1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 httpx,
6 poetry-core,
7 pytest-asyncio,
8 pytest-httpx,
9 pytestCheckHook,
10 pythonOlder,
11}:
12
13buildPythonPackage rec {
14 pname = "glances-api";
15 version = "0.9.0";
16 pyproject = true;
17
18 disabled = pythonOlder "3.11";
19
20 src = fetchFromGitHub {
21 owner = "home-assistant-ecosystem";
22 repo = "python-glances-api";
23 tag = version;
24 hash = "sha256-VLsNMFFt+kMxNw/81OMX4Fg/xCbQloCURmV0OxvClq8=";
25 };
26
27 build-system = [ poetry-core ];
28
29 dependencies = [ httpx ];
30
31 nativeCheckInputs = [
32 pytest-asyncio
33 pytest-httpx
34 pytestCheckHook
35 ];
36
37 pythonImportsCheck = [ "glances_api" ];
38
39 meta = with lib; {
40 description = "Python API for interacting with Glances";
41 homepage = "https://github.com/home-assistant-ecosystem/python-glances-api";
42 changelog = "https://github.com/home-assistant-ecosystem/python-glances-api/releases/tag/${version}";
43 license = licenses.mit;
44 maintainers = with maintainers; [ fab ];
45 };
46}