1{
2 lib,
3 aiohttp,
4 aioresponses,
5 buildPythonPackage,
6 click,
7 cryptography,
8 dateparser,
9 fetchFromGitHub,
10 marshmallow-dataclass,
11 poetry-core,
12 pyjwt,
13 pythonOlder,
14 pytest-asyncio,
15 pytestCheckHook,
16 tabulate,
17 typeguard,
18}:
19
20buildPythonPackage rec {
21 pname = "renault-api";
22 version = "0.2.8";
23 pyproject = true;
24
25 disabled = pythonOlder "3.8";
26
27 src = fetchFromGitHub {
28 owner = "hacf-fr";
29 repo = "renault-api";
30 rev = "refs/tags/v${version}";
31 hash = "sha256-j9KF2vqDZqQ35mDW/Qx6uy8H9hwuwBYfdcDXD1Cs7rQ=";
32 };
33
34 build-system = [ poetry-core ];
35
36 dependencies = [
37 aiohttp
38 cryptography
39 marshmallow-dataclass
40 pyjwt
41 ];
42
43 optional-dependencies = {
44 cli = [
45 click
46 dateparser
47 tabulate
48 ];
49 };
50
51 nativeCheckInputs = [
52 aioresponses
53 pytest-asyncio
54 pytestCheckHook
55 typeguard
56 ] ++ lib.flatten (lib.attrValues optional-dependencies);
57
58 pythonImportsCheck = [ "renault_api" ];
59
60 meta = with lib; {
61 description = "Python library to interact with the Renault API";
62 homepage = "https://github.com/hacf-fr/renault-api";
63 changelog = "https://github.com/hacf-fr/renault-api/releases/tag/v${version}";
64 license = licenses.mit;
65 maintainers = with maintainers; [ fab ];
66 mainProgram = "renault-api";
67 };
68}