gnu: tzdata: Update to 2020a.
[jackhill/guix/guix.git] / gnu / packages / ham-radio.scm
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>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
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.
11 ;;;
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.
16 ;;;
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/>.
19
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))
39
40 (define-public rtl-sdr
41 (package
42 (name "rtl-sdr")
43 (version "0.6.0")
44 (source
45 (origin
46 (method git-fetch)
47 (uri (git-reference
48 (url "git://git.osmocom.org/rtl-sdr.git")
49 (commit version)))
50 (file-name (git-file-name name version))
51 (sha256
52 (base32
53 "0lmvsnb4xw4hmz6zs0z5ilsah5hjz29g1s0050n59fllskqr3b8k"))))
54 (build-system cmake-build-system)
55 (inputs
56 `(("libusb" ,libusb)))
57 (native-inputs
58 `(("pkg-config" ,pkg-config)))
59 (arguments
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+)))
68
69 (define-public chirp
70 (package
71 (name "chirp")
72 (version "20181205")
73 (source
74 (origin
75 (method url-fetch)
76 (uri (string-append "https://trac.chirp.danplanet.com/chirp_daily/daily-"
77 version "/chirp-daily-" version ".tar.gz"))
78 (sha256
79 (base32
80 "1cp280b95j39xaxs50zn55jigg7pyfpm9n098hmsyxrplqn8z43c"))))
81 (build-system python-build-system)
82 (inputs
83 `(("python2-libxml2" ,python2-libxml2)
84 ("python2-pygtk" ,python2-pygtk)
85 ("python2-pyserial" ,python2-pyserial)))
86 (arguments
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
95
96 (define-public aptdec
97 (package
98 (name "aptdec")
99 (version "1.7")
100 (source
101 (origin
102 (method git-fetch)
103 (uri (git-reference
104 (url "https://github.com/csete/aptdec")
105 (commit (string-append "v" version))))
106 (file-name (git-file-name name version))
107 (sha256
108 (base32
109 "1hf0zb51qc6fyhdjxyij1n3vgwnw3cwksc3r11szbhkml14qjnzk"))))
110 (build-system gnu-build-system)
111 (inputs
112 `(("libpng" ,libpng)
113 ("libsndfile" ,libsndfile)))
114 (arguments
115 `(#:make-flags (list "CC=gcc")
116 #:tests? #f ; no tests
117 #:phases
118 (modify-phases %standard-phases
119 (delete 'configure)
120 (replace 'install
121 (lambda* (#:key outputs #:allow-other-keys)
122 (let ((out (assoc-ref outputs "out")))
123 (install-file "atpdec" (string-append out "/bin")))
124 #t)))))
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+)))
133
134 (define-public redsea
135 (package
136 (name "redsea")
137 (version "0.18")
138 (source (origin
139 (method git-fetch)
140 (uri (git-reference
141 (url "https://github.com/windytan/redsea")
142 (commit (string-append "v" version))))
143 (file-name (git-file-name name version))
144 (sha256
145 (base32
146 "1y96g0ra2krjb2kypm8s5gdfia45yci4f36klsvyzg8d53v5cwhn"))))
147 (build-system gnu-build-system)
148 (arguments
149 `(#:phases
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
155 ;; linked against.
156 (add-after 'unpack 'patch-libiconv
157 (lambda _
158 (substitute* "configure.ac"
159 (("^ +AC_SUBST")
160 "# AC_SUBST")
161 (("esac")
162 "esac\nAC_SUBST([ICONV], [\"-liconv\"])"))
163 #t)))))
164 (inputs
165 `(("libiconv" ,libiconv)
166 ("libsndfile" ,libsndfile)
167 ("liquid-dsp" ,liquid-dsp)))
168 (native-inputs
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)))