Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, aiohttp 4, async-timeout 5, buildPythonPackage 6, click 7, construct 8, dacite 9, fetchFromGitHub 10, paho-mqtt 11, poetry-core 12, pycryptodome 13, pycryptodomex 14, pytest-asyncio 15, pytestCheckHook 16, pythonOlder 17}: 18 19buildPythonPackage rec { 20 pname = "python-roborock"; 21 version = "0.23.6"; 22 format = "pyproject"; 23 24 disabled = pythonOlder "3.7"; 25 26 src = fetchFromGitHub { 27 owner = "humbertogontijo"; 28 repo = "python-roborock"; 29 rev = "refs/tags/v${version}"; 30 hash = "sha256-5WgCVdmEhFrKYT7Uflnjv6OIISk//VH2aoxVwlWuPTk="; 31 }; 32 33 nativeBuildInputs = [ 34 poetry-core 35 ]; 36 37 propagatedBuildInputs = [ 38 aiohttp 39 async-timeout 40 click 41 construct 42 dacite 43 paho-mqtt 44 pycryptodome 45 ] ++ lib.optionals stdenv.isDarwin [ 46 pycryptodomex 47 ]; 48 49 nativeCheckInputs = [ 50 pytest-asyncio 51 pytestCheckHook 52 ]; 53 54 pythonImportsCheck = [ 55 "roborock" 56 ]; 57 58 meta = with lib; { 59 description = "Python library & console tool for controlling Roborock vacuum"; 60 homepage = "https://github.com/humbertogontijo/python-roborock"; 61 changelog = "https://github.com/humbertogontijo/python-roborock/blob/v${version}/CHANGELOG.md"; 62 license = licenses.gpl3Only; 63 maintainers = with maintainers; [ fab ]; 64 }; 65}