1{
2 aiohttp,
3 aioresponses,
4 lib,
5 buildPythonPackage,
6 fetchFromGitHub,
7 mashumaro,
8 orjson,
9 poetry-core,
10 pythonOlder,
11 pytestCheckHook,
12 pytest-aiohttp,
13 pytest-cov-stub,
14 syrupy,
15 yarl,
16}:
17
18buildPythonPackage rec {
19 pname = "knocki";
20 version = "0.4.2";
21 pyproject = true;
22
23 disabled = pythonOlder "3.11";
24
25 src = fetchFromGitHub {
26 owner = "swan-solutions";
27 repo = "knocki-homeassistant";
28 tag = "v${version}";
29 hash = "sha256-85w+fj00VW0miNt+xRMcU6szg/Z7QaeKLGw2BV7X0T4=";
30 };
31
32 build-system = [ poetry-core ];
33
34 dependencies = [
35 aiohttp
36 mashumaro
37 orjson
38 yarl
39 ];
40
41 nativeCheckInputs = [
42 aioresponses
43 pytestCheckHook
44 pytest-aiohttp
45 pytest-cov-stub
46 syrupy
47 ];
48
49 pythonImportsCheck = [ "knocki" ];
50
51 meta = with lib; {
52 description = "Asynchronous Python client for Knocki vibration / door sensors";
53 homepage = "https://github.com/swan-solutions/knocki-homeassistant";
54 changelog = "https://github.com/swan-solutions/knocki-homeassistant/releases/tag/v${version}";
55 license = licenses.mit;
56 maintainers = with maintainers; [ mindstorms6 ];
57 };
58}