summaryrefslogtreecommitdiff
path: root/modules/tanelorn/packages/radio.scm
blob: 232b4a74f44cbcbbd5fe5f0065c58249822873fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
;;; Copyright © 2026 bdunahu <bdunahu@operationnull.com>
;;;
;;; SPDX-License-Identifier: GPL-3.0-or-later

(define-module (tanelorn packages radio)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (gnu packages check)
  #:use-module (gnu packages protobuf)
  #:use-module (gnu packages python-build)
  #:use-module (gnu packages python-science)
  #:use-module (gnu packages python-web)
  #:use-module (gnu packages python-xyz)
  #:use-module (guix build-system pyproject)
  #:use-module (guix gexp)
  #:use-module (guix git-download)
  #:use-module (guix packages))

(define-public meshtastic-python
  (package
    (name "meshtastic-python")
    (version "2.7.7")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
              (url "https://github.com/meshtastic/python")
              (commit version)
              (recursive? #t))) ;for protobufs subproject
       (file-name (git-file-name name version))
       (sha256
        (base32 "1wbxrlidd98c7l30icgwa13cdjf9dn4gjrcc2dv8hlgnqf7jrl3d"))))
    (build-system pyproject-build-system)
    (arguments
     (list
      ;; tests: 191 passed, 4 skipped, 75 deselected
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'compile-bytecode 'patch-tests
            (lambda _
              (substitute* "meshtastic/tests/test_main.py"
                (("^def test_tunnel_tunnel_arg\\(" all)
                 (string-append
                  "@pytest.mark.skip(\"Requires pytap2, which is not in Guix.\")\n"
                  all))))))))
    ;; TODO: missing (optional) inputs: python-print-color, python-dash
    ;; python-pytap2, python-dash-bootstrap-components
    (inputs
     (list python-argcomplete
           python-bleak
           python-dotmap
           python-packaging
           python-pandas
           python-pandas-stubs
           python-protobuf
           python-pypubsub
           python-pyqrcode
           python-pyserial
           python-pyyaml
           python-requests
           python-tabulate
           python-wcwidth))
    (native-inputs
     (list python-poetry-core
           python-pytest
           python-pytest-cov))
    (home-page "https://github.com/meshtastic/python")
    (synopsis "Python CLI for talking to Meshtastic devices")
    (description "@url{https://meshtastic.org/,Meshtastic} Python is a small
library which provides an easy API for sending and receiving messages over mesh
radios.  It also provides access to any of the operations/data available in the
device user interface or the Android applications.  Events are delivered using a
publish-subscribe model, and you can subscribe to only the message types you
are interested in.")
    (license license:gpl3+)))