1{
2 lib,
3 aiohttp,
4 aiomqtt,
5 buildPythonPackage,
6 cachetools,
7 defusedxml,
8 docker,
9 fetchFromGitHub,
10 hatch-vcs,
11 hatchling,
12 numpy,
13 pillow,
14 pycountry,
15 pytest-asyncio,
16 pytestCheckHook,
17 pythonOlder,
18 svg-py,
19 testfixtures,
20}:
21
22buildPythonPackage rec {
23 pname = "deebot-client";
24 version = "8.4.1";
25 pyproject = true;
26
27 disabled = pythonOlder "3.12";
28
29 src = fetchFromGitHub {
30 owner = "DeebotUniverse";
31 repo = "client.py";
32 rev = "refs/tags/${version}";
33 hash = "sha256-lOKih1TzZRP4HIGzjmCkALtaz5s/lR2SjjqCnBK0G6Y=";
34 };
35
36 pythonRelaxDeps = [
37 "aiohttp"
38 "defusedxml"
39 ];
40
41 build-system = [
42 hatch-vcs
43 hatchling
44 ];
45
46 dependencies = [
47 aiohttp
48 aiomqtt
49 cachetools
50 defusedxml
51 numpy
52 pillow
53 svg-py
54 ];
55
56 nativeCheckInputs = [
57 docker
58 pycountry
59 pytest-asyncio
60 pytestCheckHook
61 testfixtures
62 ];
63
64 pythonImportsCheck = [ "deebot_client" ];
65
66 disabledTests = [
67 # Tests require running container
68 "test_last_message_received_at"
69 "test_client_bot_subscription"
70 "test_client_reconnect_manual"
71 "test_p2p_success"
72 "test_p2p_not_supported"
73 "test_p2p_data_type_not_supported"
74 "test_p2p_to_late"
75 "test_p2p_parse_error"
76 "test_mqtt_task_exceptions"
77 "test_mqtt_task_exceptions"
78 "test_client_reconnect_on_broker_error"
79 ];
80
81 meta = with lib; {
82 description = "Deebot client library";
83 homepage = "https://github.com/DeebotUniverse/client.py";
84 changelog = "https://github.com/DeebotUniverse/client.py/releases/tag/${version}";
85 license = licenses.gpl3Only;
86 maintainers = with maintainers; [ fab ];
87 };
88}