2021-04-26 18:47:55 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, dotmap
|
2021-12-22 23:02:13 +01:00
|
|
|
, fetchFromGitHub
|
2021-04-26 18:47:55 +02:00
|
|
|
, pexpect
|
|
|
|
, protobuf
|
|
|
|
, pygatt
|
|
|
|
, pypubsub
|
|
|
|
, pyqrcode
|
|
|
|
, pyserial
|
2021-12-22 23:02:13 +01:00
|
|
|
, pytestCheckHook
|
2021-04-26 18:47:55 +02:00
|
|
|
, pythonOlder
|
2021-12-22 22:57:28 +01:00
|
|
|
, pyyaml
|
2021-04-26 18:47:55 +02:00
|
|
|
, tabulate
|
|
|
|
, timeago
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "meshtastic";
|
2021-12-22 22:57:28 +01:00
|
|
|
version = "1.2.46";
|
2021-12-01 08:48:58 +01:00
|
|
|
format = "setuptools";
|
|
|
|
|
2021-04-26 18:47:55 +02:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
2021-12-22 23:02:13 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "meshtastic";
|
|
|
|
repo = "Meshtastic-python";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-XNoAt0R3Jt8i0erovwHBIJ3l9bY5po2UjRl/uzGBs9k=";
|
2021-04-26 18:47:55 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
dotmap
|
|
|
|
pexpect
|
|
|
|
protobuf
|
|
|
|
pygatt
|
|
|
|
pypubsub
|
|
|
|
pyqrcode
|
|
|
|
pyserial
|
2021-12-22 22:57:28 +01:00
|
|
|
pyyaml
|
2021-04-26 18:47:55 +02:00
|
|
|
tabulate
|
|
|
|
timeago
|
|
|
|
];
|
|
|
|
|
2021-12-22 23:02:13 +01:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export PATH="$PATH:$out/bin";
|
|
|
|
'';
|
2021-12-01 08:48:58 +01:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"meshtastic"
|
|
|
|
];
|
2021-04-26 18:47:55 +02: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 ];
|
|
|
|
};
|
|
|
|
}
|