Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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.9.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-lDs2H5GUf3fhTSX+20dD0FNW2oirkgQQk5t7GKSnKe4="; 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_health_check" 53 "test_multi_content_scan" 54 "test_content_scan_exceptions" 55 "test_multi_content_exceptions" 56 "test_content_scan" 57 "test_extra_headers" 58 "test_multiscan_parameters" 59 "test_quota_overview" 60 "test_versions_from_headers" 61 "test_create_honeytoken" 62 "test_create_jwt" 63 ]; 64 65 meta = with lib; { 66 description = "Library to access the GitGuardian API"; 67 homepage = "https://github.com/GitGuardian/py-gitguardian"; 68 changelog = "https://github.com/GitGuardian/py-gitguardian/blob/${version}/CHANGELOG.md"; 69 license = licenses.mit; 70 maintainers = with maintainers; [ fab ]; 71 }; 72}