1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8 setuptools-scm,
9
10 # dependencies
11 httpx,
12 pycryptodome,
13
14 # tests
15 pytestCheckHook,
16}:
17
18buildPythonPackage rec {
19 pname = "msmart-ng";
20 version = "2025.7.0";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "mill1000";
25 repo = "midea-msmart";
26 tag = version;
27 hash = "sha256-4CqdAgWkpkZ4Kz/GfLBvZ/ogb/tb3/NPGSxOpyU9CIo=";
28 };
29
30 build-system = [
31 setuptools
32 setuptools-scm
33 ];
34
35 dependencies = [
36 httpx
37 pycryptodome
38 ];
39
40 nativeCheckInputs = [ pytestCheckHook ];
41
42 disabledTests = [
43 # broken in upstream CI as well
44 "test_properties_cascade"
45 ];
46
47 disabledTestPaths = [
48 # network access
49 "msmart/tests/test_cloud.py"
50 ];
51
52 pythonImportsCheck = [ "msmart" ];
53
54 meta = with lib; {
55 changelog = "https://github.com/mill1000/midea-msmart/releases/tag/${src.tag}";
56 description = "Python library for local control of Midea (and associated brands) smart air conditioners";
57 homepage = "https://github.com/mill1000/midea-msmart";
58 license = licenses.mit;
59 mainProgram = "msmart-ng";
60 maintainers = with maintainers; [
61 hexa
62 emilylange
63 ];
64 };
65}