This commit is contained in:
mjallen18
2026-03-31 14:15:54 -05:00
parent 35154eb694
commit a125017c93

View File

@@ -0,0 +1,61 @@
{
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";
};
}