gnu: Add pulseaudio-qt.
[jackhill/guix/guix.git] / gnu / packages / radio.scm
CommitLineData
c5361b7c 1;;; GNU Guix --- Functional package management for GNU
ac2fc134 2;;; Copyright © 2017, 2018, 2019, 2020 Arun Isaac <arunisaac@systemreboot.net>
79c4fb4f 3;;; Copyright © 2019, 2020 Christopher Howard <christopher@librehacker.com>
c4f96706 4;;; Copyright © 2019, 2020 Evan Straw <evan.straw99@gmail.com>
d042caf6
GLV
5;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
6;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org>
7;;; Copyright © 2020 Charlie Ritter <chewzerita@posteo.net>
3059e120 8;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
c5361b7c
AI
9;;;
10;;; This file is part of GNU Guix.
11;;;
12;;; GNU Guix is free software; you can redistribute it and/or modify it
13;;; under the terms of the GNU General Public License as published by
14;;; the Free Software Foundation; either version 3 of the License, or (at
15;;; your option) any later version.
16;;;
17;;; GNU Guix is distributed in the hope that it will be useful, but
18;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;;; GNU General Public License for more details.
21;;;
22;;; You should have received a copy of the GNU General Public License
23;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
0493ead6 25(define-module (gnu packages radio)
c5361b7c
AI
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix packages)
28 #:use-module (guix download)
7f1c69f5 29 #:use-module (guix git-download)
f03e5ca5 30 #:use-module (guix utils)
d042caf6
GLV
31 #:use-module (gnu packages algebra)
32 #:use-module (gnu packages audio)
c4f96706
ES
33 #:use-module (gnu packages autotools)
34 #:use-module (gnu packages base)
bc94b75d 35 #:use-module (gnu packages bash)
d042caf6
GLV
36 #:use-module (gnu packages boost)
37 #:use-module (gnu packages check)
38 #:use-module (gnu packages documentation)
8e1e86b0 39 #:use-module (gnu packages engineering)
72f6ee0e 40 #:use-module (gnu packages fltk)
5a915632 41 #:use-module (gnu packages gcc)
409dfdf0 42 #:use-module (gnu packages gd)
d042caf6
GLV
43 #:use-module (gnu packages ghostscript)
44 #:use-module (gnu packages glib)
45 #:use-module (gnu packages gstreamer)
e200de54 46 #:use-module (gnu packages gtk)
7f1c69f5 47 #:use-module (gnu packages image)
c5361b7c 48 #:use-module (gnu packages libusb)
d042caf6
GLV
49 #:use-module (gnu packages linux)
50 #:use-module (gnu packages logging)
409dfdf0 51 #:use-module (gnu packages lua)
d042caf6
GLV
52 #:use-module (gnu packages maths)
53 #:use-module (gnu packages multiprecision)
4fca1bc5 54 #:use-module (gnu packages ncurses)
d042caf6 55 #:use-module (gnu packages networking)
c5361b7c 56 #:use-module (gnu packages pkg-config)
7f1c69f5 57 #:use-module (gnu packages pulseaudio)
e200de54 58 #:use-module (gnu packages python)
d042caf6 59 #:use-module (gnu packages python-science)
44d10b1f 60 #:use-module (gnu packages python-xyz)
d042caf6 61 #:use-module (gnu packages qt)
409dfdf0 62 #:use-module (gnu packages readline)
5a915632 63 #:use-module (gnu packages ruby)
d042caf6
GLV
64 #:use-module (gnu packages sphinx)
65 #:use-module (gnu packages swig)
409dfdf0 66 #:use-module (gnu packages tcl)
d042caf6 67 #:use-module (gnu packages tex)
5a915632 68 #:use-module (gnu packages texinfo)
d042caf6 69 #:use-module (gnu packages version-control)
e200de54 70 #:use-module (gnu packages xml)
d042caf6 71 #:use-module (gnu packages xorg)
e200de54 72 #:use-module (guix build-system cmake)
93299e61 73 #:use-module (guix build-system glib-or-gtk)
7f1c69f5 74 #:use-module (guix build-system gnu)
aa862c2c
GLV
75 #:use-module (guix build-system python)
76 #:use-module (guix build-system qt))
c5361b7c 77
0493ead6
GLV
78(define-public liquid-dsp
79 (package
80 (name "liquid-dsp")
81 (version "1.3.2")
82 (source
83 (origin (method git-fetch)
84 (uri (git-reference
85 (url "https://github.com/jgaeddert/liquid-dsp.git")
86 (commit (string-append "v" version))))
87 (file-name (git-file-name name version))
88 (sha256
89 (base32 "1n6dbg13q8ga5qhg1yiszwly4jj0rxqr6f1xwm9waaly5z493xsd"))))
90 (build-system gnu-build-system)
91 (native-inputs
92 `(("autoconf" ,autoconf)))
93 (inputs
94 `(("fftw" ,fftw)
95 ("fftwf" ,fftwf)))
96 (home-page "https://liquidsdr.org")
97 (synopsis "Signal processing library for software-defined radios")
98 (description
99 "Liquid DSP is a @dfn{digital signal processing} (DSP) library designed
100specifically for software-defined radios on embedded platforms. The aim is to
101provide a lightweight DSP library that does not rely on a myriad of external
102dependencies or proprietary and otherwise cumbersome frameworks. All signal
103processing elements are designed to be flexible, scalable, and dynamic,
104including filters, filter design, oscillators, modems, synchronizers, complex
105mathematical operations, and much more.")
106 (license license:expat)))
107
c5361b7c
AI
108(define-public rtl-sdr
109 (package
110 (name "rtl-sdr")
d7cefb0b 111 (version "0.6.0")
c5361b7c
AI
112 (source
113 (origin
d7cefb0b
ES
114 (method git-fetch)
115 (uri (git-reference
116 (url "git://git.osmocom.org/rtl-sdr.git")
117 (commit version)))
118 (file-name (git-file-name name version))
c5361b7c
AI
119 (sha256
120 (base32
d7cefb0b 121 "0lmvsnb4xw4hmz6zs0z5ilsah5hjz29g1s0050n59fllskqr3b8k"))))
c5361b7c
AI
122 (build-system cmake-build-system)
123 (inputs
124 `(("libusb" ,libusb)))
125 (native-inputs
126 `(("pkg-config" ,pkg-config)))
127 (arguments
2bee789a
GLV
128 `(#:configure-flags '("-DDETACH_KERNEL_DRIVER=ON"
129 "-DINSTALL_UDEV_RULES=ON")
130 #:tests? #f ; No tests
131 #:phases
132 (modify-phases %standard-phases
133 (add-after 'unpack 'fix-paths
134 (lambda* (#:key outputs #:allow-other-keys)
135 (substitute* "CMakeLists.txt"
503447ad 136 (("DESTINATION \"/etc/udev/")
2bee789a
GLV
137 (string-append "DESTINATION \""
138 (assoc-ref outputs "out")
503447ad 139 "/lib/udev/")))
2bee789a 140 #t)))))
c5361b7c
AI
141 (home-page "https://osmocom.org/projects/sdr/wiki/rtl-sdr")
142 (synopsis "Software defined radio driver for Realtek RTL2832U")
143 (description "DVB-T dongles based on the Realtek RTL2832U can be used as a
144cheap software defined radio, since the chip allows transferring the raw I/Q
2bee789a
GLV
145samples to the host. @code{rtl-sdr} provides drivers for this purpose.
146
95ffdfe8
GLV
147The default Linux driver managing DVB-T dongles as TV devices doesn't work for
148SDR purposes and clashes with this package. Therefore you must prevent the
149kernel from loading it automatically by adding the following line to your
150system configuration:
151
152@lisp
153(kernel-arguments '(\"modprobe.blacklist=dvb_usb_rtl28xxu\"))
154@end lisp
155
aee7d000
BW
156To install the rtl-sdr udev rules, you must extend 'udev-service-type' with
157this package. E.g.: @code{(udev-rules-service 'rtl-sdr rtl-sdr)}")
c5361b7c 158 (license license:gpl2+)))
e200de54
AI
159
160(define-public chirp
161 (package
162 (name "chirp")
04191985 163 (version "20200430")
e200de54
AI
164 (source
165 (origin
166 (method url-fetch)
167 (uri (string-append "https://trac.chirp.danplanet.com/chirp_daily/daily-"
168 version "/chirp-daily-" version ".tar.gz"))
169 (sha256
170 (base32
04191985 171 "060fzplgmpfrk6wkfaasx7phpfk90mmylk6drbwzk4f9r1655vda"))))
e200de54
AI
172 (build-system python-build-system)
173 (inputs
174 `(("python2-libxml2" ,python2-libxml2)
175 ("python2-pygtk" ,python2-pygtk)
176 ("python2-pyserial" ,python2-pyserial)))
177 (arguments
178 `(#:python ,python-2))
179 (home-page "https://chirp.danplanet.com")
180 (synopsis "Cross-radio programming tool")
181 (description "Chirp is a cross-radio programming tool. It supports a
182growing list of radios across several manufacturers and allows transferring of
183memory contents between them.")
184 (license (list license:gpl3+
185 license:lgpl3+)))) ; chirp/elib_intl.py
7f1c69f5
AI
186
187(define-public aptdec
188 (package
189 (name "aptdec")
190 (version "1.7")
191 (source
192 (origin
193 (method git-fetch)
194 (uri (git-reference
ac2fc134 195 (url "https://github.com/Xerbo/aptdec")
7f1c69f5
AI
196 (commit (string-append "v" version))))
197 (file-name (git-file-name name version))
198 (sha256
199 (base32
200 "1hf0zb51qc6fyhdjxyij1n3vgwnw3cwksc3r11szbhkml14qjnzk"))))
201 (build-system gnu-build-system)
202 (inputs
203 `(("libpng" ,libpng)
204 ("libsndfile" ,libsndfile)))
205 (arguments
319a73e7
AI
206 `(#:make-flags
207 (list
208 (string-append "CC="
209 (if ,(%current-target-system)
210 (string-append (assoc-ref %build-inputs "cross-gcc")
211 "/bin/" ,(%current-target-system) "-gcc")
212 "gcc"))
213 (string-append "PREFIX=" %output)
214 (string-append "RPM_BUILD_ROOT=" %output))
7f1c69f5
AI
215 #:tests? #f ; no tests
216 #:phases
217 (modify-phases %standard-phases
218 (delete 'configure)
219 (replace 'install
220 (lambda* (#:key outputs #:allow-other-keys)
221 (let ((out (assoc-ref outputs "out")))
222 (install-file "atpdec" (string-append out "/bin")))
223 #t)))))
ac2fc134 224 (home-page "https://github.com/Xerbo/aptdec")
7f1c69f5
AI
225 (synopsis "NOAA Automatic Picture Transmission (APT) decoder")
226 (description "Aptdec decodes Automatic Picture Transmission (APT) images.
227These are medium resolution images of the Earth transmitted by, among other
228satellites, the POES NOAA weather satellite series. These transmissions are
229on a frequency of 137 MHz. They can be received using an inexpensive antenna
230and a dedicated receiver.")
231 (license license:gpl2+)))
c4f96706
ES
232
233(define-public redsea
234 (package
235 (name "redsea")
236 (version "0.18")
237 (source (origin
238 (method git-fetch)
239 (uri (git-reference
240 (url "https://github.com/windytan/redsea")
241 (commit (string-append "v" version))))
242 (file-name (git-file-name name version))
243 (sha256
244 (base32
245 "1y96g0ra2krjb2kypm8s5gdfia45yci4f36klsvyzg8d53v5cwhn"))))
246 (build-system gnu-build-system)
247 (arguments
248 `(#:phases
249 (modify-phases %standard-phases
250 ;; The configure.ac file does not explicitly link against libiconv
251 ;; except on Mac OS, causing the build to fail. This phase comments
252 ;; out the original AC_SUBST macro (located inside a conditional) and
253 ;; adds an explicit use of it underneath, so that libiconv is always
254 ;; linked against.
255 (add-after 'unpack 'patch-libiconv
256 (lambda _
257 (substitute* "configure.ac"
258 (("^ +AC_SUBST")
259 "# AC_SUBST")
260 (("esac")
261 "esac\nAC_SUBST([ICONV], [\"-liconv\"])"))
262 #t)))))
263 (inputs
264 `(("libiconv" ,libiconv)
265 ("libsndfile" ,libsndfile)
266 ("liquid-dsp" ,liquid-dsp)))
267 (native-inputs
268 `(("autoconf" ,autoconf)
269 ("automake" ,automake)))
270 (home-page "https://github.com/windytan/redsea")
271 (synopsis "Lightweight RDS to JSON decoder")
272 (description "redsea is a lightweight command-line @dfn{FM Radio Data
273System} (FM-RDS) decoder. Redsea can be used with any RTL-SDR USB radio stick
274with the rtl_fm tool, or any other @dfn{software-defined radio} (SDR) via
275csdr, for example. It can also decode raw ASCII bitstream, the hex format
276used by RDS Spy, and audio files containing @dfn{multiplex} signals (MPX).")
277 (license license:expat)))
d042caf6
GLV
278
279(define-public gnuradio
280 (package
281 (name "gnuradio")
282 (version "3.8.0.0")
283 (source
284 (origin
285 (method url-fetch)
286 (uri (string-append "https://www.gnuradio.org/releases/gnuradio/"
287 "gnuradio-" version ".tar.xz"))
288 (sha256
8e1e86b0
GLV
289 (base32 "0aw55gf5549b0fz2qdi7vplcmaf92bj34h40s34b2ycnqasv900r"))
290 (modules '((guix build utils)))
291 (snippet
292 '(begin
293 ;; Delete bundled volk to use the shared one.
294 (delete-file-recursively "volk")
295 #t))))
d042caf6
GLV
296 (build-system cmake-build-system)
297 (native-inputs
298 `(("doxygen" ,doxygen)
299 ("git" ,git-minimal)
300 ("ghostscript" ,ghostscript)
301 ("orc" ,orc)
302 ("pkg-config" ,pkg-config)
d042caf6
GLV
303 ("python-cheetah" ,python-cheetah)
304 ("python-mako" ,python-mako)
305 ("python-pyzmq" ,python-pyzmq)
306 ("python-scipy" ,python-scipy)
307 ("python-sphinx" ,python-sphinx)
308 ("swig" ,swig)
309 ("texlive" ,(texlive-union (list texlive-amsfonts
310 texlive-latex-amsmath
311 ;; TODO: Add newunicodechar.
312 texlive-latex-graphics)))
313 ("xorg-server" ,xorg-server-for-tests)))
314 (inputs
315 `(("alsa-lib" ,alsa-lib)
316 ("boost" ,boost)
317 ("cairo" ,cairo)
318 ("codec2" ,codec2)
319 ("cppzmq" ,cppzmq)
320 ("fftwf" ,fftwf)
321 ("gmp" ,gmp)
322 ("gsl" ,gsl)
323 ("gsm" ,gsm)
324 ("gtk+" ,gtk+)
325 ("jack" ,jack-1)
326 ("log4cpp" ,log4cpp)
327 ("pango" ,pango)
328 ("portaudio" ,portaudio)
f03e5ca5 329 ("python" ,python)
d042caf6
GLV
330 ("python-click" ,python-click)
331 ("python-click-plugins" ,python-click-plugins)
332 ("python-lxml" ,python-lxml)
333 ("python-numpy" ,python-numpy)
334 ("python-pycairo" ,python-pycairo)
335 ("python-pygobject" ,python-pygobject)
336 ("python-pyqt" ,python-pyqt)
337 ("python-pyyaml" ,python-pyyaml)
338 ("qtbase" ,qtbase)
339 ("qwt" ,qwt)
8e1e86b0 340 ("volk" ,volk)
d042caf6
GLV
341 ("zeromq" ,zeromq)))
342 (arguments
343 `(#:modules ((guix build cmake-build-system)
93299e61 344 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
d042caf6 345 ((guix build python-build-system) #:prefix python:)
93299e61
GLV
346 (guix build utils)
347 (ice-9 match))
d042caf6 348 #:imported-modules (,@%cmake-build-system-modules
93299e61 349 (guix build glib-or-gtk-build-system)
d042caf6 350 (guix build python-build-system))
8e1e86b0
GLV
351 #:configure-flags
352 '("-DENABLE_INTERNAL_VOLK=OFF")
d042caf6
GLV
353 #:phases
354 (modify-phases %standard-phases
355 (add-after 'unpack 'fix-paths
356 (lambda* (#:key inputs #:allow-other-keys)
357 (let ((qwt (assoc-ref inputs "qwt")))
358 (substitute* "cmake/Modules/FindQwt.cmake"
359 (("/usr/include")
360 (string-append qwt "/include"))
361 (("/usr/lib")
362 (string-append qwt "/lib"))
363 (("qwt6-\\$\\{QWT_QT_VERSION\\}")
364 "qwt")))
365 (substitute* "cmake/Modules/GrPython.cmake"
366 (("dist-packages")
367 "site-packages"))
368 (substitute* '("gr-vocoder/swig/vocoder_swig.i"
369 "gr-vocoder/include/gnuradio/vocoder/codec2.h"
370 "gr-vocoder/include/gnuradio/vocoder/freedv_api.h")
371 (("<codec2/")
372 "<"))
373 #t))
374 (add-before 'check 'set-test-environment
375 (lambda* (#:key inputs #:allow-other-keys)
376 (setenv "HOME" "/tmp")
377 (system (string-append (assoc-ref inputs "xorg-server")
378 "/bin/Xvfb :1 &"))
379 (setenv "DISPLAY" ":1")
380 #t))
381 (add-after 'install 'wrap-python
93299e61
GLV
382 (assoc-ref python:%standard-phases 'wrap))
383 (add-after 'wrap-python 'wrap-glib-or-gtk
384 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
385 (add-after 'wrap-glib-or-gtk 'wrap-with-GI_TYPELIB_PATH
386 (lambda* (#:key inputs outputs #:allow-other-keys)
387 (let ((out (assoc-ref outputs "out"))
388 (paths (map (match-lambda
389 ((output . directory)
390 (let ((girepodir (string-append
391 directory
392 "/lib/girepository-1.0")))
393 (if (file-exists? girepodir)
394 girepodir
395 #f))))
396 inputs)))
397 (wrap-program (string-append out "/bin/gnuradio-companion")
398 `("GI_TYPELIB_PATH" ":" prefix ,(filter identity paths))))
399 #t)))))
cf480830 400 (native-search-paths
f03e5ca5 401 ;; Variables required to find third-party plugins at runtime.
cf480830
GLV
402 (list (search-path-specification
403 (variable "GRC_BLOCKS_PATH")
f03e5ca5
GLV
404 (files '("share/gnuradio/grc/blocks")))
405 (search-path-specification
406 (variable "PYTHONPATH")
407 (files (list (string-append "lib/python"
408 (version-major+minor
409 (package-version python))
410 "/site-packages"))))))
d042caf6
GLV
411 (synopsis "Toolkit for software-defined radios")
412 (description
413 "GNU Radio is a development toolkit that provides signal processing blocks
414to implement software radios. It can be used with external RF hardware to
415create software-defined radios, or without hardware in a simulation-like
416environment.")
417 (home-page "https://www.gnuradio.org")
418 (license license:gpl3+)))
aa862c2c
GLV
419
420(define-public gnuradio-osmosdr
421 (package
422 (name "gnuradio-osmosdr")
423 (version "0.2.0")
424 (source
425 (origin
426 (method git-fetch)
427 (uri (git-reference
428 (url "https://git.osmocom.org/gr-osmosdr")
429 (commit (string-append "v" version))))
430 (file-name (git-file-name name version))
431 (sha256
432 (base32 "1rdx7fa0xiq0qmgrrbby7z1bblmqhl9qh9jqpsznzxkx91f17ypd"))))
433 (build-system cmake-build-system)
434 (native-inputs
435 `(("doxygen" ,doxygen)
436 ("git" ,git-minimal)
437 ("pkg-config" ,pkg-config)
438 ("python" ,python)
439 ("python-mako" ,python-mako)
440 ("python-six" ,python-six)
441 ("swig" ,swig)))
442 (inputs
443 `(("boost" ,boost)
444 ("fftwf" ,fftwf)
445 ("gmp" ,gmp)
446 ("gnuradio" ,gnuradio)
62d45e46 447 ("hackrf" ,hackrf)
aa862c2c 448 ("log4cpp" ,log4cpp)
b3926202
GLV
449 ("rtl-sdr" ,rtl-sdr)
450 ("volk" ,volk)))
aa862c2c
GLV
451 (synopsis "GNU Radio block for interfacing with various radio hardware")
452 (description "This is a block for GNU Radio allowing to use a common API
453to access different radio hardware.")
454 (home-page "https://osmocom.org/projects/gr-osmosdr/wiki/GrOsmoSDR")
455 (license license:gpl3+)))
bc94b75d
GLV
456
457(define-public libosmo-dsp
458 (package
459 (name "libosmo-dsp")
460 (version "0.4.0")
461 (source
462 (origin
463 (method git-fetch)
464 (uri (git-reference
465 (url "https://git.osmocom.org/libosmo-dsp")
466 (commit version)))
467 (file-name (git-file-name name version))
468 (sha256
469 (base32 "00plihnpym1gkfpflah8il9463qxzm9kx2f07jyvbkszpj8viq5g"))))
470 (build-system gnu-build-system)
471 (native-inputs
472 `(("autoconf" ,autoconf)
473 ("automake" ,automake)
474 ("bash-minimal" ,bash-minimal)
475 ("doxygen" ,doxygen)
476 ("git" ,git-minimal)
477 ("libtool" ,libtool)
478 ("pkg-config" ,pkg-config)
479 ("texlive" ,(texlive-union (list texlive-amsfonts
480 texlive-latex-amsmath
481 ;; TODO: Add newunicodechar.
482 texlive-latex-graphics)))))
483 (inputs
484 `(("fftwf" ,fftwf)))
485 (arguments
486 `(#:phases
487 (modify-phases %standard-phases
488 (add-after 'unpack 'fix-paths
489 (lambda* (#:key inputs #:allow-other-keys)
490 (substitute* "git-version-gen"
491 (("/bin/sh")
492 (string-append (assoc-ref inputs "bash")
493 "/bin/bash")))
494 #t)))))
495 (synopsis "DSP primitives for SDR")
496 (description
497 "This a C-language library for common DSP (Digital Signal Processing)
498primitives for SDR (Software Defined Radio).")
499 (home-page "https://osmocom.org/projects/libosmo-dsp")
500 (license license:gpl2+)))
77dc12a8
GLV
501
502(define-public gnuradio-iqbalance
503 (package
504 (name "gnuradio-iqbalance")
505 (version "0.38.1")
506 (source
507 (origin
508 (method git-fetch)
509 (uri (git-reference
510 (url "https://git.osmocom.org/gr-iqbal")
511 (commit (string-append "v" version))))
512 (file-name (git-file-name name version))
513 (sha256
514 (base32 "0ksagwz05p3b0702q7ljq7013xmp0ijp30my9z6s3p7ja8dj42s3"))))
515 (build-system cmake-build-system)
516 (native-inputs
517 `(("doxygen" ,doxygen)
518 ("pkg-config" ,pkg-config)
519 ("python" ,python)
520 ("python-numpy" ,python-numpy)
521 ("python-six" ,python-six)
522 ("swig" ,swig)))
523 (inputs
524 `(("boost" ,boost)
525 ("fftwf" ,fftwf)
526 ("gmp" ,gmp)
527 ("gnuradio" ,gnuradio)
528 ("libosmo-dsp" ,libosmo-dsp)
29cab668
GLV
529 ("log4cpp" ,log4cpp)
530 ("volk" ,volk)))
77dc12a8
GLV
531 (synopsis "GNU Radio block to correct IQ imbalance")
532 (description
533 "This is a GNU Radio block to correct IQ imbalance in quadrature
534receivers. It's composed of two main block:
535@itemize
536@item Fix: Given a phase and amplitude error, it will correct a complex signal.
537@item Optimize: Attempts to auto-detect the phase and amplitude error to feed
538to the fix block above.
539@end itemize")
540 (home-page "https://git.osmocom.org/gr-iqbal/")
541 (license license:gpl3+)))
f76ac21c
GLV
542
543(define-public gqrx
544 (package
545 (name "gqrx")
546 (version "2.12.1")
547 (source
548 (origin
549 (method git-fetch)
550 (uri (git-reference
551 (url "https://github.com/csete/gqrx.git")
552 (commit (string-append "v" version))))
553 (file-name (git-file-name name version))
554 (sha256
555 (base32 "00alf3q6y313xpx6p7v43vqsphd2x4am4q362lw21bcy9wc4jidw"))))
556 (build-system qt-build-system)
557 (native-inputs
558 `(("pkg-config" ,pkg-config)))
559 (inputs
560 `(("alsa-lib" ,alsa-lib)
561 ("boost" ,boost)
562 ("fftwf" ,fftwf)
563 ("gmp" ,gmp)
564 ("gnuradio" ,gnuradio)
565 ("gnuradio-iqbalance" ,gnuradio-iqbalance)
566 ("gnuradio-osmosdr" ,gnuradio-osmosdr)
567 ("jack" ,jack-1)
568 ("log4cpp" ,log4cpp)
569 ("portaudio" ,portaudio)
570 ("pulseaudio" ,pulseaudio)
571 ("qtbase" ,qtbase)
01e62a02
GLV
572 ("qtsvg" ,qtsvg)
573 ("volk" ,volk)))
f76ac21c
GLV
574 (arguments
575 `(#:tests? #f)) ; No tests
576 (synopsis "Software defined radio receiver")
577 (description "Gqrx is a software defined radio (SDR) receiver implemented
578using GNU Radio and the Qt GUI toolkit.")
579 (home-page "https://gqrx.dk/")
580 (license license:gpl3+)))
72f6ee0e
GLV
581
582(define-public fldigi
583 (package
584 (name "fldigi")
3059e120 585 (version "4.1.13")
72f6ee0e
GLV
586 (source
587 (origin
588 (method url-fetch)
589 (uri (string-append "http://www.w1hkj.com/files/fldigi/fldigi-"
590 version ".tar.gz"))
591 (sha256
3059e120 592 (base32 "0mlq4z5k3h466plij8hg9xn5xbjxk557g4pw13cplpf32fhng224"))))
72f6ee0e
GLV
593 (build-system gnu-build-system)
594 (native-inputs
595 `(("pkg-config" ,pkg-config)))
596 (inputs
597 `(("alsa-lib" ,alsa-lib)
598 ("fltk" ,fltk)
e6d14165 599 ("hamlib" ,hamlib)
72f6ee0e
GLV
600 ("libpng" ,libpng)
601 ("libsamplerate" ,libsamplerate)
e6d14165 602 ("libusb" ,libusb)
72f6ee0e
GLV
603 ("libx11" ,libx11)
604 ("libxext" ,libxext)
605 ("libxfixes" ,libxfixes)
606 ("libxft" ,libxft)
607 ("portaudio" ,portaudio)
608 ("pulseaudio" ,pulseaudio)))
609 (synopsis "Software modem for amateur radio use")
610 (description
611 "Fldigi is a software modem for amateur radio use. It is a sound card
612based program that is used for both transmitting and receiving data by
613connecting the microphone and headphone connections of a computer to some radio
614hardware.")
615 (home-page "http://www.w1hkj.com/")
616 (license license:gpl3+)))
8080c03d
GLV
617
618(define-public flrig
619 (package
620 (name "flrig")
621 (version "1.3.50")
622 (source
623 (origin
624 (method url-fetch)
625 (uri (string-append "http://www.w1hkj.com/files/flrig/flrig-"
626 version ".tar.gz"))
627 (sha256
628 (base32 "0fzrknzzi8kmzmrcfpc8rxr7v4a4ny6z6z5q5qwh95sp2kn2qzp9"))))
629 (build-system gnu-build-system)
630 (native-inputs
631 `(("pkg-config" ,pkg-config)))
632 (inputs
633 `(("fltk" ,fltk)
634 ("libx11" ,libx11)
635 ("libxext" ,libxext)
636 ("libxfixes" ,libxfixes)
637 ("libxft" ,libxft)))
638 (synopsis "Radio transceiver control program")
639 (description
640 "Flrig is a transceiver control program for amateur radio use.
641It provides computer aided control of various radios using a serial
642or USB connection.")
643 (home-page "http://www.w1hkj.com/")
644 (license license:gpl3+)))
660912a4
GLV
645
646(define-public flamp
647 (package
648 (name "flamp")
649 (version "2.2.05")
650 (source
651 (origin
652 (method url-fetch)
653 (uri (string-append "http://www.w1hkj.com/files/flamp/flamp-"
654 version ".tar.gz"))
655 (sha256
656 (base32 "19z1kghhdf7bq6hi2j0mzlsn2nhpn3gl1a623x3inmsk80yw3ck4"))))
657 (build-system gnu-build-system)
658 (native-inputs
659 `(("pkg-config" ,pkg-config)))
660 (inputs
661 `(("fltk" ,fltk)
662 ("libx11" ,libx11)
663 ("libxext" ,libxext)
664 ("libxfixes" ,libxfixes)
665 ("libxft" ,libxft)))
666 (synopsis "Tool for AMP file transfer")
667 (description
668 "FLAMP is a program for transfering files by radio waves using AMP
669(Amateur Multicast Protocol).")
670 (home-page "http://www.w1hkj.com/")
671 (license license:gpl3+)))
90ec7085
GLV
672
673(define-public flwrap
674 (package
675 (name "flwrap")
676 (version "1.3.5")
677 (source
678 (origin
679 (method url-fetch)
680 (uri (string-append "http://www.w1hkj.com/files/flwrap/flwrap-"
681 version ".tar.gz"))
682 (sha256
683 (base32 "0qqivqkkravcg7j45740xfky2q3k7czqpkj6y364qff424q2pppg"))))
684 (build-system gnu-build-system)
685 (native-inputs
686 `(("pkg-config" ,pkg-config)))
687 (inputs
688 `(("fltk" ,fltk)
689 ("libx11" ,libx11)
690 ("libxext" ,libxext)
691 ("libxfixes" ,libxfixes)
692 ("libxft" ,libxft)))
693 (synopsis "File encapsulation program")
694 (description
695 "Flwrap is a software utility for amateur radio use. Its purpose is to
696encapsulate both text and binary files in a way that allows them to be
697transmitted over any of several digital modes and verified at the receipt end
698for correctness.")
699 (home-page "http://www.w1hkj.com/")
700 (license license:gpl3+)))
409dfdf0 701
79c4fb4f
CH
702(define-public hackrf
703 ;; Using a git commit because there have been many many commits
704 ;; since the relase two years ago, but no sign of a promised
705 ;; release for many months now.
706 (let ((commit "43e6f99fe8543094d18ff3a6550ed2066c398862")
707 (revision "0"))
708 (package
709 (name "hackrf")
710 (version (git-version "2018.01.1" revision commit))
711 (source
712 (origin
713 (method git-fetch)
714 (uri (git-reference
715 (url "https://github.com/mossmann/hackrf.git")
716 (commit commit)))
717 (file-name (git-file-name name version))
718 (sha256
719 (base32 "0avnv693xi0zsnrvkbfn0ln1r3s1iyj0bz7sc3gxay909av0pvbc"))))
720 (build-system cmake-build-system)
721 (arguments
722 '(#:configure-flags
723 (list "-DUDEV_RULES_GROUP=dialout"
724 (string-append "-DUDEV_RULES_PATH="
725 (assoc-ref %outputs "out")
726 "/lib/udev/rules.d"))
727 #:phases
728 (modify-phases %standard-phases
729 (add-before 'configure 'enter-source-directory
730 (lambda _
731 (chdir "host")
732 #t))
733 (add-after 'install 'delete-static-library
734 (lambda* (#:key outputs #:allow-other-keys)
735 (delete-file (string-append (assoc-ref outputs "out")
736 "/lib/libhackrf.a"))
737 #t))
738 (add-before 'install-license-files 'leave-source-directory
739 (lambda _
740 (chdir "..")
741 #t)))
742 #:tests? #f)) ; no test suite
743 (native-inputs
744 `(("pkg-config" ,pkg-config)))
745 (inputs
746 `(("fftw" ,fftw)
747 ("fftwf" ,fftwf)
748 ("libusb" ,libusb)))
749 (home-page "https://greatscottgadgets.com/hackrf/")
750 (synopsis "User-space library and utilities for HackRF SDR")
751 (description
752 "Command line utilities and a C library for controlling the HackRF
32290b2c
BW
753Software Defined Radio (SDR) over USB. Installing this package installs the
754userspace hackrf utilities and C library. To install the hackrf udev rules,
755you must extend 'udev-service-type' with this package. E.g.:
756@code{(udev-rules-service 'hackrf hackrf #:groups '(\"dialout\"))}.")
79c4fb4f
CH
757 (license license:gpl2))))
758
409dfdf0
GLV
759(define-public hamlib
760 (package
761 (name "hamlib")
762 (version "3.3")
763 (source
764 (origin
765 (method url-fetch)
766 (uri (string-append
767 "https://github.com/Hamlib/Hamlib/releases/download/"
768 version "/hamlib-" version ".tar.gz"))
769 (sha256
770 (base32 "10788mgrhbc57zpzakcxv5aqnr2819pcshml6fbh8zvnkja562y9"))))
771 (build-system gnu-build-system)
772 (native-inputs
773 `(("doxygen" ,doxygen)
774 ("lua" ,lua)
775 ("pkg-config" ,pkg-config)
776 ("python-wrapper" ,python-wrapper)
777 ("swig" ,swig)
778 ("tcl" ,tcl)))
779 (inputs
780 `(("gd" ,gd)
781 ("libusb" ,libusb)
782 ("libxml2" ,libxml2)
783 ("readline" ,readline)))
784 (arguments
785 `(#:configure-flags '("--disable-static"
786 "--with-lua-binding"
787 "--with-python-binding"
788 "--with-tcl-binding"
789 "--with-xml-support")))
790 (synopsis "Tools and API to control radios")
791 (description
792 "The Ham Radio Control Library (Hamlib) is a project to provide programs
793with a consistent Application Programming Interface (API) for controlling the
794myriad of radios and rotators available to amateur radio and communications
795users.")
796 (home-page "https://hamlib.github.io/")
797 (license (list license:gpl2+ license:lgpl2.1+))))
5a915632
GLV
798
799(define wsjtx-hamlib
800 ;; Fork of hamlib with custom patches used by wsjtx.
801 (package
802 (inherit hamlib)
803 (name "wsjtx-hamlib")
804 (version "2.1.2")
805 (source
806 (origin
807 (method git-fetch)
808 (uri (git-reference
809 (url "https://git.code.sf.net/u/bsomervi/hamlib.git")
810 (commit (string-append "wsjtx-" version))))
811 (file-name (git-file-name name version))
812 (sha256
813 (base32 "1ksv3cmr1dl45p0pp1panyc9dngd158gvv9ysv25lq4nqv1wn87i"))))
814 (native-inputs
815 `(("autoconf" ,autoconf)
816 ("automake" ,automake)
817 ("libtool" ,libtool)
818 ("texinfo" ,texinfo)
819 ,@(package-native-inputs hamlib)))))
820
821(define-public wsjtx
822 (package
823 (name "wsjtx")
824 (version "2.1.2")
825 (source
826 (origin
827 (method git-fetch)
828 (uri (git-reference
829 (url "https://git.code.sf.net/p/wsjt/wsjtx.git")
830 (commit (string-append "wsjtx-" version))))
831 (file-name (git-file-name name version))
832 (sha256
833 (base32 "1fnqzjd3dmxp3yjwjvwz2djk9gzb1y2cqfa188f3x8lynxhdhnfs"))
834 (modules '((guix build utils)))
835 (snippet
836 '(begin
837 ;; Delete bundled boost to use the shared one.
838 (delete-file-recursively "boost")
839 #t))))
840 (build-system qt-build-system)
841 (native-inputs
842 `(("asciidoc" ,asciidoc)
843 ("gfortran" ,gfortran)
844 ("pkg-config" ,pkg-config)
845 ("qttools" ,qttools)
846 ("ruby-asciidoctor" ,ruby-asciidoctor)))
847 (inputs
848 `(("boost" ,boost)
849 ("fftw" ,fftw)
850 ("fftwf" ,fftwf)
851 ("hamlib" ,wsjtx-hamlib)
852 ("libusb" ,libusb)
853 ("qtbase" ,qtbase)
854 ("qtmultimedia" ,qtmultimedia)
855 ("qtserialport" ,qtserialport)))
856 (arguments
b79794a7
GLV
857 `(#:tests? #f ; No test suite
858 #:phases
859 (modify-phases %standard-phases
860 (add-after 'unpack 'work-around-runtime-bug
861 (lambda _
862 ;; Some of the programs in this package fail to find symbols
863 ;; in libm at runtime. Adding libm manually at the end of the
864 ;; library lists when linking the programs seems to help.
865 ;; TODO: find exactly what is wrong in the way the programs
866 ;; are built.
867 (substitute* "CMakeLists.txt"
868 (("target_link_libraries \\((.*)\\)" all libs)
869 (string-append "target_link_libraries (" libs " m)")))
870 #t)))))
5a915632
GLV
871 (synopsis "Weak-signal ham radio communication program")
872 (description
873 "WSJT-X implements communication protocols or modes called FT4, FT8,
874JT4, JT9, JT65, QRA64, ISCAT, MSK144, and WSPR, as well as one called Echo for
875detecting and measuring your own radio signals reflected from the Moon. These
876modes were all designed for making reliable, confirmed QSOs under extreme
877weak-signal conditions.")
878 (home-page "https://www.physics.princeton.edu/pulsar/k1jt/wsjtx.html")
879 (license license:gpl3)))
f93eebbf 880
8a294ece
GLV
881(define-public js8call
882 (package
883 (inherit wsjtx)
884 (name "js8call")
885 (version "2.1.1")
886 (source
887 (origin
888 (method url-fetch)
889 (uri (string-append "http://files.js8call.com/" version
890 "/js8call-" version ".tgz"))
891 (sha256
892 (base32 "034jnv6h172znn9ijl6wpmzx0rqibb69ppg52ndvkxhqlgrbsvyc"))
893 (modules '((guix build utils)))
894 (snippet
895 '(begin
896 ;; Delete bundled boost to use the shared one.
897 (delete-file-recursively "boost")
898 #t))))
899 (build-system qt-build-system)
900 (native-inputs
901 `(("asciidoc" ,asciidoc)
902 ("gfortran" ,gfortran)
903 ("pkg-config" ,pkg-config)
904 ("qttools" ,qttools)
905 ("ruby-asciidoctor" ,ruby-asciidoctor)))
906 (inputs
907 `(("boost" ,boost)
908 ("fftw" ,fftw)
909 ("fftwf" ,fftwf)
910 ("hamlib" ,wsjtx-hamlib)
911 ("libusb" ,libusb)
912 ("qtbase" ,qtbase)
913 ("qtmultimedia" ,qtmultimedia)
914 ("qtserialport" ,qtserialport)))
915 (arguments
916 `(#:tests? #f ; No test suite
917 #:phases
918 (modify-phases %standard-phases
919 (add-after 'unpack 'fix-paths
920 (lambda* (#:key outputs #:allow-other-keys)
921 (substitute* "CMakeLists.txt"
922 (("DESTINATION /usr/share")
923 (string-append "DESTINATION "
924 (assoc-ref outputs "out")
925 "/share")))
926 #t))
ac4847eb
GLV
927 (add-after 'fix-paths 'work-around-runtime-bug
928 (lambda _
929 ;; Some of the programs in this package fail to find symbols
930 ;; in libm at runtime. Adding libm manually at the end of the
931 ;; library lists when linking the programs seems to help.
932 ;; TODO: find exactly what is wrong in the way the programs
933 ;; are built.
934 (substitute* "CMakeLists.txt"
935 (("target_link_libraries \\((.*)\\)" all libs)
936 (string-append "target_link_libraries (" libs " m)")))
937 #t))
8a294ece
GLV
938 (add-after 'unpack 'fix-hamlib
939 (lambda _
940 (substitute* "CMake/Modules/Findhamlib.cmake"
941 (("set \\(ENV\\{PKG_CONFIG_PATH\\}.*\\)")
942 "set (__pc_path $ENV{PKG_CONFIG_PATH})
943 list (APPEND __pc_path \"${__hamlib_pc_path}\")
944 set (ENV{PKG_CONFIG_PATH} \"${__pc_path}\")"))
945 (substitute* "HamlibTransceiver.hpp"
946 (("#ifdef JS8_USE_LEGACY_HAMLIB")
947 "#if 1"))
948 #t)))))
949 (synopsis "Weak-signal ham radio communication program")
950 (description
951 "JS8Call is a software using the JS8 digital mode (a derivative of the FT8
952mode) providing weak signal keyboard to keyboard messaging to amateur radio
953operators.")
954 (home-page "http://js8call.com/")
955 (license license:gpl3)))
956
f93eebbf
GLV
957(define-public xnec2c
958 (package
959 (name "xnec2c")
960 (version "4.1.1")
961 (source
962 (origin
963 (method url-fetch)
964 (uri (string-append "http://www.5b4az.org/pkg/nec2/xnec2c/xnec2c-"
965 version ".tar.bz2"))
966 (sha256
967 (base32 "1myvlkfybb2ha8l0h96ca3iz206zzy9z5iizm0sbab2zzp78n1r9"))))
968 (build-system gnu-build-system)
969 (native-inputs
970 `(("pkg-config" ,pkg-config)))
971 (inputs
972 `(("gtk+" ,gtk+)))
973 (arguments
974 `(#:phases
975 (modify-phases %standard-phases
976 (add-after 'unpack 'fix-makefile
977 (lambda* (#:key outputs #:allow-other-keys)
978 (substitute* '("Makefile.am" "Makefile.in")
979 ;; The DESTDIR variable does not get replaced the prefix
980 ;; in the final Makefile, so let's do here.
981 (("\\$\\(DESTDIR\\)/usr")
982 (assoc-ref outputs "out")))
983 #t))
984 (add-after 'fix-makefile 'fix-paths
985 (lambda* (#:key outputs #:allow-other-keys)
986 ;; Increase the max length of the path to the glade file,
987 ;; so that the '/gnu/store/...' path can fit in.
988 (substitute* '("src/shared.c" "src/shared.h")
989 (("char xnec2c_glade\\[64\\];")
990 "char xnec2c_glade[256];"))
991 ;; Fix hard coded references to '/usr/...'.
992 (substitute* '("src/geom_edit.c" "src/main.c")
993 (("\"/usr")
994 (string-append "\"" (assoc-ref outputs "out"))))
995 #t)))))
996 (synopsis "Antenna modeling software")
997 (description
998 "Xnec2c is a GTK3-based graphical version of nec2c, a translation to the
999C language of NEC2, the FORTRAN Numerical Electromagnetics Code commonly used
1000for antenna simulation and analysis. It can be used to define the geometry of
1001an antenna, and then plot the radiation pattern or frequency-related data like
1002gain and standing wave ratio.")
1003 (home-page "http://www.5b4az.org/")
1004 (license license:gpl3+)))
4fca1bc5
GLV
1005
1006(define-public dump1090
1007 (package
1008 (name "dump1090")
1009 (version "3.8.1")
1010 (source
1011 (origin
1012 (method git-fetch)
1013 (uri (git-reference
1014 (url "https://github.com/flightaware/dump1090.git")
1015 (commit (string-append "v" version))))
1016 (file-name (git-file-name name version))
1017 (sha256
1018 (base32 "0xg8rzrxqklx1m9ncxsd96dlkbjcsxfi2mrb859v50f07xysdyd8"))))
1019 (build-system gnu-build-system)
1020 (native-inputs
1021 `(("pkg-config" ,pkg-config)))
1022 (inputs
1023 `(("libusb" ,libusb)
1024 ("ncurses" ,ncurses)
1025 ("rtl-sdr" ,rtl-sdr)))
1026 (arguments
1027 `(#:test-target "test"
19e8a754 1028 #:make-flags
1ca44ae3
MB
1029 (list (string-append "CC=" ,(cc-for-target))
1030 "BLADERF=no")
4fca1bc5
GLV
1031 #:phases
1032 (modify-phases %standard-phases
19e8a754 1033 (delete 'configure)
4fca1bc5
GLV
1034 (replace 'install
1035 (lambda* (#:key outputs #:allow-other-keys)
1036 (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
1037 (install-file "dump1090" bin)
1038 (install-file "view1090" bin)
1039 #t))))))
1040 (synopsis "Mode S decoder for rtl-sdr devices")
1041 (description
1042 "Dump1090 is a Mode S decoder specifically designed for rtl-sdr devices.
1043It can be used to decode the ADS-B signals that planes emit to indicate
1044their position, altitude, speed, etc.")
1045 (home-page "https://github.com/flightaware/dump1090")
1046 (license license:bsd-3)))
232f2d26
GLV
1047
1048(define-public rtl-433
1049 (package
1050 (name "rtl-433")
1051 (version "20.02")
1052 (source
1053 (origin
1054 (method git-fetch)
1055 (uri (git-reference
1056 (url "https://github.com/merbanan/rtl_433.git")
1057 (commit version)))
1058 (file-name (git-file-name name version))
1059 (sha256
1060 (base32 "11991xky9gawkragdyg27qsf7kw5bhlg7ygvf3fn7ng00x4xbh1z"))))
1061 (build-system cmake-build-system)
1062 (native-inputs
1063 `(("pkg-config" ,pkg-config)))
1064 (inputs
1065 `(("libusb" ,libusb)
1066 ("rtl-sdr" ,rtl-sdr)))
1067 (synopsis "Decoder for radio transmissions in ISM bands")
1068 (description
1069 "This is a generic data receiver, mainly for decoding radio transmissions
1070from devices on the 433 MHz, 868 MHz, 315 MHz, 345 MHz and 915 MHz ISM bands.")
1071 (home-page "https://github.com/merbanan/rtl_433")
1072 (license license:gpl2+)))