1{ lib
2, aiohttp
3, aresponses
4, buildPythonPackage
5, fetchFromGitHub
6, poetry-core
7, pytest-asyncio
8, pytestCheckHook
9, pythonOlder
10, syrupy
11, yarl
12}:
13
14buildPythonPackage rec {
15 pname = "aiowaqi";
16 version = "3.0.0";
17 format = "pyproject";
18
19 disabled = pythonOlder "3.11";
20
21 src = fetchFromGitHub {
22 owner = "joostlek";
23 repo = "python-waqi";
24 rev = "refs/tags/v${version}";
25 hash = "sha256-FHpZVY7TFjk+2YNBejEwSdYWK41V9bti1JxpWivemw4=";
26 };
27
28 postPatch = ''
29 substituteInPlace pyproject.toml \
30 --replace "--cov" ""
31 '';
32
33 nativeBuildInputs = [
34 poetry-core
35 ];
36
37 propagatedBuildInputs = [
38 aiohttp
39 yarl
40 ];
41
42 nativeCheckInputs = [
43 aresponses
44 pytest-asyncio
45 pytestCheckHook
46 syrupy
47 ];
48
49 pythonImportsCheck = [
50 "aiowaqi"
51 ];
52
53 meta = with lib; {
54 description = "Module to interact with the WAQI API";
55 homepage = "https://github.com/joostlek/python-waqi";
56 changelog = "https://github.com/joostlek/python-waqi/releases/tag/v${version}";
57 license = licenses.mit;
58 maintainers = with maintainers; [ fab ];
59 };
60}