1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017, 2018, 2019, 2020 Arun Isaac <arunisaac@systemreboot.net>
3 ;;; Copyright © 2019, 2020 Christopher Howard <christopher@librehacker.com>
4 ;;; Copyright © 2019, 2020 Evan Straw <evan.straw99@gmail.com>
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>
8 ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; This file is part of GNU Guix.
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.
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.
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/>.
25 (define-module (gnu packages radio)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix git-download)
30 #:use-module (guix utils)
31 #:use-module (gnu packages algebra)
32 #:use-module (gnu packages audio)
33 #:use-module (gnu packages autotools)
34 #:use-module (gnu packages base)
35 #:use-module (gnu packages bash)
36 #:use-module (gnu packages boost)
37 #:use-module (gnu packages check)
38 #:use-module (gnu packages documentation)
39 #:use-module (gnu packages engineering)
40 #:use-module (gnu packages fltk)
41 #:use-module (gnu packages gcc)
42 #:use-module (gnu packages gd)
43 #:use-module (gnu packages ghostscript)
44 #:use-module (gnu packages glib)
45 #:use-module (gnu packages gstreamer)
46 #:use-module (gnu packages gtk)
47 #:use-module (gnu packages image)
48 #:use-module (gnu packages libusb)
49 #:use-module (gnu packages linux)
50 #:use-module (gnu packages logging)
51 #:use-module (gnu packages lua)
52 #:use-module (gnu packages maths)
53 #:use-module (gnu packages multiprecision)
54 #:use-module (gnu packages ncurses)
55 #:use-module (gnu packages networking)
56 #:use-module (gnu packages pkg-config)
57 #:use-module (gnu packages pulseaudio)
58 #:use-module (gnu packages python)
59 #:use-module (gnu packages python-science)
60 #:use-module (gnu packages python-xyz)
61 #:use-module (gnu packages qt)
62 #:use-module (gnu packages readline)
63 #:use-module (gnu packages ruby)
64 #:use-module (gnu packages sphinx)
65 #:use-module (gnu packages swig)
66 #:use-module (gnu packages tcl)
67 #:use-module (gnu packages tex)
68 #:use-module (gnu packages texinfo)
69 #:use-module (gnu packages version-control)
70 #:use-module (gnu packages xml)
71 #:use-module (gnu packages xorg)
72 #:use-module (guix build-system cmake)
73 #:use-module (guix build-system glib-or-gtk)
74 #:use-module (guix build-system gnu)
75 #:use-module (guix build-system python)
76 #:use-module (guix build-system qt))
78 (define-public liquid-dsp
83 (origin (method git-fetch)
85 (url "https://github.com/jgaeddert/liquid-dsp")
86 (commit (string-append "v" version))))
87 (file-name (git-file-name name version))
89 (base32 "1n6dbg13q8ga5qhg1yiszwly4jj0rxqr6f1xwm9waaly5z493xsd"))))
90 (build-system gnu-build-system)
92 `(("autoconf" ,autoconf)))
96 (home-page "https://liquidsdr.org")
97 (synopsis "Signal processing library for software-defined radios")
99 "Liquid DSP is a @dfn{digital signal processing} (DSP) library designed
100 specifically for software-defined radios on embedded platforms. The aim is to
101 provide a lightweight DSP library that does not rely on a myriad of external
102 dependencies or proprietary and otherwise cumbersome frameworks. All signal
103 processing elements are designed to be flexible, scalable, and dynamic,
104 including filters, filter design, oscillators, modems, synchronizers, complex
105 mathematical operations, and much more.")
106 (license license:expat)))
108 (define-public rtl-sdr
116 (url "https://git.osmocom.org/rtl-sdr/")
118 (file-name (git-file-name name version))
121 "0lmvsnb4xw4hmz6zs0z5ilsah5hjz29g1s0050n59fllskqr3b8k"))))
122 (build-system cmake-build-system)
124 `(("libusb" ,libusb)))
126 `(("pkg-config" ,pkg-config)))
128 `(#:configure-flags '("-DDETACH_KERNEL_DRIVER=ON"
129 "-DINSTALL_UDEV_RULES=ON")
130 #:tests? #f ; No tests
132 (modify-phases %standard-phases
133 (add-after 'unpack 'fix-paths
134 (lambda* (#:key outputs #:allow-other-keys)
135 (substitute* "CMakeLists.txt"
136 (("DESTINATION \"/etc/udev/")
137 (string-append "DESTINATION \""
138 (assoc-ref outputs "out")
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
144 cheap software defined radio, since the chip allows transferring the raw I/Q
145 samples to the host. @code{rtl-sdr} provides drivers for this purpose.
147 The default Linux driver managing DVB-T dongles as TV devices doesn't work for
148 SDR purposes and clashes with this package. Therefore you must prevent the
149 kernel from loading it automatically by adding the following line to your
150 system configuration:
153 (kernel-arguments '(\"modprobe.blacklist=dvb_usb_rtl28xxu\"))
156 To install the rtl-sdr udev rules, you must extend 'udev-service-type' with
157 this package. E.g.: @code{(udev-rules-service 'rtl-sdr rtl-sdr)}")
158 (license license:gpl2+)))
167 (uri (string-append "https://trac.chirp.danplanet.com/chirp_daily/daily-"
168 version "/chirp-daily-" version ".tar.gz"))
171 "060fzplgmpfrk6wkfaasx7phpfk90mmylk6drbwzk4f9r1655vda"))))
172 (build-system python-build-system)
174 `(("python2-libxml2" ,python2-libxml2)
175 ("python2-pygtk" ,python2-pygtk)
176 ("python2-pyserial" ,python2-pyserial)))
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
182 growing list of radios across several manufacturers and allows transferring of
183 memory contents between them.")
184 (license (list license:gpl3+
185 license:lgpl3+)))) ; chirp/elib_intl.py
187 (define-public aptdec
195 (url "https://github.com/Xerbo/aptdec")
196 (commit (string-append "v" version))))
197 (file-name (git-file-name name version))
200 "1hf0zb51qc6fyhdjxyij1n3vgwnw3cwksc3r11szbhkml14qjnzk"))))
201 (build-system gnu-build-system)
204 ("libsndfile" ,libsndfile)))
209 (if ,(%current-target-system)
210 (string-append (assoc-ref %build-inputs "cross-gcc")
211 "/bin/" ,(%current-target-system) "-gcc")
213 (string-append "PREFIX=" %output)
214 (string-append "RPM_BUILD_ROOT=" %output))
215 #:tests? #f ; no tests
217 (modify-phases %standard-phases
220 (lambda* (#:key outputs #:allow-other-keys)
221 (let ((out (assoc-ref outputs "out")))
222 (install-file "atpdec" (string-append out "/bin")))
224 (home-page "https://github.com/Xerbo/aptdec")
225 (synopsis "NOAA Automatic Picture Transmission (APT) decoder")
226 (description "Aptdec decodes Automatic Picture Transmission (APT) images.
227 These are medium resolution images of the Earth transmitted by, among other
228 satellites, the POES NOAA weather satellite series. These transmissions are
229 on a frequency of 137 MHz. They can be received using an inexpensive antenna
230 and a dedicated receiver.")
231 (license license:gpl2+)))
233 (define-public redsea
240 (url "https://github.com/windytan/redsea")
241 (commit (string-append "v" version))))
242 (file-name (git-file-name name version))
245 "1y96g0ra2krjb2kypm8s5gdfia45yci4f36klsvyzg8d53v5cwhn"))))
246 (build-system gnu-build-system)
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
255 (add-after 'unpack 'patch-libiconv
257 (substitute* "configure.ac"
261 "esac\nAC_SUBST([ICONV], [\"-liconv\"])"))
264 `(("libiconv" ,libiconv)
265 ("libsndfile" ,libsndfile)
266 ("liquid-dsp" ,liquid-dsp)))
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
273 System} (FM-RDS) decoder. Redsea can be used with any RTL-SDR USB radio stick
274 with the rtl_fm tool, or any other @dfn{software-defined radio} (SDR) via
275 csdr, for example. It can also decode raw ASCII bitstream, the hex format
276 used by RDS Spy, and audio files containing @dfn{multiplex} signals (MPX).")
277 (license license:expat)))
279 (define-public gnuradio
286 (uri (string-append "https://www.gnuradio.org/releases/gnuradio/"
287 "gnuradio-" version ".tar.xz"))
289 (base32 "0aw55gf5549b0fz2qdi7vplcmaf92bj34h40s34b2ycnqasv900r"))
290 (modules '((guix build utils)))
293 ;; Delete bundled volk to use the shared one.
294 (delete-file-recursively "volk")
296 (build-system cmake-build-system)
298 `(("doxygen" ,doxygen)
300 ("ghostscript" ,ghostscript)
302 ("pkg-config" ,pkg-config)
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)
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)))
315 `(("alsa-lib" ,alsa-lib)
328 ("portaudio" ,portaudio)
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)
343 `(#:modules ((guix build cmake-build-system)
344 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
345 ((guix build python-build-system) #:prefix python:)
348 #:imported-modules (,@%cmake-build-system-modules
349 (guix build glib-or-gtk-build-system)
350 (guix build python-build-system))
352 '("-DENABLE_INTERNAL_VOLK=OFF")
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"
360 (string-append qwt "/include"))
362 (string-append qwt "/lib"))
363 (("qwt6-\\$\\{QWT_QT_VERSION\\}")
365 (substitute* "cmake/Modules/GrPython.cmake"
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")
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")
379 (setenv "DISPLAY" ":1")
381 (add-after 'install 'wrap-python
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
392 "/lib/girepository-1.0")))
393 (if (file-exists? girepodir)
397 (wrap-program (string-append out "/bin/gnuradio-companion")
398 `("GI_TYPELIB_PATH" ":" prefix ,(filter identity paths))))
401 ;; Variables required to find third-party plugins at runtime.
402 (list (search-path-specification
403 (variable "GRC_BLOCKS_PATH")
404 (files '("share/gnuradio/grc/blocks")))
405 (search-path-specification
406 (variable "PYTHONPATH")
407 (files (list (string-append "lib/python"
409 (package-version python))
410 "/site-packages"))))))
411 (synopsis "Toolkit for software-defined radios")
413 "GNU Radio is a development toolkit that provides signal processing blocks
414 to implement software radios. It can be used with external RF hardware to
415 create software-defined radios, or without hardware in a simulation-like
417 (home-page "https://www.gnuradio.org")
418 (license license:gpl3+)))
420 (define-public gnuradio-osmosdr
422 (name "gnuradio-osmosdr")
428 (url "https://git.osmocom.org/gr-osmosdr")
429 (commit (string-append "v" version))))
430 (file-name (git-file-name name version))
432 (base32 "1rdx7fa0xiq0qmgrrbby7z1bblmqhl9qh9jqpsznzxkx91f17ypd"))))
433 (build-system cmake-build-system)
435 `(("doxygen" ,doxygen)
437 ("pkg-config" ,pkg-config)
439 ("python-mako" ,python-mako)
440 ("python-six" ,python-six)
446 ("gnuradio" ,gnuradio)
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
453 to access different radio hardware.")
454 (home-page "https://osmocom.org/projects/gr-osmosdr/wiki/GrOsmoSDR")
455 (license license:gpl3+)))
457 (define-public libosmo-dsp
465 (url "https://git.osmocom.org/libosmo-dsp")
467 (file-name (git-file-name name version))
469 (base32 "00plihnpym1gkfpflah8il9463qxzm9kx2f07jyvbkszpj8viq5g"))))
470 (build-system gnu-build-system)
472 `(("autoconf" ,autoconf)
473 ("automake" ,automake)
474 ("bash-minimal" ,bash-minimal)
478 ("pkg-config" ,pkg-config)
479 ("texlive" ,(texlive-union (list texlive-amsfonts
480 texlive-latex-amsmath
481 ;; TODO: Add newunicodechar.
482 texlive-latex-graphics)))))
487 (modify-phases %standard-phases
488 (add-after 'unpack 'fix-paths
489 (lambda* (#:key inputs #:allow-other-keys)
490 (substitute* "git-version-gen"
492 (string-append (assoc-ref inputs "bash")
495 (synopsis "DSP primitives for SDR")
497 "This a C-language library for common DSP (Digital Signal Processing)
498 primitives for SDR (Software Defined Radio).")
499 (home-page "https://osmocom.org/projects/libosmo-dsp")
500 (license license:gpl2+)))
502 (define-public gnuradio-iqbalance
504 (name "gnuradio-iqbalance")
510 (url "https://git.osmocom.org/gr-iqbal")
511 (commit (string-append "v" version))))
512 (file-name (git-file-name name version))
514 (base32 "0ksagwz05p3b0702q7ljq7013xmp0ijp30my9z6s3p7ja8dj42s3"))))
515 (build-system cmake-build-system)
517 `(("doxygen" ,doxygen)
518 ("pkg-config" ,pkg-config)
520 ("python-numpy" ,python-numpy)
521 ("python-six" ,python-six)
527 ("gnuradio" ,gnuradio)
528 ("libosmo-dsp" ,libosmo-dsp)
531 (synopsis "GNU Radio block to correct IQ imbalance")
533 "This is a GNU Radio block to correct IQ imbalance in quadrature
534 receivers. It's composed of two main block:
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
538 to the fix block above.
540 (home-page "https://git.osmocom.org/gr-iqbal/")
541 (license license:gpl3+)))
551 (url "https://github.com/csete/gqrx")
552 (commit (string-append "v" version))))
553 (file-name (git-file-name name version))
555 (base32 "00alf3q6y313xpx6p7v43vqsphd2x4am4q362lw21bcy9wc4jidw"))))
556 (build-system qt-build-system)
558 `(("pkg-config" ,pkg-config)))
560 `(("alsa-lib" ,alsa-lib)
564 ("gnuradio" ,gnuradio)
565 ("gnuradio-iqbalance" ,gnuradio-iqbalance)
566 ("gnuradio-osmosdr" ,gnuradio-osmosdr)
569 ("portaudio" ,portaudio)
570 ("pulseaudio" ,pulseaudio)
575 `(#:tests? #f)) ; No tests
576 (synopsis "Software defined radio receiver")
577 (description "Gqrx is a software defined radio (SDR) receiver implemented
578 using GNU Radio and the Qt GUI toolkit.")
579 (home-page "https://gqrx.dk/")
580 (license license:gpl3+)))
582 (define-public fldigi
589 (uri (string-append "http://www.w1hkj.com/files/fldigi/fldigi-"
592 (base32 "0mlq4z5k3h466plij8hg9xn5xbjxk557g4pw13cplpf32fhng224"))))
593 (build-system gnu-build-system)
595 `(("pkg-config" ,pkg-config)))
597 `(("alsa-lib" ,alsa-lib)
601 ("libsamplerate" ,libsamplerate)
605 ("libxfixes" ,libxfixes)
607 ("portaudio" ,portaudio)
608 ("pulseaudio" ,pulseaudio)))
609 (synopsis "Software modem for amateur radio use")
611 "Fldigi is a software modem for amateur radio use. It is a sound card
612 based program that is used for both transmitting and receiving data by
613 connecting the microphone and headphone connections of a computer to some radio
615 (home-page "http://www.w1hkj.com/")
616 (license license:gpl3+)))
625 (uri (string-append "http://www.w1hkj.com/files/flrig/flrig-"
628 (base32 "0aq4x0ai9q08ypfhzfj2inc4z3q39zq1l6h9as1kil9yn4zbay61"))))
629 (build-system gnu-build-system)
631 `(("pkg-config" ,pkg-config)))
636 ("libxfixes" ,libxfixes)
638 (synopsis "Radio transceiver control program")
640 "Flrig is a transceiver control program for amateur radio use.
641 It provides computer aided control of various radios using a serial
643 (home-page "http://www.w1hkj.com/")
644 (license license:gpl3+)))
653 (uri (string-append "http://www.w1hkj.com/files/flamp/flamp-"
656 (base32 "19z1kghhdf7bq6hi2j0mzlsn2nhpn3gl1a623x3inmsk80yw3ck4"))))
657 (build-system gnu-build-system)
659 `(("pkg-config" ,pkg-config)))
664 ("libxfixes" ,libxfixes)
666 (synopsis "Tool for AMP file transfer")
668 "FLAMP is a program for transferring files by radio waves using AMP
669 (Amateur Multicast Protocol).")
670 (home-page "http://www.w1hkj.com/")
671 (license license:gpl3+)))
673 (define-public flwrap
680 (uri (string-append "http://www.w1hkj.com/files/flwrap/flwrap-"
683 (base32 "0qqivqkkravcg7j45740xfky2q3k7czqpkj6y364qff424q2pppg"))))
684 (build-system gnu-build-system)
686 `(("pkg-config" ,pkg-config)))
691 ("libxfixes" ,libxfixes)
693 (synopsis "File encapsulation program")
695 "Flwrap is a software utility for amateur radio use. Its purpose is to
696 encapsulate both text and binary files in a way that allows them to be
697 transmitted over any of several digital modes and verified at the receipt end
699 (home-page "http://www.w1hkj.com/")
700 (license license:gpl3+)))
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")
710 (version (git-version "2018.01.1" revision commit))
715 (url "https://github.com/mossmann/hackrf")
717 (file-name (git-file-name name version))
719 (base32 "0avnv693xi0zsnrvkbfn0ln1r3s1iyj0bz7sc3gxay909av0pvbc"))))
720 (build-system cmake-build-system)
723 (list "-DUDEV_RULES_GROUP=dialout"
724 (string-append "-DUDEV_RULES_PATH="
725 (assoc-ref %outputs "out")
726 "/lib/udev/rules.d"))
728 (modify-phases %standard-phases
729 (add-before 'configure 'enter-source-directory
733 (add-after 'install 'delete-static-library
734 (lambda* (#:key outputs #:allow-other-keys)
735 (delete-file (string-append (assoc-ref outputs "out")
738 (add-before 'install-license-files 'leave-source-directory
742 #:tests? #f)) ; no test suite
744 `(("pkg-config" ,pkg-config)))
749 (home-page "https://greatscottgadgets.com/hackrf/")
750 (synopsis "User-space library and utilities for HackRF SDR")
752 "Command line utilities and a C library for controlling the HackRF
753 Software Defined Radio (SDR) over USB. Installing this package installs the
754 userspace hackrf utilities and C library. To install the hackrf udev rules,
755 you must extend 'udev-service-type' with this package. E.g.:
756 @code{(udev-rules-service 'hackrf hackrf #:groups '(\"dialout\"))}.")
757 (license license:gpl2))))
759 (define-public hamlib
767 "https://github.com/Hamlib/Hamlib/releases/download/"
768 version "/hamlib-" version ".tar.gz"))
770 (base32 "10788mgrhbc57zpzakcxv5aqnr2819pcshml6fbh8zvnkja562y9"))))
771 (build-system gnu-build-system)
773 `(("doxygen" ,doxygen)
775 ("pkg-config" ,pkg-config)
776 ("python-wrapper" ,python-wrapper)
783 ("readline" ,readline)))
785 `(#:configure-flags '("--disable-static"
787 "--with-python-binding"
789 "--with-xml-support")))
790 (synopsis "Tools and API to control radios")
792 "The Ham Radio Control Library (Hamlib) is a project to provide programs
793 with a consistent Application Programming Interface (API) for controlling the
794 myriad of radios and rotators available to amateur radio and communications
796 (home-page "https://hamlib.github.io/")
797 (license (list license:gpl2+ license:lgpl2.1+))))
800 ;; Fork of hamlib with custom patches used by wsjtx.
803 (name "wsjtx-hamlib")
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))
813 (base32 "01h5ps0yq5vi1x9rkw742gx6a5fj02zhbpi89i412qdfbnyk35cv"))))
815 `(("autoconf" ,autoconf)
816 ("automake" ,automake)
819 ,@(package-native-inputs hamlib)))
821 `(#:configure-flags '("--disable-static"
823 "--with-python-binding"
825 "--with-xml-support")
827 (modify-phases %standard-phases
828 (add-after 'unpack 'fix-tests
830 (substitute* "tests/testloc.c"
831 (("dmmm2dec\\(deg, mmm, nesw\\);")
832 "dmmm2dec(deg, mmm, 0, nesw);"))
843 (url "https://git.code.sf.net/p/wsjt/wsjtx.git")
844 (commit (string-append "wsjtx-" version))))
845 (file-name (git-file-name name version))
847 (base32 "0fhws44gg05d9y2al0pcdnxwxwh4bazcfl0g5mq2ks1r7w23wi5x"))
848 (modules '((guix build utils)))
851 ;; Delete bundled boost to use the shared one.
852 (delete-file-recursively "boost")
854 (build-system qt-build-system)
856 `(("asciidoc" ,asciidoc)
857 ("gfortran" ,gfortran)
858 ("pkg-config" ,pkg-config)
860 ("ruby-asciidoctor" ,ruby-asciidoctor)))
865 ("hamlib" ,wsjtx-hamlib)
868 ("qtmultimedia" ,qtmultimedia)
869 ("qtserialport" ,qtserialport)))
871 `(#:tests? #f ; No test suite
873 (modify-phases %standard-phases
874 (add-after 'unpack 'work-around-runtime-bug
876 ;; Some of the programs in this package fail to find symbols
877 ;; in libm at runtime. Adding libm manually at the end of the
878 ;; library lists when linking the programs seems to help.
879 ;; TODO: find exactly what is wrong in the way the programs
881 (substitute* "CMakeLists.txt"
882 (("target_link_libraries \\((.*)\\)" all libs)
883 (string-append "target_link_libraries (" libs " m)")))
885 (synopsis "Weak-signal ham radio communication program")
887 "WSJT-X implements communication protocols or modes called FT4, FT8,
888 JT4, JT9, JT65, QRA64, ISCAT, MSK144, and WSPR, as well as one called Echo for
889 detecting and measuring your own radio signals reflected from the Moon. These
890 modes were all designed for making reliable, confirmed QSOs under extreme
891 weak-signal conditions.")
892 (home-page "https://www.physics.princeton.edu/pulsar/k1jt/wsjtx.html")
893 (license license:gpl3)))
895 (define-public js8call
903 (uri (string-append "http://files.js8call.com/" version
904 "/js8call-" version ".tgz"))
906 (base32 "149sjwc4zg6ckgq26af93p4fxappa4k9dh7rdy67g8ajfjad4cd8"))
907 (modules '((guix build utils)))
910 ;; Delete bundled boost to use the shared one.
911 (delete-file-recursively "boost")
913 (build-system qt-build-system)
915 `(("asciidoc" ,asciidoc)
916 ("gfortran" ,gfortran)
917 ("pkg-config" ,pkg-config)
919 ("ruby-asciidoctor" ,ruby-asciidoctor)))
924 ("hamlib" ,wsjtx-hamlib)
927 ("qtmultimedia" ,qtmultimedia)
928 ("qtserialport" ,qtserialport)))
930 `(#:tests? #f ; No test suite
932 (modify-phases %standard-phases
933 (add-after 'unpack 'fix-paths
934 (lambda* (#:key outputs #:allow-other-keys)
935 (substitute* "CMakeLists.txt"
936 (("DESTINATION /usr/share")
937 (string-append "DESTINATION "
938 (assoc-ref outputs "out")
941 (add-after 'fix-paths 'work-around-runtime-bug
943 ;; Some of the programs in this package fail to find symbols
944 ;; in libm at runtime. Adding libm manually at the end of the
945 ;; library lists when linking the programs seems to help.
946 ;; TODO: find exactly what is wrong in the way the programs
948 (substitute* "CMakeLists.txt"
949 (("target_link_libraries \\((.*)\\)" all libs)
950 (string-append "target_link_libraries (" libs " m)")))
952 (add-after 'unpack 'fix-hamlib
954 (substitute* "CMake/Modules/Findhamlib.cmake"
955 (("set \\(ENV\\{PKG_CONFIG_PATH\\}.*\\)")
956 "set (__pc_path $ENV{PKG_CONFIG_PATH})
957 list (APPEND __pc_path \"${__hamlib_pc_path}\")
958 set (ENV{PKG_CONFIG_PATH} \"${__pc_path}\")"))
959 (substitute* "HamlibTransceiver.hpp"
960 (("#ifdef JS8_USE_LEGACY_HAMLIB")
963 (synopsis "Weak-signal ham radio communication program")
965 "JS8Call is a software using the JS8 digital mode (a derivative of the FT8
966 mode) providing weak signal keyboard to keyboard messaging to amateur radio
968 (home-page "http://js8call.com/")
969 (license license:gpl3)))
971 (define-public xnec2c
978 (uri (string-append "http://www.5b4az.org/pkg/nec2/xnec2c/xnec2c-"
981 (base32 "1myvlkfybb2ha8l0h96ca3iz206zzy9z5iizm0sbab2zzp78n1r9"))))
982 (build-system gnu-build-system)
984 `(("pkg-config" ,pkg-config)))
989 (modify-phases %standard-phases
990 (add-after 'unpack 'fix-makefile
991 (lambda* (#:key outputs #:allow-other-keys)
992 (substitute* '("Makefile.am" "Makefile.in")
993 ;; The DESTDIR variable does not get replaced the prefix
994 ;; in the final Makefile, so let's do here.
995 (("\\$\\(DESTDIR\\)/usr")
996 (assoc-ref outputs "out")))
998 (add-after 'fix-makefile 'fix-paths
999 (lambda* (#:key outputs #:allow-other-keys)
1000 ;; Increase the max length of the path to the glade file,
1001 ;; so that the '/gnu/store/...' path can fit in.
1002 (substitute* '("src/shared.c" "src/shared.h")
1003 (("char xnec2c_glade\\[64\\];")
1004 "char xnec2c_glade[256];"))
1005 ;; Fix hard coded references to '/usr/...'.
1006 (substitute* '("src/geom_edit.c" "src/main.c")
1008 (string-append "\"" (assoc-ref outputs "out"))))
1010 (synopsis "Antenna modeling software")
1012 "Xnec2c is a GTK3-based graphical version of nec2c, a translation to the
1013 C language of NEC2, the FORTRAN Numerical Electromagnetics Code commonly used
1014 for antenna simulation and analysis. It can be used to define the geometry of
1015 an antenna, and then plot the radiation pattern or frequency-related data like
1016 gain and standing wave ratio.")
1017 (home-page "http://www.5b4az.org/")
1018 (license license:gpl3+)))
1020 (define-public dump1090
1028 (url "https://github.com/flightaware/dump1090")
1029 (commit (string-append "v" version))))
1030 (file-name (git-file-name name version))
1032 (base32 "0xg8rzrxqklx1m9ncxsd96dlkbjcsxfi2mrb859v50f07xysdyd8"))))
1033 (build-system gnu-build-system)
1035 `(("pkg-config" ,pkg-config)))
1037 `(("libusb" ,libusb)
1038 ("ncurses" ,ncurses)
1039 ("rtl-sdr" ,rtl-sdr)))
1041 `(#:test-target "test"
1043 (list (string-append "CC=" ,(cc-for-target))
1046 (modify-phases %standard-phases
1049 (lambda* (#:key outputs #:allow-other-keys)
1050 (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
1051 (install-file "dump1090" bin)
1052 (install-file "view1090" bin)
1054 (synopsis "Mode S decoder for rtl-sdr devices")
1056 "Dump1090 is a Mode S decoder specifically designed for rtl-sdr devices.
1057 It can be used to decode the ADS-B signals that planes emit to indicate
1058 their position, altitude, speed, etc.")
1059 (home-page "https://github.com/flightaware/dump1090")
1060 (license license:bsd-3)))
1062 (define-public rtl-433
1070 (url "https://github.com/merbanan/rtl_433")
1072 (file-name (git-file-name name version))
1074 (base32 "11991xky9gawkragdyg27qsf7kw5bhlg7ygvf3fn7ng00x4xbh1z"))))
1075 (build-system cmake-build-system)
1077 `(("pkg-config" ,pkg-config)))
1079 `(("libusb" ,libusb)
1080 ("rtl-sdr" ,rtl-sdr)))
1081 (synopsis "Decoder for radio transmissions in ISM bands")
1083 "This is a generic data receiver, mainly for decoding radio transmissions
1084 from devices on the 433 MHz, 868 MHz, 315 MHz, 345 MHz and 915 MHz ISM bands.")
1085 (home-page "https://github.com/merbanan/rtl_433")
1086 (license license:gpl2+)))
1088 (define-public multimon-ng
1090 (name "multimon-ng")
1096 (url "https://github.com/EliasOenal/multimon-ng")
1098 (file-name (git-file-name name version))
1100 (base32 "1973xfyvzl1viz19zr83cgqlx5laxbjrca35rqabn6dlb6xb5xk8"))))
1101 (build-system cmake-build-system)
1103 `(("libx11" ,libx11)
1104 ("pulseaudio" ,pulseaudio)))
1106 '(#:tests? #f)) ; No test suite
1107 (home-page "https://github.com/EliasOenal/multimon-ng")
1108 (synopsis "Decoder for digital radio transmission modes")
1109 (description "Multimon-ng can decode several digital radio transmission
1112 @item POCSAG512, POCSAG1200, POCSAG2400
1115 @item UFSK1200, CLIPFSK, AFSK1200, AFSK2400, AFSK2400_2, AFSK2400_3
1119 @item ZVEI1, ZVEI2, ZVEI3, DZVEI, PZVEI
1120 @item EEA, EIA, CCIR
1124 (license license:gpl2+)))