Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pyhanko-certvalidator / default.nix
blobe55936a8e41c3c5f53085a1bd506576253ca4bd3
1 { lib
2 , aiohttp
3 , asn1crypto
4 , buildPythonPackage
5 , cryptography
6 , fetchFromGitHub
7 , freezegun
8 , oscrypto
9 , pytest-asyncio
10 , pytestCheckHook
11 , pythonOlder
12 , requests
13 , setuptools
14 , uritools
17 buildPythonPackage rec {
18   pname = "pyhanko-certvalidator";
19   version = "0.26.3";
20   pyproject = true;
22   disabled = pythonOlder "3.7";
24   src = fetchFromGitHub {
25     owner = "MatthiasValvekens";
26     repo = "certvalidator";
27     rev = "refs/tags/v${version}";
28     hash = "sha256-uUmsWiN182g+kxrCny7UNLDHdAdqKk64w6vnjmGBNjM=";
29   };
31   postPatch = ''
32     substituteInPlace pyproject.toml \
33       --replace ', "pytest-runner",' ""
34   '';
36   nativeBuildInputs = [
37     setuptools
38   ];
40   propagatedBuildInputs = [
41     asn1crypto
42     cryptography
43     oscrypto
44     requests
45     uritools
46   ];
48   nativeCheckInputs = [
49     aiohttp
50     freezegun
51     pytest-asyncio
52     pytestCheckHook
53   ];
55   disabledTestPaths = [
56     # Requests
57     "tests/test_crl_client.py"
58   ];
60   disabledTests = [
61     # Look for nonexisting certificates
62     "test_basic_certificate_validator_tls"
63     # Failed to fetch OCSP response from http://ocsp.digicert.com
64     "test_fetch_ocsp_aiohttp"
65     "test_fetch_ocsp_requests"
66     "test_fetch_ocsp_err_requests"
67     # Unable to build a validation path for the certificate "%s" - no issuer matching "%s" was found
68     "test_revocation_mode_hard_aiohttp_autofetch"
69     # The path could not be validated because no revocation information could be found for intermediate certificate 1
70     "test_revocation_mode_hard"
71     # ValueError: Hash algorithm not known for ed448
72     "test_ed"
73   ];
75   pythonImportsCheck = [
76     "pyhanko_certvalidator"
77   ];
79   meta = with lib; {
80     description = "Python library for validating X.509 certificates and paths";
81     homepage = "https://github.com/MatthiasValvekens/certvalidator";
82     changelog = "https://github.com/MatthiasValvekens/certvalidator/blob/v${version}/changelog.md";
83     license = licenses.mit;
84     maintainers = with maintainers; [ wolfangaukang ];
85   };