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