From db45f2b770df9271fb8e2bfab2f867e8f0e4153c Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Thu, 9 Oct 2025 12:58:59 -0700 Subject: [PATCH] lib: remove mapAttrsFlatten after a year It was deprecated in b9c51260d0620ffb0ef59d09b85d1f9d7b979b8c. --- doc/release-notes/rl-2511.section.md | 2 ++ lib/default.nix | 1 - lib/deprecated/misc.nix | 7 ------- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/doc/release-notes/rl-2511.section.md b/doc/release-notes/rl-2511.section.md index 57006bd0e718..5473e5fa28b6 100644 --- a/doc/release-notes/rl-2511.section.md +++ b/doc/release-notes/rl-2511.section.md @@ -301,6 +301,8 @@ - `reaction` has been updated to version 2, which includes some breaking changes. For more information, [check the release article](https://blog.ppom.me/en-reaction-v2). +- `lib.mapAttrsFlatten` has been removed, following its deprecation in NixOS 24.11. Use `lib.attrsets.mapAttrsToList` instead. + - `lib.options.mkPackageOptionMD` has been removed, following its deprecation in NixOS 24.11. Use `lib.options.mkPackageOption` instead. - The `buildPythonPackage` and `buildPythonApplication` functions now require diff --git a/lib/default.nix b/lib/default.nix index 3e8fdd1c762d..217885990c20 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -552,7 +552,6 @@ let modifySumArgs innerClosePropagation closePropagation - mapAttrsFlatten nvs setAttr setAttrMerge diff --git a/lib/deprecated/misc.nix b/lib/deprecated/misc.nix index 0abf4e0d080c..7865f0ce760f 100644 --- a/lib/deprecated/misc.nix +++ b/lib/deprecated/misc.nix @@ -29,11 +29,8 @@ let nameValuePair tail toList - warn ; - inherit (lib.attrsets) removeAttrs mapAttrsToList; - # returns default if env var is not set maybeEnv = name: default: @@ -278,9 +275,6 @@ let closePropagation = if builtins ? genericClosure then closePropagationFast else closePropagationSlow; - # calls a function (f attr value ) for each record item. returns a list - 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) ]; # adds / replaces an attribute of an attribute set @@ -470,7 +464,6 @@ in innerClosePropagation innerModifySumArgs lazyGenericClosure - mapAttrsFlatten maybeAttr maybeAttrNullable maybeEnv