;;; 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+)))