Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / python-roborock / default.nix
blob3fa39b27fba576a51ba7c8c4b4ba985a5981dc47
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
21 buildPythonPackage rec {
22   pname = "python-roborock";
23   version = "0.35.3";
24   format = "pyproject";
26   disabled = pythonOlder "3.10";
28   src = fetchFromGitHub {
29     owner = "humbertogontijo";
30     repo = "python-roborock";
31     rev = "refs/tags/v${version}";
32     hash = "sha256-3XTVHs+mLePudLnr+bAN4pHvHtUcE0D5Hw+50Vxhlzw=";
33   };
35   postPatch = ''
36     substituteInPlace pyproject.toml \
37       --replace "poetry-core==1.6.1" "poetry-core"
38   '';
40   pythonRelaxDeps = [
41     "pycryptodome"
42   ];
44   nativeBuildInputs = [
45     poetry-core
46     pythonRelaxDepsHook
47   ];
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   ];
62   nativeCheckInputs = [
63     pytest-asyncio
64     pytestCheckHook
65   ];
67   pythonImportsCheck = [
68     "roborock"
69   ];
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   };