2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
pythonAtLeast,
|
|
|
|
fetchFromGitHub,
|
|
|
|
# build-system
|
|
|
|
setuptools,
|
|
|
|
wheel,
|
|
|
|
# dependencies
|
|
|
|
asn1crypto,
|
|
|
|
click,
|
|
|
|
cryptography,
|
|
|
|
python-dateutil,
|
|
|
|
pyyaml,
|
|
|
|
tzlocal,
|
|
|
|
# optional-dependencies
|
|
|
|
requests-mock,
|
|
|
|
jinja2,
|
|
|
|
werkzeug,
|
|
|
|
python-pkcs11,
|
|
|
|
# nativeCheckInputs
|
|
|
|
freezegun,
|
|
|
|
pyhanko-certvalidator,
|
|
|
|
pytest-aiohttp,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytz,
|
|
|
|
requests,
|
2022-04-27 09:35:20 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "certomancer";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.12.0";
|
|
|
|
pyproject = true;
|
2023-08-22 20:05:09 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# https://github.com/MatthiasValvekens/certomancer/issues/12
|
|
|
|
disabled = pythonOlder "3.7" || pythonAtLeast "3.12";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MatthiasValvekens";
|
|
|
|
repo = "certomancer";
|
2023-08-22 20:05:09 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-c2Fq4YTHQvhxuZrpKQYZvqHIMfubbkeKV4rctELLeJU=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [
|
2023-08-22 20:05:09 +00:00
|
|
|
setuptools
|
|
|
|
wheel
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
dependencies = [
|
2022-04-27 09:35:20 +00:00
|
|
|
asn1crypto
|
|
|
|
click
|
2024-06-05 15:53:02 +00:00
|
|
|
cryptography
|
2022-04-27 09:35:20 +00:00
|
|
|
python-dateutil
|
2023-08-22 20:05:09 +00:00
|
|
|
pyyaml
|
2022-04-27 09:35:20 +00:00
|
|
|
tzlocal
|
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
passthru.optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
requests-mocker = [ requests-mock ];
|
2023-08-22 20:05:09 +00:00
|
|
|
web-api = [
|
|
|
|
jinja2
|
|
|
|
werkzeug
|
|
|
|
];
|
2024-06-05 15:53:02 +00:00
|
|
|
pkcs11 = [ python-pkcs11 ];
|
2023-08-22 20:05:09 +00:00
|
|
|
};
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-04-27 09:35:20 +00:00
|
|
|
freezegun
|
|
|
|
pyhanko-certvalidator
|
|
|
|
pytest-aiohttp
|
2023-08-22 20:05:09 +00:00
|
|
|
pytestCheckHook
|
2022-04-27 09:35:20 +00:00
|
|
|
pytz
|
|
|
|
requests
|
2023-08-22 20:05:09 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
disabledTests = [
|
|
|
|
# pyhanko_certvalidator.errors.DisallowedAlgorithmError
|
|
|
|
"test_validate"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "certomancer" ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
meta = {
|
2022-04-27 09:35:20 +00:00
|
|
|
description = "Quickly construct, mock & deploy PKI test configurations using simple declarative configuration";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "certomancer";
|
2022-04-27 09:35:20 +00:00
|
|
|
homepage = "https://github.com/MatthiasValvekens/certomancer";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ wolfangaukang ];
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
}
|