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.25.0";
20 pyproject = true;
21
22 disabled = pythonOlder "3.8";
23
24 src = fetchFromGitHub {
25 owner = "GitGuardian";
26 repo = "py-gitguardian";
27 tag = "v${version}";
28 hash = "sha256-XcmLaEnQ5cUTd71xvgvdS418RGOzpKydUDoSdVC/mgo=";
29 };
30
31 pythonRelaxDeps = [
32 "marshmallow-dataclass"
33 "setuptools"
34 ];
35
36 build-system = [ pdm-backend ];
37
38 dependencies = [
39 marshmallow
40 marshmallow-dataclass
41 requests
42 setuptools
43 typing-extensions
44 ];
45
46 nativeCheckInputs = [
47 pytestCheckHook
48 vcrpy
49 responses
50 ];
51
52 pythonImportsCheck = [ "pygitguardian" ];
53
54 env.GITGUARDIAN_API_KEY = "Test key for tests";
55
56 meta = with lib; {
57 description = "Library to access the GitGuardian API";
58 homepage = "https://github.com/GitGuardian/py-gitguardian";
59 changelog = "https://github.com/GitGuardian/py-gitguardian/blob/${src.tag}/CHANGELOG.md";
60 license = licenses.mit;
61 maintainers = with maintainers; [ fab ];
62 };
63}