about summary refs log tree commit diff
path: root/pkgs/stdenv/generic
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-01-19 15:56:17 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-01-19 15:56:17 +0000
commitee45e160b1fc2a8d32233bd7647e5e5fb72a486a (patch)
treefc768fb08125e1829f895732ba32a807942efba7 /pkgs/stdenv/generic
parent6208059079571059cdf462942584efa88f37b52e (diff)
downloadnixlib-ee45e160b1fc2a8d32233bd7647e5e5fb72a486a.tar
nixlib-ee45e160b1fc2a8d32233bd7647e5e5fb72a486a.tar.gz
nixlib-ee45e160b1fc2a8d32233bd7647e5e5fb72a486a.tar.bz2
nixlib-ee45e160b1fc2a8d32233bd7647e5e5fb72a486a.tar.lz
nixlib-ee45e160b1fc2a8d32233bd7647e5e5fb72a486a.tar.xz
nixlib-ee45e160b1fc2a8d32233bd7647e5e5fb72a486a.tar.zst
nixlib-ee45e160b1fc2a8d32233bd7647e5e5fb72a486a.zip
* Prepend the "prehook" rather than sourcing it.
* Don't call xargs with the -r flag in the Darwin bootstrap.

svn path=/nixpkgs/branches/stdenv-updates/; revision=31703
Diffstat (limited to 'pkgs/stdenv/generic')
-rw-r--r--pkgs/stdenv/generic/builder.sh9
-rw-r--r--pkgs/stdenv/generic/default.nix2
-rw-r--r--pkgs/stdenv/generic/setup.sh2
3 files changed, 7 insertions, 6 deletions
diff --git a/pkgs/stdenv/generic/builder.sh b/pkgs/stdenv/generic/builder.sh
index 6895d104309a..98b90144611a 100644
--- a/pkgs/stdenv/generic/builder.sh
+++ b/pkgs/stdenv/generic/builder.sh
@@ -6,12 +6,13 @@ done
 
 mkdir $out
 
-sed \
-    -e "s^@preHook@^$preHook^g" \
+echo "$preHook" > $out/setup
+cat "$setup" >> $out/setup
+
+sed -i "$out/setup" \
     -e "s^@initialPath@^$initialPath^g" \
     -e "s^@gcc@^$gcc^g" \
-    -e "s^@shell@^$shell^g" \
-    < "$setup" > "$out/setup"
+    -e "s^@shell@^$shell^g"
 
 # Allow the user to install stdenv using nix-env and get the packages
 # in stdenv.
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix
index b0cee743f8c4..91e6af01578f 100644
--- a/pkgs/stdenv/generic/default.nix
+++ b/pkgs/stdenv/generic/default.nix
@@ -1,4 +1,4 @@
-{ system, name, preHook ? null, initialPath, gcc, shell
+{ system, name, preHook ? "", initialPath, gcc, shell
 , extraAttrs ? {}, overrides ? (pkgs: {})
 
 , # The `fetchurl' to use for downloading curl and its dependencies
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh
index aa5f01a75c39..1ec05bc26134 100644
--- a/pkgs/stdenv/generic/setup.sh
+++ b/pkgs/stdenv/generic/setup.sh
@@ -103,7 +103,6 @@ fi
 # Execute the pre-hook.
 export SHELL=@shell@
 if [ -z "$shell" ]; then export shell=@shell@; fi
-if [ -n "@preHook@" ]; then source @preHook@; fi
 runHook preHook
 
 
@@ -174,6 +173,7 @@ for i in $buildNativeInputs $propagatedBuildNativeInputs; do
     findInputs $i nativePkgs propagated-build-native-inputs
 done
 
+
 # Set the relevant environment variables to point to the build inputs
 # found above.
 addToNativeEnv() {