nixos/tests/userborn: fix setting hostPlatform (#378940)
[NixPkgs.git] / pkgs / development / python-modules / xknx / default.nix
blobba4fb3a6b2bcf294ff751a1c0a2c01bd6f5b75f9
2   lib,
3   async-timeout,
4   buildPythonPackage,
5   fetchFromGitHub,
6   cryptography,
7   ifaddr,
8   freezegun,
9   pytest-asyncio,
10   pytestCheckHook,
11   pythonOlder,
12   setuptools,
15 buildPythonPackage rec {
16   pname = "xknx";
17   version = "3.5.0";
18   pyproject = true;
20   disabled = pythonOlder "3.10";
22   src = fetchFromGitHub {
23     owner = "XKNX";
24     repo = "xknx";
25     tag = version;
26     hash = "sha256-kpGT1UcpKL8LJvFkw3RYZcbXcLla95QB4exG7kA8+BQ=";
27   };
29   build-system = [ setuptools ];
31   dependencies = [
32     cryptography
33     ifaddr
34   ] ++ lib.optionals (pythonOlder "3.11") [ async-timeout ];
36   nativeCheckInputs = [
37     freezegun
38     pytest-asyncio
39     pytestCheckHook
40   ];
42   pythonImportsCheck = [ "xknx" ];
44   disabledTests = [
45     # Test requires network access
46     "test_scan_timeout"
47     "test_start_secure_routing_knx_keys"
48     "test_start_secure_routing_manual"
49     # RuntimeError: Event loop is closed
50     "test_has_group_address_localtime"
51     "test_invalid_authentication"
52     "test_invalid_frames"
53     "test_no_authentication"
54     "test_process_read_localtime"
55     "test_sync_date"
56     "test_sync_datetime"
57     "test_sync_time_local"
58   ];
60   meta = with lib; {
61     description = "KNX Library Written in Python";
62     longDescription = ''
63       XKNX is an asynchronous Python library for reading and writing KNX/IP
64       packets. It provides support for KNX/IP routing and tunneling devices.
65     '';
66     homepage = "https://github.com/XKNX/xknx";
67     changelog = "https://github.com/XKNX/xknx/releases/tag/${version}";
68     license = with licenses; [ mit ];
69     maintainers = with maintainers; [ fab ];
70     platforms = platforms.linux;
71   };