2024-04-09 19:03:04 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
aiohttp,
|
2025-01-10 09:10:23 +01:00
|
|
|
aioresponses,
|
2024-04-09 19:03:04 +02:00
|
|
|
async-timeout,
|
|
|
|
buildPythonPackage,
|
|
|
|
click,
|
|
|
|
construct,
|
|
|
|
dacite,
|
|
|
|
fetchFromGitHub,
|
2025-02-05 18:40:54 +01:00
|
|
|
freezegun,
|
2024-04-09 19:03:04 +02:00
|
|
|
paho-mqtt,
|
|
|
|
poetry-core,
|
|
|
|
pycryptodome,
|
|
|
|
pycryptodomex,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2024-12-20 13:40:09 +01:00
|
|
|
vacuum-map-parser-roborock,
|
2023-04-29 21:10:49 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-roborock";
|
2025-02-13 23:42:04 +01:00
|
|
|
version = "2.11.2";
|
2023-12-26 09:47:57 +01:00
|
|
|
pyproject = true;
|
2023-04-29 21:10:49 +02:00
|
|
|
|
2023-06-16 19:17:02 +02:00
|
|
|
disabled = pythonOlder "3.10";
|
2023-04-29 21:10:49 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "humbertogontijo";
|
|
|
|
repo = "python-roborock";
|
2024-12-20 13:40:09 +01:00
|
|
|
tag = "v${version}";
|
2025-02-13 23:42:04 +01:00
|
|
|
hash = "sha256-lSVq2x4SG4MnXaJHU+6RxVnqH2H6XKcEZRNGRfsmglY=";
|
2023-04-29 21:10:49 +02:00
|
|
|
};
|
|
|
|
|
2023-09-15 14:06:57 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-04-12 10:23:49 +02:00
|
|
|
--replace-fail "poetry-core==1.8.0" "poetry-core"
|
2023-09-15 14:06:57 +02:00
|
|
|
'';
|
|
|
|
|
2024-04-09 19:03:04 +02:00
|
|
|
pythonRelaxDeps = [ "pycryptodome" ];
|
2023-06-16 19:17:02 +02:00
|
|
|
|
2024-04-09 19:03:04 +02:00
|
|
|
build-system = [ poetry-core ];
|
2024-04-09 19:02:46 +02:00
|
|
|
|
2025-02-05 18:40:54 +01:00
|
|
|
dependencies = [
|
2023-04-29 21:10:49 +02:00
|
|
|
aiohttp
|
|
|
|
async-timeout
|
|
|
|
click
|
2023-05-02 20:16:56 +02:00
|
|
|
construct
|
2023-04-29 21:10:49 +02:00
|
|
|
dacite
|
|
|
|
paho-mqtt
|
|
|
|
pycryptodome
|
2024-12-20 13:40:09 +01:00
|
|
|
vacuum-map-parser-roborock
|
2024-04-09 19:03:04 +02:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ pycryptodomex ];
|
2023-04-29 21:10:49 +02:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2025-01-10 09:10:23 +01:00
|
|
|
aioresponses
|
2025-02-05 18:40:54 +01:00
|
|
|
freezegun
|
2023-04-29 21:10:49 +02:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-04-09 19:03:04 +02:00
|
|
|
pythonImportsCheck = [ "roborock" ];
|
2023-04-29 21:10:49 +02:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library & console tool for controlling Roborock vacuum";
|
|
|
|
homepage = "https://github.com/humbertogontijo/python-roborock";
|
2025-01-19 21:17:52 +01:00
|
|
|
changelog = "https://github.com/humbertogontijo/python-roborock/blob/${src.tag}/CHANGELOG.md";
|
2023-04-29 21:10:49 +02:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2024-04-09 19:02:46 +02:00
|
|
|
mainProgram = "roborock";
|
2023-04-29 21:10:49 +02:00
|
|
|
};
|
|
|
|
}
|