summary refs log tree commit diff
path: root/pkgs/misc
diff options
context:
space:
mode:
authorYury G. Kudryashov <urkud.urkud@gmail.com>2012-03-01 07:04:39 +0000
committerYury G. Kudryashov <urkud.urkud@gmail.com>2012-03-01 07:04:39 +0000
commit0210e20b5ae5ee9f9652d2eedf955974cc9e5ddc (patch)
treec1c7f6ea999ae4f455500ba2599c58e41aa581ad /pkgs/misc
parentb14a737a4d86608bd61acf08cfc479bf262e9d99 (diff)
parent57b612cb050778c4ded12fe8e45de26b91eeef70 (diff)
downloadnixlib-0210e20b5ae5ee9f9652d2eedf955974cc9e5ddc.tar
nixlib-0210e20b5ae5ee9f9652d2eedf955974cc9e5ddc.tar.gz
nixlib-0210e20b5ae5ee9f9652d2eedf955974cc9e5ddc.tar.bz2
nixlib-0210e20b5ae5ee9f9652d2eedf955974cc9e5ddc.tar.lz
nixlib-0210e20b5ae5ee9f9652d2eedf955974cc9e5ddc.tar.xz
nixlib-0210e20b5ae5ee9f9652d2eedf955974cc9e5ddc.tar.zst
nixlib-0210e20b5ae5ee9f9652d2eedf955974cc9e5ddc.zip
svn merge ^/nixpkgs/trunk
svn path=/nixpkgs/branches/stdenv-updates/; revision=32713
Diffstat (limited to 'pkgs/misc')
-rw-r--r--pkgs/misc/my-env/default.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/misc/my-env/default.nix b/pkgs/misc/my-env/default.nix
index 4e63cca439b4..eb319b1c9b34 100644
--- a/pkgs/misc/my-env/default.nix
+++ b/pkgs/misc/my-env/default.nix
@@ -45,7 +45,7 @@ mkDerivation {
   # the buildNativeInputs environment variable.
   buildNativeInputs = [ ] ++ buildInputs ;
   name = "env-${name}";
-  phases = [ "buildPhase" ];
+  phases = [ "buildPhase" "fixupPhase" ];
   setupNew = substituteAll {
     src = ../../stdenv/generic/setup.sh;
     initialPath= (import ../../stdenv/common-path.nix) { inherit pkgs; };
@@ -54,7 +54,7 @@ mkDerivation {
 
   buildPhase = ''
     set -x
-    mkdir -p "$out/dev-envs" "$out/nix-support"
+    mkdir -p "$out/dev-envs" "$out/nix-support" "$out/bin"
     s="$out/nix-support/setup-new-modified"
     cp "$setupNew" "$s"
     # shut some warning up.., do not use set -e
@@ -109,6 +109,12 @@ mkDerivation {
       export PATH
       echo $name loaded
     EOF
-    exit 0
+
+    cat >> "$out/bin/load-''${name/env-/}-env" << EOF
+    #!/bin/sh
+
+    source "$out/dev-envs/''${name/env-/}"
+    EOF
+    chmod +x "$out/bin/load-''${name/env-/}-env" 
   '';
 }