From b4e3faa279816145d36bd6325b14c6a232831623 Mon Sep 17 00:00:00 2001 From: bdunahu Date: Fri, 27 Feb 2026 11:34:59 -0500 Subject: tanelorn: Add meshtastic-python. * modules/tanelorn/packages/radio.scm (meshtastic-python): New variable. * README: Add meshtastic-python. --- README | 4 ++ modules/tanelorn/packages/radio.scm | 74 +++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 modules/tanelorn/packages/radio.scm diff --git a/README b/README index 694aed5..ff1e399 100644 --- a/README +++ b/README @@ -18,6 +18,10 @@ The packages and services found here are optionally free for anyone to use, unde - eww (x11 and wayland variants) +- *Radio*: + + - meshtastic-python + - *Fonts*: - font-medieval-sharp 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 +;;; +;;; 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+))) -- cgit v1.2.3