From 9320dde5f30571f70f440965c843514dbabd6884 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Fri, 19 Jan 2024 13:44:25 +0200 Subject: beets: mkPlugin: change default testPaths to fit unstable beets as well --- pkgs/tools/audio/beets/common.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'pkgs/tools/audio') diff --git a/pkgs/tools/audio/beets/common.nix b/pkgs/tools/audio/beets/common.nix index d4e589f098e4..fb8b6be0ed8a 100644 --- a/pkgs/tools/audio/beets/common.nix +++ b/pkgs/tools/audio/beets/common.nix @@ -36,7 +36,21 @@ let inherit (lib) attrNames attrValues concatMap; - mkPlugin = { name, enable ? !disableAllPlugins, builtin ? false, propagatedBuildInputs ? [ ], testPaths ? [ "test/test_${name}.py" ], wrapperBins ? [ ] }: { + mkPlugin = { name + , enable ? !disableAllPlugins + , builtin ? false + , propagatedBuildInputs ? [ ] + , testPaths ? [ + # NOTE: This conditional can be removed when beets-stable is updated and + # the default plugins test path is changed + (if (lib.versions.majorMinor version) == "1.6" then + "test/test_${name}.py" + else + "test/plugins/test_${name}.py" + ) + ] + , wrapperBins ? [ ] + }: { inherit name enable builtin propagatedBuildInputs testPaths wrapperBins; }; -- cgit 1.4.1 From 6695e9d637e27d24db8c2efb53567349e8c633d2 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Fri, 19 Jan 2024 13:53:45 +0200 Subject: beets: add some builtin plugins and their non default tests paths --- pkgs/tools/audio/beets/builtin-plugins.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'pkgs/tools/audio') diff --git a/pkgs/tools/audio/beets/builtin-plugins.nix b/pkgs/tools/audio/beets/builtin-plugins.nix index e3bc10210441..52f19cd6497e 100644 --- a/pkgs/tools/audio/beets/builtin-plugins.nix +++ b/pkgs/tools/audio/beets/builtin-plugins.nix @@ -9,6 +9,7 @@ , mp3gain , mp3val , python3Packages +, version , ... }: { absubmit = { @@ -122,4 +123,16 @@ unimported.testPaths = [ ]; web.propagatedBuildInputs = [ python3Packages.flask ]; zero = { }; + # NOTE: Condition can be removed once stable beets updates +} // lib.optionalAttrs ((lib.versions.majorMinor version) != "1.6") { + limit = { }; + substitute = { + testPaths = [ ]; + }; + advancedrewrite = { + testPaths = [ ]; + }; + autobpm = { + testPaths = [ ]; + }; } -- cgit 1.4.1 From dc8c140627a08586b4b865ef09f567ec424b5fca Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Fri, 19 Jan 2024 13:54:37 +0200 Subject: beets-stable: add NOTE near version string for upcoming update --- pkgs/tools/audio/beets/default.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkgs/tools/audio') diff --git a/pkgs/tools/audio/beets/default.nix b/pkgs/tools/audio/beets/default.nix index ba468895cc41..391974c4a4fd 100644 --- a/pkgs/tools/audio/beets/default.nix +++ b/pkgs/tools/audio/beets/default.nix @@ -22,6 +22,8 @@ lib.makeExtensible (self: { beets-stable = callPackage ./common.nix rec { inherit python3Packages; + # NOTE: ./builtin-plugins.nix and ./common.nix can have some conditionals + # be removed when stable version updates version = "1.6.0"; src = fetchFromGitHub { owner = "beetbox"; -- cgit 1.4.1