1{
2 lib,
3 aiohttp,
4 aresponses,
5 buildPythonPackage,
6 fetchFromGitHub,
7 poetry-core,
8 pytest-asyncio,
9 pytest-cov-stub,
10 pytestCheckHook,
11 pythonOlder,
12 syrupy,
13 yarl,
14}:
15
16buildPythonPackage rec {
17 pname = "aiowaqi";
18 version = "3.1.0";
19 pyproject = true;
20
21 disabled = pythonOlder "3.11";
22
23 src = fetchFromGitHub {
24 owner = "joostlek";
25 repo = "python-waqi";
26 tag = "v${version}";
27 hash = "sha256-YWTGEOSSkZ0XbZUE3k+Dn9qg8Pmwip9wCp8e/j1D9io=";
28 };
29
30 build-system = [ poetry-core ];
31
32 dependencies = [
33 aiohttp
34 yarl
35 ];
36
37 nativeCheckInputs = [
38 aresponses
39 pytest-asyncio
40 pytest-cov-stub
41 pytestCheckHook
42 syrupy
43 ];
44
45 __darwinAllowLocalNetworking = true;
46
47 pythonImportsCheck = [ "aiowaqi" ];
48
49 disabledTests = [
50 # Upstream mocking fails
51 "test_search"
52 ];
53
54 pytestFlags = [ "--snapshot-update" ];
55
56 meta = with lib; {
57 description = "Module to interact with the WAQI API";
58 homepage = "https://github.com/joostlek/python-waqi";
59 changelog = "https://github.com/joostlek/python-waqi/releases/tag/v${version}";
60 license = licenses.mit;
61 maintainers = with maintainers; [ fab ];
62 };
63}