beets: warn about deprecated plugins

Co-authored-by: aszlig <aszlig@nix.build>
This commit is contained in:
Doron Behar 2024-06-03 20:21:14 +03:00
parent 340d46ceac
commit db10d610dd

View File

@ -55,7 +55,15 @@ let
};
basePlugins = lib.mapAttrs (_: a: { builtin = true; } // a) (import ./builtin-plugins.nix inputs);
allPlugins = lib.mapAttrs (n: a: mkPlugin { name = n; } // a) (lib.recursiveUpdate basePlugins pluginOverrides);
pluginOverrides' = lib.mapAttrs
(plugName: lib.throwIf
(basePlugins.${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
;
allPlugins = lib.mapAttrs ( n: a: mkPlugin { name = n; } // a) (lib.recursiveUpdate basePlugins pluginOverrides');
builtinPlugins = lib.filterAttrs (_: p: p.builtin) allPlugins;
enabledPlugins = lib.filterAttrs (_: p: p.enable) allPlugins;
disabledPlugins = lib.filterAttrs (_: p: !p.enable) allPlugins;