summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2009-02-01 21:28:55 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2009-02-01 21:28:55 +0000
commit52122b0e4d3755139dbe9ca6b114bbca96332997 (patch)
treeecf2a2233bb4877c8a4913cb53edf069464da929 /pkgs
parent12038d558613ccd59c3d4ca826858773b6d82099 (diff)
downloadnixpkgs-52122b0e4d3755139dbe9ca6b114bbca96332997.tar
nixpkgs-52122b0e4d3755139dbe9ca6b114bbca96332997.tar.gz
nixpkgs-52122b0e4d3755139dbe9ca6b114bbca96332997.tar.bz2
nixpkgs-52122b0e4d3755139dbe9ca6b114bbca96332997.tar.lz
nixpkgs-52122b0e4d3755139dbe9ca6b114bbca96332997.tar.xz
nixpkgs-52122b0e4d3755139dbe9ca6b114bbca96332997.tar.zst
nixpkgs-52122b0e4d3755139dbe9ca6b114bbca96332997.zip
* Don't require a stdenv to build stdenv. This obviates the need for
  a stdenvInitial in the bootstrap.

svn path=/nixpkgs/branches/stdenv-updates/; revision=13942
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/stdenv/generic/builder.sh6
-rw-r--r--pkgs/stdenv/generic/default.nix10
2 files changed, 11 insertions, 5 deletions
diff --git a/pkgs/stdenv/generic/builder.sh b/pkgs/stdenv/generic/builder.sh
index 0af3210dbc9..16e232f586c 100644
--- a/pkgs/stdenv/generic/builder.sh
+++ b/pkgs/stdenv/generic/builder.sh
@@ -8,7 +8,11 @@ _postHook="$postHook"
 preHook=
 postHook=
 
-source $stdenv/setup
+export PATH=
+for i in $initialPath; do
+    if test "$i" = /; then i=; fi
+    PATH=$PATH${PATH:+:}$i/bin
+done
 
 mkdir $out
 
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix
index 029e4b95482..40baec26f94 100644
--- a/pkgs/stdenv/generic/default.nix
+++ b/pkgs/stdenv/generic/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, name, preHook ? null, postHook ? null, initialPath, gcc, shell
+{ system, name, preHook ? null, postHook ? null, initialPath, gcc, shell
 , param1 ? "", param2 ? "", param3 ? "", param4 ? "", param5 ? ""
 , extraAttrs ? {}
 , fetchurlBoot, forceFetchurlBoot
@@ -11,10 +11,12 @@ let {
     # The stdenv that we are producing.
     result =
 
-      stdenv.mkDerivation {
-        inherit name;
+      derivation {
+        inherit system name;
 
-        builder = ./builder.sh;
+        builder = shell;
+
+        args = ["-e" ./builder.sh];
 
         setup = setupScript;