evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / meshtastic / default.nix
blobe2bc68074ee48e41406d92605906fab7871e75aa
2   lib,
3   bleak,
4   buildPythonPackage,
5   dash-bootstrap-components,
6   dotmap,
7   fetchFromGitHub,
8   hypothesis,
9   packaging,
10   parse,
11   pexpect,
12   platformdirs,
13   poetry-core,
14   ppk2-api,
15   print-color,
16   protobuf,
17   pyarrow,
18   pyparsing,
19   pypubsub,
20   pyqrcode,
21   pyserial,
22   pytap2,
23   pytestCheckHook,
24   pythonOlder,
25   pyyaml,
26   requests,
27   riden,
28   setuptools,
29   tabulate,
30   timeago,
31   webencodings,
34 buildPythonPackage rec {
35   pname = "meshtastic";
36   version = "2.5.4";
37   pyproject = true;
39   disabled = pythonOlder "3.7";
41   src = fetchFromGitHub {
42     owner = "meshtastic";
43     repo = "Meshtastic-python";
44     rev = "refs/tags/${version}";
45     hash = "sha256-A1C+xkQFjoEMKyz9S7T/GzZYrcznpi/9yjBmue1Ahu4=";
46   };
48   pythonRelaxDeps = [
49     "bleak"
50     "protobuf"
51   ];
53   build-system = [ poetry-core ];
55   dependencies = [
56     bleak
57     dotmap
58     packaging
59     parse
60     pexpect
61     platformdirs
62     ppk2-api
63     print-color
64     protobuf
65     pyarrow
66     pyparsing
67     pypubsub
68     pyqrcode
69     pyserial
70     pyyaml
71     requests
72     setuptools
73     tabulate
74     timeago
75     webencodings
76   ];
78   optional-dependencies = {
79     tunnel = [ pytap2 ];
80   };
82   nativeCheckInputs = [
83     dash-bootstrap-components
84     hypothesis
85     pytestCheckHook
86     riden
87   ] ++ lib.flatten (builtins.attrValues optional-dependencies);
89   preCheck = ''
90     export PATH="$PATH:$out/bin";
91   '';
93   pythonImportsCheck = [ "meshtastic" ];
95   disabledTestPaths = [
96     # Circular import with dash-bootstrap-components
97     "meshtastic/tests/test_analysis.py"
98   ];
100   disabledTests = [
101     # TypeError
102     "test_main_info_with_seriallog_output_txt"
103     "test_main_info_with_seriallog_stdout"
104     "test_main_info_with_tcp_interfa"
105     "test_main_info"
106     "test_main_no_proto"
107     "test_main_support"
108     "test_MeshInterface"
109     "test_message_to_json_shows_all"
110     "test_node"
111     "test_SerialInterface_single_port"
112     "test_support_info"
113     "test_TCPInterface"
114   ];
116   meta = with lib; {
117     description = "Python API for talking to Meshtastic devices";
118     homepage = "https://github.com/meshtastic/Meshtastic-python";
119     changelog = "https://github.com/meshtastic/python/releases/tag/${version}";
120     license = with licenses; [ asl20 ];
121     maintainers = with maintainers; [ fab ];
122   };