Files
nixpkgs/pkgs/development/python-modules/deebot-client/default.nix
T
2026-02-23 15:37:20 +00:00

97 lines
1.9 KiB
Nix

{
lib,
aiohttp,
aiomqtt,
buildPythonPackage,
cachetools,
defusedxml,
docker,
fetchFromGitHub,
orjson,
pkg-config,
pycountry,
pytest-asyncio,
pytest-codspeed,
pytestCheckHook,
pythonOlder,
rustPlatform,
syrupy,
testfixtures,
xz,
}:
buildPythonPackage (finalAttrs: {
pname = "deebot-client";
version = "18.0.0";
pyproject = true;
disabled = pythonOlder "3.13";
src = fetchFromGitHub {
owner = "DeebotUniverse";
repo = "client.py";
tag = finalAttrs.version;
hash = "sha256-ZKLA8RbYsysY+pAT9K6z2yThWo2YeM6TLqLBMuo+/GQ=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs) pname version src;
hash = "sha256-UcgQKv8YhsWdOzKQ7K3HTX/FmopQen7HQ/Jyuj+hePI=";
};
nativeBuildInputs = [
pkg-config
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
];
buildInputs = [ xz ];
dependencies = [
aiohttp
aiomqtt
cachetools
defusedxml
orjson
];
nativeCheckInputs = [
docker
pycountry
pytest-asyncio
pytest-codspeed
pytestCheckHook
syrupy
testfixtures
];
preCheck = ''
rm -rf deebot_client
'';
pythonImportsCheck = [ "deebot_client" ];
disabledTests = [
# Tests require running container
"test_last_message_received_at"
"test_client_bot_subscription"
"test_client_reconnect_manual"
"test_p2p_success"
"test_p2p_not_supported"
"test_p2p_data_type_not_supported"
"test_p2p_to_late"
"test_p2p_parse_error"
"test_mqtt_task_exceptions"
"test_mqtt_task_exceptions"
"test_client_reconnect_on_broker_error"
];
meta = {
description = "Deebot client library";
homepage = "https://github.com/DeebotUniverse/client.py";
changelog = "https://github.com/DeebotUniverse/client.py/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ fab ];
};
})