1export PATH=
2for i in $initialPath; do
3 if [ "$i" = / ]; then i=; fi
4 PATH=$PATH${PATH:+:}$i/bin
5done
6
7mkdir $out
8
9echo "export SHELL=$shell" > $out/setup
10echo "initialPath=\"$initialPath\"" >> $out/setup
11echo "defaultNativeBuildInputs=\"$defaultNativeBuildInputs\"" >> $out/setup
12echo "defaultBuildInputs=\"$defaultBuildInputs\"" >> $out/setup
13echo "$preHook" >> $out/setup
14cat "$setup" >> $out/setup
15
16# Allow the user to install stdenv using nix-env and get the packages
17# in stdenv.
18mkdir $out/nix-support
19if [ "$propagatedUserEnvPkgs" ]; then
20 printf '%s ' $propagatedUserEnvPkgs > $out/nix-support/propagated-user-env-packages
21fi