1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 cryptography,
7 requests,
8 pytestCheckHook,
9 pytest-socket,
10 requests-mock,
11}:
12
13buildPythonPackage rec {
14 pname = "midea-beautiful-air";
15 version = "0.10.5";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "nbogojevic";
20 repo = "midea-beautiful-air";
21 tag = "v${version}";
22 hash = "sha256-786Q085bv8Zsm0c55I4XalRhEfwElRTJds5qnb0cWhk=";
23 };
24
25 build-system = [ setuptools ];
26
27 dependencies = [
28 cryptography
29 requests
30 ];
31
32 nativeCheckInputs = [
33 pytestCheckHook
34 pytest-socket
35 requests-mock
36 ];
37
38 disabledTestPaths = [
39 # tests optional dependencies + network
40 "tests/test_cli.py"
41 ];
42
43 pythonImportsCheck = [ "midea_beautiful" ];
44
45 meta = with lib; {
46 description = "Python client for accessing Midea air conditioners and dehumidifiers (Midea, Comfee, Inventor EVO) via local network";
47 homepage = "https://github.com/nbogojevic/midea-beautiful-air";
48 changelog = "https://github.com/nbogojevic/midea-beautiful-air/releases/tag/v${version}";
49 maintainers = with maintainers; [ k900 ];
50 mainProgram = "midea-beautiful-air-cli";
51 license = licenses.mit;
52 };
53}