Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 marshmallow-dataclass, 6 marshmallow, 7 pdm-backend, 8 pytestCheckHook, 9 pythonOlder, 10 requests, 11 responses, 12 setuptools, 13 typing-extensions, 14 vcrpy, 15}: 16 17buildPythonPackage rec { 18 pname = "pygitguardian"; 19 version = "1.15.2"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.8"; 23 24 src = fetchFromGitHub { 25 owner = "GitGuardian"; 26 repo = "py-gitguardian"; 27 rev = "refs/tags/v${version}"; 28 hash = "sha256-jmjlNGyGYsiwQ0qi8KiSUI38J4n1ZTzqxzY9Bn9OdqY="; 29 }; 30 31 pythonRelaxDeps = [ 32 "marshmallow-dataclass" 33 "setuptools" 34 ]; 35 36 build-system = [ 37 pdm-backend 38 ]; 39 40 dependencies = [ 41 marshmallow 42 marshmallow-dataclass 43 requests 44 setuptools 45 typing-extensions 46 ]; 47 48 nativeCheckInputs = [ 49 pytestCheckHook 50 vcrpy 51 responses 52 ]; 53 54 pythonImportsCheck = [ "pygitguardian" ]; 55 56 disabledTests = [ 57 # Tests require an API key 58 "test_bogus_rate_limit" 59 "test_compute_sca_files" 60 "test_content_scan_exceptions" 61 "test_content_scan" 62 "test_create_honeytoken" 63 "test_create_jwt" 64 "test_extra_headers" 65 "test_health_check" 66 "test_multi_content_exceptions" 67 "test_multi_content_scan" 68 "test_multiscan_parameters" 69 "test_quota_overview" 70 "test_rate_limit" 71 "test_read_metadata_bad_response" 72 "test_sca_client_scan_diff" 73 "test_sca_scan_all_with_params" 74 "test_sca_scan_directory_invalid_tar" 75 "test_sca_scan_directory" 76 "test_versions_from_headers" 77 ]; 78 79 meta = with lib; { 80 description = "Library to access the GitGuardian API"; 81 homepage = "https://github.com/GitGuardian/py-gitguardian"; 82 changelog = "https://github.com/GitGuardian/py-gitguardian/blob/v${version}/CHANGELOG.md"; 83 license = licenses.mit; 84 maintainers = with maintainers; [ fab ]; 85 }; 86}