2009-02-01 22:28:55 +01:00
|
|
|
export PATH=
|
|
|
|
for i in $initialPath; do
|
2012-01-19 16:29:20 +01:00
|
|
|
if [ "$i" = / ]; then i=; fi
|
2009-02-01 22:28:55 +01:00
|
|
|
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
|
|
|
|
2012-01-19 16:56:17 +01:00
|
|
|
echo "$preHook" > $out/setup
|
|
|
|
cat "$setup" >> $out/setup
|
|
|
|
|
2012-12-26 22:20:43 +01:00
|
|
|
if [ "$withNixImpure" == 1 ]; then
|
|
|
|
# sed wants \&\& for a &&
|
|
|
|
niximpure='test -f /niximpure/impure.sh \&\& . /niximpure/impure.sh'
|
|
|
|
fi
|
|
|
|
|
2012-01-19 17:23:14 +01:00
|
|
|
sed -e "s^@initialPath@^$initialPath^g" \
|
2008-02-13 20:41:37 +01:00
|
|
|
-e "s^@gcc@^$gcc^g" \
|
2012-01-19 17:23:14 +01:00
|
|
|
-e "s^@shell@^$shell^g" \
|
2012-12-26 22:20:43 +01:00
|
|
|
-e "s^@niximpure@^$niximpure^g" \
|
2012-01-19 17:23:14 +01:00
|
|
|
< $out/setup > $out/setup.tmp
|
|
|
|
mv $out/setup.tmp $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
|