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