From bef2986729d95d0530c58e8729a675781abf5008 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 2 Dec 2025 13:27:58 +0200 Subject: [PATCH 1/2] python3.pkgs.beets: allow to override passthru --- .../python-modules/beets/default.nix | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/beets/default.nix b/pkgs/development/python-modules/beets/default.nix index 250f1ea62d726..47216bc931161 100644 --- a/pkgs/development/python-modules/beets/default.nix +++ b/pkgs/development/python-modules/beets/default.nix @@ -145,7 +145,7 @@ buildPythonPackage rec { typing-extensions lap ] - ++ (lib.concatMap (p: p.propagatedBuildInputs) (lib.attrValues passthru.plugins.enabled)); + ++ (lib.concatMap (p: p.propagatedBuildInputs) (lib.attrValues beets.passthru.plugins.enabled)); nativeBuildInputs = [ gobject-introspection @@ -186,7 +186,7 @@ buildPythonPackage rec { 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}" + "--prefix PATH : ${lib.makeBinPath beets.passthru.plugins.wrapperBins}" ]; nativeCheckInputs = [ @@ -199,12 +199,12 @@ buildPythonPackage rec { pillow writableTmpDirAsHomeHook ] - ++ passthru.plugins.wrapperBins; + ++ beets.passthru.plugins.wrapperBins; __darwinAllowLocalNetworking = true; disabledTestPaths = - passthru.plugins.disabledTestPaths + beets.passthru.plugins.disabledTestPaths ++ [ # touches network "test/plugins/test_aura.py" @@ -246,14 +246,14 @@ buildPythonPackage rec { \( -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"} + ${diffPlugins (lib.attrNames beets.passthru.plugins.builtins) "plugins_available"} export BEETS_TEST_SHELL="${lib.getExe bashInteractive} --norc" env EDITOR="${writeScript "beetconfig.sh" '' #!${runtimeShell} cat > "$1" < Date: Tue, 2 Dec 2025 19:10:31 +0200 Subject: [PATCH 2/2] python3.pkgs.beets: use `let in` for version --- pkgs/development/python-modules/beets/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/beets/default.nix b/pkgs/development/python-modules/beets/default.nix index 47216bc931161..a390d64fe7f6d 100644 --- a/pkgs/development/python-modules/beets/default.nix +++ b/pkgs/development/python-modules/beets/default.nix @@ -106,7 +106,16 @@ runCommand, }: -buildPythonPackage rec { +let + # Avoid using `rec`, so that using e.g `passthru` or any other attributes + # defined inside, will have to be done via the beets argument, which can be + # overriden. Until `finalAttrs` support reaches `buildPythonPackage`, there + # is no way to avoid this. See: + # + # https://github.com/NixOS/nixpkgs/issues/258246 + version = "2.5.1"; +in +buildPythonPackage { pname = "beets"; version = "2.5.1"; src = fetchFromGitHub {