Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 123 lines 2.3 kB view raw
1{ 2 lib, 3 bleak, 4 buildPythonPackage, 5 dash-bootstrap-components, 6 dotmap, 7 fetchFromGitHub, 8 hypothesis, 9 packaging, 10 parse, 11 pexpect, 12 platformdirs, 13 poetry-core, 14 ppk2-api, 15 print-color, 16 protobuf, 17 pyarrow, 18 pyparsing, 19 pypubsub, 20 pyqrcode, 21 pyserial, 22 pytap2, 23 pytestCheckHook, 24 pythonOlder, 25 pyyaml, 26 requests, 27 riden, 28 setuptools, 29 tabulate, 30 timeago, 31 webencodings, 32}: 33 34buildPythonPackage rec { 35 pname = "meshtastic"; 36 version = "2.5.5"; 37 pyproject = true; 38 39 disabled = pythonOlder "3.7"; 40 41 src = fetchFromGitHub { 42 owner = "meshtastic"; 43 repo = "Meshtastic-python"; 44 rev = "refs/tags/${version}"; 45 hash = "sha256-k+Hq3pIuh8lwyoCl1KyHLt2B3OrGzBC6XDauUfVEyd8="; 46 }; 47 48 pythonRelaxDeps = [ 49 "bleak" 50 "protobuf" 51 ]; 52 53 build-system = [ poetry-core ]; 54 55 dependencies = [ 56 bleak 57 dotmap 58 packaging 59 parse 60 pexpect 61 platformdirs 62 ppk2-api 63 print-color 64 protobuf 65 pyarrow 66 pyparsing 67 pypubsub 68 pyqrcode 69 pyserial 70 pyyaml 71 requests 72 setuptools 73 tabulate 74 timeago 75 webencodings 76 ]; 77 78 optional-dependencies = { 79 tunnel = [ pytap2 ]; 80 }; 81 82 nativeCheckInputs = [ 83 dash-bootstrap-components 84 hypothesis 85 pytestCheckHook 86 riden 87 ] ++ lib.flatten (builtins.attrValues optional-dependencies); 88 89 preCheck = '' 90 export PATH="$PATH:$out/bin"; 91 ''; 92 93 pythonImportsCheck = [ "meshtastic" ]; 94 95 disabledTestPaths = [ 96 # Circular import with dash-bootstrap-components 97 "meshtastic/tests/test_analysis.py" 98 ]; 99 100 disabledTests = [ 101 # TypeError 102 "test_main_info_with_seriallog_output_txt" 103 "test_main_info_with_seriallog_stdout" 104 "test_main_info_with_tcp_interfa" 105 "test_main_info" 106 "test_main_no_proto" 107 "test_main_support" 108 "test_MeshInterface" 109 "test_message_to_json_shows_all" 110 "test_node" 111 "test_SerialInterface_single_port" 112 "test_support_info" 113 "test_TCPInterface" 114 ]; 115 116 meta = with lib; { 117 description = "Python API for talking to Meshtastic devices"; 118 homepage = "https://github.com/meshtastic/Meshtastic-python"; 119 changelog = "https://github.com/meshtastic/python/releases/tag/${version}"; 120 license = with licenses; [ asl20 ]; 121 maintainers = with maintainers; [ fab ]; 122 }; 123}