diff --git a/pkgs/development/python-modules/pyhanko/default.nix b/pkgs/development/python-modules/pyhanko/default.nix index 947f3911ce3d..f8cf0d88cbf2 100644 --- a/pkgs/development/python-modules/pyhanko/default.nix +++ b/pkgs/development/python-modules/pyhanko/default.nix @@ -1,32 +1,40 @@ { lib, - aiohttp, - asn1crypto, + stdenv, buildPythonPackage, - certomancer, + fetchFromGitHub, + + # build-system + setuptools, + + # dependencies + asn1crypto, click, cryptography, - defusedxml, - fetchFromGitHub, - fonttools, - freezegun, - oscrypto, - pillow, pyhanko-certvalidator, - pytest-aiohttp, - pytestCheckHook, - python-barcode, - python-pae, - python-pkcs11, - pythonOlder, pyyaml, qrcode, requests, - requests-mock, - setuptools, tzlocal, + + # optional-dependencies + oscrypto, + defusedxml, + fonttools, uharfbuzz, + pillow, + python-barcode, + python-pkcs11, + aiohttp, xsdata, + + # tests + certomancer, + freezegun, + pytest-aiohttp, + pytestCheckHook, + python-pae, + requests-mock, }: buildPythonPackage rec { @@ -34,8 +42,6 @@ buildPythonPackage rec { version = "0.25.1"; pyproject = true; - disabled = pythonOlder "3.8"; - src = fetchFromGitHub { owner = "MatthiasValvekens"; repo = "pyHanko"; @@ -56,7 +62,7 @@ buildPythonPackage rec { tzlocal ]; - passthru.optional-dependencies = { + optional-dependencies = { extra-pubkey-algs = [ oscrypto ]; xmp = [ defusedxml ]; opentype = [ @@ -76,11 +82,11 @@ buildPythonPackage rec { aiohttp certomancer freezegun - python-pae pytest-aiohttp - requests-mock pytestCheckHook - ] ++ lib.flatten (lib.attrValues passthru.optional-dependencies); + python-pae + requests-mock + ] ++ lib.flatten (lib.attrValues optional-dependencies); disabledTestPaths = [ # ModuleNotFoundError: No module named 'csc_dummy' @@ -115,12 +121,15 @@ buildPythonPackage rec { pythonImportsCheck = [ "pyhanko" ]; - meta = with lib; { + meta = { description = "Sign and stamp PDF files"; mainProgram = "pyhanko"; homepage = "https://github.com/MatthiasValvekens/pyHanko"; changelog = "https://github.com/MatthiasValvekens/pyHanko/blob/v${version}/docs/changelog.rst"; - license = licenses.mit; + license = lib.licenses.mit; maintainers = [ ]; + # Most tests fail with: + # OSError: One or more parameters passed to a function were not valid. + broken = stdenv.isDarwin; }; }