1{
2 lib,
3 aiohttp,
4 aresponses,
5 buildPythonPackage,
6 certifi,
7 fetchFromGitHub,
8 poetry-core,
9 pytest-aiohttp,
10 pytest-asyncio,
11 pytestCheckHook,
12 python-engineio,
13 python-socketio,
14 pythonOlder,
15 websockets,
16}:
17
18buildPythonPackage rec {
19 pname = "aioambient";
20 version = "2024.01.0";
21 pyproject = true;
22
23 disabled = pythonOlder "3.9";
24
25 src = fetchFromGitHub {
26 owner = "bachya";
27 repo = "aioambient";
28 rev = "refs/tags/${version}";
29 hash = "sha256-eqZVY0L+2BWF7cCXW/VLQYYXNPtUF6tJHQmeZNW1W5o=";
30 };
31
32 build-system = [ poetry-core ];
33
34 dependencies = [
35 aiohttp
36 certifi
37 python-engineio
38 python-socketio
39 websockets
40 ];
41
42 __darwinAllowLocalNetworking = true;
43
44 nativeCheckInputs = [
45 aresponses
46 pytest-aiohttp
47 pytest-asyncio
48 pytestCheckHook
49 ];
50
51 # Ignore the examples directory as the files are prefixed with test_
52 disabledTestPaths = [ "examples/" ];
53
54 pythonImportsCheck = [ "aioambient" ];
55
56 meta = with lib; {
57 description = "Python library for the Ambient Weather API";
58 homepage = "https://github.com/bachya/aioambient";
59 changelog = "https://github.com/bachya/aioambient/releases/tag/${version}";
60 license = with licenses; [ mit ];
61 maintainers = with maintainers; [ fab ];
62 };
63}