about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2021-10-15 16:30:58 +0200
committerpennae <github@quasiparticle.net>2021-10-15 16:39:10 +0200
commitdc895fb2815032adbcc49f090812fa355074d9be (patch)
tree3e95c4f67892d841c69c4036e12ae51d1ed419a7 /pkgs/build-support
parentdcfa5952754e5cc6cbbf7df40b62aabb3792bdc9 (diff)
lib: make extendDerivation lighter on eval
the fix to extendDerivation in #140051 unwittingly worsened eval performance by
quite a bit. set elements alone needed over 1GB extra after the change, which
seems disproportionate to how small it was. if we flip the logic used to
determine which outputs to install around and keep a "this one exactly" flag in
the specific outputs instead of a "all of them" in the root we can avoid most
of that cost.
Diffstat (limited to 'pkgs/build-support')
-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 c2186cf6bfa04..006fc2aff9232 100644
--- a/pkgs/build-support/buildenv/default.nix
+++ b/pkgs/build-support/buildenv/default.nix
@@ -62,7 +62,7 @@ runCommand name
         # and otherwise use `meta.outputsToInstall`. The attribute is guaranteed
         # to exist in mkDerivation-created cases. The other cases (e.g. runCommand)
         # aren't expected to have multiple outputs.
-        (if drv.outputUnspecified or false
+        (if (! drv ? outputSpecified || ! drv.outputSpecified)
             && drv.meta.outputsToInstall or null != null
           then map (outName: drv.${outName}) drv.meta.outputsToInstall
           else [ drv ])