1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017, 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
3 ;;; Copyright © 2019, 2020 Evan Straw <evan.straw99@gmail.com>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages ham-radio)
21 #:use-module ((guix licenses) #:prefix license:)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix git-download)
25 #:use-module (gnu packages autotools)
26 #:use-module (gnu packages base)
27 #:use-module (gnu packages gtk)
28 #:use-module (gnu packages image)
29 #:use-module (gnu packages libusb)
30 #:use-module (gnu packages pkg-config)
31 #:use-module (gnu packages pulseaudio)
32 #:use-module (gnu packages python)
33 #:use-module (gnu packages python-xyz)
34 #:use-module (gnu packages sdr)
35 #:use-module (gnu packages xml)
36 #:use-module (guix build-system cmake)
37 #:use-module (guix build-system gnu)
38 #:use-module (guix build-system python))
40 (define-public rtl-sdr
48 (url "git://git.osmocom.org/rtl-sdr.git")
50 (file-name (git-file-name name version))
53 "0lmvsnb4xw4hmz6zs0z5ilsah5hjz29g1s0050n59fllskqr3b8k"))))
54 (build-system cmake-build-system)
56 `(("libusb" ,libusb)))
58 `(("pkg-config" ,pkg-config)))
60 `(#:configure-flags '("-DDETACH_KERNEL_DRIVER=ON")
61 #:tests? #f)) ; No tests
62 (home-page "https://osmocom.org/projects/sdr/wiki/rtl-sdr")
63 (synopsis "Software defined radio driver for Realtek RTL2832U")
64 (description "DVB-T dongles based on the Realtek RTL2832U can be used as a
65 cheap software defined radio, since the chip allows transferring the raw I/Q
66 samples to the host. @code{rtl-sdr} provides drivers for this purpose.")
67 (license license:gpl2+)))
76 (uri (string-append "https://trac.chirp.danplanet.com/chirp_daily/daily-"
77 version "/chirp-daily-" version ".tar.gz"))
80 "1cp280b95j39xaxs50zn55jigg7pyfpm9n098hmsyxrplqn8z43c"))))
81 (build-system python-build-system)
83 `(("python2-libxml2" ,python2-libxml2)
84 ("python2-pygtk" ,python2-pygtk)
85 ("python2-pyserial" ,python2-pyserial)))
87 `(#:python ,python-2))
88 (home-page "https://chirp.danplanet.com")
89 (synopsis "Cross-radio programming tool")
90 (description "Chirp is a cross-radio programming tool. It supports a
91 growing list of radios across several manufacturers and allows transferring of
92 memory contents between them.")
93 (license (list license:gpl3+
94 license:lgpl3+)))) ; chirp/elib_intl.py
104 (url "https://github.com/csete/aptdec")
105 (commit (string-append "v" version))))
106 (file-name (git-file-name name version))
109 "1hf0zb51qc6fyhdjxyij1n3vgwnw3cwksc3r11szbhkml14qjnzk"))))
110 (build-system gnu-build-system)
113 ("libsndfile" ,libsndfile)))
115 `(#:make-flags (list "CC=gcc")
116 #:tests? #f ; no tests
118 (modify-phases %standard-phases
121 (lambda* (#:key outputs #:allow-other-keys)
122 (let ((out (assoc-ref outputs "out")))
123 (install-file "atpdec" (string-append out "/bin")))
125 (home-page "https://github.com/csete/aptdec")
126 (synopsis "NOAA Automatic Picture Transmission (APT) decoder")
127 (description "Aptdec decodes Automatic Picture Transmission (APT) images.
128 These are medium resolution images of the Earth transmitted by, among other
129 satellites, the POES NOAA weather satellite series. These transmissions are
130 on a frequency of 137 MHz. They can be received using an inexpensive antenna
131 and a dedicated receiver.")
132 (license license:gpl2+)))
134 (define-public redsea
141 (url "https://github.com/windytan/redsea")
142 (commit (string-append "v" version))))
143 (file-name (git-file-name name version))
146 "1y96g0ra2krjb2kypm8s5gdfia45yci4f36klsvyzg8d53v5cwhn"))))
147 (build-system gnu-build-system)
150 (modify-phases %standard-phases
151 ;; The configure.ac file does not explicitly link against libiconv
152 ;; except on Mac OS, causing the build to fail. This phase comments
153 ;; out the original AC_SUBST macro (located inside a conditional) and
154 ;; adds an explicit use of it underneath, so that libiconv is always
156 (add-after 'unpack 'patch-libiconv
158 (substitute* "configure.ac"
162 "esac\nAC_SUBST([ICONV], [\"-liconv\"])"))
165 `(("libiconv" ,libiconv)
166 ("libsndfile" ,libsndfile)
167 ("liquid-dsp" ,liquid-dsp)))
169 `(("autoconf" ,autoconf)
170 ("automake" ,automake)))
171 (home-page "https://github.com/windytan/redsea")
172 (synopsis "Lightweight RDS to JSON decoder")
173 (description "redsea is a lightweight command-line @dfn{FM Radio Data
174 System} (FM-RDS) decoder. Redsea can be used with any RTL-SDR USB radio stick
175 with the rtl_fm tool, or any other @dfn{software-defined radio} (SDR) via
176 csdr, for example. It can also decode raw ASCII bitstream, the hex format
177 used by RDS Spy, and audio files containing @dfn{multiplex} signals (MPX).")
178 (license license:expat)))