2023-04-29 21:10:49 +02:00
|
|
|
{ lib
|
2023-05-30 19:46:31 +02:00
|
|
|
, stdenv
|
2023-04-29 21:10:49 +02:00
|
|
|
, aiohttp
|
|
|
|
, async-timeout
|
|
|
|
, buildPythonPackage
|
|
|
|
, click
|
2023-05-02 20:16:56 +02:00
|
|
|
, construct
|
2023-04-29 21:10:49 +02:00
|
|
|
, dacite
|
|
|
|
, fetchFromGitHub
|
|
|
|
, paho-mqtt
|
|
|
|
, poetry-core
|
|
|
|
, pycryptodome
|
2023-05-30 19:46:31 +02:00
|
|
|
, pycryptodomex
|
2023-04-29 21:10:49 +02:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-roborock";
|
2023-06-08 21:12:04 +02:00
|
|
|
version = "0.23.6";
|
2023-04-29 21:10:49 +02:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "humbertogontijo";
|
|
|
|
repo = "python-roborock";
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-06-08 21:12:04 +02:00
|
|
|
hash = "sha256-5WgCVdmEhFrKYT7Uflnjv6OIISk//VH2aoxVwlWuPTk=";
|
2023-04-29 21:10:49 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
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
|
2023-05-30 19:46:31 +02:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
pycryptodomex
|
2023-04-29 21:10:49 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
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";
|
2023-05-02 22:45:21 +02:00
|
|
|
changelog = "https://github.com/humbertogontijo/python-roborock/blob/v${version}/CHANGELOG.md";
|
2023-04-29 21:10:49 +02:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|