From a14cf0618219a6f135e786e69e78eb0b866248f8 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 6 Jul 2017 19:29:48 -0400 Subject: [PATCH 1/6] stdenv: Harden hook runners Instead of eval, use a "nameref" to get the name of the array and iterate with that. Also, make the for-loop parameter a local variable, too. --- pkgs/stdenv/generic/setup.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index eb63b18e5f3..191abf7596b 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -17,8 +17,9 @@ runHook() { shift local var="$hookName" if [[ "$hookName" =~ Hook$ ]]; then var+=s; else var+=Hooks; fi - eval "local -a dummy=(\"\${$var[@]}\")" - for hook in "_callImplicitHook 0 $hookName" "${dummy[@]}"; do + local -n var + local hook + for hook in "_callImplicitHook 0 $hookName" "${var[@]}"; do _eval "$hook" "$@" done return 0 @@ -32,8 +33,9 @@ runOneHook() { shift local var="$hookName" if [[ "$hookName" =~ Hook$ ]]; then var+=s; else var+=Hooks; fi - eval "local -a dummy=(\"\${$var[@]}\")" - for hook in "_callImplicitHook 1 $hookName" "${dummy[@]}"; do + local -n var + local hook + for hook in "_callImplicitHook 1 $hookName" "${var[@]}"; do if _eval "$hook" "$@"; then return 0 fi From e57a220f810a9698c5df27a7488839ebea3226e2 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 29 Jun 2017 20:28:27 -0400 Subject: [PATCH 2/6] stdenv, swift: Use `local fd` in is* bash functions for hygiene --- .../development/compilers/swift/patches/build-script-pax.patch | 3 ++- pkgs/stdenv/generic/setup.sh | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/swift/patches/build-script-pax.patch b/pkgs/development/compilers/swift/patches/build-script-pax.patch index 9f1976a2d88..fa2ccdf9d5c 100644 --- a/pkgs/development/compilers/swift/patches/build-script-pax.patch +++ b/pkgs/development/compilers/swift/patches/build-script-pax.patch @@ -1,12 +1,13 @@ --- swift/utils/build-script-impl 2017-01-23 12:47:20.401326309 -0600 +++ swift-pax/utils/build-script-impl 2017-01-23 13:24:10.339366996 -0600 -@@ -1823,6 +1823,16 @@ function set_lldb_xcodebuild_options() { +@@ -1823,6 +1823,17 @@ function set_lldb_xcodebuild_options() { fi } +## XXX: Taken from nixpkgs /pkgs/stdenv/generic/setup.sh +isELF() { + local fn="$1" ++ local fd + local magic + exec {fd}< "$fn" + read -n 4 -u $fd magic diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 191abf7596b..e5d2ba8682d 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -194,6 +194,7 @@ _addRpathPrefix() { # Return success if the specified file is an ELF object. isELF() { local fn="$1" + local fd local magic exec {fd}< "$fn" read -n 4 -u $fd magic @@ -205,6 +206,7 @@ isELF() { # "#!"). isScript() { local fn="$1" + local fd local magic if ! [ -x /bin/sh ]; then return 0; fi exec {fd}< "$fn" From 21ef8d5c89281a71750cdf51ef7c8d69c52b63ed Mon Sep 17 00:00:00 2001 From: montag451 Date: Thu, 6 Jul 2017 15:14:01 +0200 Subject: [PATCH 3/6] network-manager: fix hard-coded path for modprobe --- pkgs/tools/networking/network-manager/default.nix | 4 +++- pkgs/tools/networking/network-manager/modprobe.patch | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 pkgs/tools/networking/network-manager/modprobe.patch diff --git a/pkgs/tools/networking/network-manager/default.nix b/pkgs/tools/networking/network-manager/default.nix index 3ef4188052b..d2a51b3acc8 100644 --- a/pkgs/tools/networking/network-manager/default.nix +++ b/pkgs/tools/networking/network-manager/default.nix @@ -32,7 +32,6 @@ stdenv.mkDerivation rec { --replace /usr/bin/ping6 ${inetutils}/bin/ping substituteInPlace src/devices/nm-arping-manager.c \ --replace '("arping", NULL, NULL);' '("arping", "${iputils}/bin/arping", NULL);' - substituteInPlace src/NetworkManagerUtils.c --replace /sbin/modprobe ${kmod}/bin/modprobe substituteInPlace data/84-nm-drivers.rules \ --replace /bin/sh ${stdenv.shell} substituteInPlace data/85-nm-unmanaged.rules \ @@ -43,6 +42,8 @@ stdenv.mkDerivation rec { --replace /bin/kill ${coreutils}/bin/kill substituteInPlace clients/common/nm-vpn-helpers.c \ --subst-var-by openconnect ${openconnect} + substituteInPlace src/nm-core-utils.c \ + --subst-var-by modprobeBinPath ${kmod}/bin/modprobe # to enable link-local connections configureFlags="$configureFlags --with-udev-dir=$out/lib/udev" ''; @@ -79,6 +80,7 @@ stdenv.mkDerivation rec { url = "https://github.com/NetworkManager/NetworkManager/commit/4e8eddd100bbc8429806a70620c90b72cfd29cb1.patch"; }) ./openconnect_helper_path.patch + ./modprobe.patch ]; buildInputs = [ systemd libgudev libnl libuuid polkit ppp libndp diff --git a/pkgs/tools/networking/network-manager/modprobe.patch b/pkgs/tools/networking/network-manager/modprobe.patch new file mode 100644 index 00000000000..487c70b0165 --- /dev/null +++ b/pkgs/tools/networking/network-manager/modprobe.patch @@ -0,0 +1,11 @@ +--- a/src/nm-core-utils.c 2017-02-15 13:10:27.000000000 +0100 ++++ b/src/nm-core-utils.c 2017-07-06 14:28:41.575815695 +0200 +@@ -419,7 +419,7 @@ + + /* construct the argument list */ + argv = g_ptr_array_sized_new (4); +- g_ptr_array_add (argv, "/sbin/modprobe"); ++ g_ptr_array_add (argv, "@modprobeBinPath@"); + g_ptr_array_add (argv, (char *) arg1); + + va_start (ap, arg1); From 2f198956c7b214d79715f13b57eb1b9069ebb523 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 29 Jun 2017 01:17:52 -0400 Subject: [PATCH 4/6] stdenv: Make separate-debug-info.sh a `nativeBuildInput` --- pkgs/stdenv/generic/make-derivation.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 31b0428eeb2..e2f072d8149 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -49,12 +49,10 @@ rec { dependencies' = let justMap = map lib.chooseDevOutputs dependencies; - nativeBuildInputs = lib.elemAt justMap 0 + nativeBuildInputs = lib.head justMap + ++ lib.optional separateDebugInfo ../../build-support/setup-hooks/separate-debug-info.sh ++ lib.optional stdenv.hostPlatform.isWindows ../../build-support/setup-hooks/win-dll-link.sh; - buildInputs = lib.elemAt justMap 1 - # TODO(@Ericson2314): Should instead also be appended to `nativeBuildInputs`. - ++ lib.optional separateDebugInfo ../../build-support/setup-hooks/separate-debug-info.sh; - in [ nativeBuildInputs buildInputs ]; + in [ nativeBuildInputs ] ++ lib.tail justMap; propagatedDependencies' = map lib.chooseDevOutputs propagatedDependencies; From 5896d84dbbcff1b1e589e274e3addb6a0f1d2e4d Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 29 Jun 2017 01:19:20 -0400 Subject: [PATCH 5/6] stdenv: Stop reversing the list of sandbox stuff We're breaking hashes anyways --- pkgs/stdenv/generic/make-derivation.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index e2f072d8149..05221e2f3c1 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -62,15 +62,14 @@ rec { "__impureHostDeps" "__propagatedImpureHostDeps" "sandboxProfile" "propagatedSandboxProfile"]) // (let - # TODO(@Ericson2314): Reversing of dep lists is just temporary to avoid Darwin mass rebuild. computedSandboxProfile = - lib.concatMap (input: input.__propagatedSandboxProfile or []) (stdenv.extraBuildInputs ++ lib.concatLists (lib.reverseList dependencies')); + lib.concatMap (input: input.__propagatedSandboxProfile or []) (stdenv.extraBuildInputs ++ lib.concatLists dependencies'); computedPropagatedSandboxProfile = - lib.concatMap (input: input.__propagatedSandboxProfile or []) (lib.concatLists (lib.reverseList propagatedDependencies')); + lib.concatMap (input: input.__propagatedSandboxProfile or []) (lib.concatLists propagatedDependencies'); computedImpureHostDeps = - lib.unique (lib.concatMap (input: input.__propagatedImpureHostDeps or []) (stdenv.extraBuildInputs ++ lib.concatLists (lib.reverseList dependencies'))); + lib.unique (lib.concatMap (input: input.__propagatedImpureHostDeps or []) (stdenv.extraBuildInputs ++ lib.concatLists dependencies')); computedPropagatedImpureHostDeps = - lib.unique (lib.concatMap (input: input.__propagatedImpureHostDeps or []) (lib.concatLists (lib.reverseList propagatedDependencies'))); + lib.unique (lib.concatMap (input: input.__propagatedImpureHostDeps or []) (lib.concatLists propagatedDependencies')); in { builder = attrs.realBuilder or stdenv.shell; From 3cb745d5a69018829ac15f7d5a508135f6bda123 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 10 Jul 2017 11:59:14 -0400 Subject: [PATCH 6/6] stdenv: Store one package per line in nix-support/propagated-* This makes those files a bit easier to read. Also, for what it's worth, it brings us one baby step closer to handling spaces in store paths. Also, I optimized handling of many transitive deps with read. Probably, not very beneficial, but nice to enforce the pkg-per-line structure. Doing so let me find much dubious code and fix it. Two misc notes: - `propagated-user-env-packages` also needed to be adjusted as sometimes it is copied to/from the propagated input files. - `local fd` should ensure that file descriptors aren't clobbered during recursion. --- pkgs/build-support/cc-wrapper/default.nix | 4 ++-- pkgs/build-support/gcc-wrapper-old/builder.sh | 2 +- .../setup-hooks/multiple-outputs.sh | 2 +- pkgs/build-support/trivial-builders.nix | 2 +- .../desktops/kde-4.14/kde-package/default.nix | 2 +- .../compilers/openjdk-darwin/8.nix | 2 +- .../compilers/openjdk-darwin/default.nix | 2 +- pkgs/development/compilers/openjdk/7.nix | 2 +- pkgs/development/compilers/openjdk/8.nix | 2 +- .../compilers/oraclejdk/jdk-linux-base.nix | 2 +- pkgs/development/compilers/zulu/default.nix | 2 +- .../haskell-modules/generic-builder.nix | 2 +- pkgs/misc/misc.nix | 2 +- pkgs/stdenv/generic/builder.sh | 5 +++-- pkgs/stdenv/generic/setup.sh | 20 +++++++++++++------ 15 files changed, 31 insertions(+), 22 deletions(-) diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 676fbd00688..37d62891ecf 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -275,9 +275,9 @@ stdenv.mkDerivation { # Propagate the wrapped cc so that if you install the wrapper, # you get tools like gcov, the manpages, etc. as well (including # for binutils and Glibc). - echo ${cc} ${cc.man or ""} ${binutils_bin} ${if libc == null then "" else libc_bin} > $out/nix-support/propagated-user-env-packages + printLines ${cc} ${cc.man or ""} ${binutils_bin} ${if libc == null then "" else libc_bin} > $out/nix-support/propagated-user-env-packages - echo ${toString extraPackages} > $out/nix-support/propagated-native-build-inputs + printLines ${toString extraPackages} > $out/nix-support/propagated-native-build-inputs '' + optionalString (targetPlatform.isSunOS && nativePrefix != "") '' diff --git a/pkgs/build-support/gcc-wrapper-old/builder.sh b/pkgs/build-support/gcc-wrapper-old/builder.sh index a8e8a370ec0..4f141f6b8f2 100644 --- a/pkgs/build-support/gcc-wrapper-old/builder.sh +++ b/pkgs/build-support/gcc-wrapper-old/builder.sh @@ -211,5 +211,5 @@ cp -p $utils $out/nix-support/utils.sh # tools like gcov, the manpages, etc. as well (including for binutils # and Glibc). if test -z "$nativeTools"; then - echo $gcc $binutils $libc $libc_bin > $out/nix-support/propagated-user-env-packages + printLines $gcc $binutils $libc $libc_bin > $out/nix-support/propagated-user-env-packages fi diff --git a/pkgs/build-support/setup-hooks/multiple-outputs.sh b/pkgs/build-support/setup-hooks/multiple-outputs.sh index 62a6491b8dc..9abf50f6ea4 100644 --- a/pkgs/build-support/setup-hooks/multiple-outputs.sh +++ b/pkgs/build-support/setup-hooks/multiple-outputs.sh @@ -202,7 +202,7 @@ _multioutPropagateDev() { mkdir -p "${!propagaterOutput}"/nix-support for output in $propagatedBuildOutputs; do - echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/$propagatedBuildInputsFile + echo "${!output}" >> "${!propagaterOutput}"/nix-support/$propagatedBuildInputsFile done } diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index 4debd963639..1ee1fe8298f 100644 --- a/pkgs/build-support/trivial-builders.nix +++ b/pkgs/build-support/trivial-builders.nix @@ -84,7 +84,7 @@ rec { mkdir -p $out/nix-support cp ${script} $out/nix-support/setup-hook '' + lib.optionalString (deps != []) '' - echo ${toString deps} > $out/nix-support/propagated-native-build-inputs + printLines ${toString deps} > $out/nix-support/propagated-native-build-inputs '' + lib.optionalString (substitutions != {}) '' substituteAll ${script} $out/nix-support/setup-hook ''); diff --git a/pkgs/desktops/kde-4.14/kde-package/default.nix b/pkgs/desktops/kde-4.14/kde-package/default.nix index d5de6f5f6bc..3637d9f89cb 100644 --- a/pkgs/desktops/kde-4.14/kde-package/default.nix +++ b/pkgs/desktops/kde-4.14/kde-package/default.nix @@ -86,7 +86,7 @@ rec { };}) '' mkdir -pv $out/nix-support - echo "${toString list}" | tee $out/nix-support/propagated-user-env-packages + printLines ${toString list} | tee $out/nix-support/propagated-user-env-packages ''; # Given manifest module data, return the module diff --git a/pkgs/development/compilers/openjdk-darwin/8.nix b/pkgs/development/compilers/openjdk-darwin/8.nix index 51effd2c784..691829c7788 100644 --- a/pkgs/development/compilers/openjdk-darwin/8.nix +++ b/pkgs/development/compilers/openjdk-darwin/8.nix @@ -33,7 +33,7 @@ let # any package that depends on the JRE has $CLASSPATH set up # properly. mkdir -p $out/nix-support - echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs + printLines ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs install_name_tool -change /usr/X11/lib/libfreetype.6.dylib ${freetype}/lib/libfreetype.6.dylib $out/jre/lib/libfontmanager.dylib diff --git a/pkgs/development/compilers/openjdk-darwin/default.nix b/pkgs/development/compilers/openjdk-darwin/default.nix index 10a9eb2b366..8ce0835fcb6 100644 --- a/pkgs/development/compilers/openjdk-darwin/default.nix +++ b/pkgs/development/compilers/openjdk-darwin/default.nix @@ -23,7 +23,7 @@ let # any package that depends on the JRE has $CLASSPATH set up # properly. mkdir -p $out/nix-support - echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs + printLines ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs install_name_tool -change /usr/X11/lib/libfreetype.6.dylib ${freetype}/lib/libfreetype.6.dylib $out/jre/lib/libfontmanager.dylib diff --git a/pkgs/development/compilers/openjdk/7.nix b/pkgs/development/compilers/openjdk/7.nix index 6dcbb0a330f..9ef7d26b2ef 100644 --- a/pkgs/development/compilers/openjdk/7.nix +++ b/pkgs/development/compilers/openjdk/7.nix @@ -190,7 +190,7 @@ let # any package that depends on the JRE has $CLASSPATH set up # properly. mkdir -p $jre/nix-support - echo -n "${setJavaClassPath}" > $jre/nix-support/propagated-native-build-inputs + printLines ${setJavaClassPath} > $jre/nix-support/propagated-native-build-inputs # Set JAVA_HOME automatically. mkdir -p $out/nix-support diff --git a/pkgs/development/compilers/openjdk/8.nix b/pkgs/development/compilers/openjdk/8.nix index 7ddf2c7ef5d..da1332127eb 100644 --- a/pkgs/development/compilers/openjdk/8.nix +++ b/pkgs/development/compilers/openjdk/8.nix @@ -202,7 +202,7 @@ let # any package that depends on the JRE has $CLASSPATH set up # properly. mkdir -p $jre/nix-support - echo -n "${setJavaClassPath}" > $jre/nix-support/propagated-native-build-inputs + printLines ${setJavaClassPath} > $jre/nix-support/propagated-native-build-inputs # Set JAVA_HOME automatically. mkdir -p $out/nix-support diff --git a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix index 8fe775de146..196544a6476 100644 --- a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix +++ b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix @@ -157,7 +157,7 @@ let result = stdenv.mkDerivation rec { ln -s $jrePath/lib/${architecture}/libnpjp2.so $jrePath/lib/${architecture}/plugins mkdir -p $out/nix-support - echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs + printLines ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs # Set JAVA_HOME automatically. cat <> $out/nix-support/setup-hook diff --git a/pkgs/development/compilers/zulu/default.nix b/pkgs/development/compilers/zulu/default.nix index 7621aa82bc7..021e94761f8 100644 --- a/pkgs/development/compilers/zulu/default.nix +++ b/pkgs/development/compilers/zulu/default.nix @@ -43,7 +43,7 @@ in stdenv.mkDerivation rec { find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \; mkdir -p $out/nix-support - echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs + printLines ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs # Set JAVA_HOME automatically. cat <> $out/nix-support/setup-hook diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index 97a3adaf220..e097fd5af33 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -311,7 +311,7 @@ stdenv.mkDerivation ({ ${optionalString isGhcjs '' for exeDir in "$out/bin/"*.jsexe; do exe="''${exeDir%.jsexe}" - printf '%s\n' '#!${nodejs}/bin/node' > "$exe" + printLines '#!${nodejs}/bin/node' > "$exe" cat "$exeDir/all.js" >> "$exe" chmod +x "$exe" done diff --git a/pkgs/misc/misc.nix b/pkgs/misc/misc.nix index 6357c4e6f90..6e8c6f4486f 100644 --- a/pkgs/misc/misc.nix +++ b/pkgs/misc/misc.nix @@ -23,7 +23,7 @@ in */ collection = {list, name} : runCommand "collection-${name}" {} '' mkdir -p $out/nix-support - echo ${builtins.toString list} > $out/nix-support/propagated-user-env-packages + printLines ${builtins.toString list} > $out/nix-support/propagated-user-env-packages ''; /* creates a derivation symlinking references C/C++ libs into one include and lib directory called $out/cdt-envs/${name} diff --git a/pkgs/stdenv/generic/builder.sh b/pkgs/stdenv/generic/builder.sh index a46c46c2db5..f8c0fd44ac7 100644 --- a/pkgs/stdenv/generic/builder.sh +++ b/pkgs/stdenv/generic/builder.sh @@ -1,4 +1,3 @@ -export PATH= for i in $initialPath; do if [ "$i" = / ]; then i=; fi PATH=$PATH${PATH:+:}$i/bin @@ -15,4 +14,6 @@ cat "$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 +if [ "$propagatedUserEnvPkgs" ]; then + printf '%s\n' $propagatedUserEnvPkgs > $out/nix-support/propagated-user-env-packages +fi diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index e5d2ba8682d..de94565ed6d 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -215,6 +215,11 @@ isScript() { if [[ "$magic" =~ \#! ]]; then return 0; else return 1; fi } +# printf unfortunately will print a trailing newline regardless +printLines() { + [[ $# -gt 0 ]] || return 0 + printf '%s\n' "$@" +} ###################################################################### # Initialisation. @@ -300,9 +305,12 @@ findInputs() { fi if [ -f "$pkg/nix-support/$propagatedBuildInputsFile" ]; then - for i in $(cat "$pkg/nix-support/$propagatedBuildInputsFile"); do - findInputs "$i" $var $propagatedBuildInputsFile + local fd pkgNext + exec {fd}<"$pkg/nix-support/$propagatedBuildInputsFile" + while IFS= read -r -u $fd pkgNext; do + findInputs "$pkgNext" $var $propagatedBuildInputsFile done + exec {fd}<&- fi } @@ -794,17 +802,17 @@ fixupPhase() { fi if [ -n "$propagated" ]; then mkdir -p "${!outputDev}/nix-support" - echo "$propagated" > "${!outputDev}/nix-support/propagated-native-build-inputs" + printLines $propagated > "${!outputDev}/nix-support/propagated-native-build-inputs" fi else if [ -n "$propagatedBuildInputs" ]; then mkdir -p "${!outputDev}/nix-support" - echo "$propagatedBuildInputs" > "${!outputDev}/nix-support/propagated-build-inputs" + printLines $propagatedBuildInputs > "${!outputDev}/nix-support/propagated-build-inputs" fi if [ -n "$propagatedNativeBuildInputs" ]; then mkdir -p "${!outputDev}/nix-support" - echo "$propagatedNativeBuildInputs" > "${!outputDev}/nix-support/propagated-native-build-inputs" + printLines $propagatedNativeBuildInputs > "${!outputDev}/nix-support/propagated-native-build-inputs" fi fi @@ -817,7 +825,7 @@ fixupPhase() { if [ -n "$propagatedUserEnvPkgs" ]; then mkdir -p "${!outputBin}/nix-support" - echo "$propagatedUserEnvPkgs" > "${!outputBin}/nix-support/propagated-user-env-packages" + printLines $propagatedUserEnvPkgs > "${!outputBin}/nix-support/propagated-user-env-packages" fi runHook postFixup