1{
2 lib,
3 amqtt,
4 buildPythonPackage,
5 click,
6 fetchFromGitHub,
7 mashumaro,
8 orjson,
9 paho-mqtt,
10 poetry-core,
11 pytest-asyncio,
12 pytestCheckHook,
13 pythonOlder,
14 pythonRelaxDepsHook,
15 tabulate,
16}:
17
18buildPythonPackage rec {
19 pname = "roombapy";
20 version = "1.8.1";
21 pyproject = true;
22
23 disabled = pythonOlder "3.10";
24
25 src = fetchFromGitHub {
26 owner = "pschmitt";
27 repo = "roombapy";
28 rev = "refs/tags/${version}";
29 hash = "sha256-1yfmaTzZ7cZW2+Yb3Zbo8+5TfD+H1sA0+SzC1c9MdsQ=";
30 };
31
32 nativeBuildInputs = [
33 poetry-core
34 pythonRelaxDepsHook
35 ];
36
37 pythonRelaxDeps = [ "orjson" ];
38
39 propagatedBuildInputs = [
40 mashumaro
41 orjson
42 paho-mqtt
43 ];
44
45 optional-dependencies.cli = [
46 click
47 tabulate
48 ];
49
50 nativeCheckInputs = [
51 amqtt
52 pytest-asyncio
53 pytestCheckHook
54 ];
55
56 disabledTestPaths = [
57 # Requires network access
58 "tests/test_discovery.py"
59 ];
60
61 disabledTests = [
62 # Test want to connect to a local MQTT broker
63 "test_roomba_connect"
64 ];
65
66 pythonImportsCheck = [ "roombapy" ];
67
68 meta = with lib; {
69 description = "Python program and library to control Wi-Fi enabled iRobot Roombas";
70 mainProgram = "roombapy";
71 homepage = "https://github.com/pschmitt/roombapy";
72 changelog = "https://github.com/pschmitt/roombapy/releases/tag/${version}";
73 license = licenses.mit;
74 maintainers = [ ];
75 };
76}