python3Packages.beets: use lib.pipe for plugins.all (readability)

Also use `lib.recursiveUpdate` for future plugin attributes.
This commit is contained in:
Doron Behar
2026-07-16 17:39:03 +03:00
parent dfc90edeb1
commit eb808e50be
@@ -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 (