From 7c145d032046cb1e2ebfa3e179e854391f49cc86 Mon Sep 17 00:00:00 2001 From: Eman Resu <78693624+quatquatt@users.noreply.github.com> Date: Tue, 28 Apr 2026 07:28:26 -0400 Subject: [PATCH] stdenv/check-meta: check condition before typechecking --- pkgs/stdenv/generic/check-meta.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix index 5ec1e77e1f90..d2c6c74b293e 100644 --- a/pkgs/stdenv/generic/check-meta.nix +++ b/pkgs/stdenv/generic/check-meta.nix @@ -388,10 +388,11 @@ let identifiers = attrs; }; - metaInvalid = if config.checkMeta then meta: !metaType.verify meta else meta: false; + checkMeta = config.checkMeta; + metaInvalid = meta: !metaType.verify meta; checkOutputsToInstall = - if config.checkMeta then + if checkMeta then attrs: let actualOutputs = attrs.outputs or [ "out" ]; @@ -412,7 +413,7 @@ let attrs: # Check meta attribute types first, to make sure it is always called even when there are other issues # Note that this is not a full type check and functions below still need to by careful about their inputs! - if metaInvalid (attrs.meta or { }) then + if checkMeta && metaInvalid (attrs.meta or { }) then { reason = "unknown-meta"; msg = "has an invalid meta attrset:${