refactor: replace mapAttrs' with mapAttrs

This commit is contained in:
Ryan Yin
2023-12-22 01:43:28 +08:00
parent e4abf62ec3
commit 8ac24e4f13
5 changed files with 23 additions and 28 deletions
+5 -10
View File
@@ -18,21 +18,16 @@
}
// inputs;
# mapAttrs'
# (name: value: nameValuePair ("foo_" + name) ("bar-" + value))
# { x = "a"; y = "b"; }
# => { foo_x = "bar-a"; foo_y = "bar-b"; }
allSystemSpecialArgs = with lib.attrsets;
mapAttrs'
(name: value: nameValuePair (name + "_specialArgs") (specialArgsForSystem value))
constants.systemAttrs;
allSystemSpecialArgs =
lib.attrsets.mapAttrs
(name: value: specialArgsForSystem value)
constants.allSystemAttrs;
args = lib.attrsets.mergeAttrsList [
inputs
constants
vars
allSystemSpecialArgs
{inherit self;}
{inherit self allSystemSpecialArgs;}
];
in
lib.attrsets.mergeAttrsList [