python3Packages.meshtastic: init at 1.2.30

This commit is contained in:
Fabian Affolter 2021-04-26 18:47:55 +02:00
parent dd1ca470db
commit 4832930b8d
2 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,57 @@
{ lib
, buildPythonPackage
, dotmap
, fetchPypi
, pexpect
, protobuf
, pygatt
, pypubsub
, pyqrcode
, pyserial
, pythonOlder
, tabulate
, timeago
}:
buildPythonPackage rec {
pname = "meshtastic";
version = "1.2.30";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "1kjflc2jwnsgxyr2zx1gyykhak9fsgy6hxaxlggsz5sw9b8rdrby";
};
propagatedBuildInputs = [
dotmap
pexpect
protobuf
pygatt
pypubsub
pyqrcode
pyserial
tabulate
timeago
];
postPatch = ''
# https://github.com/meshtastic/Meshtastic-python/pull/87
substituteInPlace setup.py \
--replace 'with open("README.md", "r") as fh:' "" \
--replace "long_description = fh.read()" "" \
--replace "long_description=long_description," 'long_description="",'
'';
# Project only provides PyPI releases which don't contain the tests
# https://github.com/meshtastic/Meshtastic-python/issues/86
doCheck = false;
pythonImportsCheck = [ "meshtastic" ];
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 ];
};
}

View File

@ -4111,6 +4111,8 @@ in {
meshlabxml = callPackage ../development/python-modules/meshlabxml { };
meshtastic = callPackage ../development/python-modules/meshtastic { };
meson = toPythonModule ((pkgs.meson.override { python3 = python; }).overrideAttrs
(oldAttrs: { # We do not want the setup hook in Python packages because the build is performed differently.
setupHook = null;