2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, dotmap
|
2021-12-24 04:21:11 +00:00
|
|
|
, fetchFromGitHub
|
2021-05-20 23:08:51 +00:00
|
|
|
, pexpect
|
|
|
|
, protobuf
|
|
|
|
, pygatt
|
|
|
|
, pypubsub
|
|
|
|
, pyqrcode
|
|
|
|
, pyserial
|
2021-12-24 04:21:11 +00:00
|
|
|
, pytestCheckHook
|
2021-05-20 23:08:51 +00:00
|
|
|
, pythonOlder
|
2021-12-24 04:21:11 +00:00
|
|
|
, pyyaml
|
2021-05-20 23:08:51 +00:00
|
|
|
, tabulate
|
2022-01-03 16:56:52 +00:00
|
|
|
, pytap2
|
2021-05-20 23:08:51 +00:00
|
|
|
, timeago
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "meshtastic";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "1.2.95";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
2021-12-24 04:21:11 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "meshtastic";
|
|
|
|
repo = "Meshtastic-python";
|
|
|
|
rev = version;
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "sha256-CMw7PbM82AjbhrCYnRuxF9WFJqr6gvCEkTyG2vKM7FM=";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
dotmap
|
|
|
|
pexpect
|
|
|
|
protobuf
|
|
|
|
pygatt
|
|
|
|
pypubsub
|
|
|
|
pyqrcode
|
|
|
|
pyserial
|
2021-12-24 04:21:11 +00:00
|
|
|
pyyaml
|
2021-05-20 23:08:51 +00:00
|
|
|
tabulate
|
|
|
|
timeago
|
|
|
|
];
|
|
|
|
|
2021-12-24 04:21:11 +00:00
|
|
|
checkInputs = [
|
2022-01-03 16:56:52 +00:00
|
|
|
pytap2
|
2021-12-24 04:21:11 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export PATH="$PATH:$out/bin";
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"meshtastic"
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python API for talking to Meshtastic devices";
|
|
|
|
homepage = "https://meshtastic.github.io/Meshtastic-python/";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|