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 xml)
70 #:use-module (gnu packages xorg)
71 #:use-module (guix build-system cmake)
72 #:use-module (guix build-system glib-or-gtk)
73 #:use-module (guix build-system gnu)
74 #:use-module (guix build-system python)
75 #:use-module (guix build-system qt))
77 (define-public liquid-dsp
82 (origin (method git-fetch)
84 (url "https://github.com/jgaeddert/liquid-dsp")
85 (commit (string-append "v" version))))
86 (file-name (git-file-name name version))
88 (base32 "1n6dbg13q8ga5qhg1yiszwly4jj0rxqr6f1xwm9waaly5z493xsd"))))
89 (build-system gnu-build-system)
91 `(("autoconf" ,autoconf)))
95 (home-page "https://liquidsdr.org")
96 (synopsis "Signal processing library for software-defined radios")
98 "Liquid DSP is a @dfn{digital signal processing} (DSP) library designed
99 specifically for software-defined radios on embedded platforms. The aim is to
100 provide a lightweight DSP library that does not rely on a myriad of external
101 dependencies or proprietary and otherwise cumbersome frameworks. All signal
102 processing elements are designed to be flexible, scalable, and dynamic,
103 including filters, filter design, oscillators, modems, synchronizers, complex
104 mathematical operations, and much more.")
105 (license license:expat)))
107 (define-public rtl-sdr
115 (url "https://git.osmocom.org/rtl-sdr/")
117 (file-name (git-file-name name version))
120 "0lmvsnb4xw4hmz6zs0z5ilsah5hjz29g1s0050n59fllskqr3b8k"))))
121 (build-system cmake-build-system)
123 `(("libusb" ,libusb)))
125 `(("pkg-config" ,pkg-config)))
127 `(#:configure-flags '("-DDETACH_KERNEL_DRIVER=ON"
128 "-DINSTALL_UDEV_RULES=ON")
129 #:tests? #f ; No tests
131 (modify-phases %standard-phases
132 (add-after 'unpack 'fix-paths
133 (lambda* (#:key outputs #:allow-other-keys)
134 (substitute* "CMakeLists.txt"
135 (("DESTINATION \"/etc/udev/")
136 (string-append "DESTINATION \""
137 (assoc-ref outputs "out")
140 (home-page "https://osmocom.org/projects/sdr/wiki/rtl-sdr")
141 (synopsis "Software defined radio driver for Realtek RTL2832U")
142 (description "DVB-T dongles based on the Realtek RTL2832U can be used as a
143 cheap software defined radio, since the chip allows transferring the raw I/Q
144 samples to the host. @code{rtl-sdr} provides drivers for this purpose.
146 The default Linux driver managing DVB-T dongles as TV devices doesn't work for
147 SDR purposes and clashes with this package. Therefore you must prevent the
148 kernel from loading it automatically by adding the following line to your
149 system configuration:
152 (kernel-arguments '(\"modprobe.blacklist=dvb_usb_rtl28xxu\"))
155 To install the rtl-sdr udev rules, you must extend 'udev-service-type' with
156 this package. E.g.: @code{(udev-rules-service 'rtl-sdr rtl-sdr)}")
157 (license license:gpl2+)))
166 (uri (string-append "https://trac.chirp.danplanet.com/chirp_daily/daily-"
167 version "/chirp-daily-" version ".tar.gz"))
169 (base32 "16x3ix2n7a9l7lln2pri1xfmhyfvvzxb0nr3h33iajqimbwckxj0"))))
170 (build-system python-build-system)
172 `(("python2-libxml2" ,python2-libxml2)
173 ("python2-pygtk" ,python2-pygtk)
174 ("python2-pyserial" ,python2-pyserial)))
176 `(#:python ,python-2))
177 (home-page "https://chirp.danplanet.com")
178 (synopsis "Cross-radio programming tool")
179 (description "Chirp is a cross-radio programming tool. It supports a
180 growing list of radios across several manufacturers and allows transferring of
181 memory contents between them.")
182 (license (list license:gpl3+
183 license:lgpl3+)))) ; chirp/elib_intl.py
185 (define-public aptdec
193 (url "https://github.com/Xerbo/aptdec")
194 (commit (string-append "v" version))))
195 (file-name (git-file-name name version))
198 "1hf0zb51qc6fyhdjxyij1n3vgwnw3cwksc3r11szbhkml14qjnzk"))))
199 (build-system gnu-build-system)
202 ("libsndfile" ,libsndfile)))
207 (if ,(%current-target-system)
208 (string-append (assoc-ref %build-inputs "cross-gcc")
209 "/bin/" ,(%current-target-system) "-gcc")
211 (string-append "PREFIX=" %output)
212 (string-append "RPM_BUILD_ROOT=" %output))
213 #:tests? #f ; no tests
215 (modify-phases %standard-phases
218 (lambda* (#:key outputs #:allow-other-keys)
219 (let ((out (assoc-ref outputs "out")))
220 (install-file "atpdec" (string-append out "/bin")))
222 (home-page "https://github.com/Xerbo/aptdec")
223 (synopsis "NOAA Automatic Picture Transmission (APT) decoder")
224 (description "Aptdec decodes Automatic Picture Transmission (APT) images.
225 These are medium resolution images of the Earth transmitted by, among other
226 satellites, the POES NOAA weather satellite series. These transmissions are
227 on a frequency of 137 MHz. They can be received using an inexpensive antenna
228 and a dedicated receiver.")
229 (license license:gpl2+)))
231 (define-public redsea
238 (url "https://github.com/windytan/redsea")
239 (commit (string-append "v" version))))
240 (file-name (git-file-name name version))
243 "1y96g0ra2krjb2kypm8s5gdfia45yci4f36klsvyzg8d53v5cwhn"))))
244 (build-system gnu-build-system)
247 (modify-phases %standard-phases
248 ;; The configure.ac file does not explicitly link against libiconv
249 ;; except on Mac OS, causing the build to fail. This phase comments
250 ;; out the original AC_SUBST macro (located inside a conditional) and
251 ;; adds an explicit use of it underneath, so that libiconv is always
253 (add-after 'unpack 'patch-libiconv
255 (substitute* "configure.ac"
259 "esac\nAC_SUBST([ICONV], [\"-liconv\"])"))
262 `(("libiconv" ,libiconv)
263 ("libsndfile" ,libsndfile)
264 ("liquid-dsp" ,liquid-dsp)))
266 `(("autoconf" ,autoconf)
267 ("automake" ,automake)))
268 (home-page "https://github.com/windytan/redsea")
269 (synopsis "Lightweight RDS to JSON decoder")
270 (description "redsea is a lightweight command-line @dfn{FM Radio Data
271 System} (FM-RDS) decoder. Redsea can be used with any RTL-SDR USB radio stick
272 with the rtl_fm tool, or any other @dfn{software-defined radio} (SDR) via
273 csdr, for example. It can also decode raw ASCII bitstream, the hex format
274 used by RDS Spy, and audio files containing @dfn{multiplex} signals (MPX).")
275 (license license:expat)))
277 (define-public gnuradio
284 (uri (string-append "https://www.gnuradio.org/releases/gnuradio/"
285 "gnuradio-" version ".tar.xz"))
287 (base32 "0aw55gf5549b0fz2qdi7vplcmaf92bj34h40s34b2ycnqasv900r"))
288 (modules '((guix build utils)))
291 ;; Delete bundled volk to use the shared one.
292 (delete-file-recursively "volk")
294 (build-system cmake-build-system)
296 `(("doxygen" ,doxygen)
297 ("ghostscript" ,ghostscript)
299 ("pkg-config" ,pkg-config)
300 ("python-cheetah" ,python-cheetah)
301 ("python-mako" ,python-mako)
302 ("python-pyzmq" ,python-pyzmq)
303 ("python-scipy" ,python-scipy)
304 ("python-sphinx" ,python-sphinx)
306 ("texlive" ,(texlive-union (list texlive-amsfonts
307 texlive-latex-amsmath
308 ;; TODO: Add newunicodechar.
309 texlive-latex-graphics)))
310 ("xorg-server" ,xorg-server-for-tests)))
312 `(("alsa-lib" ,alsa-lib)
325 ("portaudio" ,portaudio)
327 ("python-click" ,python-click)
328 ("python-click-plugins" ,python-click-plugins)
329 ("python-lxml" ,python-lxml)
330 ("python-numpy" ,python-numpy)
331 ("python-pycairo" ,python-pycairo)
332 ("python-pygobject" ,python-pygobject)
333 ("python-pyqt" ,python-pyqt)
334 ("python-pyyaml" ,python-pyyaml)
340 `(#:modules ((guix build cmake-build-system)
341 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
342 ((guix build python-build-system) #:prefix python:)
345 #:imported-modules (,@%cmake-build-system-modules
346 (guix build glib-or-gtk-build-system)
347 (guix build python-build-system))
349 '("-DENABLE_INTERNAL_VOLK=OFF")
351 (modify-phases %standard-phases
352 (add-after 'unpack 'fix-paths
353 (lambda* (#:key inputs #:allow-other-keys)
354 (let ((qwt (assoc-ref inputs "qwt")))
355 (substitute* "cmake/Modules/FindQwt.cmake"
357 (string-append qwt "/include"))
359 (string-append qwt "/lib"))
360 (("qwt6-\\$\\{QWT_QT_VERSION\\}")
362 (substitute* "cmake/Modules/GrPython.cmake"
365 (substitute* '("gr-vocoder/swig/vocoder_swig.i"
366 "gr-vocoder/include/gnuradio/vocoder/codec2.h"
367 "gr-vocoder/include/gnuradio/vocoder/freedv_api.h")
371 (add-before 'check 'set-test-environment
372 (lambda* (#:key inputs #:allow-other-keys)
373 (setenv "HOME" "/tmp")
374 (system (string-append (assoc-ref inputs "xorg-server")
376 (setenv "DISPLAY" ":1")
378 (add-after 'install 'wrap-python
379 (assoc-ref python:%standard-phases 'wrap))
380 (add-after 'wrap-python 'wrap-glib-or-gtk
381 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
382 (add-after 'wrap-glib-or-gtk 'wrap-with-GI_TYPELIB_PATH
383 (lambda* (#:key inputs outputs #:allow-other-keys)
384 (let ((out (assoc-ref outputs "out"))
385 (paths (map (match-lambda
386 ((output . directory)
387 (let ((girepodir (string-append
389 "/lib/girepository-1.0")))
390 (if (file-exists? girepodir)
394 (wrap-program (string-append out "/bin/gnuradio-companion")
395 `("GI_TYPELIB_PATH" ":" prefix ,(filter identity paths))))
398 ;; Variables required to find third-party plugins at runtime.
399 (list (search-path-specification
400 (variable "GRC_BLOCKS_PATH")
401 (files '("share/gnuradio/grc/blocks")))
402 (search-path-specification
403 (variable "PYTHONPATH")
404 (files (list (string-append "lib/python"
406 (package-version python))
407 "/site-packages"))))))
408 (synopsis "Toolkit for software-defined radios")
410 "GNU Radio is a development toolkit that provides signal processing blocks
411 to implement software radios. It can be used with external RF hardware to
412 create software-defined radios, or without hardware in a simulation-like
414 (home-page "https://www.gnuradio.org")
415 (license license:gpl3+)))
417 (define-public gnuradio-osmosdr
419 (name "gnuradio-osmosdr")
425 (url "https://git.osmocom.org/gr-osmosdr")
426 (commit (string-append "v" version))))
427 (file-name (git-file-name name version))
429 (base32 "1aqj5cylipmmjh1x1kb2j8262hxq6mi86dgb2zphj94wvsab2ghx"))))
430 (build-system cmake-build-system)
432 `(("doxygen" ,doxygen)
433 ("pkg-config" ,pkg-config)
435 ("python-mako" ,python-mako)
436 ("python-six" ,python-six)
442 ("gnuradio" ,gnuradio)
447 (synopsis "GNU Radio block for interfacing with various radio hardware")
448 (description "This is a block for GNU Radio allowing to use a common API
449 to access different radio hardware.")
450 (home-page "https://osmocom.org/projects/gr-osmosdr/wiki/GrOsmoSDR")
451 (license license:gpl3+)))
453 (define-public libosmo-dsp
461 (url "https://git.osmocom.org/libosmo-dsp")
463 (file-name (git-file-name name version))
465 (base32 "00plihnpym1gkfpflah8il9463qxzm9kx2f07jyvbkszpj8viq5g"))))
466 (build-system gnu-build-system)
468 `(("autoconf" ,autoconf)
469 ("automake" ,automake)
470 ("bash-minimal" ,bash-minimal)
473 ("pkg-config" ,pkg-config)
474 ("texlive" ,(texlive-union (list texlive-amsfonts
475 texlive-latex-amsmath
476 ;; TODO: Add newunicodechar.
477 texlive-latex-graphics)))))
482 (modify-phases %standard-phases
483 (add-after 'unpack 'fix-paths
484 (lambda* (#:key inputs #:allow-other-keys)
485 (substitute* "git-version-gen"
487 (string-append (assoc-ref inputs "bash")
490 (synopsis "DSP primitives for SDR")
492 "This a C-language library for common DSP (Digital Signal Processing)
493 primitives for SDR (Software Defined Radio).")
494 (home-page "https://osmocom.org/projects/libosmo-dsp")
495 (license license:gpl2+)))
497 (define-public gnuradio-iqbalance
499 (name "gnuradio-iqbalance")
505 (url "https://git.osmocom.org/gr-iqbal")
506 (commit (string-append "v" version))))
507 (file-name (git-file-name name version))
509 (base32 "0ksagwz05p3b0702q7ljq7013xmp0ijp30my9z6s3p7ja8dj42s3"))))
510 (build-system cmake-build-system)
512 `(("doxygen" ,doxygen)
513 ("pkg-config" ,pkg-config)
515 ("python-numpy" ,python-numpy)
516 ("python-six" ,python-six)
522 ("gnuradio" ,gnuradio)
523 ("libosmo-dsp" ,libosmo-dsp)
526 (synopsis "GNU Radio block to correct IQ imbalance")
528 "This is a GNU Radio block to correct IQ imbalance in quadrature
529 receivers. It's composed of two main block:
531 @item Fix: Given a phase and amplitude error, it will correct a complex signal.
532 @item Optimize: Attempts to auto-detect the phase and amplitude error to feed
533 to the fix block above.
535 (home-page "https://git.osmocom.org/gr-iqbal/")
536 (license license:gpl3+)))
546 (url "https://github.com/csete/gqrx")
547 (commit (string-append "v" version))))
548 (file-name (git-file-name name version))
550 (base32 "0awj5wzq0p677my0065rpqkmfl3jc0bjdrnip8715z8031cd923n"))))
551 (build-system qt-build-system)
553 `(("pkg-config" ,pkg-config)))
555 `(("alsa-lib" ,alsa-lib)
559 ("gnuradio" ,gnuradio)
560 ("gnuradio-iqbalance" ,gnuradio-iqbalance)
561 ("gnuradio-osmosdr" ,gnuradio-osmosdr)
564 ("portaudio" ,portaudio)
565 ("pulseaudio" ,pulseaudio)
570 `(#:tests? #f)) ; No tests
571 (synopsis "Software defined radio receiver")
572 (description "Gqrx is a software defined radio (SDR) receiver implemented
573 using GNU Radio and the Qt GUI toolkit.")
574 (home-page "https://gqrx.dk/")
575 (license license:gpl3+)))
577 (define-public fldigi
584 (uri (string-append "http://www.w1hkj.com/files/fldigi/fldigi-"
587 (base32 "1fzbcv2dgg6byb2l8m2d6i69yn0a44pq52mpmms756jdf6z622i6"))))
588 (build-system gnu-build-system)
590 `(("pkg-config" ,pkg-config)))
592 `(("alsa-lib" ,alsa-lib)
596 ("libsamplerate" ,libsamplerate)
600 ("libxfixes" ,libxfixes)
602 ("portaudio" ,portaudio)
603 ("pulseaudio" ,pulseaudio)))
604 (synopsis "Software modem for amateur radio use")
606 "Fldigi is a software modem for amateur radio use. It is a sound card
607 based program that is used for both transmitting and receiving data by
608 connecting the microphone and headphone connections of a computer to some radio
610 (home-page "http://www.w1hkj.com/")
611 (license license:gpl3+)))
620 (uri (string-append "http://www.w1hkj.com/files/flrig/flrig-"
623 (base32 "0aq4x0ai9q08ypfhzfj2inc4z3q39zq1l6h9as1kil9yn4zbay61"))))
624 (build-system gnu-build-system)
626 `(("pkg-config" ,pkg-config)))
631 ("libxfixes" ,libxfixes)
633 (synopsis "Radio transceiver control program")
635 "Flrig is a transceiver control program for amateur radio use.
636 It provides computer aided control of various radios using a serial
638 (home-page "http://www.w1hkj.com/")
639 (license license:gpl3+)))
648 (uri (string-append "http://www.w1hkj.com/files/flamp/flamp-"
651 (base32 "19z1kghhdf7bq6hi2j0mzlsn2nhpn3gl1a623x3inmsk80yw3ck4"))))
652 (build-system gnu-build-system)
654 `(("pkg-config" ,pkg-config)))
659 ("libxfixes" ,libxfixes)
661 (synopsis "Tool for AMP file transfer")
663 "FLAMP is a program for transferring files by radio waves using AMP
664 (Amateur Multicast Protocol).")
665 (home-page "http://www.w1hkj.com/")
666 (license license:gpl3+)))
668 (define-public flwrap
675 (uri (string-append "http://www.w1hkj.com/files/flwrap/flwrap-"
678 (base32 "0qqivqkkravcg7j45740xfky2q3k7czqpkj6y364qff424q2pppg"))))
679 (build-system gnu-build-system)
681 `(("pkg-config" ,pkg-config)))
686 ("libxfixes" ,libxfixes)
688 (synopsis "File encapsulation program")
690 "Flwrap is a software utility for amateur radio use. Its purpose is to
691 encapsulate both text and binary files in a way that allows them to be
692 transmitted over any of several digital modes and verified at the receipt end
694 (home-page "http://www.w1hkj.com/")
695 (license license:gpl3+)))
697 (define-public hackrf
698 ;; Using a git commit because there have been many many commits
699 ;; since the relase two years ago, but no sign of a promised
700 ;; release for many months now.
701 (let ((commit "43e6f99fe8543094d18ff3a6550ed2066c398862")
705 (version (git-version "2018.01.1" revision commit))
710 (url "https://github.com/mossmann/hackrf")
712 (file-name (git-file-name name version))
714 (base32 "0avnv693xi0zsnrvkbfn0ln1r3s1iyj0bz7sc3gxay909av0pvbc"))))
715 (build-system cmake-build-system)
718 (list "-DUDEV_RULES_GROUP=dialout"
719 (string-append "-DUDEV_RULES_PATH="
720 (assoc-ref %outputs "out")
721 "/lib/udev/rules.d"))
723 (modify-phases %standard-phases
724 (add-before 'configure 'enter-source-directory
728 (add-after 'install 'delete-static-library
729 (lambda* (#:key outputs #:allow-other-keys)
730 (delete-file (string-append (assoc-ref outputs "out")
733 (add-before 'install-license-files 'leave-source-directory
737 #:tests? #f)) ; no test suite
739 `(("pkg-config" ,pkg-config)))
744 (home-page "https://greatscottgadgets.com/hackrf/")
745 (synopsis "User-space library and utilities for HackRF SDR")
747 "Command line utilities and a C library for controlling the HackRF
748 Software Defined Radio (SDR) over USB. Installing this package installs the
749 userspace hackrf utilities and C library. To install the hackrf udev rules,
750 you must extend 'udev-service-type' with this package. E.g.:
751 @code{(udev-rules-service 'hackrf hackrf #:groups '(\"dialout\"))}.")
752 (license license:gpl2))))
754 (define-public hamlib
762 "https://github.com/Hamlib/Hamlib/releases/download/"
763 version "/hamlib-" version ".tar.gz"))
765 (base32 "10788mgrhbc57zpzakcxv5aqnr2819pcshml6fbh8zvnkja562y9"))))
766 (build-system gnu-build-system)
768 `(("doxygen" ,doxygen)
770 ("pkg-config" ,pkg-config)
771 ("python-wrapper" ,python-wrapper)
778 ("readline" ,readline)))
780 `(#:configure-flags '("--disable-static"
782 "--with-python-binding"
784 "--with-xml-support")))
785 (synopsis "Tools and API to control radios")
787 "The Ham Radio Control Library (Hamlib) is a project to provide programs
788 with a consistent Application Programming Interface (API) for controlling the
789 myriad of radios and rotators available to amateur radio and communications
791 (home-page "https://hamlib.github.io/")
792 (license (list license:gpl2+ license:lgpl2.1+))))
795 ;; Fork of hamlib with custom patches used by wsjtx.
798 (name "wsjtx-hamlib")
804 (url "https://git.code.sf.net/u/bsomervi/hamlib.git")
805 (commit (string-append "wsjtx-" version))))
806 (file-name (git-file-name name version))
808 (base32 "01h5ps0yq5vi1x9rkw742gx6a5fj02zhbpi89i412qdfbnyk35cv"))))
810 `(("autoconf" ,autoconf)
811 ("automake" ,automake)
814 ,@(package-native-inputs hamlib)))
816 `(#:configure-flags '("--disable-static"
818 "--with-python-binding"
820 "--with-xml-support")
822 (modify-phases %standard-phases
823 (add-after 'unpack 'fix-tests
825 (substitute* "tests/testloc.c"
826 (("dmmm2dec\\(deg, mmm, nesw\\);")
827 "dmmm2dec(deg, mmm, 0, nesw);"))
838 (url "https://git.code.sf.net/p/wsjt/wsjtx.git")
839 (commit (string-append "wsjtx-" version))))
840 (file-name (git-file-name name version))
842 (base32 "0fhws44gg05d9y2al0pcdnxwxwh4bazcfl0g5mq2ks1r7w23wi5x"))
843 (modules '((guix build utils)))
846 ;; Delete bundled boost to use the shared one.
847 (delete-file-recursively "boost")
849 (build-system qt-build-system)
851 `(("asciidoc" ,asciidoc)
852 ("gfortran" ,gfortran)
853 ("pkg-config" ,pkg-config)
855 ("ruby-asciidoctor" ,ruby-asciidoctor)))
860 ("hamlib" ,wsjtx-hamlib)
863 ("qtmultimedia" ,qtmultimedia)
864 ("qtserialport" ,qtserialport)))
866 `(#:tests? #f ; No test suite
868 (modify-phases %standard-phases
869 (add-after 'unpack 'work-around-runtime-bug
871 ;; Some of the programs in this package fail to find symbols
872 ;; in libm at runtime. Adding libm manually at the end of the
873 ;; library lists when linking the programs seems to help.
874 ;; TODO: find exactly what is wrong in the way the programs
876 (substitute* "CMakeLists.txt"
877 (("target_link_libraries \\((.*)\\)" all libs)
878 (string-append "target_link_libraries (" libs " m)")))
880 (synopsis "Weak-signal ham radio communication program")
882 "WSJT-X implements communication protocols or modes called FT4, FT8,
883 JT4, JT9, JT65, QRA64, ISCAT, MSK144, and WSPR, as well as one called Echo for
884 detecting and measuring your own radio signals reflected from the Moon. These
885 modes were all designed for making reliable, confirmed QSOs under extreme
886 weak-signal conditions.")
887 (home-page "https://www.physics.princeton.edu/pulsar/k1jt/wsjtx.html")
888 (license license:gpl3)))
890 (define-public js8call
898 (uri (string-append "http://files.js8call.com/" version
899 "/js8call-" version ".tgz"))
901 (base32 "149sjwc4zg6ckgq26af93p4fxappa4k9dh7rdy67g8ajfjad4cd8"))
902 (modules '((guix build utils)))
905 ;; Delete bundled boost to use the shared one.
906 (delete-file-recursively "boost")
908 (build-system qt-build-system)
910 `(("asciidoc" ,asciidoc)
911 ("gfortran" ,gfortran)
912 ("pkg-config" ,pkg-config)
914 ("ruby-asciidoctor" ,ruby-asciidoctor)))
919 ("hamlib" ,wsjtx-hamlib)
922 ("qtmultimedia" ,qtmultimedia)
923 ("qtserialport" ,qtserialport)))
925 `(#:tests? #f ; No test suite
927 (modify-phases %standard-phases
928 (add-after 'unpack 'fix-paths
929 (lambda* (#:key outputs #:allow-other-keys)
930 (substitute* "CMakeLists.txt"
931 (("DESTINATION /usr/share")
932 (string-append "DESTINATION "
933 (assoc-ref outputs "out")
936 (add-after 'fix-paths 'work-around-runtime-bug
938 ;; Some of the programs in this package fail to find symbols
939 ;; in libm at runtime. Adding libm manually at the end of the
940 ;; library lists when linking the programs seems to help.
941 ;; TODO: find exactly what is wrong in the way the programs
943 (substitute* "CMakeLists.txt"
944 (("target_link_libraries \\((.*)\\)" all libs)
945 (string-append "target_link_libraries (" libs " m)")))
947 (add-after 'unpack 'fix-hamlib
949 (substitute* "CMake/Modules/Findhamlib.cmake"
950 (("set \\(ENV\\{PKG_CONFIG_PATH\\}.*\\)")
951 "set (__pc_path $ENV{PKG_CONFIG_PATH})
952 list (APPEND __pc_path \"${__hamlib_pc_path}\")
953 set (ENV{PKG_CONFIG_PATH} \"${__pc_path}\")"))
954 (substitute* "HamlibTransceiver.hpp"
955 (("#ifdef JS8_USE_LEGACY_HAMLIB")
958 (synopsis "Weak-signal ham radio communication program")
960 "JS8Call is a software using the JS8 digital mode (a derivative of the FT8
961 mode) providing weak signal keyboard to keyboard messaging to amateur radio
963 (home-page "http://js8call.com/")
964 (license license:gpl3)))
966 (define-public xnec2c
973 (uri (string-append "http://www.5b4az.org/pkg/nec2/xnec2c/xnec2c-"
976 (base32 "1myvlkfybb2ha8l0h96ca3iz206zzy9z5iizm0sbab2zzp78n1r9"))))
977 (build-system gnu-build-system)
979 `(("pkg-config" ,pkg-config)))
984 (modify-phases %standard-phases
985 (add-after 'unpack 'fix-makefile
986 (lambda* (#:key outputs #:allow-other-keys)
987 (substitute* '("Makefile.am" "Makefile.in")
988 ;; The DESTDIR variable does not get replaced the prefix
989 ;; in the final Makefile, so let's do here.
990 (("\\$\\(DESTDIR\\)/usr")
991 (assoc-ref outputs "out")))
993 (add-after 'fix-makefile 'fix-paths
994 (lambda* (#:key outputs #:allow-other-keys)
995 ;; Increase the max length of the path to the glade file,
996 ;; so that the '/gnu/store/...' path can fit in.
997 (substitute* '("src/shared.c" "src/shared.h")
998 (("char xnec2c_glade\\[64\\];")
999 "char xnec2c_glade[256];"))
1000 ;; Fix hard coded references to '/usr/...'.
1001 (substitute* '("src/geom_edit.c" "src/main.c")
1003 (string-append "\"" (assoc-ref outputs "out"))))
1005 (synopsis "Antenna modeling software")
1007 "Xnec2c is a GTK3-based graphical version of nec2c, a translation to the
1008 C language of NEC2, the FORTRAN Numerical Electromagnetics Code commonly used
1009 for antenna simulation and analysis. It can be used to define the geometry of
1010 an antenna, and then plot the radiation pattern or frequency-related data like
1011 gain and standing wave ratio.")
1012 (home-page "http://www.5b4az.org/")
1013 (license license:gpl3+)))
1015 (define-public dump1090
1023 (url "https://github.com/flightaware/dump1090")
1024 (commit (string-append "v" version))))
1025 (file-name (git-file-name name version))
1027 (base32 "1zacsqaqsiapljhzw31dwc4nld2rp98jm3ivkyznrhzk9n156p42"))))
1028 (build-system gnu-build-system)
1030 `(("pkg-config" ,pkg-config)))
1032 `(("libusb" ,libusb)
1033 ("ncurses" ,ncurses)
1034 ("rtl-sdr" ,rtl-sdr)))
1036 `(#:test-target "test"
1038 (list (string-append "CC=" ,(cc-for-target))
1041 (modify-phases %standard-phases
1044 (lambda* (#:key outputs #:allow-other-keys)
1045 (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
1046 (install-file "dump1090" bin)
1047 (install-file "view1090" bin)
1049 (synopsis "Mode S decoder for rtl-sdr devices")
1051 "Dump1090 is a Mode S decoder specifically designed for rtl-sdr devices.
1052 It can be used to decode the ADS-B signals that planes emit to indicate
1053 their position, altitude, speed, etc.")
1054 (home-page "https://github.com/flightaware/dump1090")
1055 (license license:gpl2+)))
1057 (define-public rtl-433
1065 (url "https://github.com/merbanan/rtl_433")
1067 (file-name (git-file-name name version))
1069 (base32 "11991xky9gawkragdyg27qsf7kw5bhlg7ygvf3fn7ng00x4xbh1z"))))
1070 (build-system cmake-build-system)
1072 `(("pkg-config" ,pkg-config)))
1074 `(("libusb" ,libusb)
1075 ("rtl-sdr" ,rtl-sdr)))
1076 (synopsis "Decoder for radio transmissions in ISM bands")
1078 "This is a generic data receiver, mainly for decoding radio transmissions
1079 from devices on the 433 MHz, 868 MHz, 315 MHz, 345 MHz and 915 MHz ISM bands.")
1080 (home-page "https://github.com/merbanan/rtl_433")
1081 (license license:gpl2+)))
1083 (define-public multimon-ng
1085 (name "multimon-ng")
1091 (url "https://github.com/EliasOenal/multimon-ng")
1093 (file-name (git-file-name name version))
1095 (base32 "01716cfhxfzsab9zjply9giaa4nn4b7rm3p3vizrwi7n253yiwm2"))))
1096 (build-system cmake-build-system)
1098 `(("libx11" ,libx11)
1099 ("pulseaudio" ,pulseaudio)))
1101 '(#:tests? #f)) ; no test suite
1102 (home-page "https://github.com/EliasOenal/multimon-ng")
1103 (synopsis "Decoder for digital radio transmission modes")
1104 (description "Multimon-ng can decode several digital radio transmission
1107 @item POCSAG512, POCSAG1200, POCSAG2400
1110 @item UFSK1200, CLIPFSK, AFSK1200, AFSK2400, AFSK2400_2, AFSK2400_3
1114 @item ZVEI1, ZVEI2, ZVEI3, DZVEI, PZVEI
1115 @item EEA, EIA, CCIR
1119 (license license:gpl2+)))