From a125017c933ac8906146582230fcfa1c9c7fe9a9 Mon Sep 17 00:00:00 2001 From: mjallen18 Date: Tue, 31 Mar 2026 14:15:54 -0500 Subject: [PATCH] roborock --- packages/python/python-roborock/default.nix | 61 +++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 packages/python/python-roborock/default.nix diff --git a/packages/python/python-roborock/default.nix b/packages/python/python-roborock/default.nix new file mode 100644 index 0000000..5127be6 --- /dev/null +++ b/packages/python/python-roborock/default.nix @@ -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"; + }; +} \ No newline at end of file