Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / python-roborock / default.nix
blob49ea2cc277d38c39ee71bde021fccac79c826119
2   lib,
3   stdenv,
4   aiohttp,
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 = "2.0.0";
24   pyproject = true;
26   disabled = pythonOlder "3.10";
28   src = fetchFromGitHub {
29     owner = "humbertogontijo";
30     repo = "python-roborock";
31     rev = "refs/tags/v${version}";
32     hash = "sha256-vtT6hsyiP1FxWo5PezcjJACknCT9JEhqSQ6C4FpU+Jg=";
33   };
35   postPatch = ''
36     substituteInPlace pyproject.toml \
37       --replace-fail "poetry-core==1.8.0" "poetry-core"
38   '';
40   pythonRelaxDeps = [ "pycryptodome" ];
42   build-system = [ poetry-core ];
44   nativeBuildInputs = [ pythonRelaxDepsHook ];
46   propagatedBuildInputs = [
47     aiohttp
48     async-timeout
49     click
50     construct
51     dacite
52     paho-mqtt
53     pycryptodome
54   ] ++ lib.optionals stdenv.isDarwin [ pycryptodomex ];
56   nativeCheckInputs = [
57     pytest-asyncio
58     pytestCheckHook
59   ];
61   pythonImportsCheck = [ "roborock" ];
63   meta = with lib; {
64     description = "Python library & console tool for controlling Roborock vacuum";
65     homepage = "https://github.com/humbertogontijo/python-roborock";
66     changelog = "https://github.com/humbertogontijo/python-roborock/blob/v${version}/CHANGELOG.md";
67     license = licenses.gpl3Only;
68     maintainers = with maintainers; [ fab ];
69     mainProgram = "roborock";
70   };