From 52122b0e4d3755139dbe9ca6b114bbca96332997 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 1 Feb 2009 21:28:55 +0000 Subject: * 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 --- pkgs/stdenv/generic/builder.sh | 6 +++++- pkgs/stdenv/generic/default.nix | 10 ++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'pkgs') 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; -- cgit 1.4.1