summary refs log tree commit diff
path: root/pkgs/build-support/buildenv
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-03-10 19:43:17 +0100
committerProfpatsch <mail@profpatsch.de>2021-03-18 19:56:40 +0100
commitb398d00903af1eca6b4e298225e85ecd118a80dd (patch)
tree29af5237d26cf0ae5b0b96d2c04ab1bd41ef03db /pkgs/build-support/buildenv
parent9a48ca802731e542787b487ff559decbc0ea696e (diff)
downloadnixpkgs-b398d00903af1eca6b4e298225e85ecd118a80dd.tar
nixpkgs-b398d00903af1eca6b4e298225e85ecd118a80dd.tar.gz
nixpkgs-b398d00903af1eca6b4e298225e85ecd118a80dd.tar.bz2
nixpkgs-b398d00903af1eca6b4e298225e85ecd118a80dd.tar.lz
nixpkgs-b398d00903af1eca6b4e298225e85ecd118a80dd.tar.xz
nixpkgs-b398d00903af1eca6b4e298225e85ecd118a80dd.tar.zst
nixpkgs-b398d00903af1eca6b4e298225e85ecd118a80dd.zip
trivial-builders: merge passAsFile with env in runCommand'
Previously it was awkward to use the runCommand-variants with
passAsFile as a double definition of passAsFile would potentially
break runCommand: passAsFile would overwrite the previous definition,
defeating the purpose of setting it in runCommand in the first place.
This is now fixed by concatenating the [ "buildCommand" ] list with
one the one from env, if present.

Adjust buildEnv where passAsFile = null; was passed in some cases,
breaking evaluation since it'd evaluate to [ "buildCommand" ] ++ null.
Diffstat (limited to 'pkgs/build-support/buildenv')
-rw-r--r--pkgs/build-support/buildenv/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/buildenv/default.nix b/pkgs/build-support/buildenv/default.nix
index 5fafc36273a..c2186cf6bfa 100644
--- a/pkgs/build-support/buildenv/default.nix
+++ b/pkgs/build-support/buildenv/default.nix
@@ -74,7 +74,7 @@ runCommand name
     preferLocalBuild = true;
     allowSubstitutes = false;
     # XXX: The size is somewhat arbitrary
-    passAsFile = if builtins.stringLength pkgs >= 128*1024 then [ "pkgs" ] else null;
+    passAsFile = if builtins.stringLength pkgs >= 128*1024 then [ "pkgs" ] else [ ];
   }
   ''
     ${buildPackages.perl}/bin/perl -w ${builder}