1{ 2 lib, 3 aiohttp, 4 aiomqtt, 5 buildPythonPackage, 6 cachetools, 7 defusedxml, 8 docker, 9 fetchFromGitHub, 10 orjson, 11 pkg-config, 12 pycountry, 13 pytest-asyncio, 14 pytest-codspeed, 15 pytestCheckHook, 16 pythonOlder, 17 rustPlatform, 18 testfixtures, 19 xz, 20}: 21 22buildPythonPackage rec { 23 pname = "deebot-client"; 24 version = "15.0.0"; 25 pyproject = true; 26 27 disabled = pythonOlder "3.13"; 28 29 src = fetchFromGitHub { 30 owner = "DeebotUniverse"; 31 repo = "client.py"; 32 tag = version; 33 hash = "sha256-rTVVcbA0lsnxOlzyLq9Br9maw8CRNpww9T/FnTGCKmw="; 34 }; 35 36 cargoDeps = rustPlatform.fetchCargoVendor { 37 inherit pname version src; 38 hash = "sha256-IdaBhExbH0yotjMjkqgdbyVMrFMfAItM6vadYlldCIE="; 39 }; 40 41 pythonRelaxDeps = [ 42 "aiohttp" 43 "defusedxml" 44 "orjson" 45 ]; 46 47 nativeBuildInputs = [ 48 pkg-config 49 rustPlatform.cargoSetupHook 50 rustPlatform.maturinBuildHook 51 ]; 52 53 buildInputs = [ xz ]; 54 55 dependencies = [ 56 aiohttp 57 aiomqtt 58 cachetools 59 defusedxml 60 orjson 61 ]; 62 63 nativeCheckInputs = [ 64 docker 65 pycountry 66 pytest-asyncio 67 pytest-codspeed 68 pytestCheckHook 69 testfixtures 70 ]; 71 72 preCheck = '' 73 rm -rf deebot_client 74 ''; 75 76 pythonImportsCheck = [ "deebot_client" ]; 77 78 disabledTests = [ 79 # Tests require running container 80 "test_last_message_received_at" 81 "test_client_bot_subscription" 82 "test_client_reconnect_manual" 83 "test_p2p_success" 84 "test_p2p_not_supported" 85 "test_p2p_data_type_not_supported" 86 "test_p2p_to_late" 87 "test_p2p_parse_error" 88 "test_mqtt_task_exceptions" 89 "test_mqtt_task_exceptions" 90 "test_client_reconnect_on_broker_error" 91 ]; 92 93 meta = with lib; { 94 description = "Deebot client library"; 95 homepage = "https://github.com/DeebotUniverse/client.py"; 96 changelog = "https://github.com/DeebotUniverse/client.py/releases/tag/${version}"; 97 license = licenses.gpl3Only; 98 maintainers = with maintainers; [ fab ]; 99 }; 100}