1{ lib 2, buildPythonPackage 3, dotmap 4, fetchFromGitHub 5, pexpect 6, protobuf 7, pygatt 8, pypubsub 9, pyqrcode 10, pyserial 11, pytap2 12, pytestCheckHook 13, pythonOlder 14, pyyaml 15, requests 16, setuptools 17, tabulate 18, timeago 19}: 20 21buildPythonPackage rec { 22 pname = "meshtastic"; 23 version = "2.2.12"; 24 format = "setuptools"; 25 26 disabled = pythonOlder "3.7"; 27 28 src = fetchFromGitHub { 29 owner = "meshtastic"; 30 repo = "Meshtastic-python"; 31 rev = "refs/tags/${version}"; 32 hash = "sha256-W//mDKtTWjcKT43n82OU3h4yKrNZMAVzLzQCjsmkJP0="; 33 }; 34 35 propagatedBuildInputs = [ 36 dotmap 37 pexpect 38 protobuf 39 pygatt 40 pypubsub 41 pyqrcode 42 pyserial 43 pyyaml 44 setuptools 45 requests 46 tabulate 47 timeago 48 ]; 49 50 passthru.optional-dependencies = { 51 tunnel = [ 52 pytap2 53 ]; 54 }; 55 56 nativeCheckInputs = [ 57 pytap2 58 pytestCheckHook 59 ]; 60 61 preCheck = '' 62 export PATH="$PATH:$out/bin"; 63 ''; 64 65 pythonImportsCheck = [ 66 "meshtastic" 67 ]; 68 69 disabledTests = [ 70 # AttributeError: 'HardwareMessage'... 71 "test_handleFromRadio_with_my_info" 72 "test_handleFromRadio_with_node_info" 73 "test_main_ch_longsfast_on_non_primary_channel" 74 "test_main_ch_set_name_with_ch_index" 75 "test_main_configure_with_camel_case_keys" 76 "test_main_configure_with_snake_case" 77 "test_main_export_config_called_from_main" 78 "test_main_export_config_use_camel" 79 "test_main_export_config" 80 "test_main_get_with_invalid" 81 "test_main_get_with_valid_values_camel" 82 "test_main_getPref_invalid_field_camel" 83 "test_main_getPref_invalid_field" 84 "test_main_getPref_valid_field_bool_camel" 85 "test_main_getPref_valid_field_bool" 86 "test_main_getPref_valid_field_camel" 87 "test_main_getPref_valid_field_string_camel" 88 "test_main_getPref_valid_field_string" 89 "test_main_getPref_valid_field" 90 "test_main_set_invalid_wifi_passwd" 91 "test_main_set_valid_camel_case" 92 "test_main_set_valid_wifi_passwd" 93 "test_main_set_valid" 94 "test_main_set_with_invalid" 95 "test_main_setPref_ignore_incoming_0" 96 "test_main_setPref_ignore_incoming_123" 97 "test_main_setPref_invalid_field_camel" 98 "test_main_setPref_invalid_field" 99 "test_main_setPref_valid_field_int_as_string" 100 "test_readGPIOs" 101 "test_onGPIOreceive" 102 "test_setURL_empty_url" 103 "test_watchGPIOs" 104 "test_writeConfig_with_no_radioConfig" 105 "test_writeGPIOs" 106 "test_reboot" 107 "test_shutdown" 108 "test_main_sendtext" 109 "test_main_sendtext_with_channel" 110 "test_MeshInterface" 111 "test_getNode_not_local" 112 "test_getNode_not_local_timeout" 113 "test_main_onConnected_exception" 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}