From 3af6539795d2130ae003f359f8e65bd127741ffa Mon Sep 17 00:00:00 2001 From: Anton Mosich Date: Fri, 7 Nov 2025 02:01:16 +0100 Subject: [PATCH] python3Packages.pyhanko-certvalidator: 0.26.8 -> 0.29.0 pyhanko-certvalidator was moved into the pyhanko repository, see https://docs.pyhanko.eu/en/latest/changelog.html#certvalidator-release-0-27-0. --- .../pyhanko-certvalidator/default.nix | 47 ++++++++++++------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/pyhanko-certvalidator/default.nix b/pkgs/development/python-modules/pyhanko-certvalidator/default.nix index d2663cb70d56..0a7d6dcbd759 100644 --- a/pkgs/development/python-modules/pyhanko-certvalidator/default.nix +++ b/pkgs/development/python-modules/pyhanko-certvalidator/default.nix @@ -1,34 +1,43 @@ { lib, - aiohttp, - asn1crypto, buildPythonPackage, - cryptography, fetchFromGitHub, - freezegun, + nix-update-script, + + asn1crypto, + cryptography, oscrypto, + requests, + uritools, + + aiohttp, + freezegun, pytest-asyncio, pytestCheckHook, - pythonOlder, - requests, setuptools, - uritools, }: buildPythonPackage rec { pname = "pyhanko-certvalidator"; - version = "0.26.8"; + version = "0.29.0"; pyproject = true; - disabled = pythonOlder "3.7"; - src = fetchFromGitHub { owner = "MatthiasValvekens"; - repo = "certvalidator"; - tag = "v${version}"; - hash = "sha256-Gvahyuz3n/CNAEzMXS5Z0Z85yDqLUQu8Yis5oJ2jaKc="; + repo = "pyhanko"; + tag = "pyhanko-certvalidator/v${version}"; + hash = "sha256-ZDHAcI2yoiVifYt05V85lz8mJmoyi10g4XoLQ+LhLHE="; }; + sourceRoot = "${src.name}/pkgs/pyhanko-certvalidator"; + + postPatch = '' + substituteInPlace src/pyhanko_certvalidator/version.py \ + --replace-fail "0.0.0.dev1" "${version}" \ + --replace-fail "(0, 0, 0, 'dev1')" "tuple(\"${version}\".split(\".\"))" + substituteInPlace pyproject.toml --replace-fail "0.0.0.dev1" "${version}" + ''; + build-system = [ setuptools ]; dependencies = [ @@ -48,11 +57,17 @@ buildPythonPackage rec { pythonImportsCheck = [ "pyhanko_certvalidator" ]; + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex=pyhanko-certvalidator/v(.*)" + ]; + }; + meta = with lib; { description = "Python library for validating X.509 certificates and paths"; - homepage = "https://github.com/MatthiasValvekens/certvalidator"; - changelog = "https://github.com/MatthiasValvekens/certvalidator/blob/v${version}/changelog.md"; + homepage = "https://github.com/MatthiasValvekens/pyHanko/tree/master/pkgs/pyhanko-certvalidator"; + changelog = "https://github.com/MatthiasValvekens/pyhanko/blob/pyhanko-certvalidator/${src.tag}/docs/changelog.rst#pyhanko-certvalidator"; license = licenses.mit; - maintainers = [ ]; + maintainers = [ lib.maintainers.antonmosich ]; }; }