1{
2 lib,
3 aiohttp,
4 aresponses,
5 buildPythonPackage,
6 certifi,
7 ciso8601,
8 fetchFromGitHub,
9 frozenlist,
10 mashumaro,
11 poetry-core,
12 pyjwt,
13 pytest-aiohttp,
14 pytest-asyncio,
15 pytestCheckHook,
16 pytest-cov-stub,
17 pythonOlder,
18 yarl,
19}:
20
21buildPythonPackage rec {
22 pname = "aionotion";
23 version = "2025.02.0";
24 pyproject = true;
25
26 disabled = pythonOlder "3.7";
27
28 src = fetchFromGitHub {
29 owner = "bachya";
30 repo = "aionotion";
31 tag = version;
32 hash = "sha256-MqH3CPp+dAX5DXtnHio95KGQ+Ok2TXrX6rn/AMx5OsY=";
33 };
34
35 postPatch = ''
36 substituteInPlace pyproject.toml \
37 --replace-fail "poetry-core==" "poetry-core>="
38 '';
39
40 nativeBuildInputs = [ poetry-core ];
41
42 propagatedBuildInputs = [
43 aiohttp
44 certifi
45 ciso8601
46 frozenlist
47 mashumaro
48 pyjwt
49 yarl
50 ];
51
52 pythonRelaxDeps = [
53 "ciso8601"
54 "frozenlist"
55 "mashumaro"
56 ];
57
58 __darwinAllowLocalNetworking = true;
59
60 nativeCheckInputs = [
61 aresponses
62 pytest-aiohttp
63 pytest-asyncio
64 pytest-cov-stub
65 pytestCheckHook
66 ];
67
68 disabledTestPaths = [ "examples" ];
69
70 pythonImportsCheck = [ "aionotion" ];
71
72 meta = with lib; {
73 description = "Python library for Notion Home Monitoring";
74 homepage = "https://github.com/bachya/aionotion";
75 changelog = "https://github.com/bachya/aionotion/releases/tag/${src.tag}";
76 license = with licenses; [ mit ];
77 maintainers = with maintainers; [ fab ];
78 };
79}