3
0
Fork 0
forked from mirrors/nixpkgs

lib/modules.nix: Apply argument modules of old old old byName

This commit is contained in:
Robert Hensing 2023-07-11 11:48:24 +02:00
parent 65de18210d
commit eb410eab82

View file

@ -540,7 +540,7 @@ let
mergeModules' = prefix: options: configs:
let
# an attrset 'name' => list of submodules that declare name.
declsByName = (modules:
declsByName =
zipAttrsWith (n: concatLists)
(map (module: let subtree = module.options; in
if !(builtins.isAttrs subtree) then
@ -555,9 +555,9 @@ let
[{ inherit (module) _file; options = option; }]
) module)
subtree
) modules)) options;
) options);
# an attrset 'name' => list of submodules that define name.
defnsByName = (modules:
defnsByName =
zipAttrsWith (n: concatLists)
(map (module: let subtree = module.config; in
if !(builtins.isAttrs subtree) then
@ -576,9 +576,9 @@ let
map (config: { inherit (module) file; inherit config; }) (pushDownProperties value)
) module)
subtree
) modules)) configs;
) configs);
# extract the definitions for each loc
defnsByName' = (modules:
defnsByName' =
zipAttrsWith (n: concatLists)
(map (module: let subtree = module.config; in
if !(builtins.isAttrs subtree) then
@ -597,7 +597,7 @@ let
[{ inherit (module) file; inherit value; }]
) module)
subtree
) modules)) configs;
) configs);
# Convert an option tree decl to a submodule option decl
optionTreeToOption = decl: