biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / certomancer / default.nix
blobb04866a54607c5823a5c791d0ff80f4de0faa130
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,
31 buildPythonPackage rec {
32   pname = "certomancer";
33   version = "0.12.0";
34   pyproject = true;
36   # https://github.com/MatthiasValvekens/certomancer/issues/12
37   disabled = pythonOlder "3.7" || pythonAtLeast "3.12";
39   src = fetchFromGitHub {
40     owner = "MatthiasValvekens";
41     repo = "certomancer";
42     rev = "refs/tags/v${version}";
43     hash = "sha256-c2Fq4YTHQvhxuZrpKQYZvqHIMfubbkeKV4rctELLeJU=";
44   };
46   build-system = [
47     setuptools
48     wheel
49   ];
51   dependencies = [
52     asn1crypto
53     click
54     cryptography
55     python-dateutil
56     pyyaml
57     tzlocal
58   ];
60   optional-dependencies = {
61     requests-mocker = [ requests-mock ];
62     web-api = [
63       jinja2
64       werkzeug
65     ];
66     pkcs11 = [ python-pkcs11 ];
67   };
69   nativeCheckInputs = [
70     freezegun
71     pyhanko-certvalidator
72     pytest-aiohttp
73     pytestCheckHook
74     pytz
75     requests
76   ] ++ lib.flatten (builtins.attrValues optional-dependencies);
78   disabledTests = [
79     # pyhanko_certvalidator.errors.DisallowedAlgorithmError
80     "test_validate"
81   ];
83   pythonImportsCheck = [ "certomancer" ];
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   };