Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5, aiohttp 6, asn1crypto 7, cryptography 8, freezegun 9, oscrypto 10, requests 11, uritools 12, openssl 13, pytest-asyncio 14, pytestCheckHook 15}: 16 17buildPythonPackage rec { 18 pname = "pyhanko-certvalidator"; 19 version = "0.20.1"; 20 format = "setuptools"; 21 22 disabled = pythonOlder "3.7"; 23 24 # Tests are only available on GitHub 25 src = fetchFromGitHub { 26 owner = "MatthiasValvekens"; 27 repo = "certvalidator"; 28 rev = version; 29 hash = "sha256-0RSveoSZb7R6d4cMlF1mIrDfnTx2DYNwfTMMtmg+RpM="; 30 }; 31 32 propagatedBuildInputs = [ 33 asn1crypto 34 cryptography 35 oscrypto 36 requests 37 uritools 38 ]; 39 40 nativeCheckInputs = [ 41 aiohttp 42 freezegun 43 pytest-asyncio 44 pytestCheckHook 45 ]; 46 47 disabledTestPaths = [ 48 # Requests 49 "tests/test_crl_client.py" 50 ]; 51 52 disabledTests = [ 53 # Look for nonexisting certificates 54 "test_basic_certificate_validator_tls" 55 # Failed to fetch OCSP response from http://ocsp.digicert.com 56 "test_fetch_ocsp_aiohttp" 57 "test_fetch_ocsp_requests" 58 "test_fetch_ocsp_err_requests" 59 # Unable to build a validation path for the certificate "%s" - no issuer matching "%s" was found 60 "test_revocation_mode_hard_aiohttp_autofetch" 61 # The path could not be validated because no revocation information could be found for intermediate certificate 1 62 "test_revocation_mode_hard" 63 # certificate expired 2022-09-17 64 "test_revocation_mode_soft" 65 ]; 66 67 pythonImportsCheck = [ 68 "pyhanko_certvalidator" 69 ]; 70 71 meta = with lib; { 72 description = "Python library for validating X.509 certificates and paths"; 73 homepage = "https://github.com/MatthiasValvekens/certvalidator"; 74 license = licenses.mit; 75 maintainers = with maintainers; [ wolfangaukang ]; 76 }; 77}