mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 01:51:24 +00:00
beets: refactor external plugins into top-level package set
Instead of managing external plugins in the beets derivation, we introduce a new top-level package set beetsExternalPlugins which the beets derivation receives as an input. This change doesn't affect how the beets derivation is built or overridden, so the change won't be noticed by users, but it makes hydra evaluate and build external plugins which should benefit users of those plugins and prevent future regressions as we have experienced (currently on master beets-alternatives fails to evaluate, but this wasn't picked up by ofborg nor hydra).
This commit is contained in:
parent
979a6b2590
commit
bce37e7542
|
@ -3,8 +3,8 @@
|
|||
, runtimeShell
|
||||
, unstableGitUpdater
|
||||
|
||||
# Attributes needed for tests of the external plugins
|
||||
, callPackage, beets
|
||||
# external plugins package set
|
||||
, beetsExternalPlugins
|
||||
|
||||
, enableAbsubmit ? lib.elem stdenv.hostPlatform.system essentia-extractor.meta.platforms, essentia-extractor ? null
|
||||
, enableAcousticbrainz ? true
|
||||
|
@ -116,15 +116,6 @@ let
|
|||
doInstallCheck = false;
|
||||
});
|
||||
|
||||
pluginArgs = externalTestArgs // { inherit pythonPackages; };
|
||||
|
||||
plugins = {
|
||||
alternatives = callPackage ./plugins/alternatives.nix pluginArgs;
|
||||
check = callPackage ./plugins/check.nix pluginArgs;
|
||||
copyartifacts = callPackage ./plugins/copyartifacts.nix pluginArgs;
|
||||
extrafiles = callPackage ./plugins/extrafiles.nix pluginArgs;
|
||||
};
|
||||
|
||||
in pythonPackages.buildPythonApplication rec {
|
||||
pname = "beets";
|
||||
# While there is a stable version, 1.4.9, it is more than 1000 commits behind
|
||||
|
@ -169,7 +160,7 @@ in pythonPackages.buildPythonApplication rec {
|
|||
|| enableSubsonicupdate
|
||||
|| enableAcousticbrainz)
|
||||
pythonPackages.requests
|
||||
++ optional enableCheck plugins.check
|
||||
++ optional enableCheck beetsExternalPlugins.check
|
||||
++ optional enableConvert ffmpeg
|
||||
++ optional enableDiscogs pythonPackages.discogs_client
|
||||
++ optional enableGmusic pythonPackages.gmusicapi
|
||||
|
@ -179,9 +170,9 @@ in pythonPackages.buildPythonApplication rec {
|
|||
++ optional enableSonosUpdate pythonPackages.soco
|
||||
++ optional enableThumbnails pythonPackages.pyxdg
|
||||
++ optional enableWeb pythonPackages.flask
|
||||
++ optional enableAlternatives plugins.alternatives
|
||||
++ optional enableCopyArtifacts plugins.copyartifacts
|
||||
++ optional enableExtraFiles plugins.extrafiles
|
||||
++ optional enableAlternatives beetsExternalPlugins.alternatives
|
||||
++ optional enableCopyArtifacts beetsExternalPlugins.copyartifacts
|
||||
++ optional enableExtraFiles beetsExternalPlugins.extrafiles
|
||||
;
|
||||
|
||||
buildInputs = [
|
||||
|
@ -289,7 +280,8 @@ in pythonPackages.buildPythonApplication rec {
|
|||
makeWrapperArgs = [ "--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\"" "--set GST_PLUGIN_SYSTEM_PATH_1_0 \"$GST_PLUGIN_SYSTEM_PATH_1_0\"" ];
|
||||
|
||||
passthru = {
|
||||
externalPlugins = plugins;
|
||||
# FIXME: remove in favor of pkgs.beetsExternalPlugins
|
||||
externalPlugins = beetsExternalPlugins;
|
||||
updateScript = unstableGitUpdater { url = "https://github.com/beetbox/beets"; };
|
||||
};
|
||||
|
||||
|
|
|
@ -3009,6 +3009,26 @@ in
|
|||
pythonPackages = python3Packages;
|
||||
};
|
||||
|
||||
beetsExternalPlugins =
|
||||
let
|
||||
pluginArgs = {
|
||||
# This is a stripped down beets for testing of the external plugins.
|
||||
beets = (beets.override {
|
||||
enableAlternatives = false;
|
||||
enableCopyArtifacts = false;
|
||||
enableExtraFiles = false;
|
||||
}).overrideAttrs (lib.const {
|
||||
doInstallCheck = false;
|
||||
});
|
||||
pythonPackages = python3Packages;
|
||||
};
|
||||
in lib.recurseIntoAttrs {
|
||||
alternatives = callPackage ../tools/audio/beets/plugins/alternatives.nix pluginArgs;
|
||||
check = callPackage ../tools/audio/beets/plugins/check.nix pluginArgs;
|
||||
copyartifacts = callPackage ../tools/audio/beets/plugins/copyartifacts.nix pluginArgs;
|
||||
extrafiles = callPackage ../tools/audio/beets/plugins/extrafiles.nix pluginArgs;
|
||||
};
|
||||
|
||||
bento4 = callPackage ../tools/video/bento4 { };
|
||||
|
||||
bepasty = callPackage ../tools/misc/bepasty { };
|
||||
|
|
Loading…
Reference in a new issue