Move GEM_PATH part of rubygems' setup hook to ruby
Fixes #1413 Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
parent
88b9e1f191
commit
44c97e02f6
@ -33,8 +33,19 @@ stdenv.mkDerivation rec {
|
||||
configureFlags = ["--enable-shared" "--enable-pthread"];
|
||||
|
||||
installFlags = stdenv.lib.optionalString docSupport "install-doc";
|
||||
# Bundler tries to create this directory
|
||||
postInstall = "mkdir -pv $out/${passthru.gemPath}";
|
||||
|
||||
postInstall = ''
|
||||
# Bundler tries to create this directory
|
||||
mkdir -pv $out/${passthru.gemPath}
|
||||
mkdir -p $out/nix-support
|
||||
cat > $out/nix-support/setup-hook <<EOF
|
||||
addGemPath() {
|
||||
addToSearchPath GEM_PATH \$1/${passthru.gemPath}
|
||||
}
|
||||
|
||||
envHooks+=(addGemPath)
|
||||
EOF
|
||||
'';
|
||||
|
||||
meta = {
|
||||
license = "Ruby";
|
||||
|
@ -48,8 +48,19 @@ stdenv.mkDerivation rec {
|
||||
++ ( if stdenv.isDarwin then [ "--with-out-ext=tk " ] else [ ]);
|
||||
|
||||
installFlags = stdenv.lib.optionalString docSupport "install-doc";
|
||||
# Bundler tries to create this directory
|
||||
postInstall = "mkdir -pv $out/${passthru.gemPath}";
|
||||
|
||||
postInstall = ''
|
||||
# Bundler tries to create this directory
|
||||
mkdir -pv $out/${passthru.gemPath}
|
||||
mkdir -p $out/nix-support
|
||||
cat > $out/nix-support/setup-hook <<EOF
|
||||
addGemPath() {
|
||||
addToSearchPath GEM_PATH \$1/${passthru.gemPath}
|
||||
}
|
||||
|
||||
envHooks+=(addGemPath)
|
||||
EOF
|
||||
'';
|
||||
|
||||
meta = {
|
||||
license = "Ruby";
|
||||
|
@ -46,7 +46,18 @@ stdenv.mkDerivation rec {
|
||||
|
||||
installFlags = stdenv.lib.optionalString docSupport "install-doc";
|
||||
# Bundler tries to create this directory
|
||||
postInstall = "mkdir -pv $out/${passthru.gemPath}";
|
||||
postInstall = ''
|
||||
# Bundler tries to create this directory
|
||||
mkdir -pv $out/${passthru.gemPath}
|
||||
mkdir -p $out/nix-support
|
||||
cat > $out/nix-support/setup-hook <<EOF
|
||||
addGemPath() {
|
||||
addToSearchPath GEM_PATH \$1/${passthru.gemPath}
|
||||
}
|
||||
|
||||
envHooks+=(addGemPath)
|
||||
EOF
|
||||
'';
|
||||
|
||||
meta = {
|
||||
license = "Ruby";
|
||||
|
@ -18,12 +18,6 @@ rec {
|
||||
cat > $out/nix-support/setup-hook <<EOF
|
||||
export RUBYOPT=rubygems
|
||||
addToSearchPath RUBYLIB $out/lib
|
||||
|
||||
addGemPath() {
|
||||
addToSearchPath GEM_PATH \$1/${ruby.gemPath}
|
||||
}
|
||||
|
||||
envHooks+=(addGemPath)
|
||||
EOF'') ["minInit" "addInputs" "doUnpack" "defEnsureDir"];
|
||||
|
||||
/* doConfigure should be specified separately */
|
||||
|
Loading…
Reference in New Issue
Block a user