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