2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
bleak,
|
|
|
|
buildPythonPackage,
|
2024-09-19 14:19:46 +00:00
|
|
|
dash-bootstrap-components,
|
2024-04-21 15:54:59 +00:00
|
|
|
dotmap,
|
|
|
|
fetchFromGitHub,
|
2024-09-19 14:19:46 +00:00
|
|
|
hypothesis,
|
2024-06-20 14:57:18 +00:00
|
|
|
packaging,
|
2024-09-19 14:19:46 +00:00
|
|
|
parse,
|
2024-04-21 15:54:59 +00:00
|
|
|
pexpect,
|
2024-09-19 14:19:46 +00:00
|
|
|
platformdirs,
|
|
|
|
poetry-core,
|
|
|
|
ppk2-api,
|
|
|
|
print-color,
|
2024-04-21 15:54:59 +00:00
|
|
|
protobuf,
|
2024-09-19 14:19:46 +00:00
|
|
|
pyarrow,
|
|
|
|
pyparsing,
|
2024-04-21 15:54:59 +00:00
|
|
|
pypubsub,
|
|
|
|
pyqrcode,
|
|
|
|
pyserial,
|
|
|
|
pytap2,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pyyaml,
|
|
|
|
requests,
|
2024-09-19 14:19:46 +00:00
|
|
|
riden,
|
2024-04-21 15:54:59 +00:00
|
|
|
setuptools,
|
|
|
|
tabulate,
|
|
|
|
timeago,
|
2024-09-19 14:19:46 +00:00
|
|
|
webencodings,
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "meshtastic";
|
2024-10-04 16:56:33 +00:00
|
|
|
version = "2.5.1";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2021-12-24 04:21:11 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "meshtastic";
|
|
|
|
repo = "Meshtastic-python";
|
2022-10-30 15:09:59 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-10-04 16:56:33 +00:00
|
|
|
hash = "sha256-LyWb7BWwRi0Q/dOZkFu/FwOBIqR2mPr3c8/mpsqw/ec=";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"bleak"
|
|
|
|
"protobuf"
|
|
|
|
];
|
|
|
|
|
|
|
|
build-system = [ poetry-core ];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2024-01-25 14:12:00 +00:00
|
|
|
bleak
|
2021-05-20 23:08:51 +00:00
|
|
|
dotmap
|
2024-06-20 14:57:18 +00:00
|
|
|
packaging
|
2024-09-19 14:19:46 +00:00
|
|
|
parse
|
2021-05-20 23:08:51 +00:00
|
|
|
pexpect
|
2024-09-19 14:19:46 +00:00
|
|
|
platformdirs
|
|
|
|
ppk2-api
|
|
|
|
print-color
|
2021-05-20 23:08:51 +00:00
|
|
|
protobuf
|
2024-09-19 14:19:46 +00:00
|
|
|
pyarrow
|
|
|
|
pyparsing
|
2021-05-20 23:08:51 +00:00
|
|
|
pypubsub
|
|
|
|
pyqrcode
|
|
|
|
pyserial
|
2021-12-24 04:21:11 +00:00
|
|
|
pyyaml
|
2023-04-29 16:46:19 +00:00
|
|
|
requests
|
2024-01-25 14:12:00 +00:00
|
|
|
setuptools
|
2021-05-20 23:08:51 +00:00
|
|
|
tabulate
|
|
|
|
timeago
|
2024-09-19 14:19:46 +00:00
|
|
|
webencodings
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
optional-dependencies = {
|
2024-04-21 15:54:59 +00:00
|
|
|
tunnel = [ pytap2 ];
|
2022-09-30 11:47:45 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-09-19 14:19:46 +00:00
|
|
|
dash-bootstrap-components
|
|
|
|
hypothesis
|
2021-12-24 04:21:11 +00:00
|
|
|
pytestCheckHook
|
2024-09-19 14:19:46 +00:00
|
|
|
riden
|
2024-10-04 16:56:33 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues optional-dependencies);
|
2021-12-24 04:21:11 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export PATH="$PATH:$out/bin";
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "meshtastic" ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Circular import with dash-bootstrap-components
|
|
|
|
"meshtastic/tests/test_analysis.py"
|
|
|
|
];
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
disabledTests = [
|
2024-04-21 15:54:59 +00:00
|
|
|
# TypeError
|
|
|
|
"test_main_info_with_seriallog_output_txt"
|
|
|
|
"test_main_info_with_seriallog_stdout"
|
|
|
|
"test_main_info_with_tcp_interfa"
|
|
|
|
"test_main_info"
|
|
|
|
"test_main_no_proto"
|
|
|
|
"test_main_support"
|
2023-04-29 16:46:19 +00:00
|
|
|
"test_MeshInterface"
|
2024-04-21 15:54:59 +00:00
|
|
|
"test_message_to_json_shows_all"
|
2024-09-19 14:19:46 +00:00
|
|
|
"test_node"
|
2024-04-21 15:54:59 +00:00
|
|
|
"test_SerialInterface_single_port"
|
|
|
|
"test_support_info"
|
|
|
|
"test_TCPInterface"
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python API for talking to Meshtastic devices";
|
2022-09-30 11:47:45 +00:00
|
|
|
homepage = "https://github.com/meshtastic/Meshtastic-python";
|
2022-11-27 09:42:12 +00:00
|
|
|
changelog = "https://github.com/meshtastic/python/releases/tag/${version}";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|