diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-02-01 21:28:55 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-02-01 21:28:55 +0000 |
commit | 52122b0e4d3755139dbe9ca6b114bbca96332997 (patch) | |
tree | ecf2a2233bb4877c8a4913cb53edf069464da929 /pkgs/stdenv | |
parent | 12038d558613ccd59c3d4ca826858773b6d82099 (diff) |
* 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/stdenv')
-rw-r--r-- | pkgs/stdenv/generic/builder.sh | 6 | ||||
-rw-r--r-- | pkgs/stdenv/generic/default.nix | 10 |
2 files changed, 11 insertions, 5 deletions
diff --git a/pkgs/stdenv/generic/builder.sh b/pkgs/stdenv/generic/builder.sh index 0af3210dbc944..16e232f586c66 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 029e4b95482e2..40baec26f94f1 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; |