summary refs log blame commit diff
path: root/pkgs/stdenv/generic/builder.sh
blob: 79bf21ab473083e3f7d0821e44e2c5f809ceaa04 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
            
                         
                                

                              
 
          
 

                                                 
                                                                           
                                                               
                             

                          

                                                                     
                      
                                     
                                                                                       
  
export PATH=
for i in $initialPath; do
    if [ "$i" = / ]; then i=; fi
    PATH=$PATH${PATH:+:}$i/bin
done

mkdir $out

echo "export SHELL=$shell" > $out/setup
echo "initialPath=\"$initialPath\"" >> $out/setup
echo "defaultNativeBuildInputs=\"$defaultNativeBuildInputs\"" >> $out/setup
echo "defaultBuildInputs=\"$defaultBuildInputs\"" >> $out/setup
echo "$preHook" >> $out/setup
cat "$setup" >> $out/setup

# Allow the user to install stdenv using nix-env and get the packages
# in stdenv.
mkdir $out/nix-support
if [ "$propagatedUserEnvPkgs" ]; then
    printf '%s ' $propagatedUserEnvPkgs > $out/nix-support/propagated-user-env-packages
fi