Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 async-timeout, 4 buildPythonPackage, 5 fetchFromGitHub, 6 cryptography, 7 ifaddr, 8 pytest-asyncio, 9 pytestCheckHook, 10 pythonOlder, 11 setuptools, 12}: 13 14buildPythonPackage rec { 15 pname = "xknx"; 16 version = "2.12.2"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.8"; 20 21 src = fetchFromGitHub { 22 owner = "XKNX"; 23 repo = "xknx"; 24 rev = "refs/tags/${version}"; 25 hash = "sha256-gajxXIR3lmHsW7258v4z20RilzGfm5KGVrXZwRm74Mk="; 26 }; 27 28 build-system = [ setuptools ]; 29 30 dependencies = [ 31 cryptography 32 ifaddr 33 ] ++ lib.optionals (pythonOlder "3.11") [ async-timeout ]; 34 35 nativeCheckInputs = [ 36 pytest-asyncio 37 pytestCheckHook 38 ]; 39 40 pythonImportsCheck = [ "xknx" ]; 41 42 disabledTests = [ 43 # Test requires network access 44 "test_scan_timeout" 45 "test_start_secure_routing_knx_keys" 46 "test_start_secure_routing_manual" 47 # RuntimeError: Event loop is closed 48 "test_has_group_address_localtime" 49 "test_invalid_authentication" 50 "test_invalid_frames" 51 "test_no_authentication" 52 "test_process_read_localtime" 53 "test_sync_date" 54 "test_sync_datetime" 55 "test_sync_time_local" 56 ]; 57 58 meta = with lib; { 59 description = "KNX Library Written in Python"; 60 longDescription = '' 61 XKNX is an asynchronous Python library for reading and writing KNX/IP 62 packets. It provides support for KNX/IP routing and tunneling devices. 63 ''; 64 homepage = "https://github.com/XKNX/xknx"; 65 changelog = "https://github.com/XKNX/xknx/releases/tag/${version}"; 66 license = with licenses; [ mit ]; 67 maintainers = with maintainers; [ fab ]; 68 platforms = platforms.linux; 69 }; 70}