1{
2 lib,
3 authlib,
4 buildPythonPackage,
5 fastapi,
6 fetchFromGitHub,
7 httpx-sse,
8 httpx,
9 mashumaro,
10 pytest-asyncio,
11 pytest-cov-stub,
12 pytest-httpx,
13 pytestCheckHook,
14 pythonOlder,
15 setuptools,
16 typer,
17 uvicorn,
18}:
19
20buildPythonPackage rec {
21 pname = "aiohomeconnect";
22 version = "0.20.0";
23 pyproject = true;
24
25 disabled = pythonOlder "3.11";
26
27 src = fetchFromGitHub {
28 owner = "MartinHjelmare";
29 repo = "aiohomeconnect";
30 tag = "v${version}";
31 hash = "sha256-vvwWvI5OEyFZuzBFO44CHBnzmIEajQtR2lSTkaWCiPU=";
32 };
33
34 build-system = [ setuptools ];
35
36 dependencies = [
37 httpx
38 httpx-sse
39 mashumaro
40 ];
41
42 optional-dependencies = {
43 cli = [
44 authlib
45 fastapi
46 typer
47 uvicorn
48 ];
49 };
50
51 nativeCheckInputs = [
52 pytest-asyncio
53 pytest-cov-stub
54 pytest-httpx
55 pytestCheckHook
56 ]
57 ++ lib.flatten (builtins.attrValues optional-dependencies);
58
59 pythonImportsCheck = [ "aiohomeconnect" ];
60
61 meta = {
62 description = "asyncio client for the Home Connect API";
63 homepage = "https://github.com/MartinHjelmare/aiohomeconnect";
64 changelog = "https://github.com/MartinHjelmare/aiohomeconnect/blob/${src.tag}/CHANGELOG.md";
65 license = lib.licenses.asl20;
66 maintainers = with lib.maintainers; [ fab ];
67 };
68}