From b628b12b3efdeb3b523368f54dafb56ee3538e81 Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Wed, 21 May 2025 16:45:19 +0200 Subject: [PATCH] Fix(introspection): 'lazyAttrsOf' needs to get the same handling as 'attrsOf' --- lib/introspection/default.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/introspection/default.nix b/lib/introspection/default.nix index e0ade12b4..ef5c49b68 100644 --- a/lib/introspection/default.nix +++ b/lib/introspection/default.nix @@ -58,12 +58,15 @@ let getPrios { options = submoduleEval.options; } else # Nested attrsOf - (lib.optionalAttrs (type.nestedTypes.elemType.name == "attrsOf") ( - prioPerValue { - type = type.nestedTypes.elemType; - defs = zipDefs defs.${attrName}; - } prioSet.value - )) + (lib.optionalAttrs + (type.nestedTypes.elemType.name == "attrsOf" || type.nestedTypes.elemType.name == "lazyAttrsOf") + ( + prioPerValue { + type = type.nestedTypes.elemType; + defs = zipDefs defs.${attrName}; + } prioSet.value + ) + ) ) ); @@ -79,7 +82,7 @@ let in if opt ? type && opt.type.name == "submodule" then (prio) // submodulePrios - else if opt ? type && opt.type.name == "attrsOf" then + else if opt ? type && (opt.type.name == "attrsOf" || opt.type.name == "lazyAttrsOf") then prio // (prioPerValue { type = opt.type;