2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
asn1crypto,
|
|
|
|
azure-identity,
|
|
|
|
azure-keyvault-keys,
|
|
|
|
boto3,
|
|
|
|
botocore,
|
|
|
|
buildPythonPackage,
|
|
|
|
cryptography,
|
|
|
|
ed25519,
|
|
|
|
fetchFromGitHub,
|
|
|
|
google-cloud-kms,
|
|
|
|
hatchling,
|
|
|
|
pynacl,
|
|
|
|
pyspx,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "securesystemslib";
|
|
|
|
version = "0.31.0";
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "secure-systems-lab";
|
|
|
|
repo = "securesystemslib";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-REi38rIVZmWawFGcrPl9QzSthW4jHZDr/0ug7kJRz3Y=";
|
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-04-21 15:54:59 +00:00
|
|
|
--replace-fail "hatchling==1.18.0" "hatchling"
|
2024-01-13 08:15:51 +00:00
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeBuildInputs = [ hatchling ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
2024-04-21 15:54:59 +00:00
|
|
|
PySPX = [ pyspx ];
|
2024-01-02 11:29:13 +00:00
|
|
|
awskms = [
|
|
|
|
boto3
|
|
|
|
botocore
|
|
|
|
cryptography
|
|
|
|
];
|
|
|
|
azurekms = [
|
|
|
|
azure-identity
|
|
|
|
azure-keyvault-keys
|
|
|
|
cryptography
|
|
|
|
];
|
2024-04-21 15:54:59 +00:00
|
|
|
crypto = [ cryptography ];
|
2024-01-02 11:29:13 +00:00
|
|
|
gcpkms = [
|
|
|
|
cryptography
|
|
|
|
google-cloud-kms
|
|
|
|
];
|
|
|
|
hsm = [
|
|
|
|
asn1crypto
|
|
|
|
cryptography
|
2024-04-21 15:54:59 +00:00
|
|
|
# pykcs11
|
2024-01-02 11:29:13 +00:00
|
|
|
];
|
2024-04-21 15:54:59 +00:00
|
|
|
pynacl = [ pynacl ];
|
2024-01-02 11:29:13 +00:00
|
|
|
# Circular dependency
|
|
|
|
# sigstore = [
|
|
|
|
# sigstore
|
|
|
|
# ];
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
ed25519
|
|
|
|
pytestCheckHook
|
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "securesystemslib" ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
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/v${version}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|