Merge pull request #175658 from lovesegfault/fix-beets-external-plugins

beets: fix external plugins in pluginOverrides
This commit is contained in:
Bernardo Meurer 2022-06-01 13:25:12 -07:00 committed by GitHub
commit 42d65c41d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View file

@ -27,13 +27,13 @@
let
inherit (lib) attrNames attrValues concatMap;
builtinPlugins = import ./builtin-plugins.nix inputs;
mkPlugin = { enable ? !disableAllPlugins, propagatedBuildInputs ? [ ], testPaths ? [ ], wrapperBins ? [ ] }: {
inherit enable propagatedBuildInputs testPaths wrapperBins;
mkPlugin = { enable ? !disableAllPlugins, builtin ? false, propagatedBuildInputs ? [ ], testPaths ? [ ], wrapperBins ? [ ] }: {
inherit enable builtin propagatedBuildInputs testPaths wrapperBins;
};
allPlugins = lib.mapAttrs (_: mkPlugin) (lib.recursiveUpdate builtinPlugins pluginOverrides);
basePlugins = lib.mapAttrs (_: a: { builtin = true; } // a) (import ./builtin-plugins.nix inputs);
allPlugins = lib.mapAttrs (_: mkPlugin) (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;
@ -117,7 +117,7 @@ python3Packages.buildPythonApplication rec {
\( -name '*.py' -o -path 'beetsplug/*/__init__.py' \) -print \
| sed -n -re 's|^beetsplug/([^/.]+).*|\1|p' \
| sort -u > plugins_available
${diffPlugins (attrNames allPlugins) "plugins_available"}
${diffPlugins (attrNames builtinPlugins) "plugins_available"}
export BEETS_TEST_SHELL="${bashInteractive}/bin/bash --norc"
export HOME="$(mktemp -d)"

View file

@ -40,7 +40,7 @@ lib.makeExtensible (self: {
};
pluginOverrides = {
# unstable has a new plugin, so we register it here.
limit = { };
limit = { builtin = true; };
};
};