2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
marshmallow-dataclass,
|
2024-07-01 15:47:52 +00:00
|
|
|
marshmallow,
|
|
|
|
pdm-backend,
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
responses,
|
|
|
|
setuptools,
|
|
|
|
typing-extensions,
|
|
|
|
vcrpy,
|
2023-08-22 20:05:09 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pygitguardian";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "1.16.0";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2023-08-22 20:05:09 +00:00
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "GitGuardian";
|
|
|
|
repo = "py-gitguardian";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-2yuYu02Nd9B3UfzrM0p19hDM5HmvigBf48gu+ZSO0kU=";
|
2023-08-22 20:05:09 +00:00
|
|
|
};
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"marshmallow-dataclass"
|
|
|
|
"setuptools"
|
|
|
|
];
|
|
|
|
|
|
|
|
build-system = [
|
|
|
|
pdm-backend
|
|
|
|
];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
dependencies = [
|
2023-08-22 20:05:09 +00:00
|
|
|
marshmallow
|
|
|
|
marshmallow-dataclass
|
|
|
|
requests
|
2024-07-01 15:47:52 +00:00
|
|
|
setuptools
|
2023-08-22 20:05:09 +00:00
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
vcrpy
|
|
|
|
responses
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pygitguardian" ];
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests require an API key
|
2024-01-13 08:15:51 +00:00
|
|
|
"test_bogus_rate_limit"
|
2023-10-09 19:29:22 +00:00
|
|
|
"test_compute_sca_files"
|
2023-08-22 20:05:09 +00:00
|
|
|
"test_content_scan_exceptions"
|
|
|
|
"test_content_scan"
|
2023-10-09 19:29:22 +00:00
|
|
|
"test_create_honeytoken"
|
|
|
|
"test_create_jwt"
|
2023-08-22 20:05:09 +00:00
|
|
|
"test_extra_headers"
|
2023-10-09 19:29:22 +00:00
|
|
|
"test_health_check"
|
|
|
|
"test_multi_content_exceptions"
|
|
|
|
"test_multi_content_scan"
|
2023-08-22 20:05:09 +00:00
|
|
|
"test_multiscan_parameters"
|
|
|
|
"test_quota_overview"
|
2024-01-13 08:15:51 +00:00
|
|
|
"test_rate_limit"
|
2024-07-01 15:47:52 +00:00
|
|
|
"test_read_metadata_bad_response"
|
2024-09-19 14:19:46 +00:00
|
|
|
"test_read_metadata_no_remediation_message"
|
|
|
|
"test_read_metadata_remediation_message"
|
2023-10-09 19:29:22 +00:00
|
|
|
"test_sca_client_scan_diff"
|
2024-02-07 01:22:34 +00:00
|
|
|
"test_sca_scan_all_with_params"
|
2023-10-09 19:29:22 +00:00
|
|
|
"test_sca_scan_directory_invalid_tar"
|
|
|
|
"test_sca_scan_directory"
|
2023-08-22 20:05:09 +00:00
|
|
|
"test_versions_from_headers"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library to access the GitGuardian API";
|
|
|
|
homepage = "https://github.com/GitGuardian/py-gitguardian";
|
2024-02-07 01:22:34 +00:00
|
|
|
changelog = "https://github.com/GitGuardian/py-gitguardian/blob/v${version}/CHANGELOG.md";
|
2023-08-22 20:05:09 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|