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