1{
2 lib,
3 authlib,
4 buildPythonPackage,
5 fetchFromGitHub,
6 httpx,
7 mashumaro,
8 orjson,
9 pytest-asyncio,
10 pytest-httpx,
11 poetry-core,
12 pytestCheckHook,
13 pythonOlder,
14 pythonRelaxDepsHook,
15 pytz,
16 respx,
17}:
18
19buildPythonPackage rec {
20 pname = "pydiscovergy";
21 version = "3.0.1";
22 pyproject = true;
23
24 disabled = pythonOlder "3.10";
25
26 src = fetchFromGitHub {
27 owner = "jpbede";
28 repo = "pydiscovergy";
29 rev = "refs/tags/v${version}";
30 hash = "sha256-0zyg1EBPOfcA1jAgtNbDCVaTv9hJQ2Xidl+doHbjKrM=";
31 };
32
33 postPatch = ''
34 sed -i '/addopts =/d' pyproject.toml
35 '';
36
37 build-system = [ poetry-core ];
38
39 nativeBuildInputs = [ pythonRelaxDepsHook ];
40
41 dependencies = [
42 authlib
43 httpx
44 mashumaro
45 orjson
46 pytz
47 ];
48
49 nativeCheckInputs = [
50 pytest-asyncio
51 pytest-httpx
52 pytestCheckHook
53 respx
54 ];
55
56 pythonImportsCheck = [ "pydiscovergy" ];
57
58 meta = with lib; {
59 description = "Library for interacting with the Discovergy API";
60 homepage = "https://github.com/jpbede/pydiscovergy";
61 changelog = "https://github.com/jpbede/pydiscovergy/releases/tag/v${version}";
62 license = licenses.mit;
63 maintainers = with maintainers; [ fab ];
64 };
65}