diff options
author | Silvan Mosberger | 2024-07-24 13:32:34 +0200 |
---|---|---|
committer | GitHub | 2024-07-24 13:32:34 +0200 |
commit | 473e469d5a921a57b484a09d446cee6c231cd592 (patch) | |
tree | 96a29688b90940af2245121605364c7bd0002733 /lib | |
parent | 6b63e262c5f56ad68760e21d82e9c1dd99dc2898 (diff) | |
parent | b9c51260d0620ffb0ef59d09b85d1f9d7b979b8c (diff) |
Merge pull request #328381 from tie/map-attrs-flatten
Diffstat (limited to 'lib')
-rw-r--r-- | lib/deprecated/misc.nix | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/deprecated/misc.nix b/lib/deprecated/misc.nix index d556bccbec0b..34d1c01ce811 100644 --- a/lib/deprecated/misc.nix +++ b/lib/deprecated/misc.nix @@ -29,9 +29,10 @@ let nameValuePair tail toList + warn ; - inherit (lib.attrsets) removeAttrs; + inherit (lib.attrsets) removeAttrs mapAttrsToList; # returns default if env var is not set maybeEnv = name: default: @@ -212,7 +213,7 @@ let else closePropagationSlow; # calls a function (f attr value ) for each record item. returns a list - mapAttrsFlatten = f: r: map (attr: f attr r.${attr}) (attrNames r); + mapAttrsFlatten = warn "lib.misc.mapAttrsFlatten is deprecated, please use lib.attrsets.mapAttrsToList instead." mapAttrsToList; # attribute set containing one attribute nvs = name: value: listToAttrs [ (nameValuePair name value) ]; |