stdenv/mkDerivation: only run zipAttrsWith if we have to

If attrs.outputChecks.${name} is undefined, we'd be performing an
unnecessary no-op.
This commit is contained in:
Eman Resu
2026-05-09 15:50:15 -04:00
parent ec66d5fc09
commit ce35986f7f
+8 -4
View File
@@ -784,10 +784,14 @@ let
inherit name;
value =
let
raw = zipAttrsWith (_: concatLists) [
attrsOutputChecksFiltered
(makeOutputChecks attrs.outputChecks.${name} or { })
];
raw =
if attrs ? outputChecks.${name} then
zipAttrsWith (_: concatLists) [
attrsOutputChecksFiltered
(makeOutputChecks attrs.outputChecks.${name})
]
else
attrsOutputChecksFiltered;
in
# separateDebugInfo = true will put all sorts of files in
# the debug output which could carry references, but