mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-16 06:29:17 +03:00
lib/modules.nix: Apply argument modules
of old old old byName
This commit is contained in:
parent
65de18210d
commit
eb410eab82
1 changed files with 6 additions and 6 deletions
|
@ -540,7 +540,7 @@ let
|
||||||
mergeModules' = prefix: options: configs:
|
mergeModules' = prefix: options: configs:
|
||||||
let
|
let
|
||||||
# an attrset 'name' => list of submodules that declare ‘name’.
|
# an attrset 'name' => list of submodules that declare ‘name’.
|
||||||
declsByName = (modules:
|
declsByName =
|
||||||
zipAttrsWith (n: concatLists)
|
zipAttrsWith (n: concatLists)
|
||||||
(map (module: let subtree = module.options; in
|
(map (module: let subtree = module.options; in
|
||||||
if !(builtins.isAttrs subtree) then
|
if !(builtins.isAttrs subtree) then
|
||||||
|
@ -555,9 +555,9 @@ let
|
||||||
[{ inherit (module) _file; options = option; }]
|
[{ inherit (module) _file; options = option; }]
|
||||||
) module)
|
) module)
|
||||||
subtree
|
subtree
|
||||||
) modules)) options;
|
) options);
|
||||||
# an attrset 'name' => list of submodules that define ‘name’.
|
# an attrset 'name' => list of submodules that define ‘name’.
|
||||||
defnsByName = (modules:
|
defnsByName =
|
||||||
zipAttrsWith (n: concatLists)
|
zipAttrsWith (n: concatLists)
|
||||||
(map (module: let subtree = module.config; in
|
(map (module: let subtree = module.config; in
|
||||||
if !(builtins.isAttrs subtree) then
|
if !(builtins.isAttrs subtree) then
|
||||||
|
@ -576,9 +576,9 @@ let
|
||||||
map (config: { inherit (module) file; inherit config; }) (pushDownProperties value)
|
map (config: { inherit (module) file; inherit config; }) (pushDownProperties value)
|
||||||
) module)
|
) module)
|
||||||
subtree
|
subtree
|
||||||
) modules)) configs;
|
) configs);
|
||||||
# extract the definitions for each loc
|
# extract the definitions for each loc
|
||||||
defnsByName' = (modules:
|
defnsByName' =
|
||||||
zipAttrsWith (n: concatLists)
|
zipAttrsWith (n: concatLists)
|
||||||
(map (module: let subtree = module.config; in
|
(map (module: let subtree = module.config; in
|
||||||
if !(builtins.isAttrs subtree) then
|
if !(builtins.isAttrs subtree) then
|
||||||
|
@ -597,7 +597,7 @@ let
|
||||||
[{ inherit (module) file; inherit value; }]
|
[{ inherit (module) file; inherit value; }]
|
||||||
) module)
|
) module)
|
||||||
subtree
|
subtree
|
||||||
) modules)) configs;
|
) configs);
|
||||||
|
|
||||||
# Convert an option tree decl to a submodule option decl
|
# Convert an option tree decl to a submodule option decl
|
||||||
optionTreeToOption = decl:
|
optionTreeToOption = decl:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue