2004-07-02 12:05:53 +02:00
|
|
|
p1=$param1
|
|
|
|
p2=$param2
|
|
|
|
p3=$param3
|
|
|
|
p4=$param4
|
|
|
|
p5=$param5
|
2008-02-21 00:02:41 +01:00
|
|
|
_preHook="$preHook"
|
|
|
|
_postHook="$postHook"
|
|
|
|
preHook=
|
|
|
|
postHook=
|
2004-07-02 12:05:53 +02:00
|
|
|
|
2009-02-01 22:28:55 +01:00
|
|
|
export PATH=
|
|
|
|
for i in $initialPath; do
|
|
|
|
if test "$i" = /; then i=; fi
|
|
|
|
PATH=$PATH${PATH:+:}$i/bin
|
|
|
|
done
|
2004-07-02 12:05:53 +02:00
|
|
|
|
2005-02-22 15:32:56 +01:00
|
|
|
mkdir $out
|
2004-07-02 12:05:53 +02:00
|
|
|
|
2008-02-13 15:23:09 +01:00
|
|
|
# Can't use substitute() here, because replace may not have been
|
|
|
|
# built yet (in the bootstrap).
|
|
|
|
sed \
|
2008-02-21 00:02:41 +01:00
|
|
|
-e "s^@preHook@^$_preHook^g" \
|
|
|
|
-e "s^@postHook@^$_postHook^g" \
|
2008-02-13 20:41:37 +01:00
|
|
|
-e "s^@initialPath@^$initialPath^g" \
|
|
|
|
-e "s^@gcc@^$gcc^g" \
|
|
|
|
-e "s^@shell@^$shell^g" \
|
|
|
|
-e "s^@param1@^$p1^g" \
|
|
|
|
-e "s^@param2@^$p2^g" \
|
|
|
|
-e "s^@param3@^$p3^g" \
|
|
|
|
-e "s^@param4@^$p4^g" \
|
|
|
|
-e "s^@param5@^$p5^g" \
|
2008-02-13 15:23:09 +01:00
|
|
|
< "$setup" > "$out/setup"
|
2009-04-25 16:08:29 +02:00
|
|
|
|
|
|
|
# Allow the user to install stdenv using nix-env and get the packages
|
|
|
|
# in stdenv.
|
|
|
|
mkdir $out/nix-support
|
|
|
|
echo $propagatedUserEnvPkgs > $out/nix-support/propagated-user-env-packages
|