From 14b80828f375e4708352a13ccb6b81a0e65b7eda Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 2 Dec 2025 17:42:21 +0100 Subject: [PATCH] pyjwkest: remove 'future' dependency to fix build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This dependency is unused in pyjwkest, but disabled in nixpkgs. There is an upstream pull request pending to remove the dependency: https://github.com/IdentityPython/pyjwkest/pull/107 Before this change, these 2 Python packages failed to build: nix build .#python313Packages.pyjwkest nix build .#python313Packages.oic With the following message: error: … while evaluating the attribute 'drvPath' at /nix/store/65sypvf1f26fyi1vq6h25wg9z5gipgy8-source/lib/customisation.nix:429:7: 428| // { 429| drvPath = | ^ 430| assert condition; … while evaluating the attribute 'drvPath' at /nix/store/65sypvf1f26fyi1vq6h25wg9z5gipgy8-source/lib/customisation.nix:429:7: 428| // { 429| drvPath = | ^ 430| assert condition; … while calling the 'derivationStrict' builtin at :37:12: 36| 37| strict = derivationStrict drvAttrs; | ^ 38| (stack trace truncated; use '--show-trace' to show the full, detailed trace) error: future-1.0.0 not supported for interpreter python3.13 (I am using the oic package via the pretix-oidc plugin.) (cherry picked from commit dbefe89d9e3c8cad3d417754bbb819963f97be99) --- .../python-modules/pyjwkest/default.nix | 45 ++++++++++++------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/pyjwkest/default.nix b/pkgs/development/python-modules/pyjwkest/default.nix index 4663752311d1e..2d5e97887688b 100644 --- a/pkgs/development/python-modules/pyjwkest/default.nix +++ b/pkgs/development/python-modules/pyjwkest/default.nix @@ -1,35 +1,48 @@ { lib, buildPythonPackage, - fetchPypi, - future, + fetchFromGitHub, pycryptodomex, - pytest, + pytestCheckHook, requests, + setuptools, six, }: buildPythonPackage rec { pname = "pyjwkest"; - version = "1.4.2"; - format = "setuptools"; + version = "1.4.4"; + pyproject = true; - meta = { - description = "Implementation of JWT, JWS, JWE and JWK"; - homepage = "https://github.com/rohe/pyjwkest"; - license = lib.licenses.asl20; + src = fetchFromGitHub { + owner = "IdentityPython"; + repo = "pyjwkest"; + tag = "v${version}"; + hash = "sha256-G4/qLOOQHsNSMVndUdYBhrrk8uEufbI8Od3ziQiY0XI="; }; - src = fetchPypi { - inherit pname version; - sha256 = "5560fd5ba08655f29ff6ad1df1e15dc05abc9d976fcbcec8d2b5167f49b70222"; - }; + build-system = [ setuptools ]; + + # Remove unused future import, see pending PR: + # https://github.com/IdentityPython/pyjwkest/pull/107 + postPatch = '' + substituteInPlace setup.py \ + --replace-fail '"future"' "" + ''; - buildInputs = [ pytest ]; - propagatedBuildInputs = [ - future + dependencies = [ pycryptodomex requests six ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "jwkest" ]; + + meta = { + description = "Implementation of JWT, JWS, JWE and JWK"; + homepage = "https://github.com/IdentityPython/pyjwkest"; + license = lib.licenses.asl20; + }; }