gnu: iperf: Update to 3.10.
[jackhill/guix/guix.git] / gnu / packages / networking.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
4 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2015, 2016, 2017 Stefan Reichör <stefan@xsteve.at>
6 ;;; Copyright © 2016 Raimon Grau <raimonster@gmail.com>
7 ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
9 ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
10 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
11 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
12 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
13 ;;; Copyright © 2016 Benz Schenk <benz.schenk@uzh.ch>
14 ;;; Copyright © 2016, 2017 Pjotr Prins <pjotr.guix@thebird.nl>
15 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
16 ;;; Copyright © 2017, 2020 Leo Famulari <leo@famulari.name>
17 ;;; Copyright © 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
19 ;;; Copyright © 2017, 2019 Gábor Boskovits <boskovits@gmail.com>
20 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
21 ;;; Copyright © 2018 Adam Van Ymeren <adam@vany.ca>
22 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
23 ;;; Copyright © 2018 Tonton <tonton@riseup.net>
24 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
25 ;;; Copyright © 2018 Theodoros Foradis <theodoros@foradis.org>
26 ;;; Copyright © 2018, 2020, 2021 Marius Bakke <marius@gnu.org>
27 ;;; Copyright © 2018, 2020 Oleg Pykhalov <go.wigust@gmail.com>
28 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
29 ;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
30 ;;; Copyright © 2019 Vasile Dumitrascu <va511e@yahoo.com>
31 ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
32 ;;; Copyright © 2019 Timotej Lazar <timotej.lazar@araneo.si>
33 ;;; Copyright © 2019 Brice Waegeneire <brice@waegenei.re>
34 ;;; Copyright © 2019 Tonton <tonton@riseup.net>
35 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
36 ;;; Copyright © 2019, 2020 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
37 ;;; Copyright © 2019 Daniel Schaefer <git@danielschaefer.me>
38 ;;; Copyright © 2019 Diego N. Barbato <dnbarbato@posteo.de>
39 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
40 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
41 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
42 ;;; Copyright © 2020 Jesse Dowell <jessedowell@gmail.com>
43 ;;; Copyright © 2020 Hamzeh Nasajpour <h.nasajpour@pantherx.org>
44 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
45 ;;; Copyright © 2021 Hartmut Goebel <h.goebel@crazy-compilers.com>
46 ;;;
47 ;;; This file is part of GNU Guix.
48 ;;;
49 ;;; GNU Guix is free software; you can redistribute it and/or modify it
50 ;;; under the terms of the GNU General Public License as published by
51 ;;; the Free Software Foundation; either version 3 of the License, or (at
52 ;;; your option) any later version.
53 ;;;
54 ;;; GNU Guix is distributed in the hope that it will be useful, but
55 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
56 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57 ;;; GNU General Public License for more details.
58 ;;;
59 ;;; You should have received a copy of the GNU General Public License
60 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
61
62 (define-module (gnu packages networking)
63 #:use-module ((guix licenses) #:prefix license:)
64 #:use-module (guix packages)
65 #:use-module (guix download)
66 #:use-module (guix git-download)
67 #:use-module (guix build-system cmake)
68 #:use-module (guix build-system glib-or-gtk)
69 #:use-module (guix build-system gnu)
70 #:use-module (guix build-system go)
71 #:use-module (guix build-system meson)
72 #:use-module (guix build-system perl)
73 #:use-module (guix build-system python)
74 #:use-module (guix build-system trivial)
75 #:use-module (guix utils)
76 #:use-module (gnu packages)
77 #:use-module (gnu packages admin)
78 #:use-module (gnu packages adns)
79 #:use-module (gnu packages algebra)
80 #:use-module (gnu packages audio)
81 #:use-module (gnu packages autogen)
82 #:use-module (gnu packages autotools)
83 #:use-module (gnu packages base)
84 #:use-module (gnu packages bison)
85 #:use-module (gnu packages boost)
86 #:use-module (gnu packages check)
87 #:use-module (gnu packages code)
88 #:use-module (gnu packages compression)
89 #:use-module (gnu packages cpp)
90 #:use-module (gnu packages crypto)
91 #:use-module (gnu packages curl)
92 #:use-module (gnu packages cyrus-sasl)
93 #:use-module (gnu packages dejagnu)
94 #:use-module (gnu packages docbook)
95 #:use-module (gnu packages documentation)
96 #:use-module (gnu packages flex)
97 #:use-module (gnu packages freedesktop)
98 #:use-module (gnu packages gettext)
99 #:use-module (gnu packages glib)
100 #:use-module (gnu packages gnome)
101 #:use-module (gnu packages gnupg)
102 #:use-module (gnu packages golang)
103 #:use-module (gnu packages graphviz)
104 #:use-module (gnu packages gstreamer)
105 #:use-module (gnu packages gtk)
106 #:use-module (gnu packages image)
107 #:use-module (gnu packages libevent)
108 #:use-module (gnu packages libidn)
109 #:use-module (gnu packages linux)
110 #:use-module (gnu packages lua)
111 #:use-module (gnu packages multiprecision)
112 #:use-module (gnu packages kerberos)
113 #:use-module (gnu packages ncurses)
114 #:use-module (gnu packages nettle)
115 #:use-module (gnu packages openldap)
116 #:use-module (gnu packages onc-rpc)
117 #:use-module (gnu packages password-utils)
118 #:use-module (gnu packages pcre)
119 #:use-module (gnu packages perl)
120 #:use-module (gnu packages perl-check)
121 #:use-module (gnu packages pkg-config)
122 #:use-module (gnu packages polkit)
123 #:use-module (gnu packages pretty-print)
124 #:use-module (gnu packages pulseaudio)
125 #:use-module (gnu packages python)
126 #:use-module (gnu packages python-web)
127 #:use-module (gnu packages python-xyz)
128 #:use-module (gnu packages qt)
129 #:use-module (gnu packages readline)
130 #:use-module (gnu packages ruby)
131 #:use-module (gnu packages samba)
132 #:use-module (gnu packages serialization)
133 #:use-module (gnu packages shells)
134 #:use-module (gnu packages sphinx)
135 #:use-module (gnu packages sqlite)
136 #:use-module (gnu packages ssh)
137 #:use-module (gnu packages tcl)
138 #:use-module (gnu packages textutils)
139 #:use-module (gnu packages tls)
140 #:use-module (gnu packages valgrind)
141 #:use-module (gnu packages web)
142 #:use-module (gnu packages wxwidgets)
143 #:use-module (gnu packages xml)
144 #:use-module (ice-9 match))
145
146 (define-public usrsctp
147 (package
148 (name "usrsctp")
149 (version "0.9.5.0")
150 (source
151 (origin
152 (method git-fetch)
153 (uri
154 (git-reference
155 (url "https://github.com/sctplab/usrsctp")
156 (commit version)))
157 (file-name (git-file-name name version))
158 (sha256
159 (base32 "10ndzkip8blgkw572n3dicl6mgjaa7kygwn3vls80liq92vf1sa9"))))
160 (build-system gnu-build-system)
161 (native-inputs
162 `(("autoconf" ,autoconf)
163 ("automake" ,automake)
164 ("libtool" ,libtool)
165 ("pkg-config" ,pkg-config)
166 ("python" ,python-wrapper)
167 ("which" ,which)))
168 (home-page "https://github.com/sctplab/usrsctp/")
169 (synopsis "SCTP user-land implementation")
170 (description "UsrSCTP is a portable SCTP userland stack. SCTP is a message
171 oriented, reliable transport protocol with direct support for multihoming that
172 runs on top of IP or UDP, and supports both v4 and v6 versions.")
173 (license license:bsd-3)))
174
175 (define-public axel
176 (package
177 (name "axel")
178 (version "2.17.10")
179 (source
180 (origin
181 (method url-fetch)
182 (uri (string-append "https://github.com/axel-download-accelerator/axel/"
183 "releases/download/v" version "/"
184 "axel-" version ".tar.xz"))
185 (sha256
186 (base32 "0kmlqk04sgkshsll4r9w3k0rvrgz0gpk987618r50khwl484zss6"))))
187 (build-system gnu-build-system)
188 (native-inputs
189 `(("gettext" ,gettext-minimal)
190 ("pkg-config" ,pkg-config)))
191 (inputs
192 `(("libressl" ,libressl)))
193 (home-page "https://github.com/axel-download-accelerator/axel")
194 (synopsis "Light command line download accelerator")
195 (description
196 "Axel tries to accelerate the download process by using multiple
197 connections per file, and can also balance the load between different
198 servers. It tries to be as light as possible, so it might be useful
199 on byte-critical systems. It supports HTTP, HTTPS, FTP and FTPS
200 protocols.")
201 (license license:gpl2+)))
202
203 ;; This package does not have a release yet.
204 ;; But this is required to provide a feature in PipeWire.
205 (define-public libcamera
206 (package
207 (name "libcamera")
208 (version "0.0.0")
209 (source
210 (origin
211 (method git-fetch)
212 (uri
213 (git-reference
214 (url "git://linuxtv.org/libcamera.git")
215 (commit "74c8b508338ccdd0780aa1e067a1e8fcb9ee326b")))
216 (file-name
217 (git-file-name name version))
218 (sha256
219 (base32 "0d9lp8b9gyxh4jwfh55kp8zl1xyyg32z684v3y29378zpksncss1"))))
220 (build-system meson-build-system)
221 (outputs '("out" "doc"))
222 (arguments
223 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
224 #:configure-flags
225 (list
226 "-Dv4l2=true")
227 #:phases
228 (modify-phases %standard-phases
229 (add-after 'unpack 'disable-failing-tests
230 (lambda _
231 (substitute* "test/meson.build"
232 (("\\['list-cameras', 'list-cameras.cpp'\\],")
233 ""))
234 #t))
235 (add-after 'install 'move-doc
236 (lambda* (#:key outputs #:allow-other-keys)
237 (let* ((out (assoc-ref outputs "out"))
238 (doc (assoc-ref outputs "doc")))
239 (mkdir-p (string-append doc "/share"))
240 (rename-file
241 (string-append out "/share/doc")
242 (string-append doc "/share/doc"))
243 #t))))))
244 (native-inputs
245 `(("dot" ,graphviz)
246 ("doxygen" ,doxygen)
247 ("pkg-config" ,pkg-config)
248 ("python" ,python-wrapper)
249 ("sphinx" ,python-sphinx)
250 ("yaml" ,python-pyyaml)))
251 (inputs
252 `(("boost" ,boost)
253 ("glib" ,glib)
254 ("gstreamer" ,gst-plugins-base)
255 ("gnutls" ,gnutls)
256 ("libtiff" ,libtiff)
257 ("openssl" ,openssl)
258 ("qt5" ,qtbase)
259 ("udev" ,eudev)))
260 (synopsis "Camera stack and framework")
261 (description "LibCamera is a complex camera support library for GNU+Linux,
262 Android, and ChromeOS.")
263 (home-page "https://libcamera.org/")
264 (license license:lgpl2.1+)))
265
266 (define-public libnice
267 (package
268 (name "libnice")
269 (version "0.1.18")
270 (source
271 (origin
272 (method url-fetch)
273 (uri
274 (string-append "https://libnice.freedesktop.org/releases/"
275 name "-" version ".tar.gz"))
276 (sha256
277 (base32 "1x3kj9b3dy9m2h6j96wgywfamas1j8k2ca43k5v82kmml9dx5asy"))))
278 (build-system meson-build-system)
279 (outputs '("out" "doc"))
280 (arguments
281 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
282 #:configure-flags
283 (list
284 "-Dgtk_doc=enabled")
285 #:phases
286 (modify-phases %standard-phases
287 (add-after 'unpack 'disable-failing-test
288 (lambda _
289 (substitute* "tests/meson.build"
290 ;; ‘test-set-port-range.c:66:main: assertion failed:
291 ;; (nice_agent_gather_candidates (agent, stream1))’
292 (("'test-set-port-range'") "#"))
293 #t))
294 (add-after 'install 'move-docs
295 (lambda* (#:key outputs #:allow-other-keys)
296 (let* ((out (assoc-ref outputs "out"))
297 (doc (assoc-ref outputs "doc")))
298 (mkdir-p (string-append doc "/share"))
299 (rename-file
300 (string-append out "/share/gtk-doc")
301 (string-append doc "/share/gtk-doc"))
302 #t))))))
303 (native-inputs
304 `(("glib:bin" ,glib "bin")
305 ("gobject-introspection" ,gobject-introspection)
306 ("gtk-doc" ,gtk-doc/stable)
307 ("pkg-config" ,pkg-config)))
308 (inputs
309 `(("gstreamer" ,gstreamer)
310 ("gst-plugins-base" ,gst-plugins-base)
311 ("libnsl" ,libnsl)))
312 (propagated-inputs
313 `(("glib" ,glib)
314 ("glib-networking" ,glib-networking)
315 ("gnutls" ,gnutls)))
316 (synopsis "GLib ICE implementation")
317 (description "LibNice is a library that implements the Interactive
318 Connectivity Establishment (ICE) standard (RFC 5245 & RFC 8445). It provides a
319 GLib-based library, libnice, as well as GStreamer elements to use it.")
320 (home-page "https://libnice.freedesktop.org/")
321 (license
322 ;; This project is dual-licensed.
323 (list
324 license:lgpl2.1+
325 license:mpl1.1))))
326
327 (define-public rtmpdump
328 ;; There are no tags in the repository, and the project is unlikely to
329 ;; make new releases. Take a recent commit for multiple security fixes
330 ;; as well as GnuTLS compatibility.
331 (let ((commit "c5f04a58fc2aeea6296ca7c44ee4734c18401aa3")
332 (revision "0")
333 (version "2.4")) ;as mentioned in README and man pages
334 (package
335 (name "rtmpdump")
336 (version (git-version version revision commit))
337 (source
338 (origin
339 (method git-fetch)
340 (uri (git-reference
341 (url "https://git.ffmpeg.org/rtmpdump")
342 (commit commit)))
343 (file-name (git-file-name name version))
344 (sha256
345 (base32 "07ias612jgmxpam9h418kvlag32da914jsnjsfyafklpnh8gdzjb"))))
346 (build-system gnu-build-system)
347 (arguments
348 `(#:tests? #f ; no tests
349 #:make-flags
350 (list
351 ;; The ‘validate-runpath’ phase fails to find librtmp.so.0.
352 (string-append "LDFLAGS=-Wl,-rpath="
353 (assoc-ref %outputs "out") "/lib")
354 (string-append "prefix=" (assoc-ref %outputs "out")))
355 #:phases
356 (modify-phases %standard-phases
357 (add-after 'unpack 'omit-static-library
358 (lambda _
359 (substitute* "librtmp/Makefile"
360 (("cp librtmp\\.a .*") ; don't install it
361 "")
362 (("librtmp\\.a ") ; don't build it
363 ""))
364 #t))
365 (add-after 'unpack 'prefer-gnutls
366 (lambda _
367 (substitute* '("Makefile" "librtmp/Makefile")
368 (("CRYPTO=OPENSSL")
369 "#CRYPTO=OPENSSL")
370 (("#CRYPTO=GNUTLS")
371 "CRYPTO=GNUTLS"))))
372 (delete 'configure))))
373 (inputs
374 `(("gnutls" ,gnutls)
375 ("zlib" ,zlib)))
376 (synopsis "Tools and library for handling RTMP streams")
377 (description "RTMPdump is a toolkit for RTMP streams. All forms of RTMP are
378 supported, including rtmp://, rtmpt://, rtmpe://, rtmpte://, and rtmps://.")
379 (home-page "https://rtmpdump.mplayerhq.hu/")
380 (license
381 (list
382 ;; Library.
383 license:lgpl2.1+
384 ;; Others.
385 license:gpl2+)))))
386
387 (define-public srt
388 (package
389 (name "srt")
390 (version "1.4.3")
391 (source
392 (origin
393 (method git-fetch)
394 (uri
395 (git-reference
396 (url "https://github.com/Haivision/srt")
397 (commit (string-append "v" version))))
398 (file-name (git-file-name name version))
399 (sha256
400 (base32 "1f60vlfxhh9bhafws82c3301whjlz5gy92jz9a9ymwfg5h53bv1j"))))
401 (build-system cmake-build-system)
402 (arguments
403 `(#:configure-flags
404 (list
405 (string-append "-DCMAKE_INSTALL_BINDIR="
406 (assoc-ref %outputs "out") "/bin")
407 "-DCMAKE_INSTALL_INCLUDEDIR=include"
408 "-DENABLE_STATIC=OFF"
409 "-DENABLE_UNITTESTS=ON")))
410 (native-inputs
411 `(("gtest" ,googletest)
412 ("pkg-config" ,pkg-config)
413 ("tclsh" ,tcl)))
414 (propagated-inputs
415 `(("openssl" ,openssl)))
416 (synopsis "Secure Reliable Transport")
417 (description "SRT is a transport technology that optimizes streaming
418 performance across unpredictable networks, such as the Internet.")
419 (home-page "https://www.srtalliance.org/")
420 (license license:mpl2.0)))
421
422 ;; FFmpeg, GStreamer, and VLC don't support SRT 1.4.2 yet.
423 (define-public srt-1.4.1
424 (package
425 (inherit srt)
426 (name "srt")
427 (version "1.4.1")
428 (source
429 (origin
430 (method git-fetch)
431 (uri
432 (git-reference
433 (url "https://github.com/Haivision/srt")
434 (commit (string-append "v" version))))
435 (file-name (git-file-name name version))
436 (sha256
437 (base32
438 "01xaq44j95kbgqfl41pnybvqy0yq6wd4wdw88ckylzf0nzp977xz"))))))
439
440 (define-public lksctp-tools
441 (package
442 (name "lksctp-tools")
443 (version "1.0.18")
444 (source
445 (origin
446 (method git-fetch)
447 (uri
448 (git-reference
449 (url "https://github.com/sctp/lksctp-tools")
450 (commit (string-append "v" version))))
451 (file-name (git-file-name name version))
452 (patches
453 (search-patches "lksctp-tools-1.0.18-fix-header-file-name.patch"))
454 (sha256
455 (base32 "1x4fwzrlzvfa3vcpja97m8w5g9ir2zrh4zs7zksminrnmdrs0dsr"))))
456 (build-system gnu-build-system)
457 (native-inputs
458 `(("autoconf" ,autoconf)
459 ("automake" ,automake)
460 ("libtool" ,libtool)
461 ("pkg-config" ,pkg-config)))
462 (inputs
463 `(("linux-headers" ,linux-libre-headers)))
464 (synopsis "Linux SCTP helper library")
465 (description "Lksctp-tools project provides a user space library for SCTP
466 (libsctp) including C language header files (netinet/sctp.h) for accessing SCTP
467 specific application programming interfaces not provided by the standard
468 sockets, and also some helper utilities around SCTP.")
469 (home-page "http://lksctp.sourceforge.net/")
470 (license
471 (list
472 ;; Library.
473 license:lgpl2.1+
474 ;; Others.
475 license:gpl2+))))
476
477 (define-public python-pysctp
478 (package
479 (name "python-pysctp")
480 (version "0.6.1")
481 (source
482 (origin
483 (method url-fetch)
484 (uri (pypi-uri "pysctp" version))
485 (sha256
486 (base32 "14h2qlmfi24bizhvvqkfqfa78pzm3911ibrzy9k94i97xy1978dy"))))
487 (build-system python-build-system)
488 (inputs
489 `(("lksctp-tools" ,lksctp-tools)))
490 (arguments
491 `(#:tests? #f ;; tests require network
492 #:phases
493 (modify-phases %standard-phases
494 (add-after 'unpack 'patch-setup.py
495 (lambda _
496 (substitute* "setup.py"
497 (("include_dirs\\s*=.*")
498 (string-append "include_dirs = ['.'] + '"
499 (getenv "C_INCLUDE_PATH") "'.split(':'),"))
500 (("library_dirs\\s*=.*")
501 (string-append "library_dirs = '"
502 (getenv "LIBRARY_PATH") "'.split(':'),"))))))))
503 (home-page "https://github.com/p1sec/pysctp")
504 (synopsis "Python module for the SCTP protocol stack and library")
505 (description "@code{pysctp} implements the SCTP socket API. You need a
506 SCTP-aware kernel (most are).")
507 (license license:lgpl2.1+)))
508
509 (define-public knockd
510 (package
511 (name "knockd")
512 (version "0.8")
513 (source (origin
514 (method url-fetch)
515 (uri (string-append "https://www.zeroflux.org/proj/knock/files/knock-"
516 version ".tar.gz"))
517 (sha256
518 (base32
519 "1iv9h7a9l81ilbld3pi0dmzkizjss1755x1x3v5jxsi4asb8r3b9"))))
520 (build-system gnu-build-system)
521 (arguments
522 `(#:configure-flags
523 (list (string-append "--docdir=" (assoc-ref %outputs "out")
524 "/share/doc/" ,name "-" ,version))))
525 (inputs
526 `(("libpcap" ,libpcap)))
527 (home-page "https://www.zeroflux.org/projects/knock")
528 (synopsis "Small port-knock daemon")
529 (description "@command{knockd} is a port-knock daemon. It listens to all traffic on
530 an ethernet or PPP interface, looking for special \"knock\" sequences of @dfn{port-hits}
531 (UDP/TCP packets sent to a server port). This port need not be open, since knockd listens
532 at the link-layer level.")
533 (license license:gpl2+)))
534
535 (define-public nng
536 (package
537 (name "nng")
538 (version "1.3.2")
539 (source
540 (origin
541 (method git-fetch)
542 (uri (git-reference
543 (url "https://github.com/nanomsg/nng")
544 (commit (string-append "v" version))))
545 (file-name (git-file-name name version))
546 (sha256
547 (base32 "0a4jg8alh2h0rw6fb4dqpvk4hgl2a7h76mq7g34fy89qh9sgg1a4"))))
548 (build-system cmake-build-system)
549 (arguments
550 `(#:configure-flags
551 (list "-DNNG_ENABLE_COVERAGE=ON"
552 "-DNNG_ENABLE_TLS=ON"
553 "-DBUILD_SHARED_LIBS=ON")
554 #:phases
555 (modify-phases %standard-phases
556 (add-after 'unpack 'disable-failing-tests
557 (lambda _
558 ;; These tests require network access.
559 (substitute* "tests/CMakeLists.txt"
560 (("add_nng_test1\\(httpclient 60 NNG_SUPP_HTTP\\)") "")
561 (("add_nng_test1\\(resolv 10 NNG_STATIC_LIB\\)") "")
562 (("add_nng_test\\(tls 60\\)") ""))
563 #t)))))
564 (native-inputs
565 `(("ksh" ,oksh)))
566 (inputs
567 `(("mbedtls" ,mbedtls-apache)))
568 (synopsis "Lightweight messaging library")
569 (description "NNG project is a rewrite of the scalability protocols library
570 known as libnanomsg, and adds significant new capabilities, while retaining
571 compatibility with the original. It is a lightweight, broker-less library,
572 offering a simple API to solve common recurring messaging problems, such as
573 publish/subscribe, RPC-style request/reply, or service discovery.")
574 (home-page "https://nng.nanomsg.org/")
575 (license license:expat)))
576
577 (define-public nanomsg
578 (package
579 (name "nanomsg")
580 (version "1.1.5")
581 (source
582 (origin
583 (method git-fetch)
584 (uri
585 (git-reference
586 (url "https://github.com/nanomsg/nanomsg")
587 (commit version)))
588 (file-name (git-file-name name version))
589 (sha256
590 (base32 "01ddfzjlkf2dgijrmm3j3j8irccsnbgfvjcnwslsfaxnrmrq5s64"))))
591 (build-system cmake-build-system)
592 (outputs '("out" "doc"))
593 (arguments
594 `(#:configure-flags
595 (list
596 "-DNN_ENABLE_COVERAGE=ON")
597 #:phases
598 (modify-phases %standard-phases
599 (add-after 'install 'move-docs
600 (lambda* (#:key outputs #:allow-other-keys)
601 (let* ((out (assoc-ref outputs "out"))
602 (doc (assoc-ref outputs "doc")))
603 (mkdir-p (string-append doc "/share/doc"))
604 (rename-file
605 (string-append out "/share/doc/nanomsg")
606 (string-append doc "/share/doc/nanomsg"))
607 #t))))))
608 (native-inputs
609 `(("asciidoctor" ,ruby-asciidoctor)
610 ("pkg-config" ,pkg-config)))
611 (synopsis "Scalable socket library")
612 (description "Nanomsg is a socket library that provides several common
613 communication patterns. It aims to make the networking layer fast, scalable,
614 and easy to use. Implemented in C, it works on a wide range of operating
615 systems with no further dependencies.")
616 (home-page "https://nanomsg.org/")
617 (license (license:non-copyleft "file:///COPYING"))))
618
619 (define-public blueman
620 (package
621 (name "blueman")
622 (version "2.1.4")
623 (source
624 (origin
625 (method url-fetch)
626 (uri (string-append "https://github.com/blueman-project/blueman/releases"
627 "/download/" version "/blueman-" version ".tar.xz"))
628 (sha256
629 (base32 "1nk46s1s8yrlqv37sc7la05nnn7sdgqhkrcdm98qin34llwkv70x"))))
630 (build-system glib-or-gtk-build-system)
631 (arguments
632 `(#:configure-flags (list "--enable-polkit"
633 "--without-systemdsystemunitdir" ; Not required
634 "--without-systemduserunitdir") ; Not required
635 #:phases
636 (modify-phases %standard-phases
637 ;; Python references are not being patched in patch-phase of build,
638 ;; despite using python-wrapper as input. So we patch them manually.
639 (add-after 'unpack 'patch-python-references
640 (lambda* (#:key inputs #:allow-other-keys)
641 (with-directory-excursion "apps"
642 (substitute* '("blueman-adapters.in" "blueman-applet.in"
643 "blueman-assistant.in" "blueman-manager.in"
644 "blueman-mechanism.in" "blueman-report.in"
645 "blueman-rfcomm-watcher.in" "blueman-sendto.in"
646 "blueman-services.in" "blueman-tray.in")
647 (("@PYTHON@") (string-append (assoc-ref inputs "python")
648 "/bin/python"
649 ,(version-major+minor
650 (package-version python))))))
651 #t))
652 ;; Fix loading of external programs.
653 (add-after 'unpack 'patch-external-programs
654 (lambda* (#:key inputs #:allow-other-keys)
655 (substitute* '("apps/blueman-report.in" "blueman/main/NetConf.py"
656 "blueman/main/PPPConnection.py")
657 (("/usr/sbin/bluetoothd")
658 (string-append (assoc-ref inputs "bluez")
659 "/libexec/bluetooth/bluetoothd"))
660 (("/sbin/iptables")
661 (string-append (assoc-ref inputs "iptables")
662 "/sbin/iptables"))
663 (("/usr/sbin/pppd")
664 (string-append (assoc-ref inputs "ppp")
665 "/sbin/pppd")))
666 #t))
667 ;; Fix loading of pulseaudio libraries.
668 (add-after 'unpack 'patch-pulseaudio-libraries
669 (lambda* (#:key inputs #:allow-other-keys)
670 (let* ((pulseaudio (assoc-ref inputs "pulseaudio"))
671 (pulse (string-append pulseaudio "/lib/libpulse.so.0"))
672 (pulse-glib (string-append pulseaudio
673 "/lib/libpulse-mainloop-glib.so.0")))
674 (with-directory-excursion "blueman/main"
675 (substitute* "PulseAudioUtils.py"
676 (("libpulse.so.0") pulse)
677 (("libpulse-mainloop-glib.so.0") pulse-glib)))
678 #t)))
679 ;; Fix running of blueman programs.
680 (add-after 'glib-or-gtk-wrap 'wrap-blueman-progs
681 (lambda* (#:key outputs #:allow-other-keys)
682 (let* ((out (assoc-ref outputs "out"))
683 (bin (string-append out "/bin/blueman-"))
684 (libexec (string-append out "/libexec/blueman-"))
685 (lib (string-append out "/lib/python"
686 ,(version-major+minor
687 (package-version python))
688 "/site-packages")))
689 (for-each
690 (lambda (program)
691 (wrap-program program
692 `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,lib))
693 `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))
694 (append
695 (map (lambda (prog) (string-append bin prog))
696 '("adapters" "applet" "assistant" "manager" "report"
697 "sendto" "services" "tray"))
698 (map (lambda (prog) (string-append libexec prog))
699 '("mechanism" "rfcomm-watcher"))))
700 #t))))))
701 (native-inputs
702 `(("cython" ,python-cython)
703 ("glib:bin" ,glib "bin")
704 ("gobject-introspection" ,gobject-introspection)
705 ("gtk+:bin" ,gtk+ "bin")
706 ("intltool" ,intltool)
707 ("pkg-config" ,pkg-config)))
708 (inputs
709 `(("bluez" ,bluez)
710 ("dbus" ,dbus)
711 ("gdkpixbuf" ,gdk-pixbuf+svg)
712 ("glib" ,glib)
713 ("gtk+" ,gtk+)
714 ("iproute2" ,iproute)
715 ("iptables" ,iptables)
716 ("net-tools" ,net-tools)
717 ("pango" ,pango)
718 ("polkit" ,polkit)
719 ("ppp" ,ppp)
720 ("pulseaudio" ,pulseaudio)
721 ("pycairo" ,python-pycairo)
722 ("pygobject" ,python-pygobject)
723 ("python" ,python-wrapper)
724 ("libappindicator" ,libappindicator)
725 ("libnm" ,network-manager)))
726 (synopsis "GTK+ Bluetooth manager")
727 (description "Blueman is a Bluetooth management utility using the Bluez
728 D-Bus backend. It is designed to be easy to use for most common Bluetooth
729 tasks.")
730 (home-page "https://github.com/blueman-project/blueman")
731 (license license:gpl3+)))
732
733 ;; The gnu.org ‘home’ for this GNU project is a directory listing with 1.6.0 as
734 ;; the latest version. The author's git repository, mentioned in the 1.6.0
735 ;; README and otherwise legit-looking, contains a proper 1.7.0 release tarball
736 ;; with many OUI updates. Use it, even though it's also several years old now.
737 (define-public macchanger
738 (package
739 (name "macchanger")
740 (version "1.7.0")
741 (source
742 (origin
743 (method url-fetch)
744 (uri (string-append "https://github.com/alobbs/macchanger/"
745 "releases/download/" version "/"
746 name "-" version ".tar.gz"))
747 (sha256
748 (base32 "1gs5m0jxyprdp00w2qkbnaqm3ilkjz0q1gqdg4nzdm8g4xy73qns"))))
749 (build-system gnu-build-system)
750 (home-page "https://www.gnu.org/software/macchanger/")
751 (synopsis "Viewing and manipulating MAC addresses of network interfaces")
752 (description "GNU MAC Changer is a utility for viewing and changing MAC
753 addresses of networking devices. New addresses may be set explicitly or
754 randomly. They can include MAC addresses of the same or other hardware vendors
755 or, more generally, MAC addresses of the same category of hardware.")
756 (license license:gpl2+)))
757
758 (define-public miredo
759 (package
760 (name "miredo")
761 (version "1.2.6")
762 (source (origin
763 (method url-fetch)
764 (uri (string-append "http://www.remlab.net/files/miredo/miredo-"
765 version ".tar.xz"))
766 (sha256
767 (base32
768 "0j9ilig570snbmj48230hf7ms8kvcwi2wblycqrmhh85lksd49ps"))))
769 (build-system gnu-build-system)
770 (arguments
771 '(#:configure-flags
772 (list "--localstatedir=/var")
773 #:phases
774 (modify-phases %standard-phases
775 (add-after 'unpack 'do-not-create-/run
776 (lambda _
777 (substitute* (find-files "src" "Makefile.*")
778 (("^.+install_sh.+/run.+$")
779 "\ttrue"))
780 #t))
781 (add-after 'unpack 'patch-iproute2
782 (lambda* (#:key inputs #:allow-other-keys)
783 (let* ((iproute (assoc-ref inputs "iproute"))
784 (ip (string-append iproute "/sbin/ip")))
785 (substitute* "misc/client-hook.iproute"
786 (("/sbin/ip") ip))
787 #t)))
788 ;; The checkconf test in src/ requires network access.
789 (add-before
790 'check 'disable-checkconf-test
791 (lambda _
792 (substitute* "src/Makefile"
793 (("^TESTS = .*") "TESTS = \n"))
794 #t)))))
795 (inputs
796 `(("iproute" ,iproute)))
797 (home-page "https://www.remlab.net/miredo/")
798 (synopsis "Teredo IPv6 tunneling software")
799 (description
800 "Miredo is an implementation (client, relay, server) of the Teredo
801 specification, which provides IPv6 Internet connectivity to IPv6 enabled hosts
802 residing in IPv4-only networks, even when they are behind a NAT device.")
803 (license license:gpl2+)))
804
805 (define-public ndisc6
806 (package
807 (name "ndisc6")
808 (version "1.0.4")
809 (source (origin
810 (method url-fetch)
811 (uri (string-append "https://www.remlab.net/files/ndisc6/ndisc6-"
812 version ".tar.bz2"))
813 (sha256
814 (base32
815 "07swyar1hl83zxmd7fqwb2q0c0slvrswkcfp3nz5lknrk15dmcdb"))))
816 (build-system gnu-build-system)
817 (home-page "https://www.remlab.net/ndisc6/")
818 (synopsis "IPv6 diagnostic tools")
819 (description
820 "NDisc6 is a collection of tools for IPv6 networking diagnostics.
821 It includes the following programs:
822
823 @itemize
824 @item @command{ndisc6}: ICMPv6 Neighbor Discovery tool.
825 @item @command{rdisc6}: ICMPv6 Router Discovery tool.
826 @item @command{tcptraceroute6}: IPv6 traceroute over TCP.
827 @item @command{traceroute6}: IPv6 traceroute over UDP.
828 @item @command{rdnssd}: Recursive DNS Servers discovery daemon.
829 @end itemize")
830 ;; The user can choose version 2 or 3 of the GPL, not later versions.
831 (license (list license:gpl2 license:gpl3))))
832
833 (define-public parprouted
834 (package
835 (name "parprouted")
836 (version "0.7")
837 (source (origin
838 (method url-fetch)
839 (uri (string-append "https://www.hazard.maks.net/parprouted/"
840 "parprouted-" version ".tar.gz"))
841 (sha256
842 (base32
843 "1z6yg28i0pv20jivyy82pxb38hsryj95inhj27bs6ja1bp4l6dnn"))))
844 (build-system gnu-build-system)
845 (arguments
846 `(#:tests? #f ;no tests
847 #:phases (modify-phases %standard-phases
848 (add-after 'unpack 'insert-absolute-iproute-reference
849 (lambda* (#:key inputs #:allow-other-keys)
850 (let* ((iproute (assoc-ref inputs "iproute"))
851 (ip (string-append iproute "/sbin/ip")))
852 (substitute* "parprouted.c"
853 (("/sbin/ip") ip))
854 #t)))
855 (replace 'configure
856 (lambda* (#:key outputs #:allow-other-keys)
857 (let* ((out (assoc-ref outputs "out"))
858 (sbin (string-append out "/sbin"))
859 (man8 (string-append out "/share/man/man8")))
860 ;; No configure script; hijack the phase to make
861 ;; the necessary arrangements.
862 (setenv "CC" ,(cc-for-target))
863 (for-each mkdir-p (list sbin man8))
864 (substitute* "Makefile"
865 (("/usr/local/sbin") sbin)
866 (("/usr/local/man/man8") man8))
867 #t))))))
868 (inputs
869 `(("iproute" ,iproute)))
870 (home-page "https://www.hazard.maks.net/parprouted/")
871 (synopsis "Proxy ARP requests to other interfaces")
872 (description
873 "@command{parprouted} is a daemon for transparent IP (Layer@tie{}3)
874 proxy ARP bridging. Unlike standard bridging, proxy ARP bridging can bridge
875 Ethernet networks behind wireless nodes. Normal layer@tie{}2 bridging does
876 not work between wireless nodes because wireless does not know about MAC
877 addresses used in the wired Ethernet networks. This daemon can also be
878 useful for making transparent firewalls.")
879 (license license:gpl2)))
880
881 (define-public socat
882 (package
883 (name "socat")
884 (version "1.7.4.1")
885 (source (origin
886 (method url-fetch)
887 (uri (string-append
888 "http://www.dest-unreach.org/socat/download/socat-"
889 version ".tar.bz2"))
890 (sha256
891 (base32
892 "1sbmqqvni3ss9wyay6ik5v81kxffkra80mh4ypgj74g82iba5b1z"))))
893 (build-system gnu-build-system)
894 (arguments '(#:tests? #f)) ; no test suite
895 (inputs `(("openssl" ,openssl)))
896 (home-page "http://www.dest-unreach.org/socat/")
897 (synopsis
898 "Open bidirectional communication channels from the command line")
899 (description
900 "socat is a relay for bidirectional data transfer between two independent
901 data channels---files, pipes, devices, sockets, etc. It can create
902 \"listening\" sockets, named pipes, and pseudo terminals.
903
904 socat can be used, for instance, as TCP port forwarder, as a shell interface
905 to UNIX sockets, IPv6 relay, for redirecting TCP oriented programs to a serial
906 line, to logically connect serial lines on different computers, or to
907 establish a relatively secure environment (su and chroot) for running client
908 or server shell scripts with network connections.")
909 (license license:gpl2)))
910
911 (define-public tcp-wrappers
912 (package
913 (name "tcp-wrappers")
914 (version "7.6")
915 (source (origin
916 (method url-fetch)
917 (uri (string-append
918 "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_"
919 version ".tar.gz"))
920 (sha256
921 (base32
922 "0p9ilj4v96q32klavx0phw9va21fjp8vpk11nbh6v2ppxnnxfhwm"))))
923 (build-system gnu-build-system)
924 (arguments
925 `(#:phases
926 (modify-phases %standard-phases
927 (delete 'configure) ; there is no configure script
928 (delete 'check) ; there are no tests
929 (replace 'build
930 (lambda _
931 (chmod "." #o755)
932 ;; Upstream doesn't generate a shared library. So we have to do it.
933 (setenv "CC" "gcc -fno-builtin -fPIC")
934 (substitute* "Makefile"
935 (("^(all[^\n]*)" line) (string-append line " libwrap.so\n
936 libwrap.so: $(LIB_OBJ)\n
937 \tgcc -shared $^ -o $@\n")))
938 ;; Deal with some gcc breakage.
939 (substitute* "percent_m.c"
940 (("extern char .sys_errlist.*;") ""))
941 (substitute* "scaffold.c"
942 (("extern char .malloc.*;") ""))
943 ;; This, believe it or not, is the recommended way to build!
944 (invoke "make" "REAL_DAEMON_DIR=/etc" "linux")))
945 ;; There is no make install stage, so we have to do it ourselves.
946 (replace 'install
947 (lambda _
948 (let ((out (assoc-ref %outputs "out"))
949 (man-pages `("hosts_access.3"
950 "hosts_access.5"
951 "hosts_options.5"
952 "tcpd.8"
953 "tcpdchk.8"
954 "tcpdmatch.8"))
955 (libs `("libwrap.a"
956 "libwrap.so"))
957 (headers `("tcpd.h"))
958 (bins `("safe_finger"
959 "tcpd"
960 "tcpdchk"
961 "tcpdmatch"
962 "try-from")))
963 (for-each
964 (lambda (x)
965 (install-file x (string-append out "/include")))
966 headers)
967 (for-each
968 (lambda (x)
969 (install-file x (string-append out "/share/man/man"
970 (string-take-right x 1))))
971 man-pages)
972 (for-each
973 (lambda (x)
974 (install-file x (string-append out "/lib/")))
975 libs)
976 (for-each
977 (lambda (x)
978 (install-file x (string-append out "/bin/")))
979 bins))
980 #t)))))
981 (home-page "http://www.porcupine.org")
982 (synopsis "Monitor and filter incoming requests for network services")
983 (description "With this package you can monitor and filter incoming requests for
984 network services. It includes a library which may be used by daemons to
985 transparently check connection attempts against an access control list.")
986 (license (license:non-copyleft "file://DISCLAIMER"
987 "See the file DISCLAIMER in the distribution."))))
988
989 (define-public zeromq
990 (package
991 (name "zeromq")
992 (version "4.3.4")
993 (source
994 (origin
995 (method url-fetch)
996 (uri (string-append "https://github.com/zeromq/libzmq/releases"
997 "/download/v" version "/zeromq-" version ".tar.gz"))
998 (sha256
999 (base32 "1rf3jmi36ms8jh2g5cvi253h43l6xdfq0r7mvp95va7mi4d014y5"))))
1000 (build-system gnu-build-system)
1001 (arguments '(#:configure-flags '("--disable-static")))
1002 (home-page "https://zeromq.org")
1003 (synopsis "Library for message-based applications")
1004 (description
1005 "The 0MQ lightweight messaging kernel is a library which extends the
1006 standard socket interfaces with features traditionally provided by specialized
1007 messaging middle-ware products. 0MQ sockets provide an abstraction of
1008 asynchronous message queues, multiple messaging patterns, message
1009 filtering (subscriptions), seamless access to multiple transport protocols and
1010 more.")
1011 (license license:lgpl3+)))
1012
1013 (define-public czmq
1014 (package
1015 (name "czmq")
1016 (version "4.2.1")
1017 (source (origin
1018 (method url-fetch)
1019 (uri (string-append
1020 "https://github.com/zeromq/" name
1021 "/releases/download/v" version
1022 "/" name "-" version ".tar.gz"))
1023 (sha256
1024 (base32
1025 "0fdclvd7fcwixp0k57ccv7d159v3slasyhvndxfn8n1a9hh0lwjx"))))
1026 (build-system gnu-build-system)
1027 (arguments
1028 '(#:configure-flags '("--enable-drafts")
1029 #:phases (modify-phases %standard-phases
1030 (add-before 'check 'patch-tests
1031 (lambda _
1032 (substitute* "src/czmq_selftest.c"
1033 ;; Disable the zproc test, which fails on some hardware
1034 ;; (see: https://github.com/zeromq/czmq/issues/2007).
1035 (("\\{ \"zproc\", zproc_test.*")
1036 "")
1037 ;; Also disable the zarmour test, which fails as well
1038 ;; (see: https://github.com/zeromq/czmq/issues/2125).
1039 (("\\{ \"zarmour\", zarmour_test.*")
1040 ""))
1041 #t)))))
1042 (inputs
1043 `(("zeromq" ,zeromq)))
1044 (home-page "https://zeromq.org")
1045 (synopsis "High-level C bindings for ØMQ")
1046 (description
1047 "czmq provides bindings for the ØMQ core API that hides the differences
1048 between different versions of ØMQ.")
1049 (license license:mpl2.0)))
1050
1051 (define-public cppzmq
1052 (package
1053 (name "cppzmq")
1054 (version "4.6.0")
1055 (source (origin
1056 (method git-fetch)
1057 (uri (git-reference
1058 (url "https://github.com/zeromq/cppzmq")
1059 (commit (string-append "v" version))))
1060 (sha256
1061 (base32
1062 "19acx2bzi4n6fdnfgkja1nds7m1bwg8lw5vfcijrx9fv75pa7m8h"))
1063 (file-name (git-file-name name version))))
1064 (build-system cmake-build-system)
1065 (arguments
1066 '(;; FIXME: The test suite requires downloading Catch and custom
1067 ;; CMake targets, and refuses to use the system version.
1068 ;; See <https://github.com/zeromq/cppzmq/issues/334>.
1069 #:tests? #f
1070 #:configure-flags '("-DCPPZMQ_BUILD_TESTS=OFF")))
1071 (native-inputs
1072 `(("pkg-config" ,pkg-config)))
1073 (inputs
1074 `(("zeromq" ,zeromq)))
1075 (home-page "https://zeromq.org")
1076 (synopsis "C++ bindings for the ØMQ messaging library")
1077 (description
1078 "This package provides header-only C++ bindings for ØMQ. The header
1079 files contain direct mappings of the abstractions provided by the ØMQ C API.")
1080 (license license:expat)))
1081
1082 (define-public libnatpmp
1083 (package
1084 (name "libnatpmp")
1085 (version "20150609")
1086 (source (origin
1087 (method url-fetch)
1088 (uri (string-append
1089 "http://miniupnp.free.fr/files/"
1090 name "-" version ".tar.gz"))
1091 (sha256
1092 (base32
1093 "1c1n8n7mp0amsd6vkz32n8zj3vnsckv308bb7na0dg0r8969rap1"))))
1094 (build-system gnu-build-system)
1095 (arguments
1096 `(#:phases
1097 (modify-phases %standard-phases
1098 (delete 'configure)
1099 (delete 'check)) ; no tests
1100 #:make-flags
1101 (let* ((target ,(%current-target-system))
1102 (gcc (if target
1103 (string-append target "-gcc")
1104 "gcc")))
1105 (list
1106 (string-append "CC=" gcc)
1107 (string-append "INSTALLPREFIX=" (assoc-ref %outputs "out"))
1108 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")))))
1109 (home-page "http://miniupnp.free.fr/libnatpmp.html")
1110 (synopsis "C library implementing NAT-PMP")
1111 (description
1112 "@code{libnatpmp} is a portable and asynchronous implementation of
1113 the Network Address Translation - Port Mapping Protocol (NAT-PMP)
1114 written in the C programming language.")
1115 (license license:bsd-3)))
1116
1117 (define-public librdkafka
1118 (package
1119 (name "librdkafka")
1120 (version "1.4.2")
1121 (source (origin
1122 (method git-fetch)
1123 (uri (git-reference
1124 (url "https://github.com/edenhill/librdkafka")
1125 (commit (string-append "v" version))))
1126 (file-name (git-file-name name version))
1127 (sha256
1128 (base32
1129 "05mgrdzacn9kdpr68r5j0cvsvl54s52glnsc1ww9rcxx6p7hq1ly"))))
1130 (build-system gnu-build-system)
1131 (arguments
1132 '(#:phases
1133 (modify-phases %standard-phases
1134 (replace 'configure
1135 ;; its custom configure script doesn't understand 'CONFIG_SHELL'.
1136 (lambda* (#:key outputs #:allow-other-keys)
1137 (let ((out (assoc-ref outputs "out")))
1138 ;; librdkafka++.so lacks RUNPATH for librdkafka.so
1139 (setenv "LDFLAGS"
1140 (string-append "-Wl,-rpath=" out "/lib"))
1141 (invoke "./configure"
1142 (string-append "--prefix=" out))))))))
1143 (native-inputs
1144 `(("python" ,python-wrapper)))
1145 (propagated-inputs
1146 `(("zlib" ,zlib))) ; in the Libs.private field of rdkafka.pc
1147 (home-page "https://github.com/edenhill/librdkafka")
1148 (synopsis "Apache Kafka C/C++ client library")
1149 (description
1150 "librdkafka is a C library implementation of the Apache Kafka protocol,
1151 containing both Producer and Consumer support.")
1152 (license license:bsd-2)))
1153
1154 (define-public libndp
1155 (package
1156 (name "libndp")
1157 (version "1.7")
1158 (source (origin
1159 (method url-fetch)
1160 (uri (string-append "https://libndp.org/files/"
1161 "libndp-" version ".tar.gz"))
1162 (sha256
1163 (base32
1164 "1dlinhl39va00v55qygjc9ap77yqf7xvn4rwmvdr49xhzzxhlj1c"))))
1165 (build-system gnu-build-system)
1166 (home-page "https://libndp.org/")
1167 (synopsis "Library for Neighbor Discovery Protocol")
1168 (description
1169 "libndp contains a library which provides a wrapper for IPv6 Neighbor
1170 Discovery Protocol. It also provides a tool named ndptool for sending and
1171 receiving NDP messages.")
1172 (license license:lgpl2.1+)))
1173
1174 (define-public ethtool
1175 (package
1176 (name "ethtool")
1177 (version "5.12")
1178 (source (origin
1179 (method url-fetch)
1180 (uri (string-append "mirror://kernel.org/software/network/"
1181 "ethtool/ethtool-" version ".tar.xz"))
1182 (sha256
1183 (base32
1184 "01vgyczgldrfss98cqrgjz8krj6kwb29xjf8p08q0g85fnfgmpgm"))))
1185 (build-system gnu-build-system)
1186 (native-inputs
1187 `(("pkg-config" ,pkg-config)))
1188 (inputs
1189 `(("libmnl" ,libmnl)))
1190 (home-page "https://www.kernel.org/pub/software/network/ethtool/")
1191 (synopsis "Display or change Ethernet device settings")
1192 (description
1193 "ethtool can be used to query and change settings such as speed,
1194 auto-negotiation and checksum offload on many network devices, especially
1195 Ethernet devices.")
1196 (license license:gpl2)))
1197
1198 (define-public ifstatus
1199 (package
1200 (name "ifstatus")
1201 (version "1.1.0")
1202 (source (origin
1203 (method url-fetch)
1204 (uri (string-append "mirror://sourceforge/ifstatus/ifstatus/"
1205 "ifstatus%20v" version "/ifstatus-v"
1206 version ".tar.gz"))
1207 (sha256
1208 (base32
1209 "045cbsq9ps32j24v8y5hpyqxnqn9mpaf3mgvirlhgpqyb9jsia0c"))
1210 (modules '((guix build utils)))
1211 (snippet
1212 '(begin
1213 (substitute* "Main.h"
1214 (("#include <stdio.h>")
1215 "#include <stdio.h>\n#include <stdlib.h>"))
1216 #t))))
1217 (build-system gnu-build-system)
1218 (arguments
1219 '(#:tests? #f ; no "check" target
1220 #:phases
1221 (modify-phases %standard-phases
1222 (delete 'configure) ; no configure script
1223 (replace 'install
1224 (lambda* (#:key outputs #:allow-other-keys)
1225 (let* ((out (assoc-ref outputs "out"))
1226 (bin (string-append out "/bin")))
1227 (mkdir-p bin)
1228 (copy-file "ifstatus"
1229 (string-append bin "/ifstatus")))
1230 #t)))))
1231 (inputs `(("ncurses" ,ncurses)))
1232 (home-page "http://ifstatus.sourceforge.net/graphic/index.html")
1233 (synopsis "Text based network interface status monitor")
1234 (description
1235 "IFStatus is a simple, easy-to-use program for displaying commonly
1236 needed/wanted real-time traffic statistics of multiple network
1237 interfaces, with a simple and efficient view on the command line. It is
1238 intended as a substitute for the PPPStatus and EthStatus projects.")
1239 (license license:gpl2+)))
1240
1241 (define-public iputils
1242 (package
1243 (name "iputils")
1244 (version "20190709")
1245 (home-page "https://github.com/iputils/iputils")
1246 (source (origin
1247 (method git-fetch)
1248 (uri (git-reference (url home-page)
1249 (commit (string-append "s" version))))
1250 (file-name (git-file-name name version))
1251 (patches (search-patches "iputils-libcap-compat.patch"))
1252 (sha256
1253 (base32
1254 "04bp4af15adp79ipxmiakfp0ij6hx5qam266flzbr94pr8z8l693"))))
1255 (build-system meson-build-system)
1256 (arguments
1257 `(#:configure-flags '("-DBUILD_RARPD=true")
1258 #:phases
1259 (modify-phases %standard-phases
1260 (add-after 'unpack 'fix-docbook-url
1261 (lambda* (#:key inputs #:allow-other-keys)
1262 (let* ((docbook-xsl (assoc-ref inputs "docbook-xsl"))
1263 (uri (string-append docbook-xsl "/xml/xsl/docbook-xsl-"
1264 ,(package-version docbook-xsl))))
1265 (for-each
1266 (lambda (file)
1267 (substitute* file
1268 (("http://docbook\\.sourceforge\\.net/release/xsl-ns/current")
1269 uri)))
1270 (cons "doc/meson.build"
1271 (find-files "doc" "\\.xsl$")))
1272 #t))))))
1273 (native-inputs
1274 `(("gettext" ,gettext-minimal)
1275 ("pkg-config" ,pkg-config)
1276 ("docbook-xsl" ,docbook-xsl)
1277 ("docbook-xml" ,docbook-xml-5)
1278 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
1279 ("xsltproc" ,libxslt)))
1280 (inputs
1281 `(("libcap" ,libcap)
1282 ("libidn2" ,libidn2)
1283 ("openssl" ,openssl)))
1284 (synopsis "Collection of network utilities")
1285 (description
1286 "This package contains a variety of tools for dealing with network
1287 configuration, troubleshooting, or servers. Utilities included are:
1288
1289 @itemize @bullet
1290 @item @command{arping}: Ping hosts using the @dfn{Address Resolution Protocol}.
1291 @item @command{clockdiff}: Compute time difference between network hosts
1292 using ICMP TSTAMP messages.
1293 @item @command{ninfod}: Daemon that responds to IPv6 Node Information Queries.
1294 @item @command{ping}: Use ICMP ECHO messages to measure round-trip delays
1295 and packet loss across network paths.
1296 @item @command{rarpd}: Answer RARP requests from clients.
1297 @item @command{rdisc}: Populate network routing tables with information from
1298 the ICMP router discovery protocol.
1299 @item @command{tftpd}: Trivial file transfer protocol server.
1300 @item @command{tracepath}: Trace network path to an IPv4 or IPv6 address and
1301 discover MTU along the way.
1302 @end itemize")
1303 ;; The various utilities are covered by different licenses, see LICENSE
1304 ;; for details.
1305 (license (list license:gpl2+ ;arping, rarpd, tracepath
1306 license:bsd-3 ;clockdiff, ninfod, ping, tftpd
1307 (license:non-copyleft
1308 "https://spdx.org/licenses/Rdisc.html"
1309 "Sun Microsystems license, see rdisc.c for details")))))
1310
1311 (define-public nload
1312 (package
1313 (name "nload")
1314 (version "0.7.4")
1315 (source (origin
1316 (method url-fetch)
1317 (uri (string-append "mirror://sourceforge/nload/nload/" version
1318 "/nload-" version ".tar.gz"))
1319 (sha256
1320 (base32
1321 "1rb9skch2kgqzigf19x8bzk211jdfjfdkrcvaqyj89jy2pkm3h61"))))
1322 (build-system gnu-build-system)
1323 (inputs `(("ncurses" ,ncurses)))
1324 (home-page "http://www.roland-riegel.de/nload/")
1325 (synopsis "Realtime console network usage monitor")
1326 (description
1327 "Nload is a console application which monitors network traffic and
1328 bandwidth usage in real time. It visualizes the in- and outgoing traffic using
1329 two graphs, and provides additional info like total amount of transferred data
1330 and min/max network usage.")
1331 (license license:gpl2+)))
1332
1333 (define-public iodine
1334 (package
1335 (name "iodine")
1336 (version "0.7.0")
1337 (source (origin
1338 (method url-fetch)
1339 (uri (string-append "http://code.kryo.se/" name "/"
1340 name "-" version ".tar.gz"))
1341 (sha256
1342 (base32
1343 "0gh17kcxxi37k65zm4gqsvbk3aw7yphcs3c02pn1c4s2y6n40axd"))))
1344 (build-system gnu-build-system)
1345 (arguments
1346 `(#:phases
1347 (modify-phases %standard-phases
1348 (delete 'configure)
1349 (add-before 'build 'fix-ifconfig-path
1350 ;; This package works only with the net-tools version of ifconfig.
1351 (lambda* (#:key inputs #:allow-other-keys)
1352 (substitute* "src/tun.c"
1353 (("PATH=[^ ]* ")
1354 (string-append (assoc-ref inputs "net-tools") "/bin/")))
1355 #t))
1356 (add-before 'check 'delete-failing-tests
1357 ;; Avoid https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802105.
1358 (lambda _
1359 (substitute* "tests/common.c"
1360 (("tcase_add_test\\(tc, \
1361 test_parse_format_ipv(4(|_listen_all|_mapped_ipv6)|6)\\);")
1362 ""))
1363 #t)))
1364 #:make-flags (list ,(string-append "CC=" (cc-for-target))
1365 (string-append "prefix=" (assoc-ref %outputs "out")))
1366 #:test-target "test"))
1367 (inputs `(("net-tools" ,net-tools)
1368 ("zlib" ,zlib)))
1369 (native-inputs `(("check" ,check-0.14)
1370 ("pkg-config" ,pkg-config)))
1371 (home-page "https://code.kryo.se/iodine/")
1372 (synopsis "Tunnel IPv4 data through a DNS server")
1373 (description "Iodine tunnels IPv4 data through a DNS server. This
1374 can be useful in different situations where internet access is firewalled, but
1375 DNS queries are allowed. The bandwidth is asymmetrical, with limited upstream
1376 and up to 1 Mbit/s downstream.")
1377 ;; src/md5.[ch] is released under the zlib license
1378 (license (list license:isc license:zlib))))
1379
1380 (define-public whois
1381 (package
1382 (name "whois")
1383 (version "5.5.9")
1384 (source
1385 (origin
1386 (method git-fetch)
1387 (uri (git-reference
1388 (url "https://github.com/rfc1036/whois")
1389 (commit (string-append "v" version))))
1390 (file-name (git-file-name name version))
1391 (sha256
1392 (base32 "0l9dhyciylh14lqw8j5mrk0y2hl95cnj8pyvvabbgwxpsdn0yvbb"))))
1393 (build-system gnu-build-system)
1394 (arguments
1395 `(#:tests? #f ; no test suite
1396 #:make-flags (list (string-append "CC=" ,(cc-for-target))
1397 (string-append "PKG_CONFIG=" ,(pkg-config-for-target))
1398 (string-append "prefix=" (assoc-ref %outputs "out")))
1399 #:phases
1400 (modify-phases %standard-phases
1401 (delete 'configure) ; no configure script
1402 (add-before 'build 'setenv
1403 (lambda _
1404 (setenv "HAVE_ICONV" "1")
1405 #t)))))
1406 (inputs
1407 `(("libidn2" ,libidn2)))
1408 (native-inputs
1409 `(("gettext" ,gettext-minimal)
1410 ("perl" ,perl)
1411 ("pkg-config" ,pkg-config)))
1412 (synopsis "Intelligent client for the WHOIS directory service")
1413 (description
1414 "whois searches for an object in a @dfn{WHOIS} (RFC 3912) database.
1415 It is commonly used to look up the registered users or assignees of an Internet
1416 resource, such as a domain name, an IP address block, or an autonomous system.
1417 It can automatically select the appropriate server for most queries.
1418
1419 For historical reasons, this package also includes @command{mkpasswd}, which
1420 encrypts passwords using @code{crypt(3)} and is unrelated to the Expect command
1421 of the same name.")
1422 (home-page "https://github.com/rfc1036/whois")
1423 (license license:gpl2+)))
1424
1425 (define-public wireshark
1426 (package
1427 (name "wireshark")
1428 (version "3.4.5")
1429 (source
1430 (origin
1431 (method url-fetch)
1432 (uri (string-append "https://www.wireshark.org/download/src/wireshark-"
1433 version ".tar.xz"))
1434 (sha256
1435 (base32 "0cyk8nqws9gp8p2ywszbynh8vawivnbhw60dhmy21qd1038sy6ny"))))
1436 (build-system cmake-build-system)
1437 (arguments
1438 `(#:phases
1439 (modify-phases %standard-phases
1440 (add-after 'unpack 'remove-failing-test
1441 ;; Skip test suite failing with "Program reassemble_test is not
1442 ;; available" and alike errors. Also skip test suite failing with
1443 ;; "AssertionError: Program extcap/sdjournal is not available"
1444 ;; error.'
1445 (lambda _
1446 (substitute* "CMakeLists.txt"
1447 (("suite_unittests" all) (string-append "# " all))
1448 (("suite_extcaps" all) (string-append "# " all)))
1449 #t)))
1450 ;; Build process chokes during `validate-runpath' phase.
1451 ;;
1452 ;; Errors are like the following:
1453 ;; "/gnu/store/...wireshark-3.0.0/lib/wireshark/plugins/3.0/epan/ethercat.so:
1454 ;; error: depends on 'libwireshark.so.12', which cannot be found in
1455 ;; RUNPATH". That is, "/gnu/store/...wireshark-3.0.0./lib" doesn't
1456 ;; belong to RUNPATH.
1457 ;;
1458 ;; That’s not a problem in practice because "ethercat.so" is a plugin,
1459 ;; so it’s dlopen’d by a process that already provides "libwireshark".
1460 ;; For now, we disable this phase.
1461 #:validate-runpath? #f))
1462 (inputs
1463 `(("c-ares" ,c-ares)
1464 ("glib" ,glib)
1465 ("gnutls" ,gnutls)
1466 ("libcap" ,libcap)
1467 ("libgcrypt" ,libgcrypt)
1468 ("libnl" ,libnl)
1469 ("libpcap" ,libpcap)
1470 ("libssh" ,libssh)
1471 ("libxml2" ,libxml2)
1472 ("lz4" ,lz4)
1473 ("lua" ,lua-5.2) ;Lua 5.3 unsupported
1474 ("krb5" ,mit-krb5)
1475 ("qtbase" ,qtbase)
1476 ("qtmultimedia" ,qtmultimedia)
1477 ("qtsvg" ,qtsvg)
1478 ("sbc" ,sbc)
1479 ("snappy" ,snappy)
1480 ("zlib" ,zlib)))
1481 (native-inputs
1482 `(("bison" ,bison)
1483 ("doxygen" ,doxygen)
1484 ("flex" ,flex)
1485 ("gettext" ,gettext-minimal)
1486 ("perl" ,perl)
1487 ("pkg-config" ,pkg-config)
1488 ("python" ,python-wrapper)
1489 ("qttools" ,qttools)))
1490 (synopsis "Network traffic analyzer")
1491 (description "Wireshark is a network protocol analyzer, or @dfn{packet
1492 sniffer}, that lets you capture and interactively browse the contents of
1493 network frames.")
1494 (home-page "https://www.wireshark.org/")
1495 (license license:gpl2+)))
1496
1497 (define-public fping
1498 (package
1499 (name "fping")
1500 (version "5.0")
1501 (source
1502 (origin
1503 (method url-fetch)
1504 (uri (string-append "https://fping.org/dist/fping-"
1505 version ".tar.gz"))
1506 (sha256
1507 (base32 "1f2prmii4fyl44cfykp40hp4jjhicrhddh9v3dfs11j6nsww0f7d"))))
1508 (build-system gnu-build-system)
1509 (home-page "https://fping.org/")
1510 (synopsis "Send ICMP ECHO_REQUEST packets to network hosts")
1511 (description
1512 "fping is a ping-like program which uses @acronym{ICMP, Internet Control
1513 Message Protocol} echo requests to determine if a target host is responding.
1514
1515 @command{fping} differs from @command{ping} in that you can specify any number
1516 of targets on the command line, or specify a file containing the lists of
1517 targets to ping. Instead of sending to one target until it times out or
1518 replies, fping will send out a ping packet and move on to the next target in a
1519 round-robin fashion.")
1520 (license license:expat)))
1521
1522 (define-public gandi.cli
1523 (package
1524 (name "gandi.cli")
1525 (version "1.6")
1526 (source
1527 (origin
1528 (method url-fetch)
1529 (uri (pypi-uri name version))
1530 (sha256
1531 (base32 "1h36jahbp7273wn3yd747kbiwjc0bm3sja67bcxdsd54ln0vyndg"))))
1532 (build-system python-build-system)
1533 (arguments
1534 `(#:phases
1535 (modify-phases %standard-phases
1536 (add-after 'unpack 'embed-store-file-names
1537 (lambda _
1538 (substitute* (list "gandi/cli/modules/cert.py"
1539 "gandi/cli/tests/commands/test_certificate.py")
1540 (("openssl") (which "openssl")))
1541 #t))
1542 (add-after 'install 'install-documentation
1543 ;; The included man page may be outdated but we install it anyway,
1544 ;; since it's mentioned in 'gandi --help' and better than nothing.
1545 (lambda* (#:key outputs #:allow-other-keys)
1546 (let* ((out (assoc-ref outputs "out"))
1547 (man1 (string-append out "/share/man/man1")))
1548 (mkdir-p man1)
1549 (with-output-to-file (string-append man1 "/gandi.1")
1550 (lambda _
1551 (invoke "rst2man.py" "gandicli.man.rst")))
1552 #t))))))
1553 (native-inputs
1554 `(("python-docutils" ,python-docutils) ; for rst2man.py
1555 ("python-pytest" ,python-pytest)
1556 ("python-pytest-cov" ,python-pytest-cov)
1557 ("python-tox" ,python-tox)))
1558 (propagated-inputs
1559 `(("openssh" ,openssh))) ; used by gandi/cli/modules/iass.py
1560 (inputs
1561 `(("openssl" ,openssl)
1562 ("python-click" ,python-click)
1563 ("python-ipy" ,python-ipy)
1564 ("python-pyyaml" ,python-pyyaml)
1565 ("python-requests" ,python-requests)))
1566 (home-page "https://cli.gandi.net")
1567 (synopsis "Command-line interface to the Gandi.net Web API")
1568 (description
1569 "This package provides a command-line client (@command{gandi}) to buy,
1570 manage, and delete Internet resources from Gandi.net such as domain names,
1571 virtual machines, and certificates.")
1572 (license license:gpl3+)))
1573
1574 (define-public go-netns
1575 (let ((commit "13995c7128ccc8e51e9a6bd2b551020a27180abd")
1576 (revision "1"))
1577 (package
1578 (name "go-netns")
1579 (version (git-version "0.0.0" revision commit))
1580 (source (origin
1581 (method git-fetch)
1582 (uri (git-reference
1583 (url "https://github.com/vishvananda/netns")
1584 (commit commit)))
1585 (file-name (git-file-name name version))
1586 (sha256
1587 (base32
1588 "1zk6w8158qi4niva5rijchbv9ixgmijsgqshh54wdaav4xrhjshn"))))
1589 (build-system go-build-system)
1590 (arguments
1591 `(#:import-path "github.com/vishvananda/netns"
1592 #:tests? #f)) ;tests require root privileges
1593 (home-page "https://github.com/vishvananda/netns")
1594 (synopsis "Simple network namespace handling for Go")
1595 (description "The netns package provides a simple interface for
1596 handling network namespaces in Go.")
1597 (license license:asl2.0))))
1598
1599 (define-public go-sctp
1600 ;; docker-libnetwork-cmd-proxy requires this exact commit.
1601 ;; This commit is mentioned in docker-libnetwork-cmd-proxy's vendor.conf.
1602 (let ((commit "6e2cb1366111dcf547c13531e3a263a067715847")
1603 (revision "2"))
1604 (package
1605 (name "go-sctp")
1606 (version (git-version "0.0.0" revision commit))
1607 (source (origin
1608 (method git-fetch)
1609 (uri (git-reference
1610 (url "https://github.com/ishidawataru/sctp")
1611 (commit commit)))
1612 (file-name (git-file-name name version))
1613 (sha256
1614 (base32
1615 "1ba90fmpdwxa1ba4hrsjhi3gfy3pwmz7x8amw1p5dc9p5a7nnqrb"))))
1616 (build-system go-build-system)
1617 (arguments
1618 `(#:tests? #f ; Test suite is flakey.
1619 #:import-path "github.com/ishidawataru/sctp"))
1620 (home-page "https://github.com/ishidawataru/sctp")
1621 (synopsis "SCTP library for the Go programming language")
1622 (description "This library provides methods for using the stream control
1623 transmission protocol (SCTP) in a Go application.")
1624 (license license:asl2.0))))
1625
1626 (define-public httping
1627 (package
1628 (name "httping")
1629 (version "2.5")
1630 (source
1631 (origin
1632 (method url-fetch)
1633 (uri (string-append "https://www.vanheusden.com/httping/httping-"
1634 version ".tgz"))
1635 (sha256
1636 (base32
1637 "1y7sbgkhgadmd93x1zafqc4yp26ssiv16ni5bbi9vmvvdl55m29y"))))
1638 (build-system gnu-build-system)
1639 (native-inputs
1640 `(("gettext" ,gettext-minimal)))
1641 (inputs
1642 `(("fftw" ,fftw)
1643 ("ncurses" ,ncurses)
1644 ("openssl" ,openssl)))
1645 (arguments
1646 `(#:make-flags (list ,(string-append "CC=" (cc-for-target))
1647 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
1648 "PREFIX=")
1649 #:tests? #f)) ; no tests
1650 (home-page "https://www.vanheusden.com/httping/")
1651 (synopsis "Web server latency and throughput monitor")
1652 (description
1653 "httping measures how long it takes to connect to a web server, send an
1654 HTTP(S) request, and receive the reply headers. It is somewhat similar to
1655 @command{ping}, but can be used even in cases where ICMP traffic is blocked
1656 by firewalls or when you want to monitor the response time of the actual web
1657 application stack itself.")
1658 (license license:gpl2))) ; with permission to link with OpenSSL
1659
1660 (define-public httpstat
1661 (package
1662 (name "httpstat")
1663 (version "1.3.1")
1664 (source
1665 (origin
1666 (method git-fetch)
1667 (uri (git-reference
1668 (url "https://github.com/reorx/httpstat")
1669 (commit version)))
1670 (file-name (git-file-name name version))
1671 (sha256
1672 (base32 "0cw8299a080m42slsimz31xs0gjnh833gpbj2dsr4hkcinrn4iyd"))))
1673 (build-system python-build-system)
1674 (inputs `(("curl" ,curl)))
1675 (arguments
1676 '(#:phases
1677 (modify-phases %standard-phases
1678 (add-before 'build 'fix-curl-path
1679 (lambda* (#:key inputs #:allow-other-keys)
1680 (substitute* "httpstat.py"
1681 (("ENV_CURL_BIN.get\\('curl'\\)")
1682 (string-append "ENV_CURL_BIN.get('"
1683 (assoc-ref inputs "curl")
1684 "/bin/curl')"))
1685 ;; "curl -w time_*" units seems to have
1686 ;; changed from seconds to nanoseconds.
1687 (("d\\[k\\] \\* 1000") "d[k] / 1000"))
1688 #t)))))
1689 (home-page "https://github.com/reorx/httpstat")
1690 (synopsis "Visualize curl statistics")
1691 (description
1692 "@command{httpstat} is a tool to visualize statistics from the
1693 @command{curl} HTTP client. It acts as a wrapper for @command{curl} and
1694 prints timing information for each step of the HTTP request (DNS lookup,
1695 TCP connection, TLS handshake and so on) in the terminal.")
1696 (license license:expat)))
1697
1698 (define-public squid
1699 (package
1700 (name "squid")
1701 (version "4.15")
1702 (source
1703 (origin
1704 (method url-fetch)
1705 (uri (string-append "http://www.squid-cache.org/Versions/v4/squid-"
1706 version ".tar.xz"))
1707 (sha256
1708 (base32 "09aaz0hi7q4s5jalgl5i5fakmgzv5akf03gnajlah498mgjs94xn"))))
1709 (build-system gnu-build-system)
1710 (arguments
1711 '(#:configure-flags
1712 ;; disable -march=native in build for reproducibility; see
1713 ;; https://wiki.squid-cache.org/KnowledgeBase/IllegalInstructionError
1714 (list "--disable-arch-native")
1715 #:phases
1716 (modify-phases %standard-phases
1717 (add-before 'build 'fix-true-path
1718 (lambda* (#:key inputs #:allow-other-keys)
1719 (substitute* "test-suite/testheaders.sh"
1720 (("/bin/true")
1721 (string-append (assoc-ref inputs "coreutils")
1722 "/bin/true")))
1723 #t)))))
1724 (inputs
1725 `(("perl" ,perl)
1726 ("openldap" ,openldap)
1727 ("linux-pam" ,linux-pam)
1728 ("libcap" ,libcap)
1729 ("cyrus-sasl" ,cyrus-sasl)
1730 ("expat" ,expat)
1731 ("libxml2" ,libxml2)
1732 ("openssl" ,openssl)))
1733 (native-inputs
1734 `(("cppunit" ,cppunit)
1735 ("pkg-config" ,pkg-config)))
1736 (synopsis "Web caching proxy")
1737 (description "Squid is a caching proxy for the Web supporting HTTP, HTTPS,
1738 FTP, and more. It reduces bandwidth and improves response times by caching and
1739 reusing frequently-requested web pages.")
1740 (home-page "http://www.squid-cache.org/")
1741 (license license:gpl2+)))
1742
1743 (define-public bwm-ng
1744 (package
1745 (name "bwm-ng")
1746 (version "0.6.3")
1747 (source
1748 (origin
1749 (method git-fetch)
1750 (uri (git-reference
1751 (url "https://github.com/vgropp/bwm-ng")
1752 (commit (string-append "v" version))))
1753 (file-name (git-file-name name version))
1754 (sha256
1755 (base32 "1gpp2l3w479h1w5skjra5xy0gxd24kvmk6i4psbkafnv2399la4k"))))
1756 (build-system gnu-build-system)
1757 (arguments
1758 `(#:phases
1759 (modify-phases %standard-phases
1760 (add-after 'unpack 'disable-premature-./configure
1761 (lambda _
1762 (substitute* "autogen.sh"
1763 (("\\$srcdir/configure")
1764 "true"))
1765 #t)))))
1766 (native-inputs
1767 `(("autoconf" ,autoconf)
1768 ("automake" ,automake)))
1769 (inputs
1770 `(("ncurses" ,ncurses)))
1771 (synopsis "Console based live network and disk I/O bandwidth monitor")
1772 (description "Bandwidth Monitor NG is a small and simple console based
1773 live network and disk I/O bandwidth monitor.")
1774 (home-page "https://www.gropp.org/?id=projects&sub=bwm-ng")
1775 (license license:gpl2)))
1776
1777 (define-public aircrack-ng
1778 (package
1779 (name "aircrack-ng")
1780 (version "1.6")
1781 (source
1782 (origin
1783 (method url-fetch)
1784 (uri (string-append "https://download.aircrack-ng.org/aircrack-ng-"
1785 version ".tar.gz"))
1786 (sha256
1787 (base32 "0ix2k64qg7x3w0bzdsbk1m50kcpq1ws59g3zkwiafvpwdr4gs2sg"))))
1788 (build-system gnu-build-system)
1789 (native-inputs
1790 `(("autoconf" ,autoconf)
1791 ("automake" ,automake)
1792 ("libtool" ,libtool)
1793 ("pkg-config" ,pkg-config)
1794 ("which" ,which)))
1795 (inputs
1796 `(("libgcrypt" ,libgcrypt)
1797 ("libnl" ,libnl)
1798 ("libpcap" ,libpcap)
1799 ("ethtool" ,ethtool)
1800 ("pcre" ,pcre)
1801 ("sqlite" ,sqlite)
1802 ("zlib" ,zlib)))
1803 (arguments
1804 `(#:configure-flags
1805 (list "--with-experimental=yes" ; build wesside-ng, etc.
1806 "--with-gcrypt") ; openssl's the default
1807 #:phases (modify-phases %standard-phases
1808 (add-before 'bootstrap 'patch-evalrev
1809 (lambda _
1810 ;; Called by ./autogen.sh below, before the default
1811 ;; ‘patch-shebangs’ phase has had a chance to run.
1812 (substitute* "evalrev"
1813 (("/bin/sh")
1814 (which "sh")))
1815 #t))
1816 (add-after 'build 'absolutize-tools
1817 (lambda* (#:key inputs #:allow-other-keys)
1818 (let ((ethtool (string-append (assoc-ref inputs "ethtool")
1819 "/sbin/ethtool")))
1820 (substitute* "scripts/airmon-ng"
1821 (("ethtool ")
1822 (string-append ethtool " ")))
1823 #t))))))
1824 (home-page "https://www.aircrack-ng.org")
1825 (synopsis "Assess WiFi network security")
1826 (description
1827 "Aircrack-ng is a complete suite of tools to assess WiFi network
1828 security. It focuses on different areas of WiFi security: monitoring,
1829 attacking, testing, and cracking. All tools are command-line driven, which
1830 allows for heavy scripting.")
1831 (license (list license:gpl2+ license:bsd-3))))
1832
1833 (define-public pixiewps
1834 (package
1835 (name "pixiewps")
1836 (version "1.4.2")
1837 (source (origin
1838 (method url-fetch)
1839 (uri (string-append
1840 "https://github.com/wiire-a/pixiewps/releases/"
1841 "download/v" version "/" name "-" version ".tar.xz"))
1842 (sha256
1843 (base32
1844 "07nym6bqml0k9v29vnj003nrgnwrywgjvnljb7cdpsvnwilhbp64"))))
1845 (build-system gnu-build-system)
1846 (arguments
1847 `(#:make-flags
1848 (list ,(string-append "CC=" (cc-for-target))
1849 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1850 #:phases
1851 (modify-phases %standard-phases
1852 (delete 'configure)) ; no configure script
1853 #:tests? #f)) ; there are no tests
1854 (home-page "https://github.com/wiire-a/pixiewps/")
1855 (synopsis "Offline brute-force tool for Wi-Fi Protected Setup")
1856 (description "Pixiewps implements the pixie-dust attack to brute
1857 force the Wi-Fi Protected Setup (WPS) PIN by exploiting the low or
1858 non-existing entropy of some access points.")
1859 (license license:gpl3+)))
1860
1861 (define-public reaver
1862 (package
1863 (name "reaver")
1864 (version "1.6.6")
1865 (source (origin
1866 (method url-fetch)
1867 (uri (string-append
1868 "https://github.com/t6x/reaver-wps-fork-t6x/releases/"
1869 "download/v" version "/reaver-" version ".tar.xz"))
1870 (sha256
1871 (base32
1872 "00k7mc81ifv0wma7k4v18mj498badbw5yls6c28qin3d1gda0ag3"))))
1873 (build-system gnu-build-system)
1874 (arguments
1875 `(#:configure-flags
1876 ;; Save session files to current directory instead of /var.
1877 (list "--enable-savetocurrent"
1878 "--localstatedir=/tmp/dummy") ; prevent creating /var during install
1879 #:phases
1880 (modify-phases %standard-phases
1881 (add-before 'configure 'change-directory
1882 (lambda _
1883 (chdir "src")
1884 #t))
1885 (add-after 'install 'install-doc
1886 (lambda* (#:key outputs #:allow-other-keys)
1887 (chdir "../docs")
1888 (let* ((out (assoc-ref outputs "out"))
1889 (doc (string-append out "/share/doc/" ,name "-" ,version))
1890 (man1 (string-append out "/share/man/man1")))
1891 (for-each (lambda (file) (install-file file doc))
1892 (find-files "." "README.*"))
1893 (install-file "reaver.1" man1)
1894 #t))))
1895 #:tests? #f)) ; there are no tests
1896 (inputs
1897 `(("libpcap" ,libpcap)))
1898 (propagated-inputs
1899 `(("aircrack-ng" ,aircrack-ng)
1900 ("pixiewps" ,pixiewps)))
1901 (home-page "https://github.com/t6x/reaver-wps-fork-t6x/")
1902 (synopsis "Attack tool for Wi-Fi Protected Setup")
1903 (description "Reaver performs a brute force attack against an access
1904 point's Wi-Fi Protected Setup (WPS) PIN. Once the PIN is found, the WPA
1905 passphrase can be recovered and the AP's wireless settings can be
1906 reconfigured.")
1907 (license license:gpl2+)))
1908
1909 (define-public perl-danga-socket
1910 (package
1911 (name "perl-danga-socket")
1912 (version "1.62")
1913 (source
1914 (origin
1915 (method url-fetch)
1916 (uri (string-append "mirror://cpan/authors/id/N/NM/NML/"
1917 "Danga-Socket-" version ".tar.gz"))
1918 (sha256
1919 (base32 "0x4bvirmf0kphks19jwgva00zz73zx344218dfaiv8gigrw3yg4m"))))
1920 (build-system perl-build-system)
1921 (native-inputs
1922 `(("perl-test-tcp" ,perl-test-tcp)))
1923 (propagated-inputs
1924 `(("perl-sys-syscall" ,perl-sys-syscall)))
1925 (home-page "https://metacpan.org/release/Danga-Socket")
1926 (synopsis "Event loop and event-driven async socket base class")
1927 (description
1928 "Danga::Socket is an abstract base class for objects backed by a socket
1929 which provides the basic framework for event-driven asynchronous IO, designed
1930 to be fast. Danga::Socket is both a base class for objects, and an event
1931 loop.")
1932 (license license:perl-license)))
1933
1934 (define-public perl-data-validate-ip
1935 (package
1936 (name "perl-data-validate-ip")
1937 (version "0.30")
1938 (source
1939 (origin
1940 (method url-fetch)
1941 (uri (string-append
1942 "mirror://cpan/authors/id/D/DR/DROLSKY/Data-Validate-IP-"
1943 version ".tar.gz"))
1944 (sha256
1945 (base32 "074adrlvkiahj1fdc9nvb95dpfyjzm2jzhi90m8xaw4bw5ipcbzy"))))
1946 (build-system perl-build-system)
1947 (native-inputs
1948 `(("perl-test-requires" ,perl-test-requires)))
1949 (propagated-inputs
1950 `(("perl-netaddr-ip" ,perl-netaddr-ip)))
1951 (home-page "https://metacpan.org/release/Data-Validate-IP")
1952 (synopsis "IPv4 and IPv6 validation methods")
1953 (description
1954 "This module provides several IP address validation subroutines that both
1955 validate and untaint their input. This includes both basic validation
1956 (@code{is_ipv4()} and @code{is_ipv6()}) and special cases like checking whether
1957 an address belongs to a specific network or whether an address is public or
1958 private (reserved).")
1959 (license license:perl-license)))
1960
1961 (define-public perl-net-dns
1962 (package
1963 (name "perl-net-dns")
1964 (version "1.31")
1965 (source
1966 (origin
1967 (method url-fetch)
1968 (uri
1969 (list
1970 (string-append "https://www.net-dns.org/download/Net-DNS-"
1971 version ".tar.gz")
1972 (string-append "mirror://cpan/authors/id/N/NL/NLNETLABS/Net-DNS-"
1973 version ".tar.gz")))
1974 (sha256
1975 (base32 "05f6rzvvmm6xd0p100k5y9kczdzqgala09ra8bccc18n6y74l0h0"))))
1976 (build-system perl-build-system)
1977 (inputs
1978 `(("perl-digest-hmac" ,perl-digest-hmac)))
1979 (home-page "https://www.net-dns.org/")
1980 (synopsis
1981 "Perl Interface to the Domain Name System")
1982 (description "Net::DNS is the Perl Interface to the Domain Name System.")
1983 (license license:x11)))
1984
1985 (define-public perl-socket6
1986 (package
1987 (name "perl-socket6")
1988 (version "0.29")
1989 (source
1990 (origin
1991 (method url-fetch)
1992 (uri (string-append
1993 "mirror://cpan/authors/id/U/UM/UMEMOTO/Socket6-"
1994 version
1995 ".tar.gz"))
1996 (sha256
1997 (base32
1998 "054izici8klfxs8hr5rljib28plijpsfymy99xbzdp047bx1b2a6"))))
1999 (build-system perl-build-system)
2000 (arguments
2001 `(#:phases
2002 (modify-phases %standard-phases
2003 (replace 'configure
2004 (lambda* (#:key outputs #:allow-other-keys)
2005 (let* ((out (assoc-ref outputs "out"))
2006 (args `("Makefile.PL"
2007 ,(string-append "PREFIX=" out)
2008 "INSTALLDIRS=site")))
2009 (setenv "CONFIG_SHELL" (which "sh"))
2010 (apply invoke "perl" args)))))))
2011 (home-page "https://metacpan.org/release/Socket6")
2012 (synopsis
2013 "IPv6 related part of the C socket.h defines and structure manipulators for Perl")
2014 (description "Socket6 binds the IPv6 related part of the C socket header
2015 definitions and structure manipulators for Perl.")
2016 (license license:bsd-3)))
2017
2018 (define-public perl-net-dns-resolver-programmable
2019 (package
2020 (name "perl-net-dns-resolver-programmable")
2021 (version "0.003")
2022 (source
2023 (origin
2024 (method url-fetch)
2025 (uri (string-append
2026 "mirror://cpan/authors/id/J/JM/JMEHNLE/net-dns-resolver-programmable/"
2027 "Net-DNS-Resolver-Programmable-v" version ".tar.gz"))
2028 (sha256
2029 (base32
2030 "1v3nl2kaj4fs55n1617n53q8sa3mir06898vpy1rq98zjih24h4d"))
2031 (patches
2032 (search-patches "perl-net-dns-resolver-programmable-fix.patch"))))
2033 (build-system perl-build-system)
2034 (native-inputs
2035 `(("perl-module-build" ,perl-module-build)))
2036 (inputs `(("perl-net-dns" ,perl-net-dns)))
2037 (home-page
2038 "https://metacpan.org/release/Net-DNS-Resolver-Programmable")
2039 (synopsis
2040 "Programmable DNS resolver class for offline emulation of DNS")
2041 (description "Net::DNS::Resolver::Programmable is a programmable DNS resolver for
2042 offline emulation of DNS.")
2043 (license license:perl-license)))
2044
2045 (define-public perl-net-dns-resolver-mock
2046 (package
2047 (name "perl-net-dns-resolver-mock")
2048 (version "1.20171219")
2049 (source (origin
2050 (method url-fetch)
2051 (uri (string-append
2052 "mirror://cpan/authors/id/M/MB/MBRADSHAW/"
2053 "Net-DNS-Resolver-Mock-" version ".tar.gz"))
2054 (sha256
2055 (base32
2056 "0m3rxpkv1b9121srvbqkrgzg4m8mnydiydqv34in1i1ixwrl6jn9"))))
2057 (build-system perl-build-system)
2058 (inputs
2059 `(("perl-net-dns" ,perl-net-dns)))
2060 (home-page "https://metacpan.org/release/Net-DNS-Resolver-Mock")
2061 (synopsis "Mock DNS Resolver object for testing")
2062 (description
2063 "Net::DNS::Resolver::Mock is a subclass of Net::DNS::Resolver, but returns
2064 static data from any provided DNS zone file instead of querying the network.
2065 It is intended primarily for use in testing.")
2066 (license license:perl-license)))
2067
2068 (define-public perl-netaddr-ip
2069 (package
2070 (name "perl-netaddr-ip")
2071 (version "4.079")
2072 (source
2073 (origin
2074 (method url-fetch)
2075 (uri (string-append
2076 "mirror://cpan/authors/id/M/MI/MIKER/NetAddr-IP-"
2077 version
2078 ".tar.gz"))
2079 (sha256
2080 (base32
2081 "1rx0dinrz9fk9qcg4rwqq5n1dm3xv2arymixpclcv2q2nzgq4npc"))))
2082 (build-system perl-build-system)
2083 (arguments
2084 `(#:phases
2085 (modify-phases %standard-phases
2086 (replace 'configure
2087 (lambda* (#:key outputs #:allow-other-keys)
2088 (let* ((out (assoc-ref outputs "out"))
2089 (args `("Makefile.PL"
2090 ,(string-append "PREFIX=" out)
2091 "INSTALLDIRS=site")))
2092 (setenv "CONFIG_SHELL" (which "sh"))
2093 (apply invoke "perl" args)))))))
2094 (home-page
2095 "https://metacpan.org/release/NetAddr-IP")
2096 (synopsis
2097 "Manages IPv4 and IPv6 addresses and subnets")
2098 (description "NetAddr::IP manages IPv4 and IPv6 addresses and subsets.")
2099 (license license:perl-license)))
2100
2101 (define-public perl-net-patricia
2102 (package
2103 (name "perl-net-patricia")
2104 (version "1.22")
2105 (source
2106 (origin
2107 (method url-fetch)
2108 (uri (string-append
2109 "mirror://cpan/authors/id/G/GR/GRUBER/Net-Patricia-"
2110 version
2111 ".tar.gz"))
2112 (sha256
2113 (base32
2114 "0ln5f57vc8388kyh9vhx2infrdzfhbpgyby74h1qsnhwds95m0vh"))))
2115 (build-system perl-build-system)
2116 (arguments
2117 '(#:phases
2118 (modify-phases %standard-phases
2119 (add-after 'unpack 'dont-link-with-nsl ; Borrowed from Debian.
2120 (lambda _
2121 (substitute* "Makefile.PL"
2122 (("-lnsl") ""))
2123 #t)))))
2124 (inputs
2125 `(("perl-net-cidr-lite" ,perl-net-cidr-lite)
2126 ("perl-socket6" ,perl-socket6)))
2127 (home-page
2128 "https://metacpan.org/release/Net-Patricia")
2129 (synopsis
2130 "Patricia Trie Perl module for fast IP address lookups")
2131 (description
2132 "Net::Patricia does IP address lookups quickly in Perl.")
2133 ;; The bindings are licensed under GPL2 or later.
2134 ;; libpatricia is licensed under 2-clause BSD.
2135 (license (list license:gpl2+ license:bsd-2))))
2136
2137 (define-public perl-net-cidr-lite
2138 (package
2139 (name "perl-net-cidr-lite")
2140 (version "0.22")
2141 (source
2142 (origin
2143 (method url-fetch)
2144 (uri (string-append
2145 "mirror://cpan/authors/id/S/ST/STIGTSP/Net-CIDR-Lite-"
2146 version
2147 ".tar.gz"))
2148 (sha256
2149 (base32 "05w57db2lx4djb4vixzdr6qgrzyzkk047nl812g7nq8s6k5xh5s3"))))
2150 (build-system perl-build-system)
2151 (home-page "https://metacpan.org/release/Net-CIDR-Lite")
2152 (synopsis "Perl extension for merging IPv4 or IPv6 CIDR addresses")
2153 (description "Net::CIDR::Lite merges IPv4 or IPv6 CIDR addresses.")
2154 (license license:gpl1+)))
2155
2156 (define-public perl-io-socket-inet6
2157 (package
2158 (name "perl-io-socket-inet6")
2159 (version "2.72")
2160 (source
2161 (origin
2162 (method url-fetch)
2163 (uri (string-append
2164 "mirror://cpan/authors/id/S/SH/SHLOMIF/IO-Socket-INET6-"
2165 version
2166 ".tar.gz"))
2167 (sha256
2168 (base32
2169 "1fqypz6qa5rw2d5y2zq7f49frwra0aln13nhq5gi514j2zx21q45"))))
2170 (build-system perl-build-system)
2171 (native-inputs
2172 `(("perl-module-build" ,perl-module-build)
2173 ("perl-test-pod" ,perl-test-pod)
2174 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
2175 (inputs `(("perl-socket6" ,perl-socket6)))
2176 (arguments `(;; Need network socket API
2177 #:tests? #f))
2178 (home-page
2179 "https://metacpan.org/release/IO-Socket-INET6")
2180 (synopsis
2181 "Perl object interface for AF_INET/AF_INET6 domain sockets")
2182 (description "IO::Socket::INET6 is an interface for AF_INET/AF_INET6 domain
2183 sockets in Perl.")
2184 (license license:perl-license)))
2185
2186 (define-public libproxy
2187 (package
2188 (name "libproxy")
2189 (version "0.4.17")
2190 (source (origin
2191 (method url-fetch)
2192 (uri (string-append "https://github.com/libproxy/libproxy/"
2193 "releases/download/" version "/libproxy-"
2194 version ".tar.xz"))
2195 (sha256
2196 (base32
2197 "01cbgz6lc3v59sldqk96l1281kp2qxnsa2qwlf2ikvjlyr1gi2dw"))))
2198 (build-system cmake-build-system)
2199 (native-inputs
2200 `(("pkg-config" ,pkg-config)))
2201 (inputs
2202 `(("dbus" ,dbus)
2203 ("zlib" ,zlib)))
2204 (arguments
2205 `(#:phases
2206 (modify-phases %standard-phases
2207 (replace 'check
2208 (lambda _
2209 (invoke "ctest" "-E" "url-test"))))))
2210 (synopsis "Library providing automatic proxy configuration management")
2211 (description "Libproxy handles the details of HTTP/HTTPS proxy
2212 configuration for applications across all scenarios. Applications using
2213 libproxy only have to specify which proxy to use.")
2214 (home-page "https://libproxy.github.io/libproxy")
2215 (license license:lgpl2.1+)))
2216
2217 (define-public proxychains-ng
2218 (package
2219 (name "proxychains-ng")
2220 (version "4.14")
2221 (source
2222 (origin
2223 (method url-fetch)
2224 (uri (string-append "http://ftp.barfooze.de/pub/sabotage/tarballs/"
2225 "proxychains-ng-" version ".tar.xz"))
2226 (sha256
2227 (base32 "1bmhfbl1bzc87vl0xwr1wh5xvslfyc41nl2hqzhbj258p0sy004x"))))
2228 (build-system gnu-build-system)
2229 (arguments
2230 `(#:tests? #f ; there are no tests
2231 #:phases
2232 (modify-phases %standard-phases
2233 (add-after 'unpack 'fix-configure-script
2234 (lambda _
2235 ;; The configure script is very intolerant to unknown arguments,
2236 ;; such as "CONFIG_SHELL".
2237 (substitute* "configure"
2238 (("\\*\\) break ;;" line)
2239 (string-append "[A-Z]*) shift ;;\n"
2240 line)))
2241 #t))
2242 (add-before 'configure 'set-up-environment
2243 (lambda _
2244 (setenv "CC" "gcc")
2245 #t)))))
2246 (synopsis "Redirect any TCP connection through a proxy or proxy chain")
2247 (description "Proxychains-ng is a preloader which hooks calls to sockets
2248 in dynamically linked programs and redirects them through one or more SOCKS or
2249 HTTP proxies.")
2250 (home-page "https://github.com/rofl0r/proxychains-ng")
2251 (license license:gpl2+)))
2252
2253 (define-public enet
2254 (package
2255 (name "enet")
2256 (version "1.3.17")
2257 (source
2258 (origin
2259 (method url-fetch)
2260 (uri (string-append "http://enet.bespin.org/download/"
2261 "enet-" version ".tar.gz"))
2262 (sha256
2263 (base32 "1p6f9mby86af6cs7pv6h48032ip9g32c05cb7d9mimam8lchz3x3"))))
2264 (build-system gnu-build-system)
2265 (native-inputs
2266 `(("pkg-config" ,pkg-config)))
2267 (synopsis "Network communication layer on top of UDP")
2268 (description
2269 "ENet's purpose is to provide a relatively thin, simple and robust network
2270 communication layer on top of UDP. The primary feature it provides is optional
2271 reliable, in-order delivery of packets. ENet omits certain higher level
2272 networking features such as authentication, server discovery, encryption, or
2273 other similar tasks that are particularly application specific so that the
2274 library remains flexible, portable, and easily embeddable.")
2275 (home-page "http://enet.bespin.org")
2276 (license license:expat)))
2277
2278 (define-public sslh
2279 (package
2280 (name "sslh")
2281 (version "1.21c")
2282 (source
2283 (origin
2284 (method git-fetch)
2285 (uri (git-reference
2286 (url "https://github.com/yrutschle/sslh")
2287 (commit (string-append "v" version))))
2288 (file-name (git-file-name name version))
2289 (sha256
2290 (base32 "19h32dn0076p3s7dn35qi5yp2xvnxw9sqphppmn72vyb8caxvw1z"))))
2291 (build-system gnu-build-system)
2292 (native-inputs
2293 `(;; Test dependencies.
2294 ("lcov" ,lcov)
2295 ("perl" ,perl)
2296 ("perl-conf-libconfig" ,perl-conf-libconfig)
2297 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
2298 ("perl-socket6" ,perl-socket6)
2299 ("psmisc" ,psmisc))) ; for ‘killall’
2300 (inputs
2301 `(("libcap" ,libcap)
2302 ("libconfig" ,libconfig)
2303 ("pcre" ,pcre)
2304 ("tcp-wrappers" ,tcp-wrappers)))
2305 (arguments
2306 `(#:phases
2307 (modify-phases %standard-phases
2308 (delete 'configure) ; no configure script
2309 (add-before 'check 'fix-tests
2310 (lambda _
2311 (substitute* "./t"
2312 (("\"/tmp") "$ENV{\"TMPDIR\"} . \"")
2313 ;; The Guix build environment lacks ‘ip6-localhost’.
2314 (("ip6-localhost") "localhost"))
2315 #t))
2316 ;; Many of these files are mentioned in the man page. Install them.
2317 (add-after 'install 'install-documentation
2318 (lambda* (#:key outputs #:allow-other-keys)
2319 (let* ((out (assoc-ref outputs "out"))
2320 (doc (string-append out "/share/doc/sslh")))
2321 (install-file "README.md" doc)
2322 (for-each
2323 (lambda (file)
2324 (install-file file (string-append doc "/examples")))
2325 (append (find-files "." "\\.cfg")
2326 (find-files "scripts"))))
2327 #t)))
2328 #:make-flags (list ,(string-append "CC=" (cc-for-target))
2329 "USELIBCAP=1"
2330 "USELIBWRAP=1"
2331 (string-append "PREFIX=" (assoc-ref %outputs "out")))
2332 #:test-target "test"))
2333 (home-page "https://www.rutschle.net/tech/sslh/README.html")
2334 (synopsis "Applicative network protocol demultiplexer")
2335 (description
2336 "sslh is a network protocol demultiplexer. It acts like a switchboard,
2337 accepting connections from clients on one port and forwarding them to different
2338 servers based on the contents of the first received data packet. Detection of
2339 common protocols like HTTP(S), SSL, SSH, OpenVPN, tinc, and XMPP is already
2340 implemented, but any other protocol that matches a regular expression can be
2341 added. sslh's name comes from its original application of serving both SSH and
2342 HTTPS on port 443, allowing SSH connections from inside corporate firewalls
2343 that block port 22.")
2344 (license (list license:bsd-2 ; tls.[ch]
2345 license:gpl2+)))) ; everything else
2346
2347 (define-public iperf
2348 (package
2349 (name "iperf")
2350 (version "3.10")
2351 (source
2352 (origin
2353 (method git-fetch)
2354 (uri (git-reference
2355 (url "https://github.com/esnet/iperf")
2356 (commit version)))
2357 (file-name (git-file-name name version))
2358 (sha256
2359 (base32 "102wcyl4j7c7lj7z87b5xlhj1ark88v4f3q9pmmljw8ksn2w1m2g"))))
2360 (build-system gnu-build-system)
2361 (synopsis "TCP, UDP and SCTP bandwidth measurement tool")
2362 (description
2363 "iPerf is a tool to measure achievable bandwidth on IP networks. It
2364 supports tuning of various parameters related to timing, buffers and
2365 protocols (TCP, UDP, SCTP with IPv4 and IPv6). For each test it reports
2366 the bandwidth, loss, and other parameters.")
2367 (home-page "https://software.es.net/iperf/")
2368 (license (list license:bsd-3 ; Main distribution.
2369 license:ncsa ; src/{units,iperf_locale,tcp_window_size}.c
2370 license:expat ; src/{cjson,net}.[ch]
2371 license:public-domain)))) ; src/portable_endian.h
2372
2373 (define-public nethogs
2374 (package
2375 (name "nethogs")
2376 (version "0.8.6")
2377 (source
2378 (origin
2379 (method git-fetch)
2380 (uri (git-reference
2381 (url "https://github.com/raboof/nethogs")
2382 (commit (string-append "v" version))))
2383 (hash
2384 (content-hash
2385 (base32 "0sn1sdp86akwlm4r1vmkxjjl50c0xaisk91bbz57z7kcsaphxna9")
2386 sha256))
2387 (file-name (git-file-name name version))))
2388 (build-system gnu-build-system)
2389 (inputs
2390 `(("libpcap" ,libpcap)
2391 ("ncurses" ,ncurses)))
2392 (arguments
2393 `(#:make-flags `(,,(string-append "CC=" (cc-for-target))
2394 ,(string-append "PREFIX=" %output)
2395 ,(string-append "VERSION=" ,version))
2396 #:phases
2397 (modify-phases %standard-phases
2398 (delete 'configure)))) ; no ./configure script.
2399 (home-page "https://github.com/raboof/nethogs")
2400 (synopsis "Per-process bandwidth monitor")
2401 (description "NetHogs is a small 'net top' tool for Linux. Instead of
2402 breaking the traffic down per protocol or per subnet, like most tools do, it
2403 groups bandwidth by process.
2404
2405 NetHogs does not rely on a special kernel module to be loaded. If there's
2406 suddenly a lot of network traffic, you can fire up NetHogs and immediately see
2407 which PID is causing this. This makes it easy to identify programs that have
2408 gone wild and are suddenly taking up your bandwidth.")
2409 (license license:gpl2+)))
2410
2411 (define-public nzbget
2412 (package
2413 (name "nzbget")
2414 (version "21.0")
2415 (source
2416 (origin
2417 (method url-fetch)
2418 (uri (string-append "https://github.com/nzbget/nzbget/releases"
2419 "/download/v" version
2420 "/nzbget-" version "-src.tar.gz"))
2421 (sha256
2422 (base32
2423 "0lwd0pfrs4a5ms193hgz2qiyf7grrc925dw6y0nfc0gkp27db9b5"))
2424 (modules '((guix build utils)))
2425 (snippet
2426 ;; Reported upstream as <https://github.com/nzbget/nzbget/pull/414>.
2427 '(begin
2428 (substitute* "daemon/connect/TlsSocket.cpp"
2429 (("gnutls_certificate-verification_status_print")
2430 "gnutls_certificate_verification_status_print"))
2431 #t))))
2432 (arguments
2433 `(#:configure-flags
2434 (list
2435 (string-append "--with-libcurses-includes="
2436 (assoc-ref %build-inputs "ncurses") "/include")
2437 (string-append "--with-libcurses-libraries="
2438 (assoc-ref %build-inputs "ncurses") "/lib")
2439 (string-append "--with-tlslib=GnuTLS"))))
2440 (build-system gnu-build-system)
2441 (inputs `(("gnutls" ,gnutls)
2442 ("libxml2" ,libxml2)
2443 ("ncurses" ,ncurses)
2444 ("zlib" ,zlib)))
2445 (native-inputs `(("pkg-config" ,pkg-config)))
2446 (home-page "https://github.com/nzbget/nzbget")
2447 (synopsis "Usenet binary file downloader")
2448 (description
2449 "NZBGet is a binary newsgrabber, which downloads files from Usenet based
2450 on information given in @code{nzb} files. NZBGet can be used in standalone
2451 and in server/client modes. In standalone mode, you pass NZBGet @command{nzb}
2452 files as command-line parameters and it downloads them and exits. NZBGet also
2453 contains a Web interface. Its server can be controlled through remote
2454 procedure calls (RPCs).")
2455 (license license:gpl2+)))
2456
2457 (define-public openvswitch
2458 (package
2459 (name "openvswitch")
2460 (version "2.13.3")
2461 (source (origin
2462 (method url-fetch)
2463 (uri (string-append
2464 "https://www.openvswitch.org/releases/openvswitch-"
2465 version ".tar.gz"))
2466 (sha256
2467 (base32
2468 "1wc5zspy9aln7di7m9a1qy4lv3h05gmhgd1nffhb9nxdcxqgnpgp"))))
2469 (build-system gnu-build-system)
2470 (arguments
2471 '(;; FIXME: many tests fail with:
2472 ;; […]
2473 ;; test -e $OVS_RUNDIR/ovs-vswitchd.pid
2474 ;; ovs-appctl -t ovs-vswitchd exit
2475 ;; hard failure
2476 #:tests? #f
2477 #:configure-flags
2478 '("--enable-shared"
2479 "--localstatedir=/var"
2480 "--with-dbdir=/var/lib/openvswitch")
2481 #:phases
2482 (modify-phases %standard-phases
2483 (replace 'install
2484 (lambda _
2485 (invoke "make"
2486 ;; Don't try to create directories under /var.
2487 "RUNDIR=/tmp"
2488 "PKIDIR=/tmp"
2489 "LOGDIR=/tmp"
2490 "DBDIR=/tmp"
2491 "install"))))))
2492 (native-inputs
2493 `(("perl" ,perl)
2494 ("pkg-config" ,pkg-config)
2495 ("python" ,python-wrapper)
2496 ;; for testing
2497 ("util-linux" ,util-linux)))
2498 (inputs
2499 `(("libcap-ng" ,libcap-ng)
2500 ("openssl" ,openssl)))
2501 (synopsis "Virtual network switch")
2502 (home-page "https://www.openvswitch.org/")
2503 (description
2504 "Open vSwitch is a multilayer virtual switch. It is designed to enable
2505 massive network automation through programmatic extension, while still
2506 supporting standard management interfaces and protocols (e.g. NetFlow, sFlow,
2507 IPFIX, RSPAN, CLI, LACP, 802.1ag).")
2508 (license ; see debian/copyright for detail
2509 (list license:lgpl2.1 ; xenserver and utilities/bugtool
2510 license:gpl2 ; datapath
2511 license:bsd-2 license:bsd-3
2512 license:asl2.0)))) ; all other
2513
2514 (define-public python-ipy
2515 (package
2516 (name "python-ipy")
2517 (version "1.00")
2518 (source (origin
2519 (method url-fetch)
2520 (uri (pypi-uri "IPy" version))
2521 (sha256
2522 (base32
2523 "08d6kcacj67mvh0b6y765ipccy6gi4w2ndd4v1l3im2qm1cgcarg"))))
2524 (build-system python-build-system)
2525 (home-page "https://github.com/autocracy/python-ipy/")
2526 (synopsis "Python class and tools for handling IP addresses and networks")
2527 (description "The @code{IP} class allows a comfortable parsing and
2528 handling for most notations in use for IPv4 and IPv6 addresses and
2529 networks.")
2530 (license license:bsd-3)))
2531
2532 (define-public python2-ipy
2533 (package-with-python2 python-ipy))
2534
2535 (define-public speedtest-cli
2536 (package
2537 (name "speedtest-cli")
2538 (version "2.1.3")
2539 (source
2540 (origin
2541 (method git-fetch)
2542 (uri (git-reference
2543 (url "https://github.com/sivel/speedtest-cli")
2544 (commit (string-append "v" version))))
2545 (file-name (git-file-name name version))
2546 (sha256
2547 (base32 "10fazl4kwf41mk7pnwpfms16n0ii0kg9pf8r3mz9xwnl9y04mv9x"))))
2548 (build-system python-build-system)
2549 (home-page "https://github.com/sivel/speedtest-cli")
2550 (synopsis "Internet bandwidth tester")
2551 (description
2552 "Command line interface for testing internet bandwidth using
2553 speedtest.net.")
2554 (license license:asl2.0)))
2555
2556 (define-public tftp-hpa
2557 (package
2558 (name "tftp-hpa")
2559 (version "5.2")
2560 (source (origin
2561 (method url-fetch)
2562 (uri (string-append "mirror://kernel.org/software/"
2563 "network/tftp/tftp-hpa/tftp-hpa-" version
2564 ".tar.xz"))
2565 (sha256
2566 (base32
2567 "12vidchglhyc20znq5wdsbhi9mqg90jnl7qr9qs8hbvaz4fkdvmg"))))
2568 (build-system gnu-build-system)
2569 (arguments `(#:tests? #f)) ; no test target
2570 (synopsis "HPA's tftp client")
2571 (description
2572 "This is a tftp client derived from OpenBSD tftp with some extra options
2573 added and bugs fixed. The source includes readline support but it is not
2574 enabled due to license conflicts between the BSD advertising clause and the GPL.")
2575 (home-page "https://git.kernel.org/cgit/network/tftp/tftp-hpa.git/about/")
2576 ;; Some source files are distributed under a 3-clause BSD license, and
2577 ;; others under a 4-clause BSD license. Refer to the files in the source
2578 ;; distribution for clarification.
2579 (license (list license:bsd-3 license:bsd-4))))
2580
2581 (define-public pidentd
2582 (package
2583 (name "pidentd")
2584 (version "3.0.19")
2585 (source
2586 (origin
2587 (method git-fetch)
2588 (uri (git-reference
2589 (url "https://github.com/ptrrkssn/pidentd")
2590 (commit (string-append "v" version))))
2591 (file-name (git-file-name name version))
2592 (sha256
2593 (base32
2594 "1k4rr0b4ygxssbnsykzjvz4hjhazzz4j5arlilyc1iq7b1wzsk7i"))))
2595 (build-system gnu-build-system)
2596 (arguments
2597 `(#:tests? #f)) ; No tests are included
2598 (inputs
2599 `(("openssl" ,openssl-1.0))) ;for the DES library
2600 (home-page "https://www.lysator.liu.se/~pen/pidentd/")
2601 (synopsis "Small Ident Daemon")
2602 (description
2603 "@dfn{Pidentd} (Peter's Ident Daemon) is an identd, which implements a
2604 identification server. Pidentd looks up specific TCP/IP connections and
2605 returns the user name and other information about the connection.")
2606 (license license:public-domain)))
2607
2608 (define-public spiped
2609 (package
2610 (name "spiped")
2611 (version "1.6.1")
2612 (source (origin
2613 (method url-fetch)
2614 (uri (string-append "https://www.tarsnap.com/spiped/spiped-"
2615 version ".tgz"))
2616 (sha256
2617 (base32
2618 "04rpnc53whfky7pp2m9h35gwzwn6788pnl6c1qd576mpknbqjw4d"))))
2619 (build-system gnu-build-system)
2620 (arguments
2621 `(#:test-target "test"
2622 #:make-flags (let* ((out (assoc-ref %outputs "out"))
2623 (bindir (string-append out "/bin"))
2624 (man1dir (string-append out "/share/man/man1")))
2625 (list ,(string-append "CC=" (cc-for-target)) ; It tries to invoke `c99`.
2626 (string-append "BINDIR=" bindir)
2627 (string-append "MAN1DIR=" man1dir)))
2628 #:phases
2629 (modify-phases %standard-phases
2630 (add-after 'unpack 'patch-command-invocations
2631 (lambda _
2632 (substitute* '("Makefile"
2633 "libcperciva/cpusupport/Build/cpusupport.sh"
2634 "libcperciva/POSIX/posix-cflags.sh"
2635 "libcperciva/POSIX/posix-l.sh")
2636 (("command -p") ""))
2637 #t))
2638 (delete 'configure) ; No ./configure script.
2639 (add-after 'install 'install-more-docs
2640 (lambda* (#:key outputs #:allow-other-keys)
2641 (let* ((out (assoc-ref %outputs "out"))
2642 (misc (string-append out "/share/doc/spiped")))
2643 (install-file "DESIGN.md" misc)
2644 #t))))))
2645 (native-inputs
2646 `(("procps" ,procps))) ; `ps` is used by the test suite.
2647 (inputs
2648 `(("openssl" ,openssl)))
2649 (home-page "https://www.tarsnap.com/spiped.html")
2650 (synopsis "Create secure pipes between sockets")
2651 (description "Spiped (pronounced \"ess-pipe-dee\") is a utility for creating
2652 symmetrically encrypted and authenticated pipes between socket addresses, so
2653 that one may connect to one address (e.g., a UNIX socket on localhost) and
2654 transparently have a connection established to another address (e.g., a UNIX
2655 socket on a different system). This is similar to 'ssh -L' functionality, but
2656 does not use SSH and requires a pre-shared symmetric key.")
2657 (license license:bsd-2)))
2658
2659 (define-public quagga
2660 (package
2661 (name "quagga")
2662 (version "1.2.4")
2663 (source (origin
2664 (method url-fetch)
2665 ;; Use archived sources; see <http://issues.guix.gnu.org/47123>.
2666 (uri (string-append "https://fossies.org/linux/misc/"
2667 "quagga-" version ".tar.gz"))
2668 (sha256
2669 (base32
2670 "1lsksqxij5f1llqn86pkygrf5672kvrqn1kvxghi169hqf1c0r73"))
2671 (patches
2672 (search-patches "quagga-reproducible-build.patch"))))
2673 (build-system gnu-build-system)
2674 (native-inputs `(("pkg-config" ,pkg-config)
2675 ("perl" ,perl)
2676 ("dejagnu" ,dejagnu)))
2677 (inputs `(("readline" ,readline)
2678 ("c-ares" ,c-ares)))
2679 (synopsis "Routing Software Suite")
2680 (description "Quagga is a routing software suite, providing implementations
2681 of OSPFv2, OSPFv3, RIP v1 and v2, RIPng and BGP-4 for Unix platforms.
2682
2683 The Quagga architecture consists of a core daemon, @command{zebra}, which
2684 acts as an abstraction layer to the underlying Unix kernel and presents the
2685 Zserv API over a Unix or TCP stream to Quagga clients. It is these Zserv
2686 clients which typically implement a routing protocol and communicate routing
2687 updates to the zebra daemon.")
2688 (home-page "https://www.nongnu.org/quagga/")
2689 (license license:gpl2+)))
2690
2691 (define-public thc-ipv6
2692 (let ((revision "0")
2693 (commit "4bb72573e0950ce6f8ca2800a10748477020029e"))
2694 (package
2695 (name "thc-ipv6")
2696 (version (git-version "3.4" revision commit))
2697 (source (origin
2698 (method git-fetch)
2699 (uri (git-reference
2700 (url "https://github.com/vanhauser-thc/thc-ipv6")
2701 (commit commit)))
2702 (file-name (git-file-name name version))
2703 (sha256
2704 (base32
2705 "1x5i6vbsddqc2yks7r1a2fw2fk16qxvd6hpzh1lykjfpkal8fdir"))))
2706 (build-system gnu-build-system)
2707 (arguments
2708 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2709 #:tests? #f ; No test suite.
2710 #:phases
2711 (modify-phases %standard-phases
2712 (delete 'configure) ; No ./configure script.
2713 (add-before 'build 'patch-paths
2714 (lambda _
2715 (substitute* "Makefile"
2716 (("/bin/echo") "echo"))
2717 #t))
2718 (add-after 'install 'install-more-docs
2719 (lambda* (#:key outputs #:allow-other-keys)
2720 (let* ((out (assoc-ref outputs "out"))
2721 (doc (string-append out "/share/thc-ipv6/doc")))
2722 (install-file "README" doc)
2723 (install-file "HOWTO-INJECT" doc)
2724 #t))))))
2725 ;; TODO Add libnetfilter-queue once packaged.
2726 (inputs
2727 `(("libpcap" ,libpcap)
2728 ("openssl" ,openssl)
2729 ("perl" ,perl)))
2730 (home-page "https://github.com/vanhauser-thc/thc-ipv6")
2731 (synopsis "IPv6 security research toolkit")
2732 (description "The THC IPv6 Toolkit provides command-line tools and a library
2733 for researching IPv6 implementations and deployments. It requires Linux 2.6 or
2734 newer and only works on Ethernet network interfaces.")
2735 ;; AGPL 3 with exception for linking with OpenSSL. See the 'LICENSE' file in
2736 ;; the source distribution for more information.
2737 (license license:agpl3))))
2738
2739 (define-public bmon
2740 (package
2741 (name "bmon")
2742 (version "4.0")
2743 (source
2744 (origin
2745 (method url-fetch)
2746 (uri (string-append "https://github.com/tgraf/bmon/releases/download/v"
2747 version "/bmon-" version ".tar.gz"))
2748 (sha256
2749 (base32
2750 "0ylzriv4pwh76344abzl1w219x188gshbycbna35gsyfp09c7z82"))))
2751 (build-system gnu-build-system)
2752 (inputs
2753 `(("libconfuse" ,libconfuse)
2754 ("libnl" ,libnl)
2755 ("ncurses" ,ncurses)))
2756 (native-inputs
2757 `(("pkg-config" ,pkg-config)))
2758 (synopsis "Bandwidth monitor")
2759 (description "bmon is a monitoring and debugging tool to capture
2760 networking-related statistics and prepare them visually in a human-friendly
2761 way. It features various output methods including an interactive curses user
2762 interface and a programmable text output for scripting.")
2763 (home-page "https://github.com/tgraf/bmon")
2764 ;; README.md mentions both the 2-clause BSD and expat licenses, but all
2765 ;; the source files only have expat license headers. Upstream has been
2766 ;; contacted for clarification: https://github.com/tgraf/bmon/issues/59
2767 ;; Update the license field when upstream responds.
2768 (license (list license:bsd-2
2769 license:expat))))
2770
2771 (define-public libnet
2772 (package
2773 (name "libnet")
2774 (version "1.2")
2775 (source
2776 (origin
2777 (method url-fetch)
2778 (uri (string-append "https://github.com/libnet/libnet/releases/download"
2779 "/v" version "/libnet-" version ".tar.gz"))
2780 (sha256
2781 (base32
2782 "19ys9vxk6fg70yzzdxsphfr0rwzgxxhr9b3ykhpg7rfray0qd96a"))))
2783 (build-system gnu-build-system)
2784 (arguments
2785 `(#:phases
2786 (modify-phases %standard-phases
2787 (add-before 'build 'build-doc
2788 (lambda* (#:key make-flags #:allow-other-keys)
2789 (apply invoke "make" "-C" "doc" "doc"
2790 make-flags))))))
2791 (native-inputs
2792 `(;; To build the documentation, Doxygen and Perl is required.
2793 ("doxygen" ,doxygen)
2794 ("perl" ,perl)))
2795 (home-page "https://github.com/libnet/libnet")
2796 (synopsis "Framework for low-level network packet construction")
2797 (description
2798 "Libnet provides a fairly portable framework for network packet
2799 construction and injection. It features portable packet creation interfaces
2800 at the IP layer and link layer, as well as a host of supplementary
2801 functionality. Using libnet, quick and simple packet assembly applications
2802 can be whipped up with little effort.")
2803 (license license:bsd-2)))
2804
2805 (define-public mtr
2806 (package
2807 (name "mtr")
2808 (version "0.94")
2809 (source
2810 (origin
2811 (method url-fetch)
2812 (uri (string-append "ftp://ftp.bitwizard.nl/mtr/"
2813 "mtr-" version ".tar.gz"))
2814 (sha256
2815 (base32 "1glxvlqskcmjkxlqk9i12hcfaxb389cx2n8ji7776gmix3aq4z1z"))))
2816 (build-system gnu-build-system)
2817 (inputs
2818 `(("libcap" ,libcap)
2819 ("ncurses" ,ncurses)))
2820 (arguments
2821 `(#:tests? #f)) ; tests require network access
2822 (home-page "https://www.bitwizard.nl/mtr/")
2823 (synopsis "Network diagnostic tool")
2824 (description
2825 "@acronym{mtr, My TraceRoute} combines the functionality of the
2826 @command{traceroute} and @command{ping} programs in a single network diagnostic
2827 tool. @command{mtr} can use several network protocols to detect intermediate
2828 routers (or @dfn{hops}) between the local host and a user-specified destination.
2829 It then continually measures the response time and packet loss at each hop, and
2830 displays the results in real time.")
2831 (license license:gpl2+)))
2832
2833 (define-public strongswan
2834 (package
2835 (name "strongswan")
2836 (version "5.8.4")
2837 (source
2838 (origin
2839 (method url-fetch)
2840 (uri (string-append "https://download.strongswan.org/strongswan-"
2841 version ".tar.bz2"))
2842 (sha256
2843 (base32 "0g2m08gmgdi3qvvqz6zy7n16np53sp232xd0rdc2vdhk73img6id"))))
2844 (build-system gnu-build-system)
2845 (arguments
2846 `(#:phases
2847 (modify-phases %standard-phases
2848 (add-before 'build 'patch-command-file-names
2849 (lambda* (#:key inputs #:allow-other-keys)
2850 (substitute* "src/libstrongswan/utils/process.c"
2851 (("/bin/sh")
2852 (string-append (assoc-ref inputs "bash") "/bin/sh")))
2853
2854 (substitute* "src/libstrongswan/tests/suites/test_process.c"
2855 (("/bin/sh") (which "sh"))
2856 (("/bin/echo") (which "echo"))
2857 (("cat") (which "cat")))
2858 #t))
2859 (add-before 'check 'set-up-test-environment
2860 (lambda* (#:key inputs #:allow-other-keys)
2861 (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata")
2862 "/share/zoneinfo"))
2863 #t)))
2864 #:configure-flags
2865 (list
2866 ;; Disable bsd-4 licensed plugins.
2867 "--disable-des"
2868 "--disable-blowfish")))
2869 (inputs
2870 `(("curl" ,curl)
2871 ("gmp" ,gmp)
2872 ("libgcrypt" ,libgcrypt)
2873 ("openssl" ,openssl)))
2874 (native-inputs
2875 `(("coreutils" ,coreutils)
2876 ("tzdata" ,tzdata-for-tests)))
2877 (synopsis "IKEv1/v2 keying daemon")
2878 (description "StrongSwan is an IPsec implementation originally based upon
2879 the FreeS/WAN project. It contains support for IKEv1, IKEv2, MOBIKE, IPv6,
2880 NAT-T and more.")
2881 (home-page "https://strongswan.org/")
2882 (license
2883 (list license:gpl2+
2884 ;; src/aikgen/*
2885 ;; src/libcharon/plugins/dnscert/*
2886 ;; src/libcharon/plugins/ext_auth/*
2887 ;; src/libcharon/plugins/vici/ruby/*
2888 ;; src/libcharon/plugins/xauth_pam/xauth_pam_listener.[ch]
2889 license:expat
2890 ;; src/inclue/sys/*
2891 license:bsd-3
2892 ;; src/libstrongswan/plugins/sha3/sha3_keccak.c
2893 license:public-domain
2894 ;; src/libstrongswan/plugins/pkcs11/pkcs11.h
2895 (license:non-copyleft
2896 "file://src/libstrongswan/plugins/pkcs11/pkcs11.h"
2897 "pkcs11 contains a unknown permissive license. View the specific
2898 file for more details.")
2899 ;; These files are not included in the
2900 ;; build, they are disabled through
2901 ;; options to ./configure
2902 ;;
2903 ;; src/libstrongswan/plugins/blowfish/bf_enc.c
2904 ;; src/libstrongswan/plugins/blowfish/bf_locl.h
2905 ;; src/libstrongswan/plugins/blowfish/bf_pi.h
2906 ;; src/libstrongswan/plugins/blowfish/bf_skey.c
2907 ;; src/libstrongswan/plugins/blowfish/blowfish_crypter.c
2908 ;; src/libstrongswan/plugins/des/des_crypter.c
2909 license:bsd-4))))
2910
2911 (define-public amule
2912 (package
2913 (name "amule")
2914 (version "2.3.2")
2915 (source (origin
2916 (method git-fetch)
2917 (uri (git-reference
2918 (url "https://github.com/amule-project/amule")
2919 (commit version)))
2920 (file-name (git-file-name name version))
2921 (sha256
2922 (base32
2923 "010wxm6g9f92x6fympj501zbnjka32rzbx0sk3a2y4zpih5d2nsn"))
2924 ;; Patch for adopting crypto++ >= 6.0.
2925 (patches (search-patches "amule-crypto-6.patch"))))
2926 (build-system gnu-build-system)
2927 (arguments
2928 `(#:phases
2929 (modify-phases %standard-phases
2930 (delete 'bootstrap) ; bootstrap phase runs too early.
2931 (add-after 'patch-source-shebangs 'autogen
2932 (lambda _
2933 (invoke "sh" "autogen.sh")
2934 #t)))
2935 #:configure-flags
2936 '("--disable-rpath"
2937 "--enable-wxcas"
2938 "--enable-cas"
2939 "--enable-alc"
2940 "--enable-alcc"
2941 "--enable-xas"
2942 "--enable-amulecmd"
2943 "--enable-geoip"
2944 "--enable-ccache"
2945 "--enable-nls"
2946 "--enable-optimize"
2947 "--enable-amule-gui"
2948 "--enable-amule-daemon"
2949 "--enable-webserver"
2950 "--with-denoise-level=0")))
2951 (native-inputs
2952 `(("autoconf" ,autoconf)
2953 ("automake" ,automake)
2954 ("gettext-minimal" ,gettext-minimal)
2955 ("perl" ,perl)))
2956 (inputs
2957 `(("zlib" ,zlib)
2958 ("crypto++" ,crypto++)
2959 ("libpng" ,libpng)
2960 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
2961 (home-page "http://amule.org/")
2962 (synopsis "Peer-to-peer client for the eD2K and Kademlia networks")
2963 (description
2964 "aMule is an eMule-like client for the eD2k and Kademlia peer-to-peer
2965 file sharing networks. It includes a graphical user interface (GUI), a daemon
2966 allowing you to run a client with no graphical interface, and a Web GUI for
2967 remote access. The @command{amulecmd} command allows you to control aMule
2968 remotely.")
2969 (license license:gpl2+)))
2970
2971 (define-public zyre
2972 (package
2973 (name "zyre")
2974 (version "2.0.1")
2975 (source (origin
2976 (method url-fetch)
2977 (uri
2978 (string-append "https://github.com/zeromq/zyre/releases/download/v"
2979 version "/" name "-" version ".tar.gz"))
2980 (sha256
2981 (base32
2982 "13596507ma1474cjqzxym5jlvcshvw7sjhw80rdz788gyz6kz90b"))))
2983 (build-system gnu-build-system)
2984 (inputs `(("zeromq" ,zeromq)
2985 ("czmq" ,czmq)
2986 ("libsodium" ,libsodium)))
2987 (synopsis "Framework for proximity-based peer-to-peer applications")
2988 (description "Zyre provides reliable group messaging over local area
2989 networks using zeromq. It has these key characteristics:
2990
2991 @itemize
2992 @item Zyre needs no administration or configuration.
2993 @item Peers may join and leave the network at any time.
2994 @item Peers talk to each other without any central brokers or servers.
2995 @item Peers can talk directly to each other.
2996 @item Peers can join groups, and then talk to groups.
2997 @item Zyre is reliable, and loses no messages even when the network is heavily loaded.
2998 @item Zyre is fast and has low latency, requiring no consensus protocols.
2999 @item Zyre is designed for WiFi networks, yet also works well on Ethernet networks.
3000 @end itemize")
3001 (home-page "https://github.com/zeromq/zyre")
3002 (license license:mpl2.0)))
3003
3004 (define-public libsocketcan
3005 (package
3006 (name "libsocketcan")
3007 (version "0.0.11")
3008 (source (origin
3009 (method git-fetch)
3010 (uri (git-reference
3011 (url "https://git.pengutronix.de/cgit/tools/libsocketcan")
3012 (commit (string-append "v" version))))
3013 (file-name (git-file-name name version))
3014 (sha256
3015 (base32
3016 "17z2y2r9xkixhr9bxr50m77fh710afl30s7jdhbxrvf56vmal2jr"))))
3017 (build-system gnu-build-system)
3018 (native-inputs
3019 `(("autoconf" ,autoconf)
3020 ("automake" ,automake)
3021 ("libtool" ,libtool)))
3022 (home-page "https://git.pengutronix.de/cgit/tools/libsocketcan")
3023 (synopsis "SocketCAN user-space library")
3024 (description "This library allows controlling basic functions in SocketCAN
3025 from user-space. It requires a kernel built with SocketCAN support.")
3026 (license license:lgpl2.1+)))
3027
3028 (define-public can-utils
3029 (package
3030 (name "can-utils")
3031 (version "2020.02.04")
3032 (source (origin
3033 (method git-fetch)
3034 (uri (git-reference
3035 (url "https://github.com/linux-can/can-utils")
3036 (commit (string-append "v" version))))
3037 (file-name (git-file-name name version))
3038 (sha256
3039 (base32
3040 "1a3j1mmnb7pvgc8r7zzp6sdp7903in2hna6bmpraxln7cwlzn4l6"))))
3041 (build-system gnu-build-system)
3042 (arguments
3043 `(#:tests? #f ; No tests exist.
3044 #:make-flags (list ,(string-append "CC=" (cc-for-target))
3045 (string-append "PREFIX="
3046 (assoc-ref %outputs "out")))
3047 #:phases
3048 (modify-phases %standard-phases
3049 (delete 'bootstrap)
3050 (delete 'configure))))
3051 (home-page "https://github.com/linux-can/can-utils")
3052 (synopsis "CAN utilities")
3053 (description "This package provides CAN utilities in the following areas:
3054
3055 @itemize
3056 @item Basic tools to display, record, generate and replay CAN traffic
3057 @item CAN access via IP sockets
3058 @item CAN in-kernel gateway configuration
3059 @item CAN bus measurement and testing
3060 @item ISO-TP (ISO15765-2:2016 - this means messages with a body larger than
3061 eight bytes) tools
3062 @item Log file converters
3063 @item Serial Line Discipline configuration for slcan driver
3064 @end itemize")
3065 ;; Either BSD-3 or GPL-2 can be used.
3066 (license (list license:bsd-3 license:gpl2))))
3067
3068 ;;; This is an old version required by rested.
3069 (define-public asio-1.12
3070 (package
3071 (name "asio")
3072 (version "1.12.2")
3073 (source
3074 (origin
3075 (method url-fetch)
3076 (uri (string-append "mirror://sourceforge/asio/asio/"
3077 version " (Stable)/asio-" version ".tar.bz2"))
3078 (sha256
3079 (base32 "1akray4l3hgahmb92sbvsqg128c7g7s92jrkf1sp1fjnfjrxq9sf"))))
3080 (build-system gnu-build-system)
3081 (inputs
3082 `(("boost" ,boost)
3083 ("openssl" ,openssl)))
3084 (arguments
3085 `(#:configure-flags
3086 (list
3087 (string-append "--with-boost=" (assoc-ref %build-inputs "boost"))
3088 (string-append "--with-openssl=" (assoc-ref %build-inputs "openssl")))))
3089 (home-page "https://think-async.com/Asio")
3090 (synopsis "C++ library for ASynchronous network I/O")
3091 (description "Asio is a cross-platform C++ library for network and
3092 low-level I/O programming that provides developers with a consistent
3093 asynchronous model using a modern C++ approach.")
3094 (license license:boost1.0)))
3095
3096 (define-public asio
3097 (package
3098 (inherit asio-1.12)
3099 (version "1.18.1")
3100 (source
3101 (origin
3102 (method url-fetch)
3103 (uri (string-append "mirror://sourceforge/asio/asio/"
3104 version " (Stable)/asio-" version ".tar.bz2"))
3105 (sha256
3106 (base32 "04wi69d72l1p5c7d63z1dz06zn8pdqsbgx1if98dszs9ymfqgyaa"))))))
3107
3108 (define-public shadowsocks
3109 ;; There are some security fixes after the last release.
3110 (let* ((commit "e332ec93e9c90f1cbee676b022bf2c5d5b7b1239")
3111 (revision "0")
3112 (version (git-version "2.8.2" revision commit)))
3113 (package
3114 (name "shadowsocks")
3115 (version version)
3116 (home-page "https://github.com/shadowsocks/shadowsocks")
3117 (source (origin
3118 (method git-fetch)
3119 (uri (git-reference
3120 (url home-page)
3121 (commit commit)))
3122 (sha256
3123 (base32
3124 "1idd9b4f2pnhcpk1bh030hqg5zq25gkwxd53xi3c0cj242w7sp2j"))
3125 (file-name (git-file-name name version))))
3126 (inputs
3127 `(("openssl" ,openssl)))
3128 (arguments
3129 '(#:phases
3130 (modify-phases %standard-phases
3131 (add-after 'unpack 'patch-crypto-paths
3132 (lambda* (#:key inputs #:allow-other-keys)
3133 (substitute* "shadowsocks/shell.py"
3134 (("config\\.get\\('libopenssl', None\\)")
3135 (format #f "config.get('libopenssl', ~s)"
3136 (string-append
3137 (assoc-ref inputs "openssl")
3138 "/lib/libssl.so")))))))))
3139 (build-system python-build-system)
3140 (synopsis "Fast tunnel proxy that helps you bypass firewalls")
3141 (description
3142 "This package is a fast tunnel proxy that helps you bypass firewalls.
3143
3144 Features:
3145 @itemize
3146 @item TCP & UDP support
3147 @item User management API
3148 @item TCP Fast Open
3149 @item Workers and graceful restart
3150 @item Destination IP blacklist
3151 @end itemize")
3152 (license license:asl2.0))))
3153
3154 (define-public net-snmp
3155 (package
3156 (name "net-snmp")
3157 (version "5.9")
3158 (source (origin
3159 (method url-fetch)
3160 (uri (string-append "mirror://sourceforge/net-snmp/net-snmp/"
3161 version "/net-snmp-" version ".tar.gz"))
3162 (sha256
3163 (base32
3164 "0wb0vyafpspw3mcifkjjmf17r1r80kjvslycscb8nvaxz1k3lc04"))
3165 (modules '((guix build utils)))
3166 (snippet
3167 '(begin
3168 ;; Drop bundled libraries.
3169 (delete-file-recursively "snmplib/openssl")
3170 #t))))
3171 (build-system gnu-build-system)
3172 (arguments
3173 `(#:test-target "test"
3174 ;; XXX: With parallel build enabled, Perl modules may not get linked with
3175 ;; libnetsnmp. See e.g. <https://bugzilla.novell.com/show_bug.cgi?id=819497>.
3176 #:parallel-build? #f
3177 #:configure-flags
3178 (list (string-append "LDFLAGS=-Wl,-rpath="
3179 (assoc-ref %outputs "out")
3180 "/lib")
3181 "--with-logfile=/var/log/snmpd.log"
3182 (string-append "--with-openssl="
3183 (assoc-ref %build-inputs "openssl")))
3184 #:phases
3185 (modify-phases %standard-phases
3186 (add-after 'unpack 'patch-tests
3187 (lambda* (#:key inputs #:allow-other-keys)
3188 (substitute* "testing/fulltests/support/simple_TESTCONF.sh"
3189 (("NETSTAT=\"\"")
3190 (string-append "NETSTAT=\"" (which "netstat") "\"")))
3191 (substitute* '("testing/fulltests/default/T065agentextend_simple"
3192 "testing/fulltests/default/T115agentxperl_simple")
3193 (("/usr/bin/env") (which "env")))
3194 (substitute* "testing/fulltests/default/T065agentextend_sh_simple"
3195 (("/bin/sh") (which "sh")))
3196 ;; These tests require network access.
3197 (for-each delete-file
3198 '("testing/fulltests/default/T070com2sec_simple"
3199 "testing/fulltests/default/T071com2sec6_simple"))
3200 #t))
3201 (add-after 'unpack 'patch-Makefile.PL
3202 (lambda* (#:key outputs #:allow-other-keys)
3203 (substitute* "Makefile.in"
3204 (("Makefile.PL -NET")
3205 (string-append "Makefile.PL PREFIX="
3206 (assoc-ref outputs "out")
3207 " INSTALLDIRS=site" " NO_PERLLOCAL=1"
3208 " -NET")))
3209 #t)))))
3210 (inputs
3211 `(("libnl" ,libnl)
3212 ("ncurses" ,ncurses) ; for the ‘apps’
3213 ("openssl" ,openssl)
3214 ("perl" ,perl)))
3215 (native-inputs
3216 `(("pkg-config" ,pkg-config)
3217
3218 ;; For tests only.
3219 ("net-tools" ,net-tools)
3220 ("coreutils" ,coreutils)
3221 ("grep" ,grep)))
3222 (home-page "http://www.net-snmp.org/")
3223 (synopsis "Simple Network Management Protocol library and tools")
3224 (description "The @dfn{Simple Network Management Protocol} (SNMP) is a
3225 widely used protocol for monitoring the health and welfare of network
3226 equipment (e.g. routers), computer equipment and even devices like UPSs.
3227 Net-SNMP is a suite of applications used to implement SNMP v1, SNMP v2c and
3228 SNMP v3 using both IPv4 and IPv6.")
3229 ;; This only affects OpenBSD
3230 ;; https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-8100
3231 (properties `((lint-hidden-cve . ("CVE-2015-8100"))))
3232 (license (list license:bsd-3
3233 (license:non-copyleft
3234 "http://www.net-snmp.org/about/license.html"
3235 "CMU/UCD copyright notice")))))
3236
3237 (define-public ubridge
3238 (package
3239 (name "ubridge")
3240 (version "0.9.18")
3241 (source
3242 (origin
3243 (method git-fetch)
3244 (uri (git-reference
3245 (url "https://github.com/GNS3/ubridge")
3246 (commit (string-append "v" version))))
3247 (file-name (git-file-name name version))
3248 (sha256
3249 (base32 "0jg66jhhpv4c9340fsdp64hf9h253i8r81fknxa0gq241ripp3jn"))))
3250 (build-system gnu-build-system)
3251 (arguments
3252 `(#:tests? #f ; no tests
3253 #:make-flags
3254 (list ,(string-append "CC=" (cc-for-target)))
3255 #:phases
3256 (modify-phases %standard-phases
3257 (delete 'configure) ; no configure script
3258 (add-before 'install 'set-bindir
3259 (lambda* (#:key inputs outputs #:allow-other-keys)
3260 (let ((bin (string-append (assoc-ref outputs "out")
3261 "/bin")))
3262 (mkdir-p bin)
3263 (substitute* "Makefile"
3264 (("\\$\\(BINDIR\\)") bin)
3265 (("\tsetcap cap_net.*$") "")))
3266 #t)))))
3267 (inputs
3268 `(("libpcap" ,libpcap)))
3269 (home-page "https://github.com/GNS3/ubridge/")
3270 (synopsis "Bridge for UDP tunnels, Ethernet, TAP and VMnet interfaces")
3271 (description "uBridge is a simple program to create user-land bridges
3272 between various technologies. Currently, bridging between UDP tunnels,
3273 Ethernet and TAP interfaces is supported. Packet capture is also supported.")
3274 (license license:gpl3+)))
3275
3276 (define-public hcxtools
3277 (package
3278 (name "hcxtools")
3279 (version "5.2.0")
3280 (source
3281 (origin
3282 (method git-fetch)
3283 (uri (git-reference
3284 (url "https://github.com/ZerBea/hcxtools")
3285 (commit version)))
3286 (sha256
3287 (base32 "0k2qlq9hz5zc21nyc6yrnfqzga7hydn5mm0x3rpl2fhkwl81lxcn"))
3288 (file-name (git-file-name name version))))
3289 (build-system gnu-build-system)
3290 (inputs
3291 `(("curl" ,curl)
3292 ("libpcap" ,libpcap)
3293 ("openssl" ,openssl)
3294 ("zlib" ,zlib)))
3295 (arguments
3296 `(#:make-flags
3297 (list ,(string-append "CC=" (cc-for-target))
3298 (string-append "INSTALLDIR=" (assoc-ref %outputs "out") "/bin"))
3299 #:tests? #f ; no test suite
3300 #:phases
3301 (modify-phases %standard-phases
3302 (delete 'configure))))
3303 (home-page "https://github.com/ZerBea/hcxtools")
3304 (synopsis "Capture wlan traffic to hashcat and John the Ripper")
3305 (description
3306 "This package contains a small set of tools to capture and convert
3307 packets from wireless devices for use with hashcat or John the Ripper.")
3308 (license license:expat)))
3309
3310 (define-public hcxdumptool
3311 (package
3312 (name "hcxdumptool")
3313 (version "6.0.6")
3314 (source
3315 (origin
3316 (method git-fetch)
3317 (uri (git-reference
3318 (url "https://github.com/ZerBea/hcxdumptool")
3319 (commit version)))
3320 (sha256
3321 (base32 "1b4d543y64ib92w9gcmiyjn5hz2vyjqmxk3f3yr1zk04fhw16gmf"))
3322 (file-name (git-file-name name version))))
3323 (build-system gnu-build-system)
3324 (arguments
3325 `(#:make-flags
3326 (list ,(string-append "CC=" (cc-for-target))
3327 (string-append "INSTALLDIR=" (assoc-ref %outputs "out") "/bin"))
3328 #:tests? #f ; no test suite
3329 #:phases
3330 (modify-phases %standard-phases
3331 (delete 'configure))))
3332 (inputs
3333 `(("openssl" ,openssl)))
3334 (home-page "https://github.com/ZerBea/hcxdumptool")
3335 (synopsis "Small tool to capture packets from wlan devices")
3336 (description
3337 "Small tool to capture packets from WLAN devices. After capturing,
3338 upload the \"uncleaned\" cap to @url{https://wpa-sec.stanev.org/?submit} to
3339 see if the access point or the client is vulnerable to a dictionary attack.
3340 Convert the cap file to hccapx format and/or to WPA-PMKID-PBKDF2
3341 hashline (16800) with @command{hcxpcaptool} from the @code{hcxtools} package
3342 and check if the WLAN key or the master key was transmitted unencrypted.")
3343 (license license:expat)))
3344
3345 (define-public dante
3346 (package
3347 (name "dante")
3348 (version "1.4.3")
3349 (source
3350 (origin
3351 (method url-fetch)
3352 (uri (string-append "https://www.inet.no/dante/files/dante-"
3353 version ".tar.gz"))
3354 (sha256
3355 (base32 "0pbahkj43rx7rmv2x40mf5p3g3x9d6i2sz7pzglarf54w5ghd2j1"))))
3356 (build-system gnu-build-system)
3357 (arguments
3358 ;; XXX: The dynamic socks library doesn't work with 'libc.so' (GNU ld
3359 ;; script). When preloading is enabled, 'sockd' failed with:
3360 ;; … Failed to open library "libc.so": …: invalid ELF header
3361 '(#:configure-flags '("--disable-preload")))
3362 (home-page "https://www.inet.no/dante/")
3363 (synopsis "SOCKS server and client")
3364 (description "Dante is a SOCKS client and server implementation. It can
3365 be installed on a machine with access to an external TCP/IP network and will
3366 allow all other machines, without direct access to that network, to be relayed
3367 through the machine the Dante server is running on. The external network will
3368 never see any machines other than the one Dante is running on.")
3369 (license (license:non-copyleft "file://LICENSE"))))
3370
3371 (define-public restbed
3372 (package
3373 (name "restbed")
3374 (version "4.7")
3375 (source
3376 (origin
3377 (method git-fetch)
3378 (uri (git-reference
3379 (url "https://github.com/Corvusoft/restbed/")
3380 (commit version)))
3381 (file-name (git-file-name name version))
3382 (sha256
3383 (base32 "055qicb773a599dsqbcz5xf0xj1wpk33mdrkyi0fsmyjmn8d2p9d"))))
3384 (build-system cmake-build-system)
3385 (inputs
3386 `(("asio" ,asio-1.12)
3387 ("catch" ,catch-framework)
3388 ("openssl" ,openssl)))
3389 (arguments
3390 `(#:tests? #f
3391 #:configure-flags
3392 '("-DBUILD_TESTS=NO"
3393 "-DBUILD_EXAMPLES=NO"
3394 "-DBUILD_SSL=NO"
3395 "-DBUILD_SHARED=NO")
3396 #:phases
3397 (modify-phases %standard-phases
3398 (add-after 'unpack 'apply-patches-and-fix-paths
3399 (lambda* (#:key inputs #:allow-other-keys)
3400 (let ((asio (assoc-ref inputs "asio"))
3401 (catch (assoc-ref inputs "catch"))
3402 (openssl (assoc-ref inputs "openssl")))
3403 (substitute* "cmake/Findasio.cmake"
3404 (("(find_path\\( asio_INCLUDE asio\\.hpp HINTS ).*$" all begin)
3405 (string-append begin " \"" asio "/include\" )")))
3406 (substitute* "cmake/Findcatch.cmake"
3407 (("(find_path\\( catch_INCLUDE catch\\.hpp HINTS ).*$" all begin)
3408 (string-append begin " \"" catch "/include\" )")))
3409 (substitute* "cmake/Findopenssl.cmake"
3410 (("(find_library\\( ssl_LIBRARY ssl ssleay32 HINTS ).*$" all begin)
3411 (string-append begin " \"" openssl "/lib\" )"))
3412 (("(find_library\\( crypto_LIBRARY crypto libeay32 HINTS ).*$" all begin)
3413 (string-append begin " \"" openssl "/lib\" )"))
3414 (("(find_path\\( ssl_INCLUDE openssl/ssl\\.h HINTS ).*$" all begin)
3415 (string-append begin " \"" openssl "/include\" )")))))))))
3416 (synopsis "Asynchronous RESTful functionality to C++11 applications")
3417 (description "Restbed is a comprehensive and consistent programming
3418 model for building applications that require seamless and secure
3419 communication over HTTP.")
3420 (home-page "https://github.com/Corvusoft/restbed")
3421 (license license:agpl3+)))
3422
3423 (define-public restinio
3424 (package
3425 (name "restinio")
3426 (version "0.6.13")
3427 (source (origin
3428 (method git-fetch)
3429 (uri (git-reference
3430 (url "https://github.com/Stiffstream/restinio")
3431 (commit (string-append "v." version))))
3432 (file-name (git-file-name name version))
3433 (sha256
3434 (base32
3435 "0gb0yc88hdzwm08zdiviay6s08q427za33kfbygib7bdzp2wr2dm"))))
3436 (build-system cmake-build-system)
3437 (inputs ; TODO: Need to force-keep references on some inputs, e.g. boost.
3438 `(("zlib" ,zlib)
3439 ("catch2" ,catch-framework2)
3440 ("openssl" ,openssl)
3441 ("boost" ,boost)
3442 ("pcre" ,pcre)
3443 ("pcre2" ,pcre2)
3444 ("sobjectizer" ,sobjectizer)))
3445 (propagated-inputs
3446 `(("asio" ,asio)
3447 ("fmt" ,fmt)
3448 ("http-parser" ,http-parser)))
3449 (arguments
3450 `(#:configure-flags '("-DRESTINIO_INSTALL=on")
3451 #:tests? #f ; TODO: The tests are called from the root CMakelist, need RESTINIO_TEST=on.
3452 #:phases
3453 (modify-phases %standard-phases
3454 (add-after 'unpack 'change-directory
3455 (lambda _
3456 (chdir "dev/restinio")
3457 #t)))))
3458 (home-page "https://stiffstream.com/en/products/restinio.html")
3459 (synopsis "C++14 library that gives you an embedded HTTP/Websocket server")
3460 (description "RESTinio is a header-only C++14 library that gives you an embedded
3461 HTTP/Websocket server. It is based on standalone version of ASIO
3462 and targeted primarily for asynchronous processing of HTTP-requests.")
3463 (license license:bsd-3)))
3464
3465 (define-public opendht
3466 (package
3467 (name "opendht")
3468 (version "2.2.0rc7") ;jami requires >= 2.2.0
3469 (source (origin
3470 (method git-fetch)
3471 (uri (git-reference
3472 (url "https://github.com/savoirfairelinux/opendht")
3473 (commit version)))
3474 (file-name (git-file-name name version))
3475 (sha256
3476 (base32
3477 "0wkynjzwzl5q46hy1yb9npi5hvknnj17rjkax5v3acqjmd0y48h9"))))
3478 ;; Since 2.0, the gnu-build-system does not seem to work anymore, upstream bug?
3479 (outputs '("out" "tools" "debug"))
3480 (build-system cmake-build-system)
3481 (inputs
3482 `(("argon2" ,argon2)
3483 ("nettle" ,nettle-3.7)
3484 ("readline" ,readline)
3485 ("jsoncpp" ,jsoncpp)
3486 ("openssl" ,openssl) ;required for the DHT proxy
3487 ("fmt" ,fmt)))
3488 (propagated-inputs
3489 `(("gnutls" ,gnutls) ;included in opendht/crypto.h
3490 ("msgpack" ,msgpack) ;included in several installed headers
3491 ("restinio" ,restinio))) ;included in opendht/http.h
3492 (native-inputs
3493 `(("autoconf" ,autoconf)
3494 ("automake" ,automake)
3495 ("pkg-config" ,pkg-config)
3496 ("python" ,python)
3497 ("python-cython" ,python-cython)
3498 ("libtool" ,libtool)
3499 ("cppunit" ,cppunit)))
3500 (arguments
3501 `(#:imported-modules ((guix build python-build-system) ;for site-packages
3502 ,@%cmake-build-system-modules)
3503 #:modules (((guix build python-build-system) #:prefix python:)
3504 (guix build cmake-build-system)
3505 (guix build utils))
3506 #:tests? #f ; Tests require network connection.
3507 #:configure-flags
3508 '( ;;"-DOPENDHT_TESTS=on"
3509 "-DOPENDHT_STATIC=off"
3510 "-DOPENDHT_TOOLS=on"
3511 "-DOPENDHT_PYTHON=on"
3512 "-DOPENDHT_PROXY_SERVER=on"
3513 "-DOPENDHT_PUSH_NOTIFICATIONS=on"
3514 "-DOPENDHT_PROXY_SERVER_IDENTITY=on"
3515 "-DOPENDHT_PROXY_CLIENT=on")
3516 #:phases
3517 (modify-phases %standard-phases
3518 (add-after 'unpack 'fix-python-installation-prefix
3519 ;; Specify the installation prefix for the compiled Python module
3520 ;; that would otherwise attempt to installs itself to Python's own
3521 ;; site-packages directory.
3522 (lambda* (#:key inputs outputs #:allow-other-keys)
3523 (substitute* "python/CMakeLists.txt"
3524 (("--root=\\\\\\$ENV\\{DESTDIR\\}")
3525 (string-append "--root=/ --single-version-externally-managed "
3526 "--prefix=${CMAKE_INSTALL_PREFIX}")))))
3527 (add-after 'unpack 'specify-runpath-for-python-module
3528 (lambda* (#:key outputs #:allow-other-keys)
3529 (let ((out (assoc-ref outputs "out")))
3530 (substitute* "python/setup.py.in"
3531 (("extra_link_args=\\[(.*)\\]" _ args)
3532 (string-append "extra_link_args=[" args
3533 ", '-Wl,-rpath=" out "/lib']"))))))
3534 (add-after 'install 'move-and-wrap-tools
3535 (lambda* (#:key inputs outputs #:allow-other-keys)
3536 (let ((out (assoc-ref outputs "out"))
3537 (tools (assoc-ref outputs "tools"))
3538 (site-packages (python:site-packages inputs outputs)))
3539 (mkdir tools)
3540 (rename-file (string-append out "/bin")
3541 (string-append tools "/bin"))
3542 (wrap-program (string-append tools "/bin/dhtcluster")
3543 `("PYTHONPATH" prefix (,site-packages)))))))))
3544 (home-page "https://github.com/savoirfairelinux/opendht/")
3545 (synopsis "Lightweight Distributed Hash Table (DHT) library")
3546 (description "OpenDHT provides an easy to use distributed in-memory data
3547 store. Every node in the network can read and write values to the store.
3548 Values are distributed over the network, with redundancy. It includes the
3549 following features:
3550 @itemize
3551 @item Lightweight and scalable, designed for large networks and small devices;
3552 @item High resilience to network disruption;
3553 @item Public key cryptography layer providing optional data signature and
3554 encryption (using GnuTLS);
3555 @item IPv4 and IPv6 support;
3556 @item Clean and powerful C++14 map API;
3557 @item Bindings for C, Rust & Python 3;
3558 @item REST API with an optional HTTP client and server with push notification
3559 support.
3560 @end itemize
3561 The following tools are also included:
3562 @table @command
3563 @item dhtnode
3564 A command line tool to run a DHT node and perform operations supported by the
3565 library (get, put, etc.) with text values.
3566 @item dhtchat
3567 A very simple IM client working over the DHT.
3568 @end table")
3569 (license license:gpl3+)))
3570
3571 (define-public frrouting
3572 (package
3573 (name "frrouting")
3574 (version "7.5.1")
3575 (source (origin
3576 (method url-fetch)
3577 (uri (string-append "https://github.com/FRRouting/frr/releases/"
3578 "download/frr-" version "/frr-" version
3579 ".tar.xz"))
3580 (sha256
3581 (base32
3582 "1r7gh5h27ii7d1d0z0x48wx7hs8vvympv3gqvy3cwzg05q5vk9xs"))))
3583 (build-system gnu-build-system)
3584 (inputs
3585 `(("c-ares" ,c-ares)
3586 ("json-c" ,json-c)
3587 ("libcap" ,libcap)
3588 ("libyang" ,libyang)
3589 ("readline" ,readline)))
3590 (native-inputs
3591 `(("perl" ,perl)
3592 ("pkg-config" ,pkg-config)
3593 ("python" ,python-wrapper)
3594 ("python-pytest" ,python-pytest)))
3595 (home-page "https://frrouting.org/")
3596 (synopsis "IP routing protocol suite")
3597 (description "FRRouting (FRR) is an IP routing protocol suite which includes
3598 protocol daemons for BGP, IS-IS, LDP, OSPF, PIM, and RIP. ")
3599 (license license:gpl2+)))
3600
3601 (define-public iwd
3602 (package
3603 (name "iwd")
3604 (version "1.14")
3605 (source (origin
3606 ;; FIXME: We're using the bootstrapped sources because
3607 ;; otherwise using an external ell library is impossible.
3608 ;; How to bootstrap with Guix?
3609 (method url-fetch)
3610 (uri (string-append "https://www.kernel.org/pub/linux/network"
3611 "/wireless/iwd-" version ".tar.xz"))
3612 (sha256
3613 (base32
3614 "02vz4lyd6vq3vcii357ljqprnas78zb8j670a0gblrm6kganmgi1"))))
3615 (build-system gnu-build-system)
3616 (inputs
3617 `(("dbus" ,dbus)
3618 ("ell" ,ell)
3619 ("readline" ,readline)))
3620 (native-inputs
3621 `(("pkgconfig" ,pkg-config)
3622 ("python" ,python)
3623 ("rst2man" ,python-docutils)
3624 ("openssl" ,openssl)))
3625 (arguments
3626 `(#:configure-flags
3627 (let ((dbus (assoc-ref %outputs "out")))
3628 (list "--disable-systemd-service"
3629 "--enable-external-ell"
3630 "--enable-hwsim"
3631 "--enable-tools"
3632 "--enable-wired"
3633 "--localstatedir=/var"
3634 (string-append "--with-dbus-datadir=" dbus "/share/")
3635 (string-append "--with-dbus-busdir="
3636 dbus "/share/dbus-1/system-services")))
3637 #:phases
3638 (modify-phases %standard-phases
3639 (add-after 'configure 'patch-Makefile
3640 (lambda _
3641 (substitute* "Makefile"
3642 ;; Don't try to 'mkdir /var'.
3643 (("\\$\\(MKDIR_P\\) -m 700") "true")))))))
3644 (home-page "https://git.kernel.org/pub/scm/network/wireless/iwd.git/")
3645 (synopsis "Internet Wireless Daemon")
3646 (description "iwd is a wireless daemon for Linux that aims to replace WPA
3647 Supplicant. It optimizes resource utilization by not depending on any external
3648 libraries and instead utilizing features provided by the Linux kernel to the
3649 maximum extent possible.")
3650 (license license:lgpl2.1+)))
3651
3652 (define-public libyang
3653 (package
3654 (name "libyang")
3655 (version "1.0.215")
3656 (source (origin
3657 (method git-fetch)
3658 (uri (git-reference
3659 (url "https://github.com/CESNET/libyang")
3660 (commit (string-append "v" version))))
3661 (file-name (git-file-name name version))
3662 (sha256
3663 (base32
3664 "0mrs2ppmq77z8sbqgm2w0rl9bfgybd6bcxanakfww4chih6cy0dw"))))
3665 (build-system cmake-build-system)
3666 (arguments
3667 `(#:configure-flags
3668 (list "-DENABLE_BUILD_TESTS=ON" "-DENABLE_LYD_PRIV=ON")))
3669 (propagated-inputs `(("pcre" ,pcre)))
3670 (native-inputs `(("cmocka" ,cmocka)
3671 ("pkg-config" ,pkg-config)))
3672 (home-page "https://github.com/CESNET/libyang")
3673 (synopsis "YANG data modelling language library")
3674 (description "libyang is a YANG data modelling language parser and toolkit
3675 written (and providing API) in C. Current implementation covers YANG 1.0 (RFC
3676 6020) as well as YANG 1.1 (RFC 7950).")
3677 (license license:bsd-3)))
3678
3679 (define-public batctl
3680 (package
3681 (name "batctl")
3682 (version "2020.4")
3683 (source
3684 (origin
3685 (method url-fetch)
3686 (uri (string-append "https://downloads.open-mesh.org/batman/releases/batman-adv-"
3687 version "/batctl-" version ".tar.gz"))
3688 (sha256
3689 (base32 "05rrpfbpdhxn5zgdps849qls2ifis6a94cjryb60d4y1nc2n0d7w"))))
3690 (inputs
3691 `(("libnl" ,libnl)))
3692 (native-inputs
3693 `(("pkg-config" ,pkg-config)))
3694 (build-system gnu-build-system)
3695 (arguments
3696 `(#:tests? #f
3697 ;; Batctl only has a makefile. Thus we disable tests and
3698 ;; configuration, passing in a few make-flags.
3699 #:phases (modify-phases %standard-phases (delete 'configure))
3700 #:make-flags
3701 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
3702 (string-append "PKG_CONFIG=" (assoc-ref %build-inputs "pkg-config")
3703 "/bin/pkg-config")
3704 ,(string-append "CC=" (cc-for-target)))))
3705 (home-page "https://www.open-mesh.org/projects/batman-adv/wiki/Wiki")
3706 (synopsis "Management tool for the mesh networking BATMAN protocol")
3707 (description "This package provides a control tool for the
3708 B.A.T.M.A.N. mesh networking routing protocol provided by the Linux kernel
3709 module @code{batman-adv}, for Layer 2.")
3710 (license license:gpl2+)))
3711
3712 (define-public pagekite
3713 (package
3714 (name "pagekite")
3715 (version "1.5.2.200725")
3716 (source
3717 (origin
3718 (method git-fetch)
3719 (uri (git-reference
3720 (url "https://github.com/pagekite/PyPagekite")
3721 (commit (string-append "v" version))))
3722 (file-name (git-file-name name version))
3723 (sha256
3724 (base32 "0lig1i42bn9isw848vnml5qhcaa04x1dr2hb075bm0a3439kv3rr"))))
3725 (build-system python-build-system)
3726 (arguments
3727 `(#:phases
3728 (modify-phases %standard-phases
3729 (add-after 'install 'install-man-page
3730 (lambda* (#:key inputs outputs #:allow-other-keys)
3731 (let* ((out (assoc-ref outputs "out"))
3732 (man (string-append out "/share/man")))
3733 (invoke "make"
3734 (string-append "PYTHONPATH=" (getenv "PYTHONPATH"))
3735 "doc/pagekite.1")
3736 (install-file "doc/pagekite.1" (string-append man "/man1"))
3737 #t))))))
3738 (inputs
3739 `(("python-six" ,python-six)
3740 ("python-socksipychain" ,python-socksipychain)))
3741 (home-page "https://pagekite.net/")
3742 (synopsis "Make localhost servers publicly visible")
3743 (description
3744 "PageKite implements a tunneled reverse proxy which makes it easy to make
3745 a service (such as an HTTP or SSH server) on localhost visible to the wider
3746 Internet, even behind NAT or restrictive firewalls. A managed front-end relay
3747 service is available at @url{https://pagekite.net/}, or you can run your own.")
3748 (license license:agpl3+)))
3749
3750 (define-public ipcalc
3751 (package
3752 (name "ipcalc")
3753 (version "0.41")
3754 (source (origin
3755 (method url-fetch)
3756 (uri (string-append "http://jodies.de/ipcalc-archive/"
3757 name "-" version ".tar.gz"))
3758 (sha256
3759 (base32
3760 "12if9sm8h2ac0pgwkw835cgyqjxm6h27k4kfn2vfas9krrqwbafx"))))
3761 (inputs `(("perl" ,perl)
3762 ("tar" ,tar)
3763 ("gzip" ,gzip)
3764 ("tarball" ,source)))
3765 (build-system trivial-build-system) ;no Makefile.PL
3766 (arguments
3767 `(#:modules ((guix build utils))
3768 #:builder
3769 (begin
3770 (use-modules (guix build utils))
3771 (use-modules (srfi srfi-1))
3772 (let* ((source (assoc-ref %build-inputs "source"))
3773 (perl (string-append (assoc-ref %build-inputs "perl")
3774 "/bin"))
3775 (tar (assoc-ref %build-inputs "tar"))
3776 (gz (assoc-ref %build-inputs "gzip"))
3777 (out (assoc-ref %outputs "out"))
3778 (bin (string-append out "/bin"))
3779 (doc (string-append out "/share/doc/ipcalc")))
3780 (setenv "PATH" (string-append gz "/bin"))
3781 (invoke (string-append tar "/bin/tar") "xvf" source)
3782 (chdir (string-append ,name "-" ,version))
3783
3784 (install-file "ipcalc" bin)
3785 (patch-shebang (string-append bin "/ipcalc") (list perl))
3786 #t))))
3787 (synopsis "Simple IP network calculator")
3788 (description "ipcalc takes an IP address and netmask and calculates the
3789 resulting broadcast, network, Cisco wildcard mask, and host range. By giving
3790 a second netmask, you can design subnets and supernets. It is also intended
3791 to be a teaching tool and presents the subnetting results as
3792 easy-to-understand binary values.")
3793 (home-page "http://jodies.de/ipcalc")
3794 (license license:gpl2+)))
3795
3796 (define-public tunctl
3797 (package
3798 (name "tunctl")
3799 (version "1.5")
3800 (source
3801 (origin
3802 (method url-fetch)
3803 (uri (string-append "mirror://sourceforge/tunctl/tunctl/" version "/"
3804 "tunctl-" version ".tar.gz"))
3805 (sha256
3806 (base32 "1zsgn7w6l2zh2q0j6qaw8wsx981qcr536qlz1lgb3b5zqr66qama"))))
3807 (build-system gnu-build-system)
3808 (arguments
3809 `(#:phases
3810 (modify-phases %standard-phases
3811 (delete 'bootstrap) ;there is no configure.ac file
3812 (delete 'configure) ;there is no configure script
3813 (delete 'check) ;there are no tests
3814 (replace 'build
3815 (lambda _
3816 (setenv "CC" "gcc")
3817 (invoke "make" "tunctl")))
3818 ;; TODO: Requires docbook2x to generate man page from SGML.
3819 (replace 'install
3820 (lambda* (#:key outputs #:allow-other-keys)
3821 (let* ((out (assoc-ref outputs "out"))
3822 (bin (string-append out "/bin")))
3823 (install-file "tunctl" bin))
3824 #t)))))
3825 (home-page "http://tunctl.sourceforge.net")
3826 (synopsis "Utility to set up and maintain TUN/TAP network interfaces")
3827 (description "Tunctl is used to set up and maintain persistent TUN/TAP
3828 network interfaces, enabling user applications to simulate network traffic.
3829 Such interfaces are useful for VPN software, virtualization, emulation,
3830 simulation, and a number of other applications.")
3831 (license license:gpl2)))
3832
3833 (define-public wol
3834 (package
3835 (name "wol")
3836 (version "0.7.1")
3837 (source
3838 (origin
3839 (method url-fetch)
3840 (uri (string-append "mirror://sourceforge/wake-on-lan/wol/"
3841 version "/wol-" version ".tar.gz"))
3842 (sha256
3843 (base32 "08i6l5lr14mh4n3qbmx6kyx7vjqvzdnh3j9yfvgjppqik2dnq270"))))
3844 (build-system gnu-build-system)
3845 (home-page "https://sourceforge.net/projects/wake-on-lan/")
3846 (synopsis "Implements Wake On LAN functionality in a small program")
3847 (description "Tool to send a magic packet to wake another host on the
3848 network. This must be enabled on the target host, usually in the BIOS.")
3849 (license license:gpl2)))
3850
3851 (define-public vde2
3852 (package
3853 (name "vde2")
3854 (version "2.3.2")
3855 (source
3856 (origin
3857 (method url-fetch)
3858 (uri "mirror://sourceforge/vde/vde2/2.3.2/vde2-2.3.2.tar.gz")
3859 (sha256
3860 (base32 "14xga0ib6p1wrv3hkl4sa89yzjxv7f1vfqaxsch87j6scdm59pr2"))))
3861 (build-system gnu-build-system)
3862 (arguments
3863 `(#:parallel-build? #f)) ; Build fails if #t.
3864 (inputs
3865 `(("python" ,python)
3866 ("libpcap" ,libpcap)
3867 ("openssl" ,openssl-1.0))) ; Build fails with 1.1.
3868 (home-page "https://github.com/virtualsquare/vde-2")
3869 (synopsis "Virtual Distributed Ethernet")
3870 (description "VDE is a set of programs to provide virtual software-defined
3871 Ethernet network interface controllers across multiple virtual or
3872 physical, local or remote devices. The VDE architecture provides
3873 virtual counterparts to hardware components such as switches and
3874 cables.")
3875 (license (list license:gpl2
3876 license:lgpl2.1 ; libvdeplug
3877 (license:non-copyleft ; slirpvde
3878 "file://COPYING.slirpvde"
3879 "See COPYING.slirpvde in the distribution.")))))
3880
3881 (define-public haproxy
3882 (package
3883 (name "haproxy")
3884 (version "2.1.7")
3885 (source (origin
3886 (method url-fetch)
3887 (uri (string-append "https://www.haproxy.org/download/"
3888 (version-major+minor version)
3889 "/src/haproxy-" version ".tar.gz"))
3890 (sha256
3891 (base32
3892 "0fd3c1znid5a9w3gcf77b85hm2a2558w9s02c4b7xzkmivqnqbir"))))
3893 (build-system gnu-build-system)
3894 (arguments
3895 `(#:make-flags
3896 (let* ((out (assoc-ref %outputs "out")))
3897 (list (string-append "PREFIX=" out)
3898 (string-append "DOCDIR=" out "/share/" ,name)
3899 "TARGET=linux-glibc"
3900 "USE_LUA=1"
3901 "USE_OPENSSL=1"
3902 "USE_ZLIB=1"
3903 "USE_PCRE_2=1"))
3904 #:tests? #f ; there are only regression tests, using varnishtest
3905 #:phases
3906 (modify-phases %standard-phases
3907 (delete 'configure))))
3908 (inputs
3909 `(("lua" ,lua)
3910 ("openssl" ,openssl)
3911 ("pcre2" ,pcre2)
3912 ("zlib" ,zlib)))
3913 (home-page "https://www.haproxy.org/")
3914 (synopsis "Reliable, high performance TCP/HTTP load balancer")
3915 (description "HAProxy is a free, very fast and reliable solution offering
3916 high availability, load balancing, and proxying for TCP and HTTP-based
3917 applications. It is particularly suited for web sites crawling under very
3918 high loads while needing persistence or Layer7 processing. Supporting tens of
3919 thousands of connections is clearly realistic with today's hardware.")
3920 (license (list license:gpl2+
3921 license:lgpl2.1
3922 license:lgpl2.1+))))
3923
3924 (define-public lldpd
3925 (package
3926 (name "lldpd")
3927 (version "1.0.11")
3928 (source
3929 (origin
3930 (method url-fetch)
3931 (uri (string-append "https://media.luffy.cx/files/lldpd/lldpd-"
3932 version ".tar.gz"))
3933 (sha256
3934 (base32 "1r265ns6fh04xwrzj06p2l7kl5rkkns0cdawp1zwpvxs1xq1a7dm"))
3935 (modules '((guix build utils)))
3936 (snippet
3937 '(begin
3938 ;; Drop bundled library.
3939 (delete-file-recursively "libevent")
3940 #t))))
3941 (arguments
3942 `(#:configure-flags
3943 (list
3944 "--with-privsep-user=nobody"
3945 "--with-privsep-group=nogroup"
3946 "--localstatedir=/var"
3947 "--enable-pie"
3948 "--disable-static"
3949 "--without-embedded-libevent"
3950 (string-append "--with-systemdsystemunitdir="
3951 (assoc-ref %outputs "out")
3952 "/lib/systemd/system"))))
3953 (build-system gnu-build-system)
3954 (inputs
3955 `(("libevent" ,libevent)
3956 ("libxml2" ,libxml2)
3957 ("openssl" ,openssl)
3958 ("readline" ,readline)))
3959 (native-inputs
3960 `(("pkg-config" ,pkg-config)))
3961 (home-page "https://vincentbernat.github.io/lldpd/")
3962 (synopsis "Locate neighbors of your network equipment")
3963 (description
3964 "The @dfn{Link Layer Discovery Protocol} (LLDP) is an industry standard
3965 protocol designed to supplant proprietary Link-Layer protocols such as EDP or
3966 CDP. The goal of LLDP is to provide an inter-vendor compatible mechanism to
3967 deliver Link-Layer notifications to adjacent network devices. @code{lldpd} is
3968 an implementation of LLDP. It also supports some proprietary protocols.")
3969 (license license:isc)))
3970
3971 (define-public hashcash
3972 (package
3973 (name "hashcash")
3974 (version "1.22")
3975 (source
3976 (origin
3977 (method url-fetch)
3978 (uri (string-append "http://www.hashcash.org/source/hashcash-"
3979 version ".tgz"))
3980 (sha256
3981 (base32
3982 "15kqaimwb2y8wvzpn73021bvay9mz1gqqfc40gk4hj6f84nz34h1"))))
3983 (build-system gnu-build-system)
3984 (arguments
3985 `(#:make-flags (list (string-append "CC=" ,(cc-for-target)))
3986 #:phases
3987 (modify-phases %standard-phases
3988 (delete 'configure)
3989 ;; No tests available.
3990 (delete 'check)
3991 (replace 'install
3992 (lambda* (#:key outputs #:allow-other-keys)
3993 (let* ((outdir (assoc-ref outputs "out"))
3994 (bindir (string-append outdir "/bin"))
3995 (mandir (string-append outdir "/share/man/man1"))
3996 (docdir (string-append outdir "/share/doc/hashcash-" ,version)))
3997 ;; Install manually, as we don't need the `sha1' binary
3998 (install-file "hashcash" bindir)
3999 (install-file "hashcash.1" mandir)
4000 (install-file "README" docdir)
4001 (install-file "LICENSE" docdir)
4002 (install-file "CHANGELOG" docdir)
4003 #t))))))
4004 (home-page "https://www.hashcash.org/")
4005 (synopsis "Denial-of-service countermeasure")
4006 (description "Hashcash is a proof-of-work algorithm, which has been used
4007 as a denial-of-service countermeasure technique in a number of systems.
4008
4009 A hashcash stamp constitutes a proof-of-work which takes a parametrizable
4010 amount of work to compute for the sender. The recipient can verify received
4011 hashcash stamps efficiently.
4012
4013 This package contains a command-line tool for computing and verifying hashcash
4014 stamps.")
4015 (license license:public-domain)))
4016
4017 (define-public nbd
4018 (package
4019 (name "nbd")
4020 (version "3.21")
4021 (source
4022 (origin
4023 (method url-fetch)
4024 (uri (string-append "mirror://sourceforge/nbd/nbd/" version
4025 "/nbd-" version ".tar.xz"))
4026 (sha256
4027 (base32 "1ydylvvayi4w2d08flji9q03sl7y8hn0c26vsay3nwwikprqls77"))))
4028 (build-system gnu-build-system)
4029 (inputs
4030 `(("glib" ,glib)))
4031 (native-inputs
4032 `(("pkg-config" ,pkg-config)
4033 ("which" ,which)))
4034 (home-page "https://nbd.sourceforge.io/")
4035 (synopsis "NBD client and server")
4036 (description "This package provides the NBD (Network Block Devices)
4037 client and server. It allows you to use remote block devices over a TCP/IP
4038 network.")
4039 (license license:gpl2)))
4040
4041 (define-public yggdrasil
4042 (package
4043 (name "yggdrasil")
4044 (version "0.3.16")
4045 (source
4046 (origin
4047 (method git-fetch)
4048 (uri
4049 (git-reference
4050 (url "https://github.com/yggdrasil-network/yggdrasil-go")
4051 (commit (string-append "v" version))
4052 (recursive? #t)))
4053 (file-name (git-file-name name version))
4054 (sha256
4055 (base32 "0vyd7a333hwn6j1lv1g9sicw74a4qk982bsi3cfdhjlv6hsjwmil"))
4056 (patches (search-patches "yggdrasil-extra-config.patch"))))
4057 (build-system go-build-system)
4058 (arguments
4059 '(#:import-path "github.com/yggdrasil-network/yggdrasil-go"
4060 ;; TODO: figure out how tests are run
4061 #:tests? #f
4062 #:install-source? #f
4063 #:phases (modify-phases %standard-phases
4064 (replace 'build
4065 (lambda _
4066 (for-each
4067 (lambda (c)
4068 (invoke
4069 "go" "build" "-v" "-ldflags=-s -w"
4070 (string-append
4071 "github.com/yggdrasil-network/yggdrasil-go/cmd/" c)))
4072 (list "yggdrasil" "yggdrasilctl"))
4073 #t))
4074 (replace 'install
4075 (lambda* (#:key outputs #:allow-other-keys)
4076 (let* ((out (assoc-ref outputs "out"))
4077 (bin (string-append out "/bin/"))
4078 (doc (string-append out "/share/doc/yggdrasil/")))
4079 (mkdir-p bin)
4080 (for-each
4081 (lambda (f)
4082 (install-file f bin))
4083 (list "yggdrasil" "yggdrasilctl"))
4084 (mkdir-p doc)
4085 (copy-recursively
4086 (string-append
4087 "src/github.com/yggdrasil-network/yggdrasil-go/"
4088 "doc/yggdrasil-network.github.io")
4089 doc))
4090 #t)))))
4091 ;; https://github.com/kardianos/minwinsvc is windows only
4092 (propagated-inputs
4093 `(("go-github-com-arceliar-phony" ,go-github-com-arceliar-phony)
4094 ("go-github-com-cheggaaa-pb" ,go-github-com-cheggaaa-pb)
4095 ("go-github-com-gologme-log" ,go-github-com-gologme-log)
4096 ("go-github-com-hashicorp-go-syslog" ,go-github-com-hashicorp-go-syslog)
4097 ("go-github-com-hjson-hjson-go" ,go-github-com-hjson-hjson-go)
4098 ("go-github-com-kardianos-minwinsvc" ,go-github-com-kardianos-minwinsvc)
4099 ("go-github-com-mitchellh-mapstructure"
4100 ,go-github-com-mitchellh-mapstructure)
4101 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
4102 ("go-golang-org-x-net" ,go-golang-org-x-net)
4103 ("go-golang-org-x-text" ,go-golang-org-x-text)
4104 ("go-golang-zx2c4-com-wireguard" ,go-golang-zx2c4-com-wireguard)
4105 ("go-netlink" ,go-netlink)
4106 ("go-netns" ,go-netns)))
4107 (home-page "https://yggdrasil-network.github.io/blog.html")
4108 (synopsis
4109 "Experiment in scalable routing as an encrypted IPv6 overlay network")
4110 (description
4111 "Yggdrasil is an early-stage implementation of a fully end-to-end encrypted
4112 IPv6 network. It is lightweight, self-arranging, supported on multiple
4113 platforms and allows pretty much any IPv6-capable application to communicate
4114 securely with other Yggdrasil nodes. Yggdrasil does not require you to have
4115 IPv6 Internet connectivity - it also works over IPv4.")
4116 (license
4117 ;; As a special exception to the GNU Lesser General Public License
4118 ;; version 3 ("LGPL3"), the copyright holders of this Library give you
4119 ;; permission to convey to a third party a Combined Work that links
4120 ;; statically or dynamically to this Library without providing any Minimal
4121 ;; Corresponding Source or Minimal Application Code as set out in 4d or
4122 ;; providing the installation information set out in section 4e, provided
4123 ;; that you comply with the other provisions of LGPL3 and provided that you
4124 ;; meet, for the Application the terms and conditions of the license(s)
4125 ;; which apply to the Application. Except as stated in this special
4126 ;; exception, the provisions of LGPL3 will continue to comply in full to
4127 ;; this Library. If you modify this Library, you may apply this exception
4128 ;; to your version of this Library, but you are not obliged to do so. If
4129 ;; you do not wish to do so, delete this exception statement from your
4130 ;; version. This exception does not (and cannot) modify any license terms
4131 ;; which apply to the Application, with which you must still comply
4132 license:lgpl3)))