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.9.2";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "mill1000";
25 repo = "midea-msmart";
26 tag = version;
27 hash = "sha256-+A3Mk/S5FZLe3y5J3olZ+kBlIlkLXlX92IdrvudFriE=";
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 env.CI = true;
43
44 pythonImportsCheck = [ "msmart" ];
45
46 meta = with lib; {
47 changelog = "https://github.com/mill1000/midea-msmart/releases/tag/${src.tag}";
48 description = "Python library for local control of Midea (and associated brands) smart air conditioners";
49 homepage = "https://github.com/mill1000/midea-msmart";
50 license = licenses.mit;
51 mainProgram = "msmart-ng";
52 maintainers = with maintainers; [
53 hexa
54 emilylange
55 ];
56 };
57}