1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
{
lib,
stdenv,
aiohttp,
async-timeout,
buildPythonPackage,
click,
construct,
dacite,
fetchFromGitHub,
paho-mqtt,
poetry-core,
pycryptodome,
pycryptodomex,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
pythonRelaxDepsHook,
}:
buildPythonPackage rec {
pname = "python-roborock";
version = "2.2.1";
pyproject = true;
disabled = pythonOlder "3.10";
src = fetchFromGitHub {
owner = "humbertogontijo";
repo = "python-roborock";
rev = "refs/tags/v${version}";
hash = "sha256-qyaERNaisfDWXW1IeyFMOV6nLqT+0O9QJ4U02LOyiuE=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "poetry-core==1.8.0" "poetry-core"
'';
pythonRelaxDeps = [ "pycryptodome" ];
build-system = [ poetry-core ];
nativeBuildInputs = [ pythonRelaxDepsHook ];
propagatedBuildInputs = [
aiohttp
async-timeout
click
construct
dacite
paho-mqtt
pycryptodome
] ++ lib.optionals stdenv.isDarwin [ pycryptodomex ];
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [ "roborock" ];
meta = with lib; {
description = "Python library & console tool for controlling Roborock vacuum";
homepage = "https://github.com/humbertogontijo/python-roborock";
changelog = "https://github.com/humbertogontijo/python-roborock/blob/v${version}/CHANGELOG.md";
license = licenses.gpl3Only;
maintainers = with maintainers; [ fab ];
mainProgram = "roborock";
};
}
|