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