From cb408e09cba81a8b6523bc74426357a79ea7d3fa Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 17 Mar 2024 20:29:43 +0100 Subject: [PATCH] python311Packages.signxml: init at 3.2.2 Python XML Signature and XAdES library https://github.com/XML-Security/signxml --- .../python-modules/signxml/default.nix | 57 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 59 insertions(+) create mode 100644 pkgs/development/python-modules/signxml/default.nix diff --git a/pkgs/development/python-modules/signxml/default.nix b/pkgs/development/python-modules/signxml/default.nix new file mode 100644 index 000000000000..c6c6ccea9b15 --- /dev/null +++ b/pkgs/development/python-modules/signxml/default.nix @@ -0,0 +1,57 @@ +{ lib +, buildPythonPackage +, certifi +, cryptography +, fetchFromGitHub +, lxml +, pyopenssl +, pytestCheckHook +, pythonOlder +, setuptools +}: + +buildPythonPackage rec { + pname = "signxml"; + version = "3.2.2"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "XML-Security"; + repo = "signxml"; + rev = "refs/tags/v${version}"; + hash = "sha256-TlOIHYvx1o46nr/3qq45pgeOqmuyWaaTGvOS0Jwz1zs="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ + certifi + cryptography + lxml + pyopenssl + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "signxml" + ]; + + pytestFlagsArray = [ + "test/test.py" + ]; + + meta = with lib; { + description = "Python XML Signature and XAdES library"; + homepage = "https://github.com/XML-Security/signxml"; + changelog = "https://github.com/XML-Security/signxml/blob/${src.rev}/Changes.rst"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bd88b3e03089..85c75e424147 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13528,6 +13528,8 @@ self: super: with self; { signedjson = callPackage ../development/python-modules/signedjson { }; + signxml = callPackage ../development/python-modules/signxml { }; + sigrok = callPackage ../development/python-modules/sigrok { }; sigstore = callPackage ../development/python-modules/sigstore { };