1{
2 lib,
3 aiofile,
4 backoff,
5 buildPythonPackage,
6 fetchFromGitHub,
7 pythonOlder,
8 pyserial,
9 pyserial-asyncio-fast,
10 pytest-asyncio,
11 pytestCheckHook,
12 setuptools,
13}:
14
15buildPythonPackage rec {
16 pname = "velbus-aio";
17 version = "2025.4.2";
18 pyproject = true;
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchFromGitHub {
23 owner = "Cereal2nd";
24 repo = "velbus-aio";
25 tag = version;
26 hash = "sha256-3H5lFIMLHyucX0h7JagGPsqGyO1RMVPJ1L91iDbdEww=";
27 fetchSubmodules = true;
28 };
29
30 build-system = [ setuptools ];
31
32 dependencies = [
33 aiofile
34 backoff
35 pyserial
36 pyserial-asyncio-fast
37 ];
38
39 nativeCheckInputs = [
40 pytest-asyncio
41 pytestCheckHook
42 ];
43
44 preCheck = ''
45 export HOME=$(mktemp -d)
46 '';
47
48 pythonImportsCheck = [ "velbusaio" ];
49
50 meta = with lib; {
51 description = "Python library to support the Velbus home automation system";
52 homepage = "https://github.com/Cereal2nd/velbus-aio";
53 changelog = "https://github.com/Cereal2nd/velbus-aio/releases/tag/${version}";
54 license = with licenses; [ asl20 ];
55 maintainers = with maintainers; [ fab ];
56 };
57}