summary refs log tree commit diff
path: root/pkgs/stdenv/generic/builder.sh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2017-08-15 11:30:45 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-08-15 18:24:54 -0400
commiteeabf85780e7fccc0289b4015b695e28ef166ab7 (patch)
tree9eb4066d881737598ccb002783435b325fa74a35 /pkgs/stdenv/generic/builder.sh
parenta71cf06b162b98282a7688f8ac221498cfd6a7e2 (diff)
downloadnixlib-eeabf85780e7fccc0289b4015b695e28ef166ab7.tar
nixlib-eeabf85780e7fccc0289b4015b695e28ef166ab7.tar.gz
nixlib-eeabf85780e7fccc0289b4015b695e28ef166ab7.tar.bz2
nixlib-eeabf85780e7fccc0289b4015b695e28ef166ab7.tar.lz
nixlib-eeabf85780e7fccc0289b4015b695e28ef166ab7.tar.xz
nixlib-eeabf85780e7fccc0289b4015b695e28ef166ab7.tar.zst
nixlib-eeabf85780e7fccc0289b4015b695e28ef166ab7.zip
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.
Diffstat (limited to 'pkgs/stdenv/generic/builder.sh')
-rw-r--r--pkgs/stdenv/generic/builder.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/stdenv/generic/builder.sh b/pkgs/stdenv/generic/builder.sh
index 42e1a029e584..bc8f23333f78 100644
--- a/pkgs/stdenv/generic/builder.sh
+++ b/pkgs/stdenv/generic/builder.sh
@@ -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