From b9daf908d9a0b38ff35fdebe2c29f0b7199450ec Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 7 Apr 2025 12:31:45 +0200 Subject: [PATCH 01/25] maubot/plugins: builtins.any -> builtins.elem --- pkgs/tools/networking/maubot/plugins/generated.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/networking/maubot/plugins/generated.nix b/pkgs/tools/networking/maubot/plugins/generated.nix index dbaee26f8853..9e7bf10ac8c3 100644 --- a/pkgs/tools/networking/maubot/plugins/generated.nix +++ b/pkgs/tools/networking/maubot/plugins/generated.nix @@ -69,7 +69,7 @@ lib.flip builtins.mapAttrs json ( ); in spdxLicenses.${spdx}; - broken = builtins.any (x: x == null) reqDeps; + broken = builtins.elem null reqDeps; }; } // lib.optionalAttrs (entry.isPoetry or false) { From d25929342857a2d893f407f0ae3860b35c4cb4c1 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 7 Apr 2025 12:32:36 +0200 Subject: [PATCH 02/25] ruby-modules/testing: lib.any -> lib.elem --- pkgs/development/ruby-modules/testing/stubs.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/ruby-modules/testing/stubs.nix b/pkgs/development/ruby-modules/testing/stubs.nix index b0258988888f..614dcd822f4a 100644 --- a/pkgs/development/ruby-modules/testing/stubs.nix +++ b/pkgs/development/ruby-modules/testing/stubs.nix @@ -14,7 +14,7 @@ let builtins.toJSON ( lib.filterAttrs ( n: v: - builtins.any (x: x == n) [ + builtins.elem n [ "name" "system" ] From c9a5d0c51fe05fff9754b5967292027716528da8 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 7 Apr 2025 12:33:12 +0200 Subject: [PATCH 03/25] sleek-grub-theme: lib.any -> lib.elem --- pkgs/by-name/sl/sleek-grub-theme/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/sl/sleek-grub-theme/package.nix b/pkgs/by-name/sl/sleek-grub-theme/package.nix index 186993f6fbd2..e7ae9353fbb4 100644 --- a/pkgs/by-name/sl/sleek-grub-theme/package.nix +++ b/pkgs/by-name/sl/sleek-grub-theme/package.nix @@ -6,7 +6,7 @@ withStyle ? "light", # use override to specify one of "dark" / "orange" / "bigSur" }: -assert builtins.any (s: withStyle == s) [ +assert builtins.elem withStyle [ "light" "dark" "orange" From b0196cc429d3efe4c2248523a0cd520ed69aa719 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 7 Apr 2025 12:34:21 +0200 Subject: [PATCH 04/25] otb: builtins.any -> builtins.elem --- pkgs/by-name/ot/otb/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/ot/otb/package.nix b/pkgs/by-name/ot/otb/package.nix index 4de37605c62c..5febf925ebfc 100644 --- a/pkgs/by-name/ot/otb/package.nix +++ b/pkgs/by-name/ot/otb/package.nix @@ -59,7 +59,7 @@ let # https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2454#note_112821 "fftw" ]; - itkIsInDepsToRemove = dep: builtins.any (d: d == dep.name) itkDepsToRemove; + itkIsInDepsToRemove = dep: builtins.elem dep.name itkDepsToRemove; # remove after https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2451 otbSwig = swig.overrideAttrs (oldArgs: { From 1da7dfe371b4aa51539e42664c3c608eb596ee77 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 7 Apr 2025 12:35:44 +0200 Subject: [PATCH 05/25] inspircd: lib.any -> lib.elem --- pkgs/by-name/in/inspircd/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/in/inspircd/package.nix b/pkgs/by-name/in/inspircd/package.nix index 6245b34a2a7d..1980e8707107 100644 --- a/pkgs/by-name/in/inspircd/package.nix +++ b/pkgs/by-name/in/inspircd/package.nix @@ -24,7 +24,7 @@ let # libcs in nixpkgs (musl and glibc). compatible = lib: drv: - lib.any (lic: lic == (drv.meta.license or { })) [ + lib.elem (drv.meta.license or { }) [ lib.licenses.mit # musl lib.licenses.lgpl2Plus # glibc ]; From ff17d6952f83d33bade139c9644f894edfeec93f Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 7 Apr 2025 12:36:41 +0200 Subject: [PATCH 06/25] pypy: lib.any -> lib.elem --- pkgs/development/interpreters/python/pypy/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/pypy/default.nix b/pkgs/development/interpreters/python/pypy/default.nix index c030a464e133..7c8ef2fbfb80 100644 --- a/pkgs/development/interpreters/python/pypy/default.nix +++ b/pkgs/development/interpreters/python/pypy/default.nix @@ -116,7 +116,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals - (lib.any (l: l == optimizationLevel) [ + (lib.elem optimizationLevel [ "0" "1" "2" From ae61c38e7b662d51bca294f03a30f764da284d39 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 7 Apr 2025 12:43:41 +0200 Subject: [PATCH 07/25] jupyter: lib.any -> lib.elem --- pkgs/applications/editors/jupyter/kernel.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/editors/jupyter/kernel.nix b/pkgs/applications/editors/jupyter/kernel.nix index 4496b943997b..2a72d84c47f7 100644 --- a/pkgs/applications/editors/jupyter/kernel.nix +++ b/pkgs/applications/editors/jupyter/kernel.nix @@ -62,7 +62,7 @@ in "logo64" "extraPaths" ]; - kernel = lib.filterAttrs (n: v: (lib.any (x: x == n) allowedKernelKeys)) unfilteredKernel; + kernel = lib.filterAttrs (n: v: (lib.elem n allowedKernelKeys)) unfilteredKernel; config = builtins.toJSON ( kernel // { From bab26e47e6031c67092a4ffdb7b873d80d9142f8 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 7 Apr 2025 12:44:46 +0200 Subject: [PATCH 08/25] zynaddsubfx: lib.any -> lib.elem --- pkgs/applications/audio/zynaddsubfx/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/audio/zynaddsubfx/default.nix b/pkgs/applications/audio/zynaddsubfx/default.nix index da5abd1baccb..9cde53585717 100644 --- a/pkgs/applications/audio/zynaddsubfx/default.nix +++ b/pkgs/applications/audio/zynaddsubfx/default.nix @@ -48,7 +48,7 @@ ctestCheckHook, }: -assert builtins.any (g: guiModule == g) [ +assert builtins.elem guiModule [ "fltk" "ntk" "zest" From 09cedbd72e28780f35078ce4be06ff9de4b931f4 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 7 Apr 2025 12:45:33 +0200 Subject: [PATCH 09/25] wordpress: lib.any -> lib.elem --- pkgs/servers/web-apps/wordpress/packages/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/web-apps/wordpress/packages/default.nix b/pkgs/servers/web-apps/wordpress/packages/default.nix index 5fafdd153413..c7630cbeb1a5 100644 --- a/pkgs/servers/web-apps/wordpress/packages/default.nix +++ b/pkgs/servers/web-apps/wordpress/packages/default.nix @@ -43,7 +43,7 @@ let license, ... }@args: - assert lib.any (x: x == type) [ + assert lib.elem type [ "plugin" "theme" "language" From aab15d28a721b4b2a112f69298da5a9240dd8ad1 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 7 Apr 2025 12:46:31 +0200 Subject: [PATCH 10/25] nixos/tests/sftpgo: lib.any -> lib.elem --- nixos/tests/sftpgo.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/tests/sftpgo.nix b/nixos/tests/sftpgo.nix index c2090c8bb180..6d18c1c5581f 100644 --- a/nixos/tests/sftpgo.nix +++ b/nixos/tests/sftpgo.nix @@ -25,7 +25,7 @@ let groupName: # users.users attrset user: - lib.any (x: x == user.name) config.users.groups.${groupName}.members; + lib.elem user.name config.users.groups.${groupName}.members; # Generates a valid SFTPGo user configuration for a given user # Will be converted to JSON and loaded on application startup. From 36baa254b473f3038640f27180ef0aeb26bf57e3 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 7 Apr 2025 12:47:42 +0200 Subject: [PATCH 11/25] nixos/i18n: lib.any -> lib.elem --- nixos/modules/config/i18n.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/config/i18n.nix b/nixos/modules/config/i18n.nix index 1e6c35a4ea31..4a022b3aaa6f 100644 --- a/nixos/modules/config/i18n.nix +++ b/nixos/modules/config/i18n.nix @@ -30,12 +30,12 @@ in glibcLocales = lib.mkOption { type = lib.types.path; default = pkgs.glibcLocales.override { - allLocales = lib.any (x: x == "all") config.i18n.supportedLocales; + allLocales = lib.elem "all" config.i18n.supportedLocales; locales = config.i18n.supportedLocales; }; defaultText = lib.literalExpression '' pkgs.glibcLocales.override { - allLocales = lib.any (x: x == "all") config.i18n.supportedLocales; + allLocales = lib.elem "all" config.i18n.supportedLocales; locales = config.i18n.supportedLocales; } ''; From 271514bd188987c00e6bdc3085857537abd14a89 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 7 Apr 2025 12:48:58 +0200 Subject: [PATCH 12/25] nixos/mpdscribble: lib.any -> lib.elem --- nixos/modules/services/audio/mpdscribble.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/audio/mpdscribble.nix b/nixos/modules/services/audio/mpdscribble.nix index 967853ffc85c..39dab7105968 100644 --- a/nixos/modules/services/audio/mpdscribble.nix +++ b/nixos/modules/services/audio/mpdscribble.nix @@ -130,7 +130,7 @@ in passwordFile = lib.mkOption { default = if localMpd then - (lib.findFirst (c: lib.any (x: x == "read") c.permissions) { + (lib.findFirst (c: lib.elem "read" c.permissions) { passwordFile = null; } mpdCfg.credentials).passwordFile else From 487d055482ce487ed143f6d6dab5f543abde7cef Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 24 Oct 2025 12:58:48 +0900 Subject: [PATCH 13/25] uwsgi: builtins.any -> lib.elem --- pkgs/by-name/uw/uwsgi/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/uw/uwsgi/package.nix b/pkgs/by-name/uw/uwsgi/package.nix index 6886ba53cae8..bab49fb7b286 100644 --- a/pkgs/by-name/uw/uwsgi/package.nix +++ b/pkgs/by-name/uw/uwsgi/package.nix @@ -145,7 +145,7 @@ stdenv.mkDerivation (finalAttrs: { # this is a hack to make the php plugin link with session.so (which on nixos is a separate package) # the hack works in coordination with ./additional-php-ldflags.patch - UWSGICONFIG_PHP_LDFLAGS = lib.optionalString (builtins.any (x: x.name == "php") needed) ( + UWSGICONFIG_PHP_LDFLAGS = lib.optionalString (lib.elem "php" needed) ( lib.concatStringsSep "," [ "-Wl" "-rpath=${php-embed.extensions.session}/lib/php/extensions/" @@ -176,7 +176,7 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; - postFixup = lib.optionalString (builtins.any (x: x.name == "php") needed) '' + postFixup = lib.optionalString (lib.elem "php" needed) '' wrapProgram $out/bin/uwsgi --set PHP_INI_SCAN_DIR ${php-embed}/lib ''; From 40136127024391e92d9b0a0eeca32b7b87a639fb Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 24 Oct 2025 13:00:21 +0900 Subject: [PATCH 14/25] distrho-ports: lib.any -> lib.elem --- pkgs/by-name/di/distrho-ports/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/di/distrho-ports/package.nix b/pkgs/by-name/di/distrho-ports/package.nix index f0271b3555ad..366b6960f415 100644 --- a/pkgs/by-name/di/distrho-ports/package.nix +++ b/pkgs/by-name/di/distrho-ports/package.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation { env.NIX_CFLAGS_COMPILE = toString [ "-fpermissive" ]; - postFixup = lib.optionalString (lib.any (x: x == "vitalium") plugins || plugins == [ ]) '' + postFixup = lib.optionalString (lib.elem "vitalium" plugins || plugins == [ ]) '' for file in \ $out/lib/lv2/vitalium.lv2/vitalium.so \ $out/lib/vst/vitalium.so \ From e9785d201744534423725c832a0be4110e9db96f Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 24 Oct 2025 13:00:57 +0900 Subject: [PATCH 15/25] libvgm: lib.lists.any -> lib.lists.elem --- pkgs/by-name/li/libvgm/package.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/by-name/li/libvgm/package.nix b/pkgs/by-name/li/libvgm/package.nix index 6c39efabcb72..d500f0d9a8e5 100644 --- a/pkgs/by-name/li/libvgm/package.nix +++ b/pkgs/by-name/li/libvgm/package.nix @@ -106,9 +106,7 @@ stdenv.mkDerivation (finalAttrs: { description = "More modular rewrite of most components from VGMPlay"; homepage = "https://github.com/ValleyBell/libvgm"; license = - if - (enableEmulation && (withAllEmulators || (lib.lists.any (core: core == "WSWAN_ALL") emulators))) - then + if (enableEmulation && (withAllEmulators || (lib.lists.elem "WSWAN_ALL" emulators))) then lib.licenses.unfree # https://github.com/ValleyBell/libvgm/issues/43 else lib.licenses.gpl2Only; From ec7699106bc26a24a0d15eb5ad73d9e0f4ff406f Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 24 Oct 2025 13:01:33 +0900 Subject: [PATCH 16/25] calibre: lib.lists.any -> lib.lists.elem --- pkgs/by-name/ca/calibre/package.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/ca/calibre/package.nix b/pkgs/by-name/ca/calibre/package.nix index 56642f9be070..b2a79c1e18ed 100644 --- a/pkgs/by-name/ca/calibre/package.nix +++ b/pkgs/by-name/ca/calibre/package.nix @@ -142,14 +142,12 @@ stdenv.mkDerivation (finalAttrs: { # the following are distributed with calibre, but we use upstream instead odfpy ] - ++ - lib.optionals (lib.lists.any (p: p == stdenv.hostPlatform.system) pyqt6-webengine.meta.platforms) - [ - # much of calibre's functionality is usable without a web - # browser, so we enable building on platforms which qtwebengine - # does not support by simply omitting qtwebengine. - pyqt6-webengine - ] + ++ lib.optionals (lib.lists.elem stdenv.hostPlatform.system pyqt6-webengine.meta.platforms) [ + # much of calibre's functionality is usable without a web + # browser, so we enable building on platforms which qtwebengine + # does not support by simply omitting qtwebengine. + pyqt6-webengine + ] ++ lib.optional unrarSupport unrardll )) piper-tts From 574cb2c5411dddf3df5b9309e04bd8a6bc78b643 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 24 Oct 2025 13:04:18 +0900 Subject: [PATCH 17/25] nixos/i18n: lib.any -> lib.elem --- nixos/modules/config/i18n.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/config/i18n.nix b/nixos/modules/config/i18n.nix index 4a022b3aaa6f..6d8a7289b238 100644 --- a/nixos/modules/config/i18n.nix +++ b/nixos/modules/config/i18n.nix @@ -149,7 +149,7 @@ in ( !( (lib.subtractLists config.i18n.supportedLocales aggregatedLocales) == [ ] - || lib.any (x: x == "all") config.i18n.supportedLocales + || lib.elem "all" config.i18n.supportedLocales ) ) '' From 428342cce1a1726ba6555d1d76885e516733dcf7 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 24 Oct 2025 13:07:48 +0900 Subject: [PATCH 18/25] nixos/ifstate: builtins.any -> builtins.elem --- nixos/modules/services/networking/ifstate.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/ifstate.nix b/nixos/modules/services/networking/ifstate.nix index ddd95d33d131..41997a039ec0 100644 --- a/nixos/modules/services/networking/ifstate.nix +++ b/nixos/modules/services/networking/ifstate.nix @@ -198,7 +198,7 @@ in { assertion = initrdCfg.package.passthru.features.withWireguard - || !(builtins.any (kind: kind == "wireguard") initrdInterfaceTypes); + || !(builtins.elem "wireguard" initrdInterfaceTypes); message = "IfState initrd package is configured without the `wireguard` feature, but wireguard interfaces are configured. Please see the `boot.initrd.network.ifstate.package` option."; } { From 9842083cd0dc66cfb60f4dc4f27ec548620b6fe2 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 24 Oct 2025 13:09:16 +0900 Subject: [PATCH 19/25] nixos/prometheus-exporters/node: lib.any -> lib.elem --- .../services/monitoring/prometheus/exporters/node.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/monitoring/prometheus/exporters/node.nix b/nixos/modules/services/monitoring/prometheus/exporters/node.nix index c543ac9a206e..2c4a82f0e044 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/node.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/node.nix @@ -13,11 +13,11 @@ let types concatStringsSep concatMapStringsSep - any + elem optionals ; - collectorIsEnabled = final: any (collector: (final == collector)) cfg.enabledCollectors; - collectorIsDisabled = final: any (collector: (final == collector)) cfg.disabledCollectors; + collectorIsEnabled = final: elem final cfg.enabledCollectors; + collectorIsDisabled = final: elem final cfg.disabledCollectors; in { port = 9100; From 2ec989b32271f25780da23c634c6c9acf18e28a9 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 24 Oct 2025 13:10:12 +0900 Subject: [PATCH 20/25] nixos/librespeed: lib.any -> lib.elem --- nixos/modules/services/web-apps/librespeed.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/web-apps/librespeed.nix b/nixos/modules/services/web-apps/librespeed.nix index 1ffc382a3d8e..2f7658339751 100644 --- a/nixos/modules/services/web-apps/librespeed.nix +++ b/nixos/modules/services/web-apps/librespeed.nix @@ -338,10 +338,10 @@ in proxy_buffering off; proxy_request_buffering off; '' - + lib.optionalString (lib.any (m: m.name == "brotli") config.services.nginx.additionalModules) '' + + lib.optionalString (lib.elem "brotli" config.services.nginx.additionalModules) '' brotli off; '' - + lib.optionalString (lib.any (m: m.name == "zstd") config.services.nginx.additionalModules) '' + + lib.optionalString (lib.elem "zstd" config.services.nginx.additionalModules) '' zstd off; ''; }; From 6992ef3a7f429899075a04226aafa4c215ec9c05 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 24 Oct 2025 13:13:34 +0900 Subject: [PATCH 21/25] nixos/kernel_config: lib.any -> lib.elem --- nixos/modules/system/boot/kernel_config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/kernel_config.nix b/nixos/modules/system/boot/kernel_config.nix index 8ca9c96006a4..2cf34e899cae 100644 --- a/nixos/modules/system/boot/kernel_config.nix +++ b/nixos/modules/system/boot/kernel_config.nix @@ -6,7 +6,7 @@ let locs: defs: if defs == [ ] then abort "This case should never happen." - else if any (x: x == false) (getValues defs) then + else if elem false (getValues defs) then false else true; From b827f37cb83f65f7199902dc6b3f9436aaf75991 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 24 Oct 2025 13:16:20 +0900 Subject: [PATCH 22/25] nixos/dolibarr: lib.any -> lib.elem --- nixos/modules/services/web-apps/dolibarr.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/web-apps/dolibarr.nix b/nixos/modules/services/web-apps/dolibarr.nix index 0a669ccad2a7..2ed5bbccd6e2 100644 --- a/nixos/modules/services/web-apps/dolibarr.nix +++ b/nixos/modules/services/web-apps/dolibarr.nix @@ -6,9 +6,9 @@ }: let inherit (lib) - any boolToString concatStringsSep + elem isBool isString mapAttrsToList @@ -46,7 +46,7 @@ let toStr = k: v: - if (any (str: k == str) secretKeys) then + if (elem k secretKeys) then v else if isString v then "'${v}'" From a0546493c1497a1b53489bdb382ff7869b8e2267 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 24 Oct 2025 13:21:12 +0900 Subject: [PATCH 23/25] nixos/tests/kubernetes: lib.any -> lib.elem --- nixos/tests/kubernetes/base.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nixos/tests/kubernetes/base.nix b/nixos/tests/kubernetes/base.nix index ff943ef17763..8a6756b8f9e5 100644 --- a/nixos/tests/kubernetes/base.nix +++ b/nixos/tests/kubernetes/base.nix @@ -18,9 +18,7 @@ let }: let masterName = head ( - filter (machineName: any (role: role == "master") machines.${machineName}.roles) ( - attrNames machines - ) + filter (machineName: lib.elem "master" machines.${machineName}.roles) (attrNames machines) ); master = machines.${masterName}; extraHosts = '' From 6c05d7bb17283232f4ff6c99fd796017e0c76ac9 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 24 Oct 2025 13:22:30 +0900 Subject: [PATCH 24/25] zfs: lib.any -> lib.elem --- pkgs/os-specific/linux/zfs/generic.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/zfs/generic.nix b/pkgs/os-specific/linux/zfs/generic.nix index 457d4cb144e6..9513e3e7a85d 100644 --- a/pkgs/os-specific/linux/zfs/generic.nix +++ b/pkgs/os-specific/linux/zfs/generic.nix @@ -57,7 +57,7 @@ let let inherit (lib) - any + elem optionalString optionals optional @@ -66,11 +66,11 @@ let smartmon = smartmontools.override { inherit enableMail; }; - buildKernel = any (n: n == configFile) [ + buildKernel = elem configFile [ "kernel" "all" ]; - buildUser = any (n: n == configFile) [ + buildUser = elem configFile [ "user" "all" ]; From 021192c0bfd963766c0a6548a8f23fdf7c3605a5 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 24 Oct 2025 13:25:14 +0900 Subject: [PATCH 25/25] make-derivation: lib.any -> builtins.elem --- pkgs/stdenv/generic/make-derivation.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index b27e59860e39..d00df6ff4139 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -426,7 +426,7 @@ let concretizeFlagImplications = flag: impliesFlags: list: - if any (x: x == flag) list then (list ++ impliesFlags) else list; + if builtins.elem flag list then (list ++ impliesFlags) else list; hardeningDisable' = unique ( pipe hardeningDisable [