2023-08-22 20:05:09 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, marshmallow
|
|
|
|
, marshmallow-dataclass
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, responses
|
|
|
|
, setuptools
|
|
|
|
, typing-extensions
|
|
|
|
, vcrpy
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pygitguardian";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.10.0";
|
2023-08-22 20:05:09 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "GitGuardian";
|
|
|
|
repo = "py-gitguardian";
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-o5Hur51Dh4HWI7f4BpfEi40/inVAJgYF3xXZGPMyF8E=";
|
2023-08-22 20:05:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
marshmallow
|
|
|
|
marshmallow-dataclass
|
|
|
|
requests
|
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
vcrpy
|
|
|
|
responses
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pygitguardian"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests require an API key
|
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"
|
2023-10-09 19:29:22 +00:00
|
|
|
"test_sca_client_scan_diff"
|
|
|
|
"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";
|
|
|
|
changelog = "https://github.com/GitGuardian/py-gitguardian/blob/${version}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|