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
|
|
|
|
, timeago
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "meshtastic";
|
2021-12-30 13:39:12 +00:00
|
|
|
version = "1.2.47";
|
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;
|
2021-12-30 13:39:12 +00:00
|
|
|
sha256 = "sha256-Qa1Rvr4aZuCe1VqfjzoUvFFYOvqmC4HdKQzRPnbJGaM=";
|
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 = [
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|