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