From 8a2726246f67aad70bd0f74f0b1e62ba3c80b2b7 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 16 Oct 2025 11:59:18 +0300 Subject: [PATCH 01/18] beets-minimal: fix build by setting _utils testPaths --- pkgs/tools/audio/beets/builtin-plugins.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/audio/beets/builtin-plugins.nix b/pkgs/tools/audio/beets/builtin-plugins.nix index 21b949affbb4..c3fdf753c72c 100644 --- a/pkgs/tools/audio/beets/builtin-plugins.nix +++ b/pkgs/tools/audio/beets/builtin-plugins.nix @@ -180,5 +180,7 @@ _typing = { testPaths = [ ]; }; - _utils = { }; + _utils = { + testPaths = [ ]; + }; } From 7c88e84a93938ba77c27a6708452a8df7385ee2a Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 16 Oct 2025 13:02:06 +0300 Subject: [PATCH 02/18] beetsPackages.alternatives: fix test failures with beets>=2.5 --- pkgs/tools/audio/beets/plugins/alternatives.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/tools/audio/beets/plugins/alternatives.nix b/pkgs/tools/audio/beets/plugins/alternatives.nix index 9e5a8182e47b..6bc2a62d8857 100644 --- a/pkgs/tools/audio/beets/plugins/alternatives.nix +++ b/pkgs/tools/audio/beets/plugins/alternatives.nix @@ -1,6 +1,7 @@ { lib, fetchFromGitHub, + fetchpatch, beets, python3Packages, writableTmpDirAsHomeHook, @@ -18,6 +19,17 @@ python3Packages.buildPythonApplication rec { hash = "sha256-jGHRoBBXqJq0r/Gbp7gkuaEFPVMGE6cqQRi84AHTXxQ="; }; + patches = [ + # Fixes build failure by ignoring DeprecationWarning during tests. + (fetchpatch { + url = "https://github.com/geigerzaehler/beets-alternatives/commit/3c15515edfe62d5d6c8f3fb729bf3dcef41c1ffa.patch"; + hash = "sha256-gZXftDI5PXJ0c65Z1HLABJ2SlDnXU78xxIEt7IGp8RQ="; + excludes = [ + "poetry.lock" + ]; + }) + ]; + nativeBuildInputs = [ beets ]; From 1f6d9c8190cf465e99fd4306460e191c9c8cf23d Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 16 Oct 2025 11:56:04 +0300 Subject: [PATCH 03/18] beetsPackages.alternatives: use correct category for poetry-core --- pkgs/tools/audio/beets/plugins/alternatives.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/audio/beets/plugins/alternatives.nix b/pkgs/tools/audio/beets/plugins/alternatives.nix index 6bc2a62d8857..6085a82064f8 100644 --- a/pkgs/tools/audio/beets/plugins/alternatives.nix +++ b/pkgs/tools/audio/beets/plugins/alternatives.nix @@ -30,12 +30,12 @@ python3Packages.buildPythonApplication rec { }) ]; - nativeBuildInputs = [ - beets + build-system = [ + python3Packages.poetry-core ]; - dependencies = [ - python3Packages.poetry-core + nativeBuildInputs = [ + beets ]; nativeCheckInputs = From 7d0a5ef29c1a7f2c12bad3d3710cdf80c7a734cc Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 16 Oct 2025 12:06:09 +0300 Subject: [PATCH 04/18] beetsPackages.filetote: no with lib; in meta --- pkgs/tools/audio/beets/plugins/filetote.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/audio/beets/plugins/filetote.nix b/pkgs/tools/audio/beets/plugins/filetote.nix index d397658bd8da..62af7d48b2a4 100644 --- a/pkgs/tools/audio/beets/plugins/filetote.nix +++ b/pkgs/tools/audio/beets/plugins/filetote.nix @@ -77,12 +77,12 @@ python3Packages.buildPythonApplication rec { ] ++ optional-dependencies.test; - meta = with lib; { + meta = { description = "Beets plugin to move non-music files during the import process"; homepage = "https://github.com/gtronset/beets-filetote"; changelog = "https://github.com/gtronset/beets-filetote/blob/${src.tag}/CHANGELOG.md"; - maintainers = with maintainers; [ dansbandit ]; - license = licenses.mit; + maintainers = with lib.maintainers; [ dansbandit ]; + license = lib.licenses.mit; inherit (beets.meta) platforms; # https://github.com/gtronset/beets-filetote/issues/211 broken = true; From b81743dbce76bfaf01903cbac5ed5dad29977a15 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 16 Oct 2025 12:24:57 +0300 Subject: [PATCH 05/18] beets: small passthru reformatting --- pkgs/tools/audio/beets/common.nix | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/pkgs/tools/audio/beets/common.nix b/pkgs/tools/audio/beets/common.nix index 132a8f5aebbe..decd9c2b1313 100644 --- a/pkgs/tools/audio/beets/common.nix +++ b/pkgs/tools/audio/beets/common.nix @@ -232,25 +232,27 @@ python3Packages.buildPythonApplication { env EDITOR=true "$out/bin/beet" config -e ''; - passthru.plugins = allPlugins; - - passthru.tests.gstreamer = - runCommand "beets-gstreamer-test" - { - meta.timeout = 60; - } - '' + passthru = { + plugins = allPlugins; + tests = { + gstreamer = + runCommand "beets-gstreamer-test" + { + meta.timeout = 60; + } + '' set -euo pipefail export HOME=$(mktemp -d) mkdir $out cat << EOF > $out/config.yaml - replaygain: - backend: gstreamer - EOF - + replaygain: + backend: gstreamer + EOF ${beets}/bin/beet -c $out/config.yaml > /dev/null - ''; + ''; + }; + }; meta = { description = "Music tagger and library organizer"; From 1af12add21c4a56d5b1aa7e769dd08ac36bf225c Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 16 Oct 2025 12:28:30 +0300 Subject: [PATCH 06/18] beets: small buildInputs formatting --- pkgs/tools/audio/beets/common.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/audio/beets/common.nix b/pkgs/tools/audio/beets/common.nix index decd9c2b1313..b2b0887530de 100644 --- a/pkgs/tools/audio/beets/common.nix +++ b/pkgs/tools/audio/beets/common.nix @@ -121,13 +121,11 @@ python3Packages.buildPythonApplication { ] ++ extraNativeBuildInputs; - buildInputs = [ - ] - ++ (with gst_all_1; [ + buildInputs = with gst_all_1; [ gst-plugins-base gst-plugins-good gst-plugins-ugly - ]); + ]; outputs = [ "out" From bc20c9aa9364268277052dc1f03dcf9931c091d6 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 16 Oct 2025 12:02:39 +0300 Subject: [PATCH 07/18] beetsPackages.audible: small formatting changes Mainly, put build-system right after src, as it is strongly coupled to it. --- pkgs/tools/audio/beets/plugins/audible.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/audio/beets/plugins/audible.nix b/pkgs/tools/audio/beets/plugins/audible.nix index 9bc10074d2f2..50176db667cd 100644 --- a/pkgs/tools/audio/beets/plugins/audible.nix +++ b/pkgs/tools/audio/beets/plugins/audible.nix @@ -5,6 +5,7 @@ nix-update-script, python3Packages, }: + python3Packages.buildPythonApplication rec { pname = "beets-audible"; version = "1.0.2"; @@ -17,16 +18,16 @@ python3Packages.buildPythonApplication rec { hash = "sha256-6rf8U63SW+gwfT7ZdN/ymYKHRs0HSMDTP2ZBfULLsJs="; }; + build-system = with python3Packages; [ + hatchling + ]; + nativeBuildInputs = [ beets ]; pythonRelaxDeps = true; - build-system = with python3Packages; [ - hatchling - ]; - dependencies = with python3Packages; [ markdownify natsort From 5b12b31e548167e88319e33c64c42171490770ae Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 16 Oct 2025 12:04:14 +0300 Subject: [PATCH 08/18] beetsPackages.copyartifacts: reorder arguments a bit --- pkgs/tools/audio/beets/plugins/copyartifacts.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/audio/beets/plugins/copyartifacts.nix b/pkgs/tools/audio/beets/plugins/copyartifacts.nix index 49bc0dadf797..7b873cbc2d42 100644 --- a/pkgs/tools/audio/beets/plugins/copyartifacts.nix +++ b/pkgs/tools/audio/beets/plugins/copyartifacts.nix @@ -27,14 +27,14 @@ python3Packages.buildPythonApplication rec { sed -i -e 's/util\.py3_path/os.fsdecode/g' tests/_common.py ''; - nativeBuildInputs = [ - beets - ]; - build-system = with python3Packages; [ setuptools ]; + nativeBuildInputs = [ + beets + ]; + dependencies = with python3Packages; [ six ]; From a1fc43f7efb744f48006eb829e7e74abee5df8cd Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 16 Oct 2025 12:07:32 +0300 Subject: [PATCH 09/18] beetsPackages.filetote: put build-system nearer src --- pkgs/tools/audio/beets/plugins/filetote.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/audio/beets/plugins/filetote.nix b/pkgs/tools/audio/beets/plugins/filetote.nix index 62af7d48b2a4..9f2c49375639 100644 --- a/pkgs/tools/audio/beets/plugins/filetote.nix +++ b/pkgs/tools/audio/beets/plugins/filetote.nix @@ -23,12 +23,14 @@ python3Packages.buildPythonApplication rec { substituteInPlace pyproject.toml --replace-fail "poetry-core<2.0.0" "poetry-core" ''; + build-system = [ + python3Packages.poetry-core + ]; + nativeBuildInputs = [ beets ]; - build-system = [ python3Packages.poetry-core ]; - dependencies = with python3Packages; [ mediafile reflink From 49b946ccb8eee977e086f51a73346c493243737f Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 16 Oct 2025 12:08:07 +0300 Subject: [PATCH 10/18] beetsPackages.filetote: put nativeCheckInputs before pytest settings --- pkgs/tools/audio/beets/plugins/filetote.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/audio/beets/plugins/filetote.nix b/pkgs/tools/audio/beets/plugins/filetote.nix index 9f2c49375639..d2874e930cbc 100644 --- a/pkgs/tools/audio/beets/plugins/filetote.nix +++ b/pkgs/tools/audio/beets/plugins/filetote.nix @@ -61,6 +61,12 @@ python3Packages.buildPythonApplication rec { dev = optional-dependencies.lint ++ optional-dependencies.test ++ [ python3Packages.tox ]; }; + nativeCheckInputs = [ + python3Packages.pytestCheckHook + writableTmpDirAsHomeHook + ] + ++ optional-dependencies.test; + pytestFlags = [ # This is the same as: # -r fEs @@ -73,12 +79,6 @@ python3Packages.buildPythonApplication rec { "tests/test_version.py" ]; - nativeCheckInputs = [ - python3Packages.pytestCheckHook - writableTmpDirAsHomeHook - ] - ++ optional-dependencies.test; - meta = { description = "Beets plugin to move non-music files during the import process"; homepage = "https://github.com/gtronset/beets-filetote"; From a0b1e33b63ea7f7c607cd684a528d34403a9007a Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 16 Oct 2025 12:08:56 +0300 Subject: [PATCH 11/18] beetsPackages.filetote: remove optional-dependencies attrset This package is broken for a while and this information has no value whatsoever. --- pkgs/tools/audio/beets/plugins/filetote.nix | 29 +++++---------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/pkgs/tools/audio/beets/plugins/filetote.nix b/pkgs/tools/audio/beets/plugins/filetote.nix index d2874e930cbc..2d52e70430af 100644 --- a/pkgs/tools/audio/beets/plugins/filetote.nix +++ b/pkgs/tools/audio/beets/plugins/filetote.nix @@ -38,34 +38,19 @@ python3Packages.buildPythonApplication rec { typeguard ]; - optional-dependencies = { - lint = with python3Packages; [ - black - check-manifest - flake8 - flake8-bugbear - flake8-bugbear-pyi - isort - mypy - pylint - typing_extensions - ]; - test = with python3Packages; [ + nativeCheckInputs = + with python3Packages; + [ + pytestCheckHook beetsPackages.audible mediafile - pytest reflink toml typeguard + ] + ++ [ + writableTmpDirAsHomeHook ]; - dev = optional-dependencies.lint ++ optional-dependencies.test ++ [ python3Packages.tox ]; - }; - - nativeCheckInputs = [ - python3Packages.pytestCheckHook - writableTmpDirAsHomeHook - ] - ++ optional-dependencies.test; pytestFlags = [ # This is the same as: From d871c165c52d7881b94bb78e772172e047547371 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 16 Oct 2025 12:35:58 +0300 Subject: [PATCH 12/18] beets{,Packages}: rewrite / reform - Promote all beets packages to 1st class Python packages, defined in pkgs/development/python-modules/beets* directories. - Define top-level beets and beets-minimal using `toPythonApplication` instead of using `toPythonModule` for python3Packages.beets attribute. - Add appropriate top-level aliases, and python-aliases - Make sure nix-update finds the version and hash strings in the correct file (main motivation of this commit). - Remove the mkPlugin function and simply put its contents inline. --- pkgs/by-name/be/beets-minimal/package.nix | 5 + pkgs/by-name/be/beets/package.nix | 5 + .../beets-alternatives/default.nix} | 45 +- .../python-modules/beets-audible/default.nix} | 24 +- .../beets-copyartifacts/default.nix} | 27 +- .../beets-filetote/default.nix} | 51 +- .../beets}/bash-completion-always-print.patch | 0 .../python-modules/beets/default.nix | 498 ++++++++++++++++++ pkgs/tools/audio/beets/builtin-plugins.nix | 186 ------- pkgs/tools/audio/beets/common.nix | 269 ---------- pkgs/tools/audio/beets/default.nix | 55 -- pkgs/top-level/aliases.nix | 3 +- pkgs/top-level/all-packages.nix | 3 - pkgs/top-level/python-aliases.nix | 3 + pkgs/top-level/python-packages.nix | 16 +- 15 files changed, 622 insertions(+), 568 deletions(-) create mode 100644 pkgs/by-name/be/beets-minimal/package.nix create mode 100644 pkgs/by-name/be/beets/package.nix rename pkgs/{tools/audio/beets/plugins/alternatives.nix => development/python-modules/beets-alternatives/default.nix} (74%) rename pkgs/{tools/audio/beets/plugins/audible.nix => development/python-modules/beets-audible/default.nix} (80%) rename pkgs/{tools/audio/beets/plugins/copyartifacts.nix => development/python-modules/beets-copyartifacts/default.nix} (80%) rename pkgs/{tools/audio/beets/plugins/filetote.nix => development/python-modules/beets-filetote/default.nix} (71%) rename pkgs/{tools/audio/beets/patches => development/python-modules/beets}/bash-completion-always-print.patch (100%) create mode 100644 pkgs/development/python-modules/beets/default.nix delete mode 100644 pkgs/tools/audio/beets/builtin-plugins.nix delete mode 100644 pkgs/tools/audio/beets/common.nix delete mode 100644 pkgs/tools/audio/beets/default.nix diff --git a/pkgs/by-name/be/beets-minimal/package.nix b/pkgs/by-name/be/beets-minimal/package.nix new file mode 100644 index 000000000000..de0125445743 --- /dev/null +++ b/pkgs/by-name/be/beets-minimal/package.nix @@ -0,0 +1,5 @@ +{ + python3, +}: + +python3.pkgs.toPythonApplication python3.pkgs.beets-minimal diff --git a/pkgs/by-name/be/beets/package.nix b/pkgs/by-name/be/beets/package.nix new file mode 100644 index 000000000000..0d8837e0c0d8 --- /dev/null +++ b/pkgs/by-name/be/beets/package.nix @@ -0,0 +1,5 @@ +{ + python3, +}: + +python3.pkgs.toPythonApplication python3.pkgs.beets diff --git a/pkgs/tools/audio/beets/plugins/alternatives.nix b/pkgs/development/python-modules/beets-alternatives/default.nix similarity index 74% rename from pkgs/tools/audio/beets/plugins/alternatives.nix rename to pkgs/development/python-modules/beets-alternatives/default.nix index 6085a82064f8..29051861646a 100644 --- a/pkgs/tools/audio/beets/plugins/alternatives.nix +++ b/pkgs/development/python-modules/beets-alternatives/default.nix @@ -2,12 +2,25 @@ lib, fetchFromGitHub, fetchpatch, - beets, - python3Packages, + buildPythonPackage, + + # build-system + poetry-core, + + # nativeBuildInputs + beets-minimal, + + # tests + pytestCheckHook, + pytest-cov-stub, + mock, + pillow, + tomli, + typeguard, writableTmpDirAsHomeHook, }: -python3Packages.buildPythonApplication rec { +buildPythonPackage rec { pname = "beets-alternatives"; version = "0.13.4"; pyproject = true; @@ -31,26 +44,22 @@ python3Packages.buildPythonApplication rec { ]; build-system = [ - python3Packages.poetry-core + poetry-core ]; nativeBuildInputs = [ - beets + beets-minimal ]; - nativeCheckInputs = - with python3Packages; - [ - pytestCheckHook - pytest-cov-stub - mock - pillow - tomli - typeguard - ] - ++ [ - writableTmpDirAsHomeHook - ]; + nativeCheckInputs = [ + pytestCheckHook + pytest-cov-stub + mock + pillow + tomli + typeguard + writableTmpDirAsHomeHook + ]; meta = { description = "Beets plugin to manage external files"; diff --git a/pkgs/tools/audio/beets/plugins/audible.nix b/pkgs/development/python-modules/beets-audible/default.nix similarity index 80% rename from pkgs/tools/audio/beets/plugins/audible.nix rename to pkgs/development/python-modules/beets-audible/default.nix index 50176db667cd..39b265ac7235 100644 --- a/pkgs/tools/audio/beets/plugins/audible.nix +++ b/pkgs/development/python-modules/beets-audible/default.nix @@ -1,12 +1,24 @@ { - beets, - fetchFromGitHub, lib, + fetchFromGitHub, + buildPythonPackage, + + # build-system + hatchling, + + # native + beets, + + # dependencies + markdownify, + natsort, + tldextract, + + # passthru nix-update-script, - python3Packages, }: -python3Packages.buildPythonApplication rec { +buildPythonPackage rec { pname = "beets-audible"; version = "1.0.2"; pyproject = true; @@ -18,7 +30,7 @@ python3Packages.buildPythonApplication rec { hash = "sha256-6rf8U63SW+gwfT7ZdN/ymYKHRs0HSMDTP2ZBfULLsJs="; }; - build-system = with python3Packages; [ + build-system = [ hatchling ]; @@ -28,7 +40,7 @@ python3Packages.buildPythonApplication rec { pythonRelaxDeps = true; - dependencies = with python3Packages; [ + dependencies = [ markdownify natsort tldextract diff --git a/pkgs/tools/audio/beets/plugins/copyartifacts.nix b/pkgs/development/python-modules/beets-copyartifacts/default.nix similarity index 80% rename from pkgs/tools/audio/beets/plugins/copyartifacts.nix rename to pkgs/development/python-modules/beets-copyartifacts/default.nix index 7b873cbc2d42..ed7ab0ba8cfe 100644 --- a/pkgs/tools/audio/beets/plugins/copyartifacts.nix +++ b/pkgs/development/python-modules/beets-copyartifacts/default.nix @@ -1,12 +1,23 @@ { lib, - beets, fetchFromGitHub, - python3Packages, + buildPythonPackage, + + # build-system + setuptools, + + # nativeBuildInputs + beets-minimal, + + # dependencies + six, + + # tests + pytestCheckHook, writableTmpDirAsHomeHook, }: -python3Packages.buildPythonApplication rec { +buildPythonPackage rec { pname = "beets-copyartifacts"; version = "0.1.5"; pyproject = true; @@ -27,20 +38,20 @@ python3Packages.buildPythonApplication rec { sed -i -e 's/util\.py3_path/os.fsdecode/g' tests/_common.py ''; - build-system = with python3Packages; [ + build-system = [ setuptools ]; nativeBuildInputs = [ - beets + beets-minimal ]; - dependencies = with python3Packages; [ + dependencies = [ six ]; nativeCheckInputs = [ - python3Packages.pytestCheckHook + pytestCheckHook writableTmpDirAsHomeHook ]; @@ -55,7 +66,7 @@ python3Packages.buildPythonApplication rec { homepage = "https://github.com/adammillerio/beets-copyartifacts"; changelog = "https://github.com/adammillerio/beets-copyartifacts/releases/tag/${src.tag}"; license = lib.licenses.mit; - inherit (beets.meta) platforms; + inherit (beets-minimal.meta) platforms; # Isn't compatible with beets >= 2.3 broken = true; }; diff --git a/pkgs/tools/audio/beets/plugins/filetote.nix b/pkgs/development/python-modules/beets-filetote/default.nix similarity index 71% rename from pkgs/tools/audio/beets/plugins/filetote.nix rename to pkgs/development/python-modules/beets-filetote/default.nix index 2d52e70430af..9b12b86118de 100644 --- a/pkgs/tools/audio/beets/plugins/filetote.nix +++ b/pkgs/development/python-modules/beets-filetote/default.nix @@ -1,13 +1,26 @@ { lib, fetchFromGitHub, - python3Packages, - beets, - beetsPackages, + buildPythonPackage, + + # build-system + poetry-core, + + # nativeBuildInputs + beets-minimal, + + # tests + pytestCheckHook, + beets-audible, + mediafile, + pytest, + reflink, + toml, + typeguard, writableTmpDirAsHomeHook, }: -python3Packages.buildPythonApplication rec { +buildPythonPackage rec { pname = "beets-filetote"; version = "1.1.0"; pyproject = true; @@ -24,33 +37,29 @@ python3Packages.buildPythonApplication rec { ''; build-system = [ - python3Packages.poetry-core + poetry-core ]; nativeBuildInputs = [ - beets + beets-minimal ]; - dependencies = with python3Packages; [ + dependencies = [ mediafile reflink toml typeguard ]; - nativeCheckInputs = - with python3Packages; - [ - pytestCheckHook - beetsPackages.audible - mediafile - reflink - toml - typeguard - ] - ++ [ - writableTmpDirAsHomeHook - ]; + nativeCheckInputs = [ + pytestCheckHook + beets-audible + mediafile + reflink + toml + typeguard + writableTmpDirAsHomeHook + ]; pytestFlags = [ # This is the same as: @@ -70,7 +79,7 @@ python3Packages.buildPythonApplication rec { changelog = "https://github.com/gtronset/beets-filetote/blob/${src.tag}/CHANGELOG.md"; maintainers = with lib.maintainers; [ dansbandit ]; license = lib.licenses.mit; - inherit (beets.meta) platforms; + inherit (beets-minimal.meta) platforms; # https://github.com/gtronset/beets-filetote/issues/211 broken = true; }; diff --git a/pkgs/tools/audio/beets/patches/bash-completion-always-print.patch b/pkgs/development/python-modules/beets/bash-completion-always-print.patch similarity index 100% rename from pkgs/tools/audio/beets/patches/bash-completion-always-print.patch rename to pkgs/development/python-modules/beets/bash-completion-always-print.patch diff --git a/pkgs/development/python-modules/beets/default.nix b/pkgs/development/python-modules/beets/default.nix new file mode 100644 index 000000000000..7ed470f74bd3 --- /dev/null +++ b/pkgs/development/python-modules/beets/default.nix @@ -0,0 +1,498 @@ +/* + ** To customize the enabled beets plugins, use the pluginOverrides input to the + ** derivation. + ** Examples: + ** + ** Disabling a builtin plugin: + ** python3.pkgs.beets.override { + ** pluginOverrides = { + ** beatport.enable = false; + ** }; + ** } + ** + ** Enabling an external plugin: + ** python3.pkgs.beets.override { + ** pluginOverrides = { + ** alternatives = { + ** enable = true; + ** propagatedBuildInputs = [ beets-alternatives ]; + ** }; + ** }; + ** } +*/ +{ + lib, + stdenv, + buildPythonPackage, + fetchFromGitHub, + beets, + + # build-system + poetry-core, + poetry-dynamic-versioning, + + # dependencies + confuse, + gst-python, + jellyfish, + mediafile, + munkres, + musicbrainzngs, + platformdirs, + pyyaml, + unidecode, + reflink, + typing-extensions, + lap, + + # native + gobject-introspection, + sphinxHook, + sphinx-design, + sphinx-copybutton, + pydata-sphinx-theme, + + # buildInputs + gst_all_1, + + # plugin deps + aacgain, + beautifulsoup4, + chromaprint, + discogs-client, + ffmpeg, + flac, + flask, + flask-cors, + imagemagick, + keyfinder-cli, + langdetect, + librosa, + mp3gain, + mp3val, + mpd2, + pyacoustid, + pylast, + pyxdg, + requests, + requests-oauthlib, + resampy, + soco, + + # configurations + extraPatches ? [ ], + pluginOverrides ? { }, + disableAllPlugins ? false, + extraDisabledTests ? [ ], + extraNativeBuildInputs ? [ ], + + # tests + pytestCheckHook, + pytest-cov-stub, + mock, + rarfile, + responses, + requests-mock, + pillow, + writableTmpDirAsHomeHook, + + # preCheck + bashInteractive, + diffPlugins, + runtimeShell, + writeScript, + + # passthru.tests + runCommand, +}: + +buildPythonPackage rec { + pname = "beets"; + version = "2.5.1"; + src = fetchFromGitHub { + owner = "beetbox"; + repo = "beets"; + tag = "v${version}"; + hash = "sha256-H3jcEHyK13+RHVlV4zp+8M3LZ0Jc2FdmAbLpekGozLA="; + }; + pyproject = true; + + patches = [ + # Bash completion fix for Nix + ./bash-completion-always-print.patch + ] + ++ extraPatches; + + build-system = [ + poetry-core + poetry-dynamic-versioning + ]; + + dependencies = [ + confuse + gst-python + jellyfish + mediafile + munkres + musicbrainzngs + platformdirs + pyyaml + unidecode + # Can be built without it, but is useful on btrfs systems, and doesn't + # add too much to the closure. See: + # https://github.com/NixOS/nixpkgs/issues/437308 + reflink + typing-extensions + lap + ] + ++ (lib.concatMap (p: p.propagatedBuildInputs) (lib.attrValues passthru.plugins.enabled)); + + nativeBuildInputs = [ + gobject-introspection + sphinxHook + sphinx-design + sphinx-copybutton + pydata-sphinx-theme + ] + ++ extraNativeBuildInputs; + + buildInputs = with gst_all_1; [ + gst-plugins-base + gst-plugins-good + gst-plugins-ugly + ]; + + outputs = [ + "out" + "doc" + "man" + ]; + sphinxBuilders = [ + "html" + "man" + ]; + # Causes an installManPage error. Not clear why this directory gets generated + # with the manpages. The same directory is observed correctly in + # $doc/share/doc/beets-${version}/html + preInstallSphinx = '' + rm -r .sphinx/man/man/_sphinx_design_static + ''; + + postInstall = '' + mkdir -p $out/share/zsh/site-functions + cp extra/_beet $out/share/zsh/site-functions/ + ''; + + makeWrapperArgs = [ + "--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\"" + "--set GST_PLUGIN_SYSTEM_PATH_1_0 \"$GST_PLUGIN_SYSTEM_PATH_1_0\"" + "--prefix PATH : ${lib.makeBinPath passthru.plugins.wrapperBins}" + ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-cov-stub + mock + rarfile + responses + requests-mock + pillow + writableTmpDirAsHomeHook + ] + ++ passthru.plugins.wrapperBins; + + __darwinAllowLocalNetworking = true; + + disabledTestPaths = + passthru.plugins.disabledTestPaths + ++ [ + # touches network + "test/plugins/test_aura.py" + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # Flaky: several tests fail randomly with: + # if not self._poll(timeout): + # raise Empty + # _queue.Empty + "test/plugins/test_bpd.py" + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + # fail on Hydra with `RuntimeError: image cannot be obtained without artresizer backend` + "test/plugins/test_art.py::AlbumArtOperationConfigurationTest::test_enforce_ratio" + "test/plugins/test_art.py::AlbumArtOperationConfigurationTest::test_enforce_ratio_with_percent_margin" + "test/plugins/test_art.py::AlbumArtOperationConfigurationTest::test_enforce_ratio_with_px_margin" + "test/plugins/test_art.py::AlbumArtOperationConfigurationTest::test_minwidth" + "test/plugins/test_art.py::AlbumArtPerformOperationTest::test_deinterlaced" + "test/plugins/test_art.py::AlbumArtPerformOperationTest::test_deinterlaced_and_resized" + "test/plugins/test_art.py::AlbumArtPerformOperationTest::test_file_not_resized" + "test/plugins/test_art.py::AlbumArtPerformOperationTest::test_file_resized" + "test/plugins/test_art.py::AlbumArtPerformOperationTest::test_file_resized_and_scaled" + "test/plugins/test_art.py::AlbumArtPerformOperationTest::test_file_resized_but_not_scaled" + "test/plugins/test_art.py::AlbumArtPerformOperationTest::test_resize" + ]; + disabledTests = extraDisabledTests ++ [ + # https://github.com/beetbox/beets/issues/5880 + "test_reject_different_art" + # touches network + "test_merge_duplicate_album" + # The existence of the dependency reflink (see comment above), causes this + # test to be run, and it fails in the sandbox. + "test_successful_reflink" + ]; + + # Perform extra "sanity checks", before running pytest tests. + preCheck = '' + # Check for undefined plugins + find beetsplug -mindepth 1 \ + \! -path 'beetsplug/__init__.py' -a \ + \( -name '*.py' -o -path 'beetsplug/*/__init__.py' \) -print \ + | sed -n -re 's|^beetsplug/([^/.]+).*|\1|p' \ + | sort -u > plugins_available + ${diffPlugins (lib.attrNames passthru.plugins.builtins) "plugins_available"} + + export BEETS_TEST_SHELL="${lib.getExe bashInteractive} --norc" + + env EDITOR="${writeScript "beetconfig.sh" '' + #!${runtimeShell} + cat > "$1" < $out/config.yaml + replaygain: + backend: gstreamer + EOF + + ${beets}/bin/beet -c $out/config.yaml > /dev/null + ''; + }; + }; + + meta = { + description = "Music tagger and library organizer"; + homepage = "https://beets.io"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ + aszlig + doronbehar + lovesegfault + montchr + pjones + ]; + platforms = lib.platforms.linux ++ lib.platforms.darwin; + mainProgram = "beet"; + }; +} diff --git a/pkgs/tools/audio/beets/builtin-plugins.nix b/pkgs/tools/audio/beets/builtin-plugins.nix deleted file mode 100644 index c3fdf753c72c..000000000000 --- a/pkgs/tools/audio/beets/builtin-plugins.nix +++ /dev/null @@ -1,186 +0,0 @@ -{ - aacgain, - chromaprint, - ffmpeg, - flac, - imagemagick, - keyfinder-cli, - mp3gain, - mp3val, - python3Packages, - version, - lib, - ... -}: -{ - absubmit = { - deprecated = true; - testPaths = [ ]; - }; - advancedrewrite = { - testPaths = [ ]; - }; - acousticbrainz = { - deprecated = true; - propagatedBuildInputs = [ python3Packages.requests ]; - }; - albumtypes = { }; - aura = { - propagatedBuildInputs = with python3Packages; [ - flask - flask-cors - pillow - ]; - }; - autobpm = { - propagatedBuildInputs = with python3Packages; [ - librosa - # An optional dependency of librosa, needed for beets' autobpm - resampy - ]; - }; - badfiles = { - testPaths = [ ]; - wrapperBins = [ - mp3val - flac - ]; - }; - bareasc = { }; - beatport.propagatedBuildInputs = [ python3Packages.requests-oauthlib ]; - bench.testPaths = [ ]; - bpd.testPaths = [ ]; - bpm.testPaths = [ ]; - bpsync.testPaths = [ ]; - bucket = { }; - chroma = { - propagatedBuildInputs = [ python3Packages.pyacoustid ]; - testPaths = [ ]; - wrapperBins = [ - chromaprint - ]; - }; - convert.wrapperBins = [ ffmpeg ]; - deezer = { - propagatedBuildInputs = [ python3Packages.requests ]; - testPaths = [ ]; - }; - discogs.propagatedBuildInputs = with python3Packages; [ - discogs-client - requests - ]; - duplicates.testPaths = [ ]; - edit = { }; - embedart = { - propagatedBuildInputs = with python3Packages; [ pillow ]; - wrapperBins = [ imagemagick ]; - }; - embyupdate.propagatedBuildInputs = [ python3Packages.requests ]; - export = { }; - fetchart = { - propagatedBuildInputs = with python3Packages; [ - beautifulsoup4 - langdetect - pillow - requests - ]; - wrapperBins = [ imagemagick ]; - }; - filefilter = { }; - fish.testPaths = [ ]; - freedesktop.testPaths = [ ]; - fromfilename.testPaths = [ ]; - ftintitle = { }; - fuzzy.testPaths = [ ]; - gmusic.testPaths = [ ]; - hook = { }; - ihate = { }; - importadded = { }; - importfeeds = { }; - info = { }; - inline.testPaths = [ ]; - ipfs = { }; - keyfinder.wrapperBins = [ keyfinder-cli ]; - kodiupdate = { - propagatedBuildInputs = [ python3Packages.requests ]; - testPaths = [ ]; - }; - lastgenre.propagatedBuildInputs = [ python3Packages.pylast ]; - lastimport = { - propagatedBuildInputs = [ python3Packages.pylast ]; - testPaths = [ ]; - }; - limit = { }; - listenbrainz = { - testPaths = [ ]; - }; - loadext = { - propagatedBuildInputs = [ python3Packages.requests ]; - testPaths = [ ]; - }; - lyrics.propagatedBuildInputs = with python3Packages; [ - beautifulsoup4 - langdetect - requests - ]; - mbcollection.testPaths = [ ]; - mbsubmit = { }; - mbsync = { }; - metasync.testPaths = [ ]; - missing.testPaths = [ ]; - mpdstats.propagatedBuildInputs = [ python3Packages.mpd2 ]; - mpdupdate = { - propagatedBuildInputs = [ python3Packages.mpd2 ]; - testPaths = [ ]; - }; - musicbrainz = { }; - parentwork = { }; - permissions = { }; - play = { }; - playlist.propagatedBuildInputs = [ python3Packages.requests ]; - plexupdate = { }; - random = { }; - replace = { }; - replaygain.wrapperBins = [ - aacgain - ffmpeg - mp3gain - ]; - rewrite.testPaths = [ ]; - scrub.testPaths = [ ]; - smartplaylist = { }; - sonosupdate = { - propagatedBuildInputs = [ python3Packages.soco ]; - testPaths = [ ]; - }; - spotify = { }; - subsonicplaylist = { - propagatedBuildInputs = [ python3Packages.requests ]; - testPaths = [ ]; - }; - subsonicupdate.propagatedBuildInputs = [ python3Packages.requests ]; - substitute = { - testPaths = [ ]; - }; - the = { }; - thumbnails = { - propagatedBuildInputs = with python3Packages; [ - pillow - pyxdg - ]; - wrapperBins = [ imagemagick ]; - }; - types.testPaths = [ "test/plugins/test_types_plugin.py" ]; - unimported.testPaths = [ ]; - web.propagatedBuildInputs = with python3Packages; [ - flask - flask-cors - ]; - zero = { }; - _typing = { - testPaths = [ ]; - }; - _utils = { - testPaths = [ ]; - }; -} diff --git a/pkgs/tools/audio/beets/common.nix b/pkgs/tools/audio/beets/common.nix deleted file mode 100644 index b2b0887530de..000000000000 --- a/pkgs/tools/audio/beets/common.nix +++ /dev/null @@ -1,269 +0,0 @@ -{ - lib, - stdenv, - src, - version, - fetchpatch, - bashInteractive, - diffPlugins, - gobject-introspection, - gst_all_1, - python3Packages, - sphinxHook, - writableTmpDirAsHomeHook, - runtimeShell, - writeScript, - - # plugin deps, used indirectly by the @inputs when we `import ./builtin-plugins.nix` - aacgain, - chromaprint, - essentia-extractor, - ffmpeg, - flac, - imagemagick, - keyfinder-cli, - mp3gain, - mp3val, - - extraPatches ? [ ], - pluginOverrides ? { }, - disableAllPlugins ? false, - disabledTests ? [ ], - extraNativeBuildInputs ? [ ], - - # tests - runCommand, - beets, -}@inputs: -let - inherit (lib) attrNames attrValues concatMap; - - mkPlugin = - { - name, - enable ? !disableAllPlugins, - builtin ? false, - propagatedBuildInputs ? [ ], - testPaths ? [ - "test/plugins/test_${name}.py" - ], - wrapperBins ? [ ], - }: - { - inherit - name - enable - builtin - propagatedBuildInputs - testPaths - wrapperBins - ; - }; - - basePlugins = lib.mapAttrs (_: a: { builtin = true; } // a) (import ./builtin-plugins.nix inputs); - 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; - disabledTestPaths = lib.flatten (attrValues (lib.mapAttrs (_: v: v.testPaths) disabledPlugins)); - - pluginWrapperBins = concatMap (p: p.wrapperBins) (attrValues enabledPlugins); -in -python3Packages.buildPythonApplication { - pname = "beets"; - inherit src version; - pyproject = true; - - patches = [ - ] - ++ extraPatches; - - build-system = [ - python3Packages.poetry-core - python3Packages.poetry-dynamic-versioning - ]; - - dependencies = - with python3Packages; - [ - confuse - gst-python - jellyfish - mediafile - munkres - musicbrainzngs - platformdirs - pyyaml - unidecode - # Can be built without it, but is useful on btrfs systems, and doesn't - # add too much to the closure. See: - # https://github.com/NixOS/nixpkgs/issues/437308 - reflink - typing-extensions - lap - ] - ++ (concatMap (p: p.propagatedBuildInputs) (attrValues enabledPlugins)); - - nativeBuildInputs = [ - gobject-introspection - sphinxHook - python3Packages.pydata-sphinx-theme - python3Packages.sphinx-design - python3Packages.sphinx-copybutton - ] - ++ extraNativeBuildInputs; - - buildInputs = with gst_all_1; [ - gst-plugins-base - gst-plugins-good - gst-plugins-ugly - ]; - - outputs = [ - "out" - "doc" - "man" - ]; - sphinxBuilders = [ - "html" - "man" - ]; - # Causes an installManPage error. Not clear why this directory gets generated - # with the manpages. The same directory is observed correctly in - # $doc/share/doc/beets-${version}/html - preInstallSphinx = '' - rm -r .sphinx/man/man/_sphinx_design_static - ''; - - postInstall = '' - mkdir -p $out/share/zsh/site-functions - cp extra/_beet $out/share/zsh/site-functions/ - ''; - - makeWrapperArgs = [ - "--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\"" - "--set GST_PLUGIN_SYSTEM_PATH_1_0 \"$GST_PLUGIN_SYSTEM_PATH_1_0\"" - "--prefix PATH : ${lib.makeBinPath pluginWrapperBins}" - ]; - - nativeCheckInputs = - with python3Packages; - [ - pytestCheckHook - pytest-cov-stub - mock - rarfile - responses - requests-mock - pillow - ] - ++ [ - writableTmpDirAsHomeHook - ] - ++ pluginWrapperBins; - - __darwinAllowLocalNetworking = true; - - disabledTestPaths = - disabledTestPaths - ++ [ - # touches network - "test/plugins/test_aura.py" - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - # Flaky: several tests fail randomly with: - # if not self._poll(timeout): - # raise Empty - # _queue.Empty - "test/plugins/test_bpd.py" - ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ - # fail on Hydra with `RuntimeError: image cannot be obtained without artresizer backend` - "test/plugins/test_art.py::AlbumArtOperationConfigurationTest::test_enforce_ratio" - "test/plugins/test_art.py::AlbumArtOperationConfigurationTest::test_enforce_ratio_with_percent_margin" - "test/plugins/test_art.py::AlbumArtOperationConfigurationTest::test_enforce_ratio_with_px_margin" - "test/plugins/test_art.py::AlbumArtOperationConfigurationTest::test_minwidth" - "test/plugins/test_art.py::AlbumArtPerformOperationTest::test_deinterlaced" - "test/plugins/test_art.py::AlbumArtPerformOperationTest::test_deinterlaced_and_resized" - "test/plugins/test_art.py::AlbumArtPerformOperationTest::test_file_not_resized" - "test/plugins/test_art.py::AlbumArtPerformOperationTest::test_file_resized" - "test/plugins/test_art.py::AlbumArtPerformOperationTest::test_file_resized_and_scaled" - "test/plugins/test_art.py::AlbumArtPerformOperationTest::test_file_resized_but_not_scaled" - "test/plugins/test_art.py::AlbumArtPerformOperationTest::test_resize" - ]; - disabledTests = disabledTests ++ [ - # https://github.com/beetbox/beets/issues/5880 - "test_reject_different_art" - # touches network - "test_merge_duplicate_album" - # The existence of the dependency reflink (see comment above), causes this - # test to be run, and it fails in the sandbox. - "test_successful_reflink" - ]; - - # Perform extra "sanity checks", before running pytest tests. - preCheck = '' - # Check for undefined plugins - find beetsplug -mindepth 1 \ - \! -path 'beetsplug/__init__.py' -a \ - \( -name '*.py' -o -path 'beetsplug/*/__init__.py' \) -print \ - | sed -n -re 's|^beetsplug/([^/.]+).*|\1|p' \ - | sort -u > plugins_available - ${diffPlugins (attrNames builtinPlugins) "plugins_available"} - - export BEETS_TEST_SHELL="${lib.getExe bashInteractive} --norc" - - env EDITOR="${writeScript "beetconfig.sh" '' - #!${runtimeShell} - cat > "$1" < $out/config.yaml - replaygain: - backend: gstreamer - EOF - ${beets}/bin/beet -c $out/config.yaml > /dev/null - ''; - }; - }; - - meta = { - description = "Music tagger and library organizer"; - homepage = "https://beets.io"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ - aszlig - doronbehar - lovesegfault - montchr - pjones - ]; - platforms = lib.platforms.linux ++ lib.platforms.darwin; - mainProgram = "beet"; - }; -} diff --git a/pkgs/tools/audio/beets/default.nix b/pkgs/tools/audio/beets/default.nix deleted file mode 100644 index 39a057cd18c8..000000000000 --- a/pkgs/tools/audio/beets/default.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ - lib, - callPackage, - config, - fetchFromGitHub, - python3Packages, -}: -/* - ** To customize the enabled beets plugins, use the pluginOverrides input to the - ** derivation. - ** Examples: - ** - ** Disabling a builtin plugin: - ** beets.override { pluginOverrides = { beatport.enable = false; }; } - ** - ** Enabling an external plugin: - ** beets.override { pluginOverrides = { - ** alternatives = { enable = true; propagatedBuildInputs = [ beetsPackages.alternatives ]; }; - ** }; } -*/ -let - extraPatches = [ - # Bash completion fix for Nix - ./patches/bash-completion-always-print.patch - ]; -in -lib.makeExtensible ( - self: - { - beets = self.beets-stable; - - beets-stable = callPackage ./common.nix rec { - inherit python3Packages extraPatches; - version = "2.5.1"; - src = fetchFromGitHub { - owner = "beetbox"; - repo = "beets"; - tag = "v${version}"; - hash = "sha256-H3jcEHyK13+RHVlV4zp+8M3LZ0Jc2FdmAbLpekGozLA="; - }; - }; - - beets-minimal = self.beets.override { disableAllPlugins = true; }; - - alternatives = callPackage ./plugins/alternatives.nix { beets = self.beets-minimal; }; - audible = callPackage ./plugins/audible.nix { beets = self.beets-minimal; }; - copyartifacts = callPackage ./plugins/copyartifacts.nix { beets = self.beets-minimal; }; - filetote = callPackage ./plugins/filetote.nix { beets = self.beets-minimal; }; - } - // lib.optionalAttrs config.allowAliases { - beets-unstable = lib.warn "beets-unstable was aliased to beets, since upstream releases are frequent nowadays" self.beets; - - extrafiles = throw "extrafiles is unmaintained since 2020 and broken since beets 2.0.0"; - } -) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index d5e3665b289d..084292d5fc22 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -545,7 +545,8 @@ mapAliases { beam_nox = throw "beam_nox has been removed in favor of beam_minimal or beamMinimalPackages"; # Added 2025-04-01 BeatSaberModManager = beatsabermodmanager; # Added 2024-06-12 beatsabermodmanager = throw "'beatsabermodmanager' has been removed due to lack of upstream maintainenance. Consider using 'bs-manager' instead"; # Added 2025-03-18 - beets-unstable = beetsPackages.beets-unstable; # Added 2025-09-24 + beets-unstable = throw "beets-unstable has been removed in favor of beets since upstream is releasing versions frequently nowadays"; # Added 2025-10-16 + beetsPackages = throw "beetsPackages were replaced with python3.pkgs.beets- prefixed attributes, and top-level beets* attributes"; # Added 2025-10-16 belcard = throw "'belcard' has been moved to 'linphonePackages.belcard'"; # Added 2025-09-20 belle-sip = throw "'belle-sip' has been moved to 'linphonePackages.belle-sip'"; # Added 2025-09-20 belr = throw "'belr' has been moved to 'linphonePackages.belr'"; # Added 2025-09-20 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5b0edba6ed60..704f9a11333f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2327,9 +2327,6 @@ with pkgs; usePoppler = true; }; - beetsPackages = lib.recurseIntoAttrs (callPackage ../tools/audio/beets { }); - inherit (beetsPackages) beets; - binlore = callPackage ../development/tools/analysis/binlore { }; birdfont = callPackage ../tools/misc/birdfont { }; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 736591ee02b1..03f55add971b 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -110,6 +110,9 @@ mapAliases { backports_weakref = throw "backports_weakref has been removed, since we no longer need to backport to python3.3"; # added 2023-07-28 bash_kernel = bash-kernel; # added 2023-11-10 beancount_docverif = beancount-docverif; # added 2023-10-08 + beets-unstable = lib.warn "beets-unstable was aliased to beets, since upstream releases are frequent nowadays" self.beets; # added 2025-10-16; + beets-stable = lib.warn "beets-stable was aliased to beets, since upstream releases are frequent nowadays" self.beets; # added 2025-10-16; + beets-extrafiles = throw "beets-extrafiles is unmaintained since 2020 and broken since beets 2.0.0"; bedup = throw "bedup was removed because it was broken and abandoned upstream"; # added 2023-02-04 bip_utils = bip-utils; # 2023-10-08 bitcoin-price-api = throw "bitcoin-price-api has been removed, it was using setuptools 2to3 translation feautre, which has been removed in setuptools 58"; # added 2022-02-15 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a65855a2a2aa..2d33913879dd 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1834,7 +1834,21 @@ self: super: with self; { beetcamp = callPackage ../development/python-modules/beetcamp { }; - beets = toPythonModule (pkgs.beets.override { python3Packages = self; }); + beets = callPackage ../development/python-modules/beets { + inherit (pkgs) chromaprint; + }; + + beets-alternatives = callPackage ../development/python-modules/beets-alternatives { }; + + beets-audible = callPackage ../development/python-modules/beets-audible { }; + + beets-copyartifacts = callPackage ../development/python-modules/beets-copyartifacts { }; + + beets-filetote = callPackage ../development/python-modules/beets-filetote { }; + + beets-minimal = beets.override { + disableAllPlugins = true; + }; beewi-smartclim = callPackage ../development/python-modules/beewi-smartclim { }; From ef60cb7396088e2f3b6407d08c011e9ede6819c8 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Fri, 17 Oct 2025 09:33:25 +0300 Subject: [PATCH 13/18] beets: Remove aszlig from maintainers https://github.com/NixOS/nixpkgs/pull/452540#discussion_r2437583212 --- pkgs/development/python-modules/beets/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/python-modules/beets/default.nix b/pkgs/development/python-modules/beets/default.nix index 7ed470f74bd3..4d32f27040f7 100644 --- a/pkgs/development/python-modules/beets/default.nix +++ b/pkgs/development/python-modules/beets/default.nix @@ -486,7 +486,6 @@ buildPythonPackage rec { homepage = "https://beets.io"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ - aszlig doronbehar lovesegfault montchr From 652a9739c448857100fbf96ecb730f8a4ab68e28 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 20 Oct 2025 11:13:32 +0300 Subject: [PATCH 14/18] python3Packages.confuse: 1.7.0 -> 2.0.1 Diff: https://github.com/beetbox/confuse/compare/v1.7.0...v2.0.1 --- pkgs/development/python-modules/confuse/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/confuse/default.nix b/pkgs/development/python-modules/confuse/default.nix index e713f0166406..65b8f05bf219 100644 --- a/pkgs/development/python-modules/confuse/default.nix +++ b/pkgs/development/python-modules/confuse/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "confuse"; - version = "1.7.0"; + version = "2.0.1"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "beetbox"; repo = "confuse"; rev = "v${version}"; - hash = "sha256-zdH5DNXnuAfYTuaG9EIKiXL2EbLSfzYjPSkC3G06bU8="; + hash = "sha256-TVx0cBXv/fIuli/xrFXBAmwJ1rQr5xJL1Q67FaDr4ow="; }; nativeBuildInputs = [ flit-core ]; From a9a4d36c9038358111fd39ba7c78b72d09e915fb Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 20 Oct 2025 11:14:10 +0300 Subject: [PATCH 15/18] python3Packages.confuse: no with lib; in meta --- pkgs/development/python-modules/confuse/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/confuse/default.nix b/pkgs/development/python-modules/confuse/default.nix index 65b8f05bf219..161825e25aea 100644 --- a/pkgs/development/python-modules/confuse/default.nix +++ b/pkgs/development/python-modules/confuse/default.nix @@ -30,10 +30,10 @@ buildPythonPackage rec { pythonImportsCheck = [ "confuse" ]; - meta = with lib; { + meta = { description = "Python configuration library for Python that uses YAML"; homepage = "https://github.com/beetbox/confuse"; - license = licenses.mit; - maintainers = with maintainers; [ lovesegfault ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ lovesegfault ]; }; } From 73a224a1f5802815b96b3c1a0b99928ff26de0ae Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 20 Oct 2025 11:16:18 +0300 Subject: [PATCH 16/18] python3Packages.confuse: modernize attributes --- .../python-modules/confuse/default.nix | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/confuse/default.nix b/pkgs/development/python-modules/confuse/default.nix index 161825e25aea..a4f12d54943b 100644 --- a/pkgs/development/python-modules/confuse/default.nix +++ b/pkgs/development/python-modules/confuse/default.nix @@ -2,10 +2,16 @@ lib, buildPythonPackage, fetchFromGitHub, - flit-core, - pyyaml, - pytestCheckHook, pythonOlder, + + # build-system + flit-core, + + # dependencies + pyyaml, + + # tests + pytestCheckHook, }: buildPythonPackage rec { @@ -22,11 +28,17 @@ buildPythonPackage rec { hash = "sha256-TVx0cBXv/fIuli/xrFXBAmwJ1rQr5xJL1Q67FaDr4ow="; }; - nativeBuildInputs = [ flit-core ]; + build-system = [ + flit-core + ]; - propagatedBuildInputs = [ pyyaml ]; + dependencies = [ + pyyaml + ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytestCheckHook + ]; pythonImportsCheck = [ "confuse" ]; From 171a9e8536a8ac25a464c2cc0d32fa4ee896f644 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 20 Oct 2025 11:17:27 +0300 Subject: [PATCH 17/18] python3Packages.confuse: add doronbehar as co-maintainer --- pkgs/development/python-modules/confuse/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/confuse/default.nix b/pkgs/development/python-modules/confuse/default.nix index a4f12d54943b..79736bac54f1 100644 --- a/pkgs/development/python-modules/confuse/default.nix +++ b/pkgs/development/python-modules/confuse/default.nix @@ -46,6 +46,9 @@ buildPythonPackage rec { description = "Python configuration library for Python that uses YAML"; homepage = "https://github.com/beetbox/confuse"; license = lib.licenses.mit; - maintainers = with lib.maintainers; [ lovesegfault ]; + maintainers = with lib.maintainers; [ + lovesegfault + doronbehar + ]; }; } From a1e0137d061d7ffb24d1bb4fd6f6b1e6bcd8f41c Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 26 Oct 2025 23:53:23 +0200 Subject: [PATCH 18/18] python312.pkg.beets: re-enable test_reject_different_art After comments at: https://github.com/beetbox/beets/issues/5880 --- pkgs/development/python-modules/beets/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/development/python-modules/beets/default.nix b/pkgs/development/python-modules/beets/default.nix index 4d32f27040f7..bb6a8822fa56 100644 --- a/pkgs/development/python-modules/beets/default.nix +++ b/pkgs/development/python-modules/beets/default.nix @@ -231,8 +231,6 @@ buildPythonPackage rec { "test/plugins/test_art.py::AlbumArtPerformOperationTest::test_resize" ]; disabledTests = extraDisabledTests ++ [ - # https://github.com/beetbox/beets/issues/5880 - "test_reject_different_art" # touches network "test_merge_duplicate_album" # The existence of the dependency reflink (see comment above), causes this