lib/modules.nix: Clean up mergeAttrDefinitionsWithPrio impl

This commit is contained in:
Robert Hensing 2023-06-23 18:10:49 +02:00 committed by GitHub
parent 8f31bff794
commit 895ac17634
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -920,14 +920,7 @@ let
option -> attrsOf { highestPrio, value }
*/
mergeAttrDefinitionsWithPrio = opt:
let subAttrDefs =
lib.concatMap
({ value, ... }@def:
map
(value: def // { inherit value; })
(lib.pushDownProperties value)
)
opt.definitionsWithLocations;
let
defsByAttr =
lib.zipAttrs (
lib.concatLists (
@ -935,7 +928,7 @@ let
({ value, ... }@def:
map
(lib.mapAttrsToList (k: value: { ${k} = def // { inherit value; }; }))
(lib.pushDownProperties value)
(pushDownProperties value)
)
opt.definitionsWithLocations
)