summary refs log tree commit diff
path: root/pkgs/stdenv/generic/builder.sh
blob: 82620f96ef5ce5ab956b67c52b374aa122d8e416 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
export PATH=
for i in $initialPath; do
    if [ "$i" = / ]; then i=; fi
    PATH=$PATH${PATH:+:}$i/bin
done

mkdir $out

sed \
    -e "s^@preHook@^$preHook^g" \
    -e "s^@postHook@^$postHook^g" \
    -e "s^@initialPath@^$initialPath^g" \
    -e "s^@gcc@^$gcc^g" \
    -e "s^@shell@^$shell^g" \
    < "$setup" > "$out/setup"

# 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