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