From 6d882ff425e065c4ee0f454e0c7e7fc13e1fbae0 Mon Sep 17 00:00:00 2001 From: "P. R. d. O" Date: Thu, 21 Apr 2022 18:24:45 -0600 Subject: [PATCH] python310Packages.certomancer: init at 0.8.2 --- .../python-modules/certomancer/default.nix | 71 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 73 insertions(+) create mode 100644 pkgs/development/python-modules/certomancer/default.nix diff --git a/pkgs/development/python-modules/certomancer/default.nix b/pkgs/development/python-modules/certomancer/default.nix new file mode 100644 index 000000000000..3d863165f296 --- /dev/null +++ b/pkgs/development/python-modules/certomancer/default.nix @@ -0,0 +1,71 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, asn1crypto +, click +, oscrypto +, pyyaml +, python-dateutil +, tzlocal +, pytest-aiohttp +, pytz +, freezegun +, jinja2 +, pyhanko-certvalidator +, requests +, requests-mock +, werkzeug +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "certomancer"; + version = "0.8.2"; + format = "setuptools"; + disabled = pythonOlder "3.7"; + + # Tests are only available on GitHub + src = fetchFromGitHub { + owner = "MatthiasValvekens"; + repo = "certomancer"; + rev = version; + sha256 = "sha256-H43NlFNTwZtedHsB7c62MocwQVOi5JjVJxRcZY+Wn7Y="; + }; + + propagatedBuildInputs = [ + asn1crypto + click + oscrypto + pyyaml + python-dateutil + tzlocal + ]; + + postPatch = '' + substituteInPlace setup.py \ + --replace ", 'pytest-runner'" "" \ + --replace "pyhanko-certvalidator==0.19.2" "pyhanko-certvalidator==0.19.5" + ''; + + checkInputs = [ + freezegun + jinja2 + pyhanko-certvalidator + pytest-aiohttp + pytz + requests + requests-mock + werkzeug + pytestCheckHook + ]; + + pythonImportsCheck = [ "certomancer" ]; + + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a6524cd8e64c..8e4ce686c94d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1555,6 +1555,8 @@ in { certipy = callPackage ../development/python-modules/certipy { }; + certomancer = callPackage ../development/python-modules/certomancer { }; + certvalidator = callPackage ../development/python-modules/certvalidator { }; cffi = callPackage ../development/python-modules/cffi { };