Files
nix-config/packages/python/python-roborock/default.nix
mjallen18 37b0c50821 fmt
2026-04-05 13:50:18 -05:00

64 lines
1.4 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
python3Packages,
}:
python3Packages.buildPythonPackage rec {
pname = "python-roborock";
version = "5.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "Python-roborock";
repo = "python-roborock";
tag = "v${version}";
hash = "sha256-H642iHioX6bqReBj7QWI9W5mtvvguEO1lZedt+d8QvU=";
};
pythonRelaxDeps = [
"protobuf"
"pycryptodome"
];
build-system = with python3Packages; [ hatchling ];
dependencies =
with python3Packages;
[
aiohttp
aiomqtt
click
construct
paho-mqtt
protobuf
pycryptodome
pyrate-limiter
vacuum-map-parser-roborock
click-shell
]
++ lib.optionals stdenv.hostPlatform.isDarwin (with python3Packages; [ pycryptodomex ]);
nativeCheckInputs = with python3Packages; [
aioresponses
freezegun
pytest-asyncio
pytestCheckHook
syrupy
];
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [ "roborock" ];
meta = {
description = "Python library & console tool for controlling Roborock vacuum";
homepage = "https://github.com/Python-roborock/python-roborock";
changelog = "https://github.com/Python-roborock/python-roborock/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "roborock";
};
}