From eb808e50bec53dc9526e2241f8e6a99b9f041bf3 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 16 Jul 2026 16:22:29 +0300 Subject: [PATCH] python3Packages.beets: use lib.pipe for plugins.all (readability) Also use `lib.recursiveUpdate` for future plugin attributes. --- .../python-modules/beets/default.nix | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/pkgs/development/python-modules/beets/default.nix b/pkgs/development/python-modules/beets/default.nix index 2543b9fdfdf3..aaa19af69e67 100644 --- a/pkgs/development/python-modules/beets/default.nix +++ b/pkgs/development/python-modules/beets/default.nix @@ -419,23 +419,20 @@ buildPythonPackage (finalAttrs: { lib.throwIf (finalAttrs.finalPackage.passthru.plugins.builtins.${plugName}.deprecated or false) "beets evaluation error: Plugin ${plugName} was enabled in pluginOverrides, but it has been removed. Remove the override to fix evaluation." ) pluginOverrides; - all = - lib.mapAttrs - ( - n: a: - { - name = n; - enable = !disableAllPlugins; - builtin = false; - propagatedBuildInputs = [ ]; - testPaths = [ "test/plugins/test_${n}.py" ]; - wrapperBins = [ ]; - } - // a - ) - ( - lib.recursiveUpdate finalAttrs.finalPackage.passthru.plugins.base finalAttrs.finalPackage.passthru.plugins.overrides - ); + all = lib.pipe finalAttrs.finalPackage.passthru.plugins.base [ + (base: lib.recursiveUpdate base finalAttrs.finalPackage.passthru.plugins.overrides) + (lib.mapAttrs ( + n: a: + lib.recursiveUpdate { + name = n; + enable = !disableAllPlugins; + builtin = false; + propagatedBuildInputs = [ ]; + testPaths = [ "test/plugins/test_${n}.py" ]; + wrapperBins = [ ]; + } a + )) + ]; enabled = lib.filterAttrs (_: p: p.enable) finalAttrs.finalPackage.passthru.plugins.all; disabled = lib.filterAttrs (_: p: !p.enable) finalAttrs.finalPackage.passthru.plugins.all; disabledTestPaths = lib.flatten (