From ce35986f7fa8035359a32b2c3350f875a3ad5c15 Mon Sep 17 00:00:00 2001 From: Eman Resu <78693624+quatquatt@users.noreply.github.com> Date: Wed, 29 Apr 2026 03:44:18 -0400 Subject: [PATCH] stdenv/mkDerivation: only run zipAttrsWith if we have to If attrs.outputChecks.${name} is undefined, we'd be performing an unnecessary no-op. --- pkgs/stdenv/generic/make-derivation.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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