From 394aa116ed1677cba3b516b343ec015ec99ffd85 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 28 Jan 2026 22:34:19 +0000 Subject: [PATCH 1/4] python3Packages.papis: cleanup --- .../python-modules/papis/default.nix | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/pkgs/development/python-modules/papis/default.nix b/pkgs/development/python-modules/papis/default.nix index 2a6a1f2ee37a..282c35b3f60a 100644 --- a/pkgs/development/python-modules/papis/default.nix +++ b/pkgs/development/python-modules/papis/default.nix @@ -45,16 +45,26 @@ pytest-cov-stub, sphinx, sphinx-click, + writableTmpDirAsHomeHook, }: -buildPythonPackage rec { + +buildPythonPackage (finalAttrs: { pname = "papis"; version = "0.14.1"; pyproject = true; + patches = [ + (fetchpatch2 { + name = "fix-support-new-click-in-papisrunner.patch"; + url = "https://github.com/papis/papis/commit/0e3ffff4bd1b62cdf0a9fdc7f54d6a2e2ab90082.patch?full_index=1"; + hash = "sha256-KUw5U5izTTWqXHzGWLibtqHWAsVxla6SA8x6SJ07/zU="; + }) + ]; + src = fetchFromGitHub { owner = "papis"; repo = "papis"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-V4YswLNYwfBYe/Td0PEeDG++ClZoF08yxXjUXuyppPI="; }; @@ -81,7 +91,7 @@ buildPythonPackage rec { requests stevedore ] - ++ lib.optionals withOptDeps optional-dependencies.complete; + ++ lib.optionals withOptDeps finalAttrs.passthru.optional-dependencies.complete; optional-dependencies = { complete = [ @@ -102,12 +112,9 @@ buildPythonPackage rec { pytest-cov-stub sphinx sphinx-click + writableTmpDirAsHomeHook ]; - preCheck = '' - export HOME=$(mktemp -d); - ''; - enabledTestPaths = [ "papis" "tests" @@ -126,23 +133,15 @@ buildPythonPackage rec { "test_git_cli" ]; - patches = [ - (fetchpatch2 { - name = "fix-support-new-click-in-papisrunner.patch"; - url = "https://github.com/papis/papis/commit/0e3ffff4bd1b62cdf0a9fdc7f54d6a2e2ab90082.patch?full_index=1"; - hash = "sha256-KUw5U5izTTWqXHzGWLibtqHWAsVxla6SA8x6SJ07/zU="; - }) - ]; - meta = { description = "Powerful command-line document and bibliography manager"; mainProgram = "papis"; homepage = "https://papis.readthedocs.io/"; - changelog = "https://github.com/papis/papis/blob/${src.tag}/CHANGELOG.md"; + changelog = "https://github.com/papis/papis/blob/${finalAttrs.src.tag}/CHANGELOG.md"; license = lib.licenses.gpl3Only; maintainers = with lib.maintainers; [ nico202 teto ]; }; -} +}) From 6010d858ea765f09fd619f689f22d375a62b95b6 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 28 Jan 2026 22:35:51 +0000 Subject: [PATCH 2/4] python3Packages.papis: disable on python>=3.14 --- pkgs/development/python-modules/papis/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/papis/default.nix b/pkgs/development/python-modules/papis/default.nix index 282c35b3f60a..b4e0f5e341d2 100644 --- a/pkgs/development/python-modules/papis/default.nix +++ b/pkgs/development/python-modules/papis/default.nix @@ -3,6 +3,7 @@ buildPythonPackage, fetchFromGitHub, fetchpatch2, + pythonAtLeast, # build-system hatchling, From ae168f1839521e3417884cac7aeeef0eed7b4805 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 28 Jan 2026 22:38:24 +0000 Subject: [PATCH 3/4] python3Packages.isbnlib: cleanup --- .../python-modules/isbnlib/default.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/isbnlib/default.nix b/pkgs/development/python-modules/isbnlib/default.nix index afa64d0f522f..982e913aa2c6 100644 --- a/pkgs/development/python-modules/isbnlib/default.nix +++ b/pkgs/development/python-modules/isbnlib/default.nix @@ -2,12 +2,16 @@ lib, buildPythonPackage, fetchFromGitHub, + + # build-system + setuptools, + + # tests pytestCheckHook, pytest-cov-stub, - setuptools, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "isbnlib"; version = "3.10.14"; pyproject = true; @@ -15,7 +19,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "xlcnd"; repo = "isbnlib"; - rev = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-d6p0wv7kj+NOZJRE2rzQgb7PXv+E3tASIibYCjzCdx8="; }; @@ -32,8 +36,8 @@ buildPythonPackage rec { enabledTestPaths = [ "isbnlib/test/" ]; - # All disabled tests require a network connection disabledTests = [ + # Require a network connection "test_cache" "test_editions_any" "test_editions_merge" @@ -66,8 +70,8 @@ buildPythonPackage rec { meta = { description = "Extract, clean, transform, hyphenate and metadata for ISBNs"; homepage = "https://github.com/xlcnd/isbnlib"; - changelog = "https://github.com/xlcnd/isbnlib/blob/v${version}/CHANGES.txt"; + changelog = "https://github.com/xlcnd/isbnlib/blob/${finalAttrs.src.tag}/CHANGES.txt"; license = lib.licenses.lgpl3Plus; maintainers = with lib.maintainers; [ dotlambda ]; }; -} +}) From 387771b7b50c4567b326ec6cf91fa34ad694c7e7 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 28 Jan 2026 22:43:08 +0000 Subject: [PATCH 4/4] python3Packages.isbnlib: skip failing test on python>=3.14 --- pkgs/development/python-modules/isbnlib/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/isbnlib/default.nix b/pkgs/development/python-modules/isbnlib/default.nix index 982e913aa2c6..a6383e0573b1 100644 --- a/pkgs/development/python-modules/isbnlib/default.nix +++ b/pkgs/development/python-modules/isbnlib/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + pythonAtLeast, # build-system setuptools, @@ -16,6 +17,9 @@ buildPythonPackage (finalAttrs: { version = "3.10.14"; pyproject = true; + # Several tests fail and suggest that the package is incompatible with python >= 3.14 + disabled = pythonAtLeast "3.14"; + src = fetchFromGitHub { owner = "xlcnd"; repo = "isbnlib";