1{ 2 lib, 3 bleak, 4 buildPythonPackage, 5 dotmap, 6 fetchFromGitHub, 7 pexpect, 8 protobuf, 9 pygatt, 10 pypubsub, 11 pyqrcode, 12 pyserial, 13 pytap2, 14 pytestCheckHook, 15 pythonOlder, 16 pyyaml, 17 requests, 18 setuptools, 19 tabulate, 20 timeago, 21}: 22 23buildPythonPackage rec { 24 pname = "meshtastic"; 25 version = "2.3.4"; 26 pyproject = true; 27 28 disabled = pythonOlder "3.7"; 29 30 src = fetchFromGitHub { 31 owner = "meshtastic"; 32 repo = "Meshtastic-python"; 33 rev = "refs/tags/${version}"; 34 hash = "sha256-WxiddF1n9lyxKkZk1MU40NzLh6goLVs81mbJZ3F33R8="; 35 }; 36 37 build-system = [ setuptools ]; 38 39 dependencies = [ 40 bleak 41 dotmap 42 pexpect 43 protobuf 44 pygatt 45 pypubsub 46 pyqrcode 47 pyserial 48 pyyaml 49 requests 50 setuptools 51 tabulate 52 timeago 53 ]; 54 55 passthru.optional-dependencies = { 56 tunnel = [ pytap2 ]; 57 }; 58 59 nativeCheckInputs = [ 60 pytap2 61 pytestCheckHook 62 ]; 63 64 preCheck = '' 65 export PATH="$PATH:$out/bin"; 66 ''; 67 68 pythonImportsCheck = [ "meshtastic" ]; 69 70 disabledTests = [ 71 # TypeError 72 "test_main_info_with_seriallog_output_txt" 73 "test_main_info_with_seriallog_stdout" 74 "test_main_info_with_tcp_interfa" 75 "test_main_info" 76 "test_main_no_proto" 77 "test_main_support" 78 "test_MeshInterface" 79 "test_message_to_json_shows_all" 80 "test_SerialInterface_single_port" 81 "test_support_info" 82 "test_TCPInterface" 83 ]; 84 85 meta = with lib; { 86 description = "Python API for talking to Meshtastic devices"; 87 homepage = "https://github.com/meshtastic/Meshtastic-python"; 88 changelog = "https://github.com/meshtastic/python/releases/tag/${version}"; 89 license = with licenses; [ asl20 ]; 90 maintainers = with maintainers; [ fab ]; 91 }; 92}