1{ stdenv
2, lib
3, buildPythonPackage
4, pythonOlder
5, fetchFromGitHub
6, netifaces
7, pycryptodome
8, pytest-asyncio
9, pytestCheckHook
10}:
11
12buildPythonPackage rec {
13 pname = "greeclimate";
14 version = "1.4.1";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.6";
18
19 src = fetchFromGitHub {
20 owner = "cmroche";
21 repo = "greeclimate";
22 rev = "refs/tags/v${version}";
23 hash = "sha256-M4oxFi/PpqhJgZX/wM+9rSrraIZcqzubbxnihfK0W2E=";
24 };
25
26 propagatedBuildInputs = [
27 netifaces
28 pycryptodome
29 ];
30
31 nativeCheckInputs = [
32 pytest-asyncio
33 pytestCheckHook
34 ];
35
36 pythonImportsCheck = [
37 "greeclimate"
38 "greeclimate.device"
39 "greeclimate.discovery"
40 "greeclimate.exceptions"
41 "greeclimate.network"
42 ];
43
44 meta = with lib; {
45 broken = stdenv.isDarwin;
46 description = "Discover, connect and control Gree based minisplit systems";
47 homepage = "https://github.com/cmroche/greeclimate";
48 changelog = "https://github.com/cmroche/greeclimate/blob/${src.rev}/CHANGELOG.md";
49 license = licenses.gpl3Only;
50 maintainers = with maintainers; [ dotlambda ];
51 };
52}