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 15}: 16 17buildPythonPackage rec { 18 pname = "pyhanko-certvalidator"; 19 version = "0.23.0"; 20 format = "pyproject"; 21 22 disabled = pythonOlder "3.7"; 23 24 src = fetchFromGitHub { 25 owner = "MatthiasValvekens"; 26 repo = "certvalidator"; 27 rev = "refs/tags/v${version}"; 28 hash = "sha256-q2YxncyMHmbRmcoLb68huK02CYiKqF2CFRl8vkUfxg4="; 29 }; 30 31 postPatch = '' 32 substituteInPlace pyproject.toml \ 33 --replace ', "pytest-runner",' "" 34 ''; 35 36 nativeBuildInputs = [ 37 setuptools 38 ]; 39 40 propagatedBuildInputs = [ 41 asn1crypto 42 cryptography 43 oscrypto 44 requests 45 uritools 46 ]; 47 48 nativeCheckInputs = [ 49 aiohttp 50 freezegun 51 pytest-asyncio 52 pytestCheckHook 53 ]; 54 55 disabledTestPaths = [ 56 # Requests 57 "tests/test_crl_client.py" 58 ]; 59 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 # certificate expired 2022-09-17 72 "test_revocation_mode_soft" 73 ]; 74 75 pythonImportsCheck = [ 76 "pyhanko_certvalidator" 77 ]; 78 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 }; 86}