From df268eb420bcc356de685d8b7901b9ca42e052ad Mon Sep 17 00:00:00 2001 From: Eman Resu <78693624+quatquatt@users.noreply.github.com> Date: Tue, 28 Apr 2026 11:43:15 -0400 Subject: [PATCH] stdenv/check-meta: move negation outside loop, avoid primop if undefined --- pkgs/stdenv/generic/check-meta.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix index 67144ac147e6..e9923aa995c9 100644 --- a/pkgs/stdenv/generic/check-meta.nix +++ b/pkgs/stdenv/generic/check-meta.nix @@ -387,10 +387,13 @@ let checkOutputsToInstall = attrs: - let - actualOutputs = attrs.outputs or [ "out" ]; - in - any (output: !elem output actualOutputs) (attrs.meta.outputsToInstall or [ ]); + attrs.meta ? outputsToInstall + && ( + let + actualOutputs = attrs.outputs or [ "out" ]; + in + !all (output: elem output actualOutputs) attrs.meta.outputsToInstall + ); # Check if a derivation is valid, that is whether it passes checks for # e.g brokenness or license.