Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 pythonAtLeast, 6 fetchFromGitHub, 7 # build-system 8 setuptools, 9 wheel, 10 # dependencies 11 asn1crypto, 12 click, 13 cryptography, 14 python-dateutil, 15 pyyaml, 16 tzlocal, 17 # optional-dependencies 18 requests-mock, 19 jinja2, 20 werkzeug, 21 python-pkcs11, 22 # nativeCheckInputs 23 freezegun, 24 pyhanko-certvalidator, 25 pytest-aiohttp, 26 pytestCheckHook, 27 pytz, 28 requests, 29}: 30 31buildPythonPackage rec { 32 pname = "certomancer"; 33 version = "0.12.0"; 34 pyproject = true; 35 36 # https://github.com/MatthiasValvekens/certomancer/issues/12 37 disabled = pythonOlder "3.7" || pythonAtLeast "3.12"; 38 39 src = fetchFromGitHub { 40 owner = "MatthiasValvekens"; 41 repo = "certomancer"; 42 rev = "refs/tags/v${version}"; 43 hash = "sha256-c2Fq4YTHQvhxuZrpKQYZvqHIMfubbkeKV4rctELLeJU="; 44 }; 45 46 build-system = [ 47 setuptools 48 wheel 49 ]; 50 51 dependencies = [ 52 asn1crypto 53 click 54 cryptography 55 python-dateutil 56 pyyaml 57 tzlocal 58 ]; 59 60 passthru.optional-dependencies = { 61 requests-mocker = [ requests-mock ]; 62 web-api = [ 63 jinja2 64 werkzeug 65 ]; 66 pkcs11 = [ python-pkcs11 ]; 67 }; 68 69 nativeCheckInputs = [ 70 freezegun 71 pyhanko-certvalidator 72 pytest-aiohttp 73 pytestCheckHook 74 pytz 75 requests 76 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); 77 78 disabledTests = [ 79 # pyhanko_certvalidator.errors.DisallowedAlgorithmError 80 "test_validate" 81 ]; 82 83 pythonImportsCheck = [ "certomancer" ]; 84 85 meta = { 86 description = "Quickly construct, mock & deploy PKI test configurations using simple declarative configuration"; 87 mainProgram = "certomancer"; 88 homepage = "https://github.com/MatthiasValvekens/certomancer"; 89 license = lib.licenses.mit; 90 maintainers = [ ]; 91 }; 92}