lib/modules.nix: Clean up mergeAttrDefinitionsWithPrio impl
This commit is contained in:
parent
8f31bff794
commit
895ac17634
@ -920,14 +920,7 @@ let
|
|||||||
option -> attrsOf { highestPrio, value }
|
option -> attrsOf { highestPrio, value }
|
||||||
*/
|
*/
|
||||||
mergeAttrDefinitionsWithPrio = opt:
|
mergeAttrDefinitionsWithPrio = opt:
|
||||||
let subAttrDefs =
|
let
|
||||||
lib.concatMap
|
|
||||||
({ value, ... }@def:
|
|
||||||
map
|
|
||||||
(value: def // { inherit value; })
|
|
||||||
(lib.pushDownProperties value)
|
|
||||||
)
|
|
||||||
opt.definitionsWithLocations;
|
|
||||||
defsByAttr =
|
defsByAttr =
|
||||||
lib.zipAttrs (
|
lib.zipAttrs (
|
||||||
lib.concatLists (
|
lib.concatLists (
|
||||||
@ -935,7 +928,7 @@ let
|
|||||||
({ value, ... }@def:
|
({ value, ... }@def:
|
||||||
map
|
map
|
||||||
(lib.mapAttrsToList (k: value: { ${k} = def // { inherit value; }; }))
|
(lib.mapAttrsToList (k: value: { ${k} = def // { inherit value; }; }))
|
||||||
(lib.pushDownProperties value)
|
(pushDownProperties value)
|
||||||
)
|
)
|
||||||
opt.definitionsWithLocations
|
opt.definitionsWithLocations
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user