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