Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, aiohttp
3, async-timeout
4, asyncio-dgram
5, asynctest
6, buildPythonPackage
7, docutils
8, fetchFromGitHub
9, poetry-core
10, pytest-aiohttp
11, pytest-asyncio
12, pytestCheckHook
13, voluptuous
14}:
15
16buildPythonPackage rec {
17 pname = "aioguardian";
18 version = "2021.11.0";
19
20 src = fetchFromGitHub {
21 owner = "bachya";
22 repo = pname;
23 rev = version;
24 sha256 = "sha256-jQIRACm0d0a5mQqlwxSTgLZfJFvGLWuJTb/MacppmS4=";
25 };
26
27 format = "pyproject";
28
29 nativeBuildInputs = [
30 poetry-core
31 ];
32
33 propagatedBuildInputs = [
34 aiohttp
35 async-timeout
36 asyncio-dgram
37 docutils
38 voluptuous
39 ];
40
41 checkInputs = [
42 asyncio-dgram
43 asynctest
44 pytest-aiohttp
45 pytest-asyncio
46 pytestCheckHook
47 ];
48
49 postPatch = ''
50 substituteInPlace pyproject.toml \
51 --replace 'docutils = "<0.18"' 'docutils = "*"'
52 '';
53
54 disabledTestPaths = [
55 "examples/"
56 ];
57
58 pythonImportsCheck = [
59 "aioguardian"
60 ];
61
62 meta = with lib; {
63 description = " Python library to interact with Elexa Guardian devices";
64 longDescription = ''
65 aioguardian is a Pytho3, asyncio-focused library for interacting with the
66 Guardian line of water valves and sensors from Elexa.
67 '';
68 homepage = "https://github.com/bachya/aioguardian";
69 license = with licenses; [ mit ];
70 maintainers = with maintainers; [ fab ];
71 };
72}