diff --git a/pkgs/development/python-modules/meshtastic/default.nix b/pkgs/development/python-modules/meshtastic/default.nix index 1100a084c473..72e8a711bb83 100644 --- a/pkgs/development/python-modules/meshtastic/default.nix +++ b/pkgs/development/python-modules/meshtastic/default.nix @@ -1,28 +1,32 @@ { lib , buildPythonPackage , dotmap -, fetchPypi +, fetchFromGitHub , pexpect , protobuf , pygatt , pypubsub , pyqrcode , pyserial +, pytestCheckHook , pythonOlder +, pyyaml , tabulate , timeago }: buildPythonPackage rec { pname = "meshtastic"; - version = "1.2.44"; + version = "1.2.46"; format = "setuptools"; disabled = pythonOlder "3.6"; - src = fetchPypi { - inherit pname version; - sha256 = "f99e076dde0db86a5ba734b48257ffc7355a2b4729cea1ff5cd7638ca93dbd90"; + src = fetchFromGitHub { + owner = "meshtastic"; + repo = "Meshtastic-python"; + rev = version; + sha256 = "sha256-XNoAt0R3Jt8i0erovwHBIJ3l9bY5po2UjRl/uzGBs9k="; }; propagatedBuildInputs = [ @@ -33,13 +37,18 @@ buildPythonPackage rec { pypubsub pyqrcode pyserial + pyyaml tabulate timeago ]; - # Project only provides PyPI releases which don't contain the tests - # https://github.com/meshtastic/Meshtastic-python/issues/86 - doCheck = false; + checkInputs = [ + pytestCheckHook + ]; + + preCheck = '' + export PATH="$PATH:$out/bin"; + ''; pythonImportsCheck = [ "meshtastic"