stdenvs: Distinguish between extraBuildInputs and extraNativeBuildInputs

Additionally, instead of pulling them from `setup.sh`, route them via
Nix. This gets us one step closer to making stdenv be a plain attribute
set instead of a derivation.
This commit is contained in:
John Ericson
2017-08-15 18:24:54 -04:00
parent a71cf06b16
commit eeabf85780
7 changed files with 47 additions and 28 deletions
+8 -3
View File
@@ -6,15 +6,20 @@ done
mkdir $out
# Buid the setup script
echo "export SHELL=$shell" > $out/setup
echo "initialPath=\"$initialPath\"" >> $out/setup
echo "defaultNativeBuildInputs=\"$defaultNativeBuildInputs\"" >> $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
mkdir -p "$out/nix-support"
echo '# Hack to induce runtime dependencies on the default inputs' \
> "$out/nix-support/default-inputs.txt"
printf '%s\n' $defaultNativeBuildInputs $defaultBuildInputs \
>> "$out/nix-support/default-inputs.txt"
if [ "$propagatedUserEnvPkgs" ]; then
printf '%s ' $propagatedUserEnvPkgs > $out/nix-support/propagated-user-env-packages
printf '%s ' $propagatedUserEnvPkgs \
> "$out/nix-support/propagated-user-env-packages"
fi