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"];
|
configureFlags = ["--enable-shared" "--enable-pthread"];
|
||||||
|
|
||||||
installFlags = stdenv.lib.optionalString docSupport "install-doc";
|
installFlags = stdenv.lib.optionalString docSupport "install-doc";
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
# Bundler tries to create this directory
|
# Bundler tries to create this directory
|
||||||
postInstall = "mkdir -pv $out/${passthru.gemPath}";
|
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 = {
|
meta = {
|
||||||
license = "Ruby";
|
license = "Ruby";
|
||||||
|
@ -48,8 +48,19 @@ stdenv.mkDerivation rec {
|
|||||||
++ ( if stdenv.isDarwin then [ "--with-out-ext=tk " ] else [ ]);
|
++ ( if stdenv.isDarwin then [ "--with-out-ext=tk " ] else [ ]);
|
||||||
|
|
||||||
installFlags = stdenv.lib.optionalString docSupport "install-doc";
|
installFlags = stdenv.lib.optionalString docSupport "install-doc";
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
# Bundler tries to create this directory
|
# Bundler tries to create this directory
|
||||||
postInstall = "mkdir -pv $out/${passthru.gemPath}";
|
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 = {
|
meta = {
|
||||||
license = "Ruby";
|
license = "Ruby";
|
||||||
|
@ -46,7 +46,18 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
installFlags = stdenv.lib.optionalString docSupport "install-doc";
|
installFlags = stdenv.lib.optionalString docSupport "install-doc";
|
||||||
# Bundler tries to create this directory
|
# 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 = {
|
meta = {
|
||||||
license = "Ruby";
|
license = "Ruby";
|
||||||
|
@ -18,12 +18,6 @@ rec {
|
|||||||
cat > $out/nix-support/setup-hook <<EOF
|
cat > $out/nix-support/setup-hook <<EOF
|
||||||
export RUBYOPT=rubygems
|
export RUBYOPT=rubygems
|
||||||
addToSearchPath RUBYLIB $out/lib
|
addToSearchPath RUBYLIB $out/lib
|
||||||
|
|
||||||
addGemPath() {
|
|
||||||
addToSearchPath GEM_PATH \$1/${ruby.gemPath}
|
|
||||||
}
|
|
||||||
|
|
||||||
envHooks+=(addGemPath)
|
|
||||||
EOF'') ["minInit" "addInputs" "doUnpack" "defEnsureDir"];
|
EOF'') ["minInit" "addInputs" "doUnpack" "defEnsureDir"];
|
||||||
|
|
||||||
/* doConfigure should be specified separately */
|
/* doConfigure should be specified separately */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user