Merge pull request #271294 from fabaff/securesystemslib

python311Packages.tuf: init at 3.1.0
This commit is contained in:
Fabian Affolter 2023-12-01 08:42:28 +01:00 committed by GitHub
commit 840f94f78d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 210 additions and 0 deletions

View file

@ -0,0 +1,47 @@
{ lib
, buildPythonPackage
, cffi
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, setuptools
, wheel
}:
buildPythonPackage rec {
pname = "pyspx";
version = "0.5.2";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "sphincs";
repo = "pyspx";
rev = "refs/tags/v${version}";
hash = "sha256-hMZ7JZoo5RdUwQYpGjtZznH/O6rBUXv+svfOAI0cjqs=";
fetchSubmodules = true;
};
nativeBuildInputs = [
cffi
setuptools
wheel
];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"pyspx"
];
meta = with lib; {
description = "Python bindings for SPHINCS";
homepage = "https://github.com/sphincs/pyspx";
changelog = "https://github.com/sphincs/pyspx/releases/tag/v${version}";
license = licenses.cc0;
maintainers = with maintainers; [ fab ];
};
}

View file

@ -0,0 +1,96 @@
{ lib
, asn1crypto
, azure-identity
, azure-keyvault-keys
, boto3
, botocore
, buildPythonPackage
, cryptography
, ed25519
, fetchFromGitHub
, google-cloud-kms
, hatchling
, pynacl
, pyspx
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "securesystemslib";
version = "0.30.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "secure-systems-lab";
repo = "securesystemslib";
rev = "refs/tags/v${version}";
hash = "sha256-Jqw65VTMLA/X7VQGxN0BlTzF/lxBYirDKBf+xI9cfhg=";
};
nativeBuildInputs = [
hatchling
];
passthru.optional-dependencies = {
PySPX = [
pyspx
];
awskms = [
boto3
botocore
cryptography
];
azurekms = [
azure-identity
azure-keyvault-keys
cryptography
];
crypto = [
cryptography
];
gcpkms = [
cryptography
google-cloud-kms
];
hsm = [
asn1crypto
cryptography
# pykcs11
];
pynacl = [
pynacl
];
# Circular dependency
# sigstore = [
# sigstore
# ];
};
nativeCheckInputs = [
ed25519
pytestCheckHook
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
pythonImportsCheck = [
"securesystemslib"
];
disabledTestPaths = [
# pykcs11 is not available
"tests/test_hsm_signer.py"
# Ignore vendorized tests
"securesystemslib/_vendor/"
];
meta = with lib; {
description = "Cryptographic and general-purpose routines";
homepage = "https://github.com/secure-systems-lab/securesystemslib";
changelog = "https://github.com/secure-systems-lab/securesystemslib/blob/${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}

View file

@ -0,0 +1,61 @@
{ lib
, buildPythonPackage
, ed25519
, fetchFromGitHub
, hatchling
, pytestCheckHook
, pythonOlder
, requests
, securesystemslib
}:
buildPythonPackage rec {
pname = "tuf";
version = "3.1.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "theupdateframework";
repo = "python-tuf";
rev = "refs/tags/v${version}";
hash = "sha256-IGF/8RdX7Oxl6gdqPGN1w/6q4zaei+MnYXBZepB4KUA=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "hatchling==" "hatchling>="
'';
nativeBuildInputs = [
hatchling
];
propagatedBuildInputs = [
requests
securesystemslib
] ++ securesystemslib.optional-dependencies.pynacl
++ securesystemslib.optional-dependencies.crypto;
nativeCheckInputs = [
ed25519
pytestCheckHook
];
pythonImportsCheck = [
"tuf"
];
preCheck = ''
cd tests
'';
meta = with lib; {
description = "Python reference implementation of The Update Framework (TUF)";
homepage = "https://github.com/theupdateframework/python-tuf";
changelog = "https://github.com/theupdateframework/python-tuf/blob/v${version}/docs/CHANGELOG.md";
license = with licenses; [ asl20 mit ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -11102,6 +11102,8 @@ self: super: with self; {
pysptk = callPackage ../development/python-modules/pysptk { }; pysptk = callPackage ../development/python-modules/pysptk { };
pyspx = callPackage ../development/python-modules/pyspx { };
pysqlcipher3 = callPackage ../development/python-modules/pysqlcipher3 { pysqlcipher3 = callPackage ../development/python-modules/pysqlcipher3 {
inherit (pkgs) sqlcipher; inherit (pkgs) sqlcipher;
}; };
@ -12753,6 +12755,8 @@ self: super: with self; {
secure = callPackage ../development/python-modules/secure { }; secure = callPackage ../development/python-modules/secure { };
securesystemslib = callPackage ../development/python-modules/securesystemslib { };
securetar = callPackage ../development/python-modules/securetar { }; securetar = callPackage ../development/python-modules/securetar { };
sectools = callPackage ../development/python-modules/sectools { }; sectools = callPackage ../development/python-modules/sectools { };
@ -14345,6 +14349,8 @@ self: super: with self; {
tubes = callPackage ../development/python-modules/tubes { }; tubes = callPackage ../development/python-modules/tubes { };
tuf = callPackage ../development/python-modules/tuf { };
tunigo = callPackage ../development/python-modules/tunigo { }; tunigo = callPackage ../development/python-modules/tunigo { };
tubeup = callPackage ../development/python-modules/tubeup { }; tubeup = callPackage ../development/python-modules/tubeup { };