summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Hensing <roberth@users.noreply.github.com>2023-06-23 18:10:49 +0200
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2023-06-23 17:18:15 +0000
commit896ee541a7ac8cba1a16299012b8c784700ca5bb (patch)
treefab1bd3062474c358183c8e5186b62cbe7c291f2
parentnixos/nixpkgs: Don't check when _module.args.pkgs is set (diff)
downloadnixpkgs-origin/backport-238136-to-release-23.05.tar.gz
lib/modules.nix: Clean up mergeAttrDefinitionsWithPrio implorigin/backport-238136-to-release-23.05
(cherry picked from commit 895ac176341606688b864bc84312140c065db741)
-rw-r--r--lib/modules.nix11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/modules.nix b/lib/modules.nix
index c7dcccd7a1dc..381675f611df 100644
--- a/lib/modules.nix
+++ b/lib/modules.nix
@@ -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
)