Robert Schütz
2025-11-05 10:01:19 -08:00
parent 4328c8f8f5
commit 9b120a628e
@@ -7,70 +7,45 @@
buildPythonPackage,
click,
construct,
dacite,
fetchFromGitHub,
fetchpatch,
freezegun,
hatchling,
paho-mqtt,
poetry-core,
pycryptodome,
pycryptodomex,
pyrate-limiter,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
vacuum-map-parser-roborock,
pyshark,
pyyaml,
click-shell,
syrupy,
}:
buildPythonPackage rec {
pname = "python-roborock";
version = "2.50.2";
version = "3.7.0";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "Python-roborock";
repo = "python-roborock";
tag = "v${version}";
hash = "sha256-66kSNkivq6BHnqIqx1INtdoysBJfCqV76yIAJiHmfxQ=";
hash = "sha256-KgrpfcGaq84VWlcGvKMjJfz4bEkC9l1waj1ZucQa7DA=";
};
patches = [
# https://github.com/Python-roborock/python-roborock/pull/527
(fetchpatch {
name = "replace async-timeout with asyncio.timeout.patch";
url = "https://github.com/Python-roborock/python-roborock/commit/f376027f5933e163441cf1815b820056731a3632.patch";
excludes = [ "poetry.lock" ];
hash = "sha256-53xsQ3yxh9CilC9hNS31rDXZVFG+mMhe7ffOb4L6bUE=";
})
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "poetry-core==1.8.0" "poetry-core"
'';
pythonRelaxDeps = [ "pycryptodome" ];
build-system = [ poetry-core ];
build-system = [ hatchling ];
dependencies = [
aiohttp
aiomqtt
click
construct
dacite
paho-mqtt
pycryptodome
pyrate-limiter
vacuum-map-parser-roborock
pyyaml
pyshark
click-shell
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ pycryptodomex ];
@@ -85,12 +60,12 @@ buildPythonPackage rec {
pythonImportsCheck = [ "roborock" ];
meta = with lib; {
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 = licenses.gpl3Only;
maintainers = with maintainers; [ fab ];
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "roborock";
};
}