From 1d12e66bc2bd4f7074051c4138e08aea89052ef2 Mon Sep 17 00:00:00 2001 From: Eman Resu <78693624+quatquatt@users.noreply.github.com> Date: Tue, 28 Apr 2026 08:07:23 -0400 Subject: [PATCH] stdenv/check-meta: check config before checking meta outputs --- pkgs/stdenv/generic/check-meta.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix index d2c6c74b293e..d219cf47e28b 100644 --- a/pkgs/stdenv/generic/check-meta.nix +++ b/pkgs/stdenv/generic/check-meta.nix @@ -392,14 +392,11 @@ let metaInvalid = meta: !metaType.verify meta; checkOutputsToInstall = - if checkMeta then - attrs: - let - actualOutputs = attrs.outputs or [ "out" ]; - in - any (output: !elem output actualOutputs) (attrs.meta.outputsToInstall or [ ]) - else - attrs: false; + attrs: + let + actualOutputs = attrs.outputs or [ "out" ]; + in + any (output: !elem output actualOutputs) (attrs.meta.outputsToInstall or [ ]); # Check if a derivation is valid, that is whether it passes checks for # e.g brokenness or license. @@ -423,7 +420,7 @@ let } # --- Put checks that cannot be ignored here --- - else if checkOutputsToInstall attrs then + else if checkMeta && checkOutputsToInstall attrs then { reason = "broken-outputs"; msg = "has invalid meta.outputsToInstall";