1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, marshmallow 5, marshmallow-dataclass 6, pytestCheckHook 7, pythonOlder 8, requests 9, responses 10, setuptools 11, typing-extensions 12, vcrpy 13}: 14 15buildPythonPackage rec { 16 pname = "pygitguardian"; 17 version = "1.11.0"; 18 format = "pyproject"; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchFromGitHub { 23 owner = "GitGuardian"; 24 repo = "py-gitguardian"; 25 rev = "refs/tags/v${version}"; 26 hash = "sha256-Vr0+y3Zi7DsXzm2COOlMqUVjlZMRJkaVxT8QpSePhuA="; 27 }; 28 29 nativeBuildInputs = [ 30 setuptools 31 ]; 32 33 propagatedBuildInputs = [ 34 marshmallow 35 marshmallow-dataclass 36 requests 37 typing-extensions 38 ]; 39 40 nativeCheckInputs = [ 41 pytestCheckHook 42 vcrpy 43 responses 44 ]; 45 46 pythonImportsCheck = [ 47 "pygitguardian" 48 ]; 49 50 disabledTests = [ 51 # Tests require an API key 52 "test_compute_sca_files" 53 "test_content_scan_exceptions" 54 "test_content_scan" 55 "test_create_honeytoken" 56 "test_create_jwt" 57 "test_extra_headers" 58 "test_health_check" 59 "test_multi_content_exceptions" 60 "test_multi_content_scan" 61 "test_multiscan_parameters" 62 "test_quota_overview" 63 "test_sca_client_scan_diff" 64 "test_sca_scan_directory_invalid_tar" 65 "test_sca_scan_directory" 66 "test_versions_from_headers" 67 ]; 68 69 meta = with lib; { 70 description = "Library to access the GitGuardian API"; 71 homepage = "https://github.com/GitGuardian/py-gitguardian"; 72 changelog = "https://github.com/GitGuardian/py-gitguardian/blob/${version}/CHANGELOG.md"; 73 license = licenses.mit; 74 maintainers = with maintainers; [ fab ]; 75 }; 76}