nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, dotmap
4, fetchFromGitHub
5, pexpect
6, protobuf
7, pygatt
8, pypubsub
9, pyqrcode
10, pyserial
11, pytestCheckHook
12, pythonOlder
13, pyyaml
14, tabulate
15, pytap2
16, timeago
17}:
18
19buildPythonPackage rec {
20 pname = "meshtastic";
21 version = "1.2.95";
22 format = "setuptools";
23
24 disabled = pythonOlder "3.6";
25
26 src = fetchFromGitHub {
27 owner = "meshtastic";
28 repo = "Meshtastic-python";
29 rev = version;
30 sha256 = "sha256-CMw7PbM82AjbhrCYnRuxF9WFJqr6gvCEkTyG2vKM7FM=";
31 };
32
33 propagatedBuildInputs = [
34 dotmap
35 pexpect
36 protobuf
37 pygatt
38 pypubsub
39 pyqrcode
40 pyserial
41 pyyaml
42 tabulate
43 timeago
44 ];
45
46 checkInputs = [
47 pytap2
48 pytestCheckHook
49 ];
50
51 preCheck = ''
52 export PATH="$PATH:$out/bin";
53 '';
54
55 pythonImportsCheck = [
56 "meshtastic"
57 ];
58
59 meta = with lib; {
60 description = "Python API for talking to Meshtastic devices";
61 homepage = "https://meshtastic.github.io/Meshtastic-python/";
62 license = with licenses; [ asl20 ];
63 maintainers = with maintainers; [ fab ];
64 };
65}