2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, asn1crypto
|
2023-08-22 20:05:09 +00:00
|
|
|
, buildPythonPackage
|
2022-04-27 09:35:20 +00:00
|
|
|
, click
|
2023-08-22 20:05:09 +00:00
|
|
|
, cryptography
|
|
|
|
, fetchFromGitHub
|
2022-04-27 09:35:20 +00:00
|
|
|
, freezegun
|
|
|
|
, jinja2
|
2023-08-22 20:05:09 +00:00
|
|
|
, oscrypto
|
2022-04-27 09:35:20 +00:00
|
|
|
, pyhanko-certvalidator
|
2023-08-22 20:05:09 +00:00
|
|
|
, pytest-aiohttp
|
|
|
|
, pytestCheckHook
|
|
|
|
, python-dateutil
|
|
|
|
, python-pkcs11
|
|
|
|
, pythonOlder
|
|
|
|
, pytz
|
|
|
|
, pyyaml
|
2022-04-27 09:35:20 +00:00
|
|
|
, requests
|
|
|
|
, requests-mock
|
2023-08-22 20:05:09 +00:00
|
|
|
, setuptools
|
|
|
|
, tzlocal
|
2022-04-27 09:35:20 +00:00
|
|
|
, werkzeug
|
2023-08-22 20:05:09 +00:00
|
|
|
, wheel
|
2022-04-27 09:35:20 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "certomancer";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "0.11.0";
|
|
|
|
format = "pyproject";
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MatthiasValvekens";
|
|
|
|
repo = "certomancer";
|
2023-08-22 20:05:09 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-UQV0Tk4C5b5iBZ34Je59gK2dLTaJusnpxdyNicIh2Q8=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace ' "pytest-runner",' "" \
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
wheel
|
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
asn1crypto
|
|
|
|
click
|
|
|
|
oscrypto
|
|
|
|
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 = {
|
|
|
|
requests-mocker = [
|
|
|
|
requests-mock
|
|
|
|
];
|
|
|
|
web-api = [
|
|
|
|
jinja2
|
|
|
|
werkzeug
|
|
|
|
];
|
|
|
|
pkcs12 = [
|
|
|
|
cryptography
|
|
|
|
];
|
|
|
|
pkcs11 = [
|
|
|
|
python-pkcs11
|
|
|
|
];
|
|
|
|
};
|
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"
|
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"certomancer"
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Quickly construct, mock & deploy PKI test configurations using simple declarative configuration";
|
|
|
|
homepage = "https://github.com/MatthiasValvekens/certomancer";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ wolfangaukang ];
|
|
|
|
};
|
|
|
|
}
|