1{ lib
2, aiohttp
3, async-timeout
4, asyncio-dgram
5, asynctest
6, buildPythonPackage
7, fetchFromGitHub
8, poetry
9, pytest-aiohttp
10, pytest-asyncio
11, pytestCheckHook
12, pythonAtLeast
13, voluptuous
14}:
15
16buildPythonPackage rec {
17 pname = "aioguardian";
18 version = "1.0.7";
19 disabled = pythonAtLeast "3.9";
20
21 src = fetchFromGitHub {
22 owner = "bachya";
23 repo = pname;
24 rev = version;
25 sha256 = "sha256-KMhq86hcqoYloS/6VHsl+3KVEZBbN97ABrZlmEr32Z8=";
26 };
27
28 format = "pyproject";
29
30 nativeBuildInputs = [ poetry ];
31
32 propagatedBuildInputs = [
33 aiohttp
34 async-timeout
35 asyncio-dgram
36 voluptuous
37 ];
38
39 checkInputs = [
40 asyncio-dgram
41 asynctest
42 pytest-aiohttp
43 pytest-asyncio
44 pytestCheckHook
45 ];
46
47 # Ignore the examples as they are prefixed with test_
48 pytestFlagsArray = [ "--ignore examples/" ];
49 pythonImportsCheck = [ "aioguardian" ];
50
51 meta = with lib; {
52 description = " Python library to interact with Elexa Guardian devices";
53 longDescription = ''
54 aioguardian is a Pytho3, asyncio-focused library for interacting with the
55 Guardian line of water valves and sensors from Elexa.
56 '';
57 homepage = "https://github.com/bachya/aioguardian";
58 license = with licenses; [ mit ];
59 maintainers = with maintainers; [ fab ];
60 };
61}