1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 cryptography,
6 ifaddr,
7 freezegun,
8 pytest-asyncio,
9 pytestCheckHook,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "xknx";
15 version = "3.9.1";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "XKNX";
20 repo = "xknx";
21 tag = version;
22 hash = "sha256-BcUZ2wNrWFapYNbvDXQgKQvXEEx/+z79AaPZHsdPRpo=";
23 };
24
25 build-system = [ setuptools ];
26
27 dependencies = [
28 cryptography
29 ifaddr
30 ];
31
32 nativeCheckInputs = [
33 freezegun
34 pytest-asyncio
35 pytestCheckHook
36 ];
37
38 pythonImportsCheck = [ "xknx" ];
39
40 disabledTests = [
41 # Test requires network access
42 "test_routing_indication_multicast"
43 "test_scan_timeout"
44 "test_start_secure_routing_explicit_keyring"
45 "test_start_secure_routing_knx_keys"
46 "test_start_secure_routing_manual"
47 ];
48
49 meta = with lib; {
50 description = "KNX Library Written in Python";
51 longDescription = ''
52 XKNX is an asynchronous Python library for reading and writing KNX/IP
53 packets. It provides support for KNX/IP routing and tunneling devices.
54 '';
55 homepage = "https://github.com/XKNX/xknx";
56 changelog = "https://github.com/XKNX/xknx/releases/tag/${src.tag}";
57 license = licenses.mit;
58 maintainers = with maintainers; [ fab ];
59 platforms = platforms.linux;
60 };
61}