Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / certomancer / default.nix
blob641941e7f38d6cf118597b6eb2bc09c7619352aa
1 { lib
2 , asn1crypto
3 , buildPythonPackage
4 , click
5 , cryptography
6 , fetchFromGitHub
7 , freezegun
8 , jinja2
9 , oscrypto
10 , pyhanko-certvalidator
11 , pytest-aiohttp
12 , pytestCheckHook
13 , python-dateutil
14 , python-pkcs11
15 , pythonOlder
16 , pytz
17 , pyyaml
18 , requests
19 , requests-mock
20 , setuptools
21 , tzlocal
22 , werkzeug
23 , wheel
26 buildPythonPackage rec {
27   pname = "certomancer";
28   version = "0.11.0";
29   format = "pyproject";
31   disabled = pythonOlder "3.7";
33   src = fetchFromGitHub {
34     owner = "MatthiasValvekens";
35     repo = "certomancer";
36     rev = "refs/tags/v${version}";
37     hash = "sha256-UQV0Tk4C5b5iBZ34Je59gK2dLTaJusnpxdyNicIh2Q8=";
38   };
40   postPatch = ''
41     substituteInPlace pyproject.toml \
42       --replace ' "pytest-runner",' "" \
43   '';
45   nativeBuildInputs = [
46     setuptools
47     wheel
48   ];
50   propagatedBuildInputs = [
51     asn1crypto
52     click
53     oscrypto
54     python-dateutil
55     pyyaml
56     tzlocal
57   ];
59   passthru.optional-dependencies = {
60     requests-mocker = [
61       requests-mock
62     ];
63     web-api = [
64       jinja2
65       werkzeug
66     ];
67     pkcs12 = [
68       cryptography
69     ];
70     pkcs11 = [
71       python-pkcs11
72     ];
73   };
75   nativeCheckInputs = [
76     freezegun
77     pyhanko-certvalidator
78     pytest-aiohttp
79     pytestCheckHook
80     pytz
81     requests
82   ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
84   disabledTests = [
85     # pyhanko_certvalidator.errors.DisallowedAlgorithmError
86     "test_validate"
87   ];
89   pythonImportsCheck = [
90     "certomancer"
91   ];
93   meta = with lib; {
94     description = "Quickly construct, mock & deploy PKI test configurations using simple declarative configuration";
95     homepage = "https://github.com/MatthiasValvekens/certomancer";
96     license = licenses.mit;
97     maintainers = with maintainers; [ wolfangaukang ];
98   };