diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 7f0b8c2809ad..caa2e412af6e 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -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