summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorbdunahu <bdunahu@operationnull.com>2026-02-27 11:34:59 -0500
committerbdunahu <bdunahu@operationnull.com>2026-02-27 11:34:59 -0500
commitb4e3faa279816145d36bd6325b14c6a232831623 (patch)
treebd396843cfd0cdde4f8787acdcb295c0736a5b95 /modules
parent9063185455f8a834d53483a66c6666b457154a9d (diff)
tanelorn: Add meshtastic-python.
* modules/tanelorn/packages/radio.scm (meshtastic-python): New variable. * README: Add meshtastic-python.
Diffstat (limited to 'modules')
-rw-r--r--modules/tanelorn/packages/radio.scm74
1 files changed, 74 insertions, 0 deletions
diff --git a/modules/tanelorn/packages/radio.scm b/modules/tanelorn/packages/radio.scm
new file mode 100644
index 0000000..232b4a7
--- /dev/null
+++ b/modules/tanelorn/packages/radio.scm
@@ -0,0 +1,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+)))