1{
2 lib,
3 async-timeout,
4 buildPythonPackage,
5 fetchFromGitHub,
6 hatchling,
7 pyserial-asyncio-fast,
8 pytest-asyncio,
9 pytestCheckHook,
10 pythonOlder,
11}:
12
13buildPythonPackage rec {
14 pname = "elkm1-lib";
15 version = "2.2.11";
16 pyproject = true;
17
18 disabled = pythonOlder "3.11";
19
20 src = fetchFromGitHub {
21 owner = "gwww";
22 repo = "elkm1";
23 tag = version;
24 hash = "sha256-wi115LppK628EBw3AFeQHNnLv51dcfaZZi5R6S9+WJE=";
25 };
26
27 build-system = [ hatchling ];
28
29 dependencies = [
30 async-timeout
31 pyserial-asyncio-fast
32 ];
33
34 nativeCheckInputs = [
35 pytest-asyncio
36 pytestCheckHook
37 ];
38
39 pythonImportsCheck = [ "elkm1_lib" ];
40
41 meta = with lib; {
42 description = "Python module for interacting with ElkM1 alarm/automation panel";
43 homepage = "https://github.com/gwww/elkm1";
44 changelog = "https://github.com/gwww/elkm1/blob/${version}/CHANGELOG.md";
45 license = licenses.mit;
46 maintainers = with maintainers; [ fab ];
47 };
48}