2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
appdirs,
|
|
|
|
buildPythonPackage,
|
|
|
|
cryptography,
|
|
|
|
fetchFromGitHub,
|
|
|
|
flit-core,
|
|
|
|
id,
|
|
|
|
importlib-resources,
|
|
|
|
pretend,
|
|
|
|
pydantic,
|
|
|
|
pyjwt,
|
|
|
|
pyopenssl,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
rich,
|
|
|
|
securesystemslib,
|
|
|
|
sigstore-protobuf-specs,
|
|
|
|
sigstore-rekor-types,
|
|
|
|
tuf,
|
2024-01-13 08:15:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sigstore-python";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.1.5";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sigstore";
|
|
|
|
repo = "sigstore-python";
|
2024-01-25 14:12:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-lqmrM4r1yPVCcvWNC9CKYMyryuIyliI2Y+TAYgAwA1Y=";
|
2024-01-13 08:15:51 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [ flit-core ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2024-01-13 08:15:51 +00:00
|
|
|
appdirs
|
|
|
|
cryptography
|
|
|
|
id
|
|
|
|
importlib-resources
|
|
|
|
pydantic
|
|
|
|
pyjwt
|
|
|
|
pyopenssl
|
|
|
|
requests
|
|
|
|
rich
|
|
|
|
securesystemslib
|
|
|
|
sigstore-protobuf-specs
|
|
|
|
sigstore-rekor-types
|
|
|
|
tuf
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2024-01-25 14:12:00 +00:00
|
|
|
pretend
|
2024-01-13 08:15:51 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "sigstore" ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Tests require network access
|
|
|
|
"test_fail_init_url"
|
|
|
|
"test_get_identity_token_bad_code"
|
|
|
|
"test_identity_proof_claim_lookup"
|
|
|
|
"test_init_url"
|
|
|
|
"test_production"
|
|
|
|
"test_sct_verify_keyring"
|
|
|
|
"test_sign_rekor_entry_consistent"
|
|
|
|
"test_verification_materials_retrieves_rekor_entry"
|
|
|
|
"test_verifier"
|
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A codesigning tool for Python packages";
|
|
|
|
homepage = "https://github.com/sigstore/sigstore-python";
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://github.com/sigstore/sigstore-python/blob/${version}/CHANGELOG.md";
|
2024-01-13 08:15:51 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ];
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "sigstore";
|
2024-01-13 08:15:51 +00:00
|
|
|
};
|
|
|
|
}
|