2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
2023-07-15 17:15:38 +00:00
|
|
|
, stdenv
|
2023-05-24 13:37:59 +00:00
|
|
|
, aiohttp
|
2023-07-15 17:15:38 +00:00
|
|
|
, alexapy
|
2023-05-24 13:37:59 +00:00
|
|
|
, async-timeout
|
|
|
|
, buildPythonPackage
|
|
|
|
, click
|
|
|
|
, construct
|
|
|
|
, dacite
|
|
|
|
, fetchFromGitHub
|
|
|
|
, paho-mqtt
|
|
|
|
, poetry-core
|
|
|
|
, pycryptodome
|
2023-07-15 17:15:38 +00:00
|
|
|
, pycryptodomex
|
2023-05-24 13:37:59 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2023-07-15 17:15:38 +00:00
|
|
|
, pythonRelaxDepsHook
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-roborock";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "0.32.3";
|
2023-05-24 13:37:59 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabled = pythonOlder "3.10";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "humbertogontijo";
|
|
|
|
repo = "python-roborock";
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-rKE+dgq0ax/EZ0qYkGVsnHhNxyt3F74hI2tZAaOHCqI=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"pycryptodome"
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
2023-07-15 17:15:38 +00:00
|
|
|
pythonRelaxDepsHook
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2023-07-15 17:15:38 +00:00
|
|
|
alexapy
|
2023-05-24 13:37:59 +00:00
|
|
|
aiohttp
|
|
|
|
async-timeout
|
|
|
|
click
|
|
|
|
construct
|
|
|
|
dacite
|
|
|
|
paho-mqtt
|
|
|
|
pycryptodome
|
2023-07-15 17:15:38 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
pycryptodomex
|
2023-05-24 13:37:59 +00: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";
|
|
|
|
changelog = "https://github.com/humbertogontijo/python-roborock/blob/v${version}/CHANGELOG.md";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|