gnu: Add netcat-openbsd.
[jackhill/guix/guix.git] / gnu / packages / admin.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
4 ;;; Copyright © 2014, 2015, 2016, 2018, 2019 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014, 2015, 2016, 2017, 2018 Eric Bavier <bavier@member.fsf.org>
6 ;;; Copyright © 2015, 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
7 ;;; Copyright © 2015 Alex Sassmannshausen <alex.sassmannshausen@gmail.com>
8 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
9 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
10 ;;; Copyright © 2016 Pjotr Prins <pjotr.guix@thebird.nl>
11 ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2016 Peter Feigl <peter.feigl@nexoid.at>
14 ;;; Copyright © 2016 John J. Foerch <jjfoerch@earthlink.net>
15 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
16 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
17 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
18 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
19 ;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23@gmail.com>
20 ;;; Copyright © 2017 Christopher Allan Webber <cwebber@dustycloud.org>
21 ;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com>
22 ;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
23 ;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
24 ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
25 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
26 ;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
27 ;;; Copyright © 2019 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
28 ;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>
29 ;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
30 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
31 ;;;
32 ;;; This file is part of GNU Guix.
33 ;;;
34 ;;; GNU Guix is free software; you can redistribute it and/or modify it
35 ;;; under the terms of the GNU General Public License as published by
36 ;;; the Free Software Foundation; either version 3 of the License, or (at
37 ;;; your option) any later version.
38 ;;;
39 ;;; GNU Guix is distributed in the hope that it will be useful, but
40 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
41 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42 ;;; GNU General Public License for more details.
43 ;;;
44 ;;; You should have received a copy of the GNU General Public License
45 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
46
47 (define-module (gnu packages admin)
48 #:use-module ((guix licenses) #:prefix license:)
49 #:use-module (guix packages)
50 #:use-module (guix utils)
51 #:use-module (guix download)
52 #:use-module (guix git-download)
53 #:use-module (guix build-system cmake)
54 #:use-module (guix build-system emacs)
55 #:use-module (guix build-system gnu)
56 #:use-module (guix build-system meson)
57 #:use-module (guix build-system perl)
58 #:use-module (guix build-system python)
59 #:use-module (guix build-system trivial)
60 #:use-module (gnu packages)
61 #:use-module (gnu packages algebra)
62 #:use-module (gnu packages base)
63 #:use-module (gnu packages bash)
64 #:use-module (gnu packages check)
65 #:use-module (gnu packages crypto)
66 #:use-module (gnu packages cyrus-sasl)
67 #:use-module (gnu packages dns)
68 #:use-module (gnu packages file)
69 #:use-module (gnu packages ncurses)
70 #:use-module (gnu packages readline)
71 #:use-module (gnu packages libbsd)
72 #:use-module (gnu packages linux)
73 #:use-module (gnu packages lua)
74 #:use-module (gnu packages guile)
75 #:use-module (gnu packages gettext)
76 #:use-module (gnu packages imagemagick)
77 #:use-module (gnu packages inkscape)
78 #:use-module (gnu packages pcre)
79 #:use-module (gnu packages perl)
80 #:use-module (gnu packages perl-check)
81 #:use-module (gnu packages tcl)
82 #:use-module (gnu packages compression)
83 #:use-module (gnu packages cross-base)
84 #:use-module (gnu packages tls)
85 #:use-module (gnu packages gnupg)
86 #:use-module (gnu packages bison)
87 #:use-module (gnu packages flex)
88 #:use-module (gnu packages gl)
89 #:use-module (gnu packages glib)
90 #:use-module (gnu packages openldap)
91 #:use-module (gnu packages mcrypt)
92 #:use-module (gnu packages patchutils)
93 #:use-module (gnu packages pkg-config)
94 #:use-module (gnu packages popt)
95 #:use-module (gnu packages python)
96 #:use-module (gnu packages python-crypto)
97 #:use-module (gnu packages python-web)
98 #:use-module (gnu packages python-xyz)
99 #:use-module (gnu packages qt)
100 #:use-module (gnu packages sphinx)
101 #:use-module (gnu packages terminals)
102 #:use-module (gnu packages texinfo)
103 #:use-module (gnu packages groff)
104 #:use-module (gnu packages pciutils)
105 #:use-module (gnu packages libunwind)
106 #:use-module (gnu packages libusb)
107 #:use-module (gnu packages libftdi)
108 #:use-module (gnu packages image)
109 #:use-module (gnu packages xorg)
110 #:use-module (gnu packages xdisorg)
111 #:use-module (gnu packages man)
112 #:use-module (gnu packages autotools)
113 #:use-module (gnu packages gnome)
114 #:use-module (gnu packages kerberos)
115 #:use-module (gnu packages gtk)
116 #:use-module (gnu packages xml)
117 #:use-module (gnu packages boost)
118 #:use-module (gnu packages elf)
119 #:use-module (gnu packages mpi)
120 #:use-module (gnu packages version-control)
121 #:use-module (gnu packages web))
122
123 (define-public aide
124 (package
125 (name "aide")
126 (version "0.16.2")
127 (source
128 (origin
129 (method url-fetch)
130 (uri (string-append "https://github.com/aide/aide/releases/download/v"
131 version "/aide-" version ".tar.gz"))
132 (sha256
133 (base32 "15xp47sz7kk1ciffw3f5xw2jg2mb2lqrbr3q6p4bkbz5dap9iy8p"))))
134 (build-system gnu-build-system)
135 (native-inputs
136 `(("bison" ,bison)
137 ("flex" ,flex)))
138 (inputs
139 `(("libgcrypt" ,libgcrypt)
140 ("libgpg-error" ,libgpg-error)
141 ("libmhash" ,libmhash)
142 ("pcre:static" ,pcre "static")
143 ("pcre" ,pcre)
144 ("zlib:static" ,zlib "static")
145 ("zlib" ,zlib)))
146 (synopsis "File and directory integrity checker")
147 (description
148 "AIDE (Advanced Intrusion Detection Environment) is a file and directory
149 integrity checker. It creates a database from the regular expression rules
150 that it finds from its configuration files. Once this database is initialized
151 it can be used to verify the integrity of the files. It has several message
152 digest algorithms that are used to check the integrity of files. All of the
153 usual file attributes can be checked for inconsistencies.")
154 (home-page "https://aide.github.io/")
155 (license license:gpl2+)))
156
157 (define-public progress
158 (package
159 (name "progress")
160 (version "0.14")
161 (source
162 (origin
163 (method git-fetch)
164 (uri (git-reference
165 (url "https://github.com/Xfennec/progress.git")
166 (commit (string-append "v" version))))
167 (sha256
168 (base32 "1lk2v4b767klib93an4g3f7z5qrv9kdk9jf7545vw1immc4kamrl"))
169 (file-name (git-file-name name version))))
170 (build-system gnu-build-system)
171 (native-inputs
172 `(("pkg-config" ,pkg-config)
173 ("which" ,which)))
174 (inputs
175 `(("ncurses" ,ncurses)))
176 (arguments
177 `(#:tests? #f ; no test suite
178 #:make-flags (list "CC=gcc"
179 (string-append "PREFIX=" (assoc-ref %outputs "out")))
180 #:phases
181 (modify-phases %standard-phases
182 (delete 'configure)))) ; no configure script
183 (home-page "https://github.com/Xfennec/progress")
184 (synopsis "Program to view the progress of the coreutils commands")
185 (description "A program that looks for coreutils basic commands (cp, mv,
186 dd, tar, gzip/gunzip, cat, etc.) currently running on your system and displays
187 the percentage of copied data. It can also show estimated time and throughput,
188 and provides a \"top-like\" mode (monitoring).")
189 (license license:gpl3+)))
190
191 (define-public shepherd
192 (package
193 (name "shepherd")
194 (version "0.6.1")
195 (source (origin
196 (method url-fetch)
197 (uri (string-append "mirror://gnu/shepherd/shepherd-"
198 version ".tar.gz"))
199 (sha256
200 (base32
201 "1xn6mb5bh8bpfgdrh09ja31jk0ln7bmxbbf0vjcqxkkixs2wl6sk"))))
202 (build-system gnu-build-system)
203 (arguments
204 '(#:configure-flags '("--localstatedir=/var")))
205 (native-inputs
206 `(("pkg-config" ,pkg-config)
207
208 ;; This is the Guile we use as a cross-compiler...
209 ("guile" ,guile-2.2)))
210 (inputs
211 ;; ... and this is the one that appears in shebangs when cross-compiling.
212 `(("guile" ,guile-2.2)
213
214 ;; The 'shepherd' command uses Readline when used interactively. It's
215 ;; an unusual use case though, so we don't propagate it.
216 ("guile-readline" ,guile-readline)))
217 (synopsis "System service manager")
218 (description
219 "The GNU Shepherd is a daemon-managing daemon, meaning that it supervises
220 the execution of system services, replacing similar functionality found in
221 typical init systems. It provides dependency-handling through a convenient
222 interface and is based on GNU Guile.")
223 (license license:gpl3+)
224 (home-page "https://www.gnu.org/software/shepherd/")))
225
226 (define-public cloud-utils
227 (package
228 (name "cloud-utils")
229 (version "0.31")
230 (source
231 (origin
232 (method url-fetch)
233 (uri (string-append
234 "https://launchpad.net/cloud-utils/trunk/"
235 version "/+download/cloud-utils-" version ".tar.gz"))
236 (sha256
237 (base32
238 "07fl3dlqwdzw4xx7mcxhpkks6dnmaxha80zgs9f6wmibgzni8z0r"))))
239 (build-system gnu-build-system)
240 (arguments
241 '(#:make-flags
242 (let ((out (assoc-ref %outputs "out")))
243 (list (string-append "BINDIR=" out "/bin")
244 (string-append "MANDIR=" out "/share/man/man1")
245 (string-append "DOCDIR=" out "/share/doc")))
246 #:phases
247 (modify-phases %standard-phases
248 (delete 'configure)
249 (delete 'check)
250 (add-after 'install 'wrap
251 (lambda* (#:key outputs inputs #:allow-other-keys)
252 (let ((growpart (string-append (assoc-ref outputs "out")
253 "/bin/growpart")))
254 (wrap-program growpart
255 `("PATH" ":" prefix (,(dirname (which "sfdisk"))
256 ,(dirname (which "readlink"))))))
257 #t)))))
258 (inputs
259 `(("python" ,python)
260 ("util-linux" ,util-linux))) ; contains sfdisk for growpart
261 (home-page "https://launchpad.net/cloud-utils")
262 (synopsis "Set of utilities for cloud computing environments")
263 (description
264 "This package contains a set of utilities for cloud computing
265 environments:
266
267 @itemize @bullet
268 @item @command{cloud-localds} Create a disk for cloud-init to utilize nocloud
269 @item @command{cloud-publish-image} Wrapper for cloud image publishing
270 @item @command{cloud-publish-tarball} Wrapper for publishing cloud tarballs
271 @item @command{cloud-publish-ubuntu} Import a Ubuntu cloud image
272 @item @command{ec2metadata} Query and display @acronym{EC2,Amazon Elastic
273 Compute Cloud} metadata
274 @item @command{growpart} Grow a partition to fill the device
275 @item @command{mount-image-callback} Mount a file and run a command
276 @item @command{resize-part-image} Resize a partition image to a new size
277 @item @command{ubuntu-cloudimg-query} Get the latest Ubuntu
278 @acronym{AMI,Amazon Machine Image}
279 @item @command{ubuntu-ec2-run} Run a @acronym{EC2,Amazon Elastic Compute
280 Cloud} instance using Ubuntu
281 @item @command{vcs-run} Obtain a repository, and run a command
282 @item @command{write-mime-multipart} Handle multipart
283 @acronym{MIME,Multipurpose Internet Mail Extensions} messages
284 @end itemize")
285 (license license:gpl3)))
286
287 (define-public daemontools
288 (package
289 (name "daemontools")
290 (version "0.76")
291 (source (origin
292 (method url-fetch)
293 (uri (string-append
294 "https://cr.yp.to/daemontools/"
295 "daemontools-" version ".tar.gz"))
296 (sha256
297 (base32
298 "07scvw88faxkscxi91031pjkpccql6wspk4yrlnsbrrb5c0kamd5"))))
299 (build-system gnu-build-system)
300 (arguments
301 `(#:tests? #f ;; No tests as far as I can tell.
302 #:phases
303 (modify-phases %standard-phases
304 (add-after 'unpack 'chdir
305 (lambda _
306 (chdir ,(string-append "daemontools-" version))
307 #t))
308 (delete 'configure)
309 (add-before 'build 'patch
310 (lambda _
311 (substitute* "src/error.h"
312 (("extern int errno;")
313 "#include <errno.h>"))
314 #t))
315 (replace 'build
316 (lambda _
317 (invoke "package/compile")))
318 (replace 'install
319 (lambda* (#:key outputs #:allow-other-keys)
320 (let* ((out (assoc-ref outputs "out"))
321 (bin (string-append out "/bin")))
322 (for-each (lambda (file)
323 (install-file file bin))
324 (find-files "command")))
325 #t)))))
326 (synopsis "Tools for managing UNIX style services")
327 (description
328 "@code{daemontools} is a collection of tools for managing UNIX
329 services.")
330 (license license:public-domain)
331 (home-page "https://cr.yp.to/daemontools.html")))
332
333 (define-public dfc
334 (package
335 (name "dfc")
336 (version "3.1.1")
337 (source
338 (origin
339 (method url-fetch)
340 (uri (string-append
341 "https://projects.gw-computing.net/attachments/download/615/dfc-"
342 version ".tar.gz"))
343 (sha256
344 (base32
345 "0m1fd7l85ckb7bq4c5c3g257bkjglm8gq7x42pkmpp87fkknc94n"))))
346 (build-system cmake-build-system)
347 (arguments '(#:tests? #f)) ; There are no tests.
348 (native-inputs `(("gettext" ,gettext-minimal)))
349 (home-page "https://projects.gw-computing.net/projects/dfc")
350 (synopsis "Display file system space usage using graphs and colors")
351 (description
352 "dfc (df color) is a modern version of df. It uses colors, draws pretty
353 graphs and can export its output to different formats.")
354 (license license:bsd-3)))
355
356 (define-public htop
357 (package
358 (name "htop")
359 (version "2.2.0")
360 (source (origin
361 (method url-fetch)
362 (uri (string-append "http://hisham.hm/htop/releases/"
363 version "/htop-" version ".tar.gz"))
364 (sha256
365 (base32
366 "0mrwpb3cpn3ai7ar33m31yklj64c3pp576vh1naqff6f21pq5mnr"))))
367 (build-system gnu-build-system)
368 (inputs
369 `(("ncurses" ,ncurses)))
370 (native-inputs
371 `(("python" ,python-wrapper))) ;for scripts/MakeHeader.py
372 (home-page "https://hisham.hm/htop/")
373 (synopsis "Interactive process viewer")
374 (description
375 "This is htop, an interactive process viewer. It is a text-mode
376 application (for console or X terminals) and requires ncurses.")
377 (license license:gpl2)))
378
379 (define-public pies
380 (package
381 (name "pies")
382 (version "1.4")
383 (source
384 (origin
385 (method url-fetch)
386 (uri (string-append "mirror://gnu/pies/pies-"
387 version ".tar.bz2"))
388 (sha256
389 (base32
390 "14jb4pa4zs26d5j2skxbaypnwhsx2lw8jgj1irrgs03c2dnf7gp6"))))
391 (build-system gnu-build-system)
392 (arguments
393 '(#:phases (modify-phases %standard-phases
394 (add-before 'build 'patch-/bin/sh
395 (lambda* (#:key inputs #:allow-other-keys)
396 ;; Use the right shell when executing user-provided
397 ;; shell commands.
398 (let ((bash (assoc-ref inputs "bash")))
399 (substitute* '("src/progman.c" "src/comp.c")
400 (("\"/bin/sh\"")
401 (string-append "\"" bash "/bin/sh\"")))
402 #t))))))
403 (home-page "https://www.gnu.org/software/pies/")
404 (synopsis "Program invocation and execution supervisor")
405 (description
406 "GNU pies is a program that supervises the invocation and execution of
407 other programs. It reads the list of programs to be started from its
408 configuration file, executes them, and then monitors their status,
409 re-executing them as necessary.")
410 (license license:gpl3+)))
411
412 (define-public inetutils
413 (package
414 (name "inetutils")
415 (version "1.9.4")
416 (source (origin
417 (method url-fetch)
418 (uri (string-append "mirror://gnu/inetutils/inetutils-"
419 version ".tar.gz"))
420 (sha256
421 (base32
422 "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy"))))
423 (build-system gnu-build-system)
424 (arguments
425 `(#:configure-flags '("--localstatedir=/var"
426
427 ;; Make sure 'PATH_PROCNET_DEV' gets defined when
428 ;; cross-compiling (by default it does not.)
429 ,@(if (%current-target-system)
430 '("--with-path-procnet-dev=/proc/net/dev")
431 '()))
432 ;; On some systems, 'libls.sh' may fail with an error such as:
433 ;; "Failed to tell switch -a apart from -A".
434 #:parallel-tests? #f))
435 (inputs `(("ncurses" ,ncurses)
436 ("readline" ,readline))) ;for 'ftp'
437 (native-inputs `(("netstat" ,net-tools))) ;for tests
438 (home-page "https://www.gnu.org/software/inetutils/")
439 (synopsis "Basic networking utilities")
440 (description
441 "Inetutils is a collection of common network programs, such as an ftp
442 client and server, a telnet client and server, an rsh client and server, and
443 hostname.")
444 (license license:gpl3+)))
445
446 (define-public shadow
447 (package
448 (name "shadow")
449 (version "4.7")
450 (source (origin
451 (method url-fetch)
452 (uri (string-append
453 "https://github.com/shadow-maint/shadow/releases/"
454 "download/" version "/shadow-" version ".tar.xz"))
455 (sha256
456 (base32
457 "0v71474rx38lg9kidrm4xbk35sg3icv3s5pk2b42icp3lyj9dqg5"))))
458 (build-system gnu-build-system)
459 (arguments
460 `(;; Assume System V `setpgrp (void)', which is the default on GNU
461 ;; variants (`AC_FUNC_SETPGRP' is not cross-compilation capable.)
462 #:configure-flags
463 '("--with-libpam" "ac_cv_func_setpgrp_void=yes")
464
465 #:phases
466 (modify-phases %standard-phases
467 (add-before 'build 'set-nscd-file-name
468 (lambda* (#:key inputs #:allow-other-keys)
469 ;; Use the right file name for nscd.
470 (let ((libc (assoc-ref inputs
471 ,(if (%current-target-system)
472 "cross-libc"
473 "libc"))))
474 (substitute* "lib/nscd.c"
475 (("/usr/sbin/nscd")
476 (string-append libc "/sbin/nscd")))
477 #t)))
478 (add-after 'install 'remove-groups
479 (lambda* (#:key outputs #:allow-other-keys)
480 ;; Remove `groups', which is already provided by Coreutils.
481 (let* ((out (assoc-ref outputs "out"))
482 (bin (string-append out "/bin"))
483 (man (string-append out "/share/man")))
484 (delete-file (string-append bin "/groups"))
485 (for-each delete-file (find-files man "^groups\\."))
486 #t))))))
487
488 (inputs (if (string-contains (or (%current-target-system)
489 (%current-system))
490 "-linux")
491 `(("linux-pam" ,linux-pam))
492 '()))
493 (home-page "https://github.com/shadow-maint/shadow")
494 (synopsis "Authentication-related tools such as passwd, su, and login")
495 (description
496 "Shadow provides a number of authentication-related tools, including:
497 login, passwd, su, groupadd, and useradd.")
498
499 ;; The `vipw' program is GPLv2+.
500 ;; libmisc/salt.c is public domain.
501 (license license:bsd-3)))
502
503 (define-public mingetty
504 (package
505 (name "mingetty")
506 (version "1.08")
507 (source (origin
508 (method url-fetch)
509 (uri (string-append "mirror://sourceforge/mingetty/mingetty/"
510 version "/mingetty-" version ".tar.gz"))
511 (sha256
512 (base32
513 "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"))))
514 (build-system gnu-build-system)
515 (arguments
516 `(#:phases
517 (modify-phases %standard-phases
518 (replace 'configure
519 (lambda* (#:key inputs outputs #:allow-other-keys)
520 (let* ((out (assoc-ref outputs "out"))
521 (man8 (string-append out "/share/man/man8"))
522 (sbin (string-append out "/sbin"))
523 (shadow (assoc-ref inputs "shadow"))
524 (login (string-append shadow "/bin/login")))
525 (substitute* "Makefile"
526 (("^SBINDIR.*")
527 (string-append "SBINDIR = " out
528 "/sbin\n"))
529 (("^MANDIR.*")
530 (string-append "MANDIR = " out
531 "/share/man/man8\n")))
532
533 ;; Pick the right 'login' by default.
534 (substitute* "mingetty.c"
535 (("\"/bin/login\"")
536 (string-append "\"" login "\"")))
537
538 (mkdir-p sbin)
539 (mkdir-p man8))
540 #t)))
541 #:tests? #f)) ; no tests
542 (inputs `(("shadow" ,shadow)))
543
544 (home-page "https://sourceforge.net/projects/mingetty")
545 (synopsis "Getty for the text console")
546 (description
547 "Small console getty that is started on the Linux text console,
548 asks for a login name and then transfers over to @code{login}. It is extended
549 to allow automatic login and starting any app.")
550 (license license:gpl2+)))
551
552 (define-public net-base
553 (package
554 (name "net-base")
555 (version "5.3")
556 (source (origin
557 (method url-fetch)
558 (uri (string-append
559 "mirror://debian/pool/main/n/netbase/netbase_"
560 version ".tar.xz"))
561 (sha256
562 (base32
563 "12xqjwg3p4rzmmh2iib6sigm9l29y3dgk74mmnw64k84jnbwdxl1"))))
564 (build-system trivial-build-system)
565 (arguments
566 `(#:modules ((guix build utils))
567 #:builder (begin
568 (use-modules (guix build utils)
569 (srfi srfi-26))
570
571 (let* ((source (assoc-ref %build-inputs "source"))
572 (tar (assoc-ref %build-inputs "tar"))
573 (xz (assoc-ref %build-inputs "xz"))
574 (output (assoc-ref %outputs "out"))
575 (etc (string-append output "/etc")))
576 (setenv "PATH" (string-append xz "/bin"))
577 (invoke (string-append tar "/bin/tar") "xvf"
578 source)
579 (chdir ,(string-append "netbase-" version))
580 (mkdir-p etc)
581 (for-each copy-file
582 '("etc-services" "etc-protocols" "etc-rpc")
583 (map (cut string-append etc "/" <>)
584 '("services" "protocols" "rpc")))
585 #t))))
586 (native-inputs `(("tar" ,tar)
587 ("xz" ,xz)))
588 (synopsis "IANA protocol, port, and RPC number assignments")
589 (description
590 "This package provides the /etc/services, /etc/protocols, and /etc/rpc
591 files, which contain information about the IANA-assigned port, protocol, and
592 ONC RPC numbers.")
593 (home-page "https://packages.debian.org/sid/netbase")
594 (license license:gpl2)))
595
596 (define-public netcat
597 (package
598 (name "netcat")
599 (version "0.7.1")
600 (source (origin
601 (method url-fetch)
602 (uri (string-append "mirror://sourceforge/netcat/netcat/" version
603 "/netcat-" version ".tar.bz2"))
604 (sha256
605 (base32
606 "1frjcdkhkpzk0f84hx6hmw5l0ynpmji8vcbaxg8h5k2svyxz0nmm"))))
607 (build-system gnu-build-system)
608 (arguments
609 `(#:configure-flags
610 ;; By default, man and info pages are put in PREFIX/{man,info},
611 ;; but we want them in PREFIX/share/{man,info}.
612 (let ((out (assoc-ref %outputs "out")))
613 (list (string-append "--mandir=" out "/share/man")
614 (string-append "--infodir=" out "/share/info")))))
615 (home-page "http://netcat.sourceforge.net")
616 (synopsis "Read and write data over TCP/IP")
617 (description
618 "Netcat is a featured networking utility which reads and writes data
619 across network connections, using the TCP/IP protocol. It is designed to be a
620 reliable \"back-end\" tool that can be used directly or easily driven by other
621 programs and scripts. At the same time, it is a feature-rich network debugging
622 and exploration tool, since it can create almost any kind of connection you
623 would need and has several interesting built-in capabilities.")
624 (license license:gpl2+)))
625
626 (define-public netcat-openbsd
627 (package
628 (name "netcat-openbsd")
629 (version "1.203-2")
630 (source (origin
631 (method git-fetch)
632 (uri (git-reference
633 (url "https://salsa.debian.org/debian/netcat-openbsd.git")
634 (commit (string-append "debian/" version))))
635 (file-name (git-file-name name version))
636 (sha256
637 (base32
638 "0j85gzbjzs6yrhgabh3zkwzd27qkr5s0zjjczl0hah8q7yhrjk3m"))))
639 (build-system gnu-build-system)
640 (arguments
641 `(#:tests? #f ; no test suite
642 #:make-flags
643 (list "CC=gcc"
644 (string-append "CFLAGS=-I" (assoc-ref %build-inputs "libbsd") "/include")
645 "LDFLAGS=-lbsd")
646 #:phases
647 (modify-phases %standard-phases
648 (delete 'configure)
649 (add-before 'build 'patch
650 (lambda _
651 (setenv "QUILT_PATCHES" "debian/patches")
652 (invoke "quilt" "push" "-a")
653 #t))
654 (replace 'install
655 (lambda* (#:key outputs #:allow-other-keys)
656 (let* ((out (assoc-ref outputs "out"))
657 (bin (string-append out "/bin"))
658 (man (string-append out "/share/man/man1"))
659 (doc (string-append out "/share/doc/netcat-openbsd-" ,version))
660 (examples (string-append doc "/examples")))
661 (install-file "nc" bin)
662 (install-file "nc.1" man)
663 (install-file "debian/copyright" doc)
664 (copy-recursively "debian/examples" examples)
665 #t))))))
666 (inputs `(("libbsd" ,libbsd)))
667 (native-inputs `(("pkg-config" ,pkg-config)
668 ("quilt" ,quilt)))
669 (home-page "https://packages.debian.org/sid/netcat-openbsd")
670 (synopsis "Read and write data over TCP/IP")
671 (description
672 "Netcat is a simple Unix utility which reads and writes data across
673 network connections using TCP or UDP protocol. It is designed to be a reliable
674 \"back-end\" tool that can be used directly or easily driven by other programs
675 and scripts. At the same time it is a feature-rich network debugging and
676 exploration tool, since it can create almost any kind of connection you would
677 need and has several interesting built-in capabilities.
678
679 This package contains the OpenBSD rewrite of netcat, including support for
680 IPv6, proxies, and Unix sockets.")
681 (license (list license:bsd-3
682 license:bsd-2)))) ; atomicio.*, socks.c
683
684 (define-public sipcalc
685 (package
686 (name "sipcalc")
687 (version "1.1.6")
688 (source
689 (origin
690 (method url-fetch)
691 (uri (string-append "http://www.routemeister.net/projects"
692 "/sipcalc/files/sipcalc" "-" version ".tar.gz"))
693 (sha256
694 (base32
695 "0mv3wndj4z2bsshh2k8d5sy3j8wxzgf8mzmmkvj1k8gpcz37dm6g"))))
696 (build-system gnu-build-system)
697 (home-page "http://www.routemeister.net/projects/sipcalc/")
698 (synopsis "Command-line IP subnet calculator")
699 (description
700 "Sipcalc is an advanced command-line IP subnet calculator. It can take
701 multiple forms of input (IPv4/IPv6/interface/hostname) and output a multitude
702 of information about a given subnet.
703
704 Features include:
705
706 @itemize @bullet
707 @item IPv4
708 @itemize
709 @item Retrieving of address information from interfaces.
710 @item Classfull and CIDR output.
711 @item Multiple address and netmask input and output formats (dotted quad, hex,
712 number of bits).
713 @item Output of broadcast address, network class, Cisco wildcard,
714 hosts/range, network range.
715 @item The ability to split a network based on a smaller netmask, now also with
716 recursive runs on the generated subnets. (also IPv6)
717 @end itemize
718 @item IPv6
719 @itemize
720 @item Compressed and expanded input and output addresses.
721 @item Standard IPv6 network output.
722 @item v4 in v6 output.
723 @item Reverse DNS address generation.
724 @end itemize
725 @end itemize\n")
726 (license license:bsd-3)))
727
728 (define-public alive
729 (package
730 (name "alive")
731 (version "2.0.2")
732 (source (origin
733 (method url-fetch)
734 (uri (string-append "mirror://gnu/alive/alive-"
735 version ".tar.xz"))
736 (sha256
737 (base32
738 "1vrzg51ai68x9yld7vbgl58sxaw5qpx8rbakwcxn4cqq6vpxj38j"))))
739 (build-system gnu-build-system)
740 (arguments '(#:configure-flags '("alive_cv_nice_ping=yes")))
741 (inputs `(("guile" ,guile-2.0)
742 ("inetutils" ,inetutils)))
743 (home-page "https://www.gnu.org/software/alive/")
744 (synopsis "Autologin and keep-alive daemon")
745 (description
746 "GNU Alive sends periodic pings to a server, generally to keep a
747 connection alive.")
748 (license license:gpl3+)))
749
750 (define-public isc-dhcp
751 (let* ((bind-major-version "9")
752 (bind-minor-version "11")
753 (bind-patch-version "13")
754 (bind-release-type "") ; for patch release, use "-P"
755 (bind-release-version "") ; for patch release, e.g. "6"
756 (bind-version (string-append bind-major-version
757 "."
758 bind-minor-version
759 "."
760 bind-patch-version
761 bind-release-type
762 bind-release-version)))
763 (package
764 (name "isc-dhcp")
765 (version "4.4.1")
766 (source (origin
767 (method url-fetch)
768 (uri (string-append "https://ftp.isc.org/isc/dhcp/"
769 version "/dhcp-" version ".tar.gz"))
770 (sha256
771 (base32
772 "025nfqx4zwdgv4b3rkw26ihcj312vir08jk6yi57ndmb4a4m08ia"))))
773 (build-system gnu-build-system)
774 (arguments
775 `(#:parallel-build? #f
776 #:phases
777 (modify-phases %standard-phases
778 (add-after 'unpack 'replace-bundled-bind
779 (lambda* (#:key inputs native-inputs #:allow-other-keys)
780 ;; XXX TODO: Remove the following invocation of 'patch' when
781 ;; isc-dhcp is updated. It should be needed only for 4.4.1.
782 (let ((patch (string-append (assoc-ref (or native-inputs inputs)
783 "patch")
784 "/bin/patch"))
785 (the-patch (assoc-ref (or native-inputs inputs)
786 "fixes-for-newer-bind.patch")))
787 (format #t "applying '~a'...~%" the-patch)
788 (invoke patch "--force" "--no-backup-if-mismatch"
789 "-p1" "--input" the-patch))
790
791 (delete-file "bind/bind.tar.gz")
792 (copy-file (assoc-ref inputs "bind-source-tarball")
793 "bind/bind.tar.gz")
794 (chmod "bind/bind.tar.gz" #o644)
795 (substitute* "bind/version.tmp"
796 (("^MAJORVER=.*")
797 (format #f "MAJORVER=~a\n" ,bind-major-version))
798 (("^MINORVER=.*")
799 (format #f "MINORVER=~a\n" ,bind-minor-version))
800 (("^PATCHVER=.*")
801 (format #f "PATCHVER=~a\n" ,bind-patch-version))
802 (("^RELEASETYPE=.*")
803 (format #f "RELEASETYPE=~a\n" ,bind-release-type))
804 (("^RELEASEVER=.*")
805 (format #f "RELEASEVER=~a\n" ,bind-release-version)))
806 #t))
807 (add-after 'configure 'post-configure
808 (lambda* (#:key outputs #:allow-other-keys)
809 ;; Point to the right client script, which will be
810 ;; installed in a later phase.
811 (substitute* "includes/dhcpd.h"
812 (("#define[[:blank:]]+_PATH_DHCLIENT_SCRIPT.*")
813 (let ((out (assoc-ref outputs "out")))
814 (string-append "#define _PATH_DHCLIENT_SCRIPT \""
815 out "/libexec/dhclient-script"
816 "\"\n"))))
817
818 ;; During the 'build' phase, 'bind.tar.gz' is extracted, so
819 ;; we must patch shebangs in there and make sure the right
820 ;; shell is used.
821 (with-directory-excursion "bind"
822 (substitute* "Makefile"
823 (("\\./configure ")
824 (let ((sh (which "sh")))
825 (string-append "./configure CONFIG_SHELL="
826 sh " SHELL=" sh " "))))
827
828 (let ((bind-directory (string-append "bind-" ,bind-version)))
829 (invoke "tar" "xf" "bind.tar.gz")
830 (for-each patch-shebang
831 (find-files bind-directory ".*"))
832 (substitute* (string-append bind-directory "/configure")
833 (("/usr/bin/file")
834 (which "file")))
835 (invoke "tar" "cf" "bind.tar.gz"
836 bind-directory
837 ;; avoid non-determinism in the archive
838 "--sort=name"
839 "--mtime=@0"
840 "--owner=root:0"
841 "--group=root:0")))))
842 (add-after 'install 'post-install
843 (lambda* (#:key inputs outputs #:allow-other-keys)
844 ;; Install the dhclient script for GNU/Linux and make sure
845 ;; if finds all the programs it needs.
846 (let* ((out (assoc-ref outputs "out"))
847 (libexec (string-append out "/libexec"))
848 (coreutils (assoc-ref inputs "coreutils"))
849 (inetutils (assoc-ref inputs "inetutils"))
850 (net-tools (assoc-ref inputs "net-tools"))
851 (sed (assoc-ref inputs "sed")))
852 (substitute* "client/scripts/linux"
853 (("/sbin/ip")
854 (string-append (assoc-ref inputs "iproute")
855 "/sbin/ip")))
856
857 (mkdir-p libexec)
858 (copy-file "client/scripts/linux"
859 (string-append libexec "/dhclient-script"))
860
861 (wrap-program
862 (string-append libexec "/dhclient-script")
863 `("PATH" ":" prefix
864 ,(map (lambda (dir)
865 (string-append dir "/bin:"
866 dir "/sbin"))
867 (list inetutils net-tools coreutils sed))))
868 #t))))))
869
870 (native-inputs
871 `(("perl" ,perl)
872 ("file" ,file)
873
874 ;; XXX TODO: Remove the following patch, and also the 'patch'
875 ;; program, when isc-dhcp is updated.
876 ("fixes-for-newer-bind.patch"
877 ,(search-patch "isc-dhcp-4.4.1-fixes-for-newer-bind.patch"))
878 ("patch" ,patch)))
879
880 (inputs `(("inetutils" ,inetutils)
881 ("net-tools" ,net-tools)
882 ("iproute" ,iproute)
883
884 ;; XXX isc-dhcp bundles a copy of bind that has security
885 ;; flaws, so we use a newer version.
886 ("bind-source-tarball"
887 ,(origin
888 (method url-fetch)
889 (uri (string-append "https://ftp.isc.org/isc/bind9/"
890 bind-version
891 "/bind-" bind-version ".tar.gz"))
892 (sha256
893 (base32
894 "0z8g81xinqx8j3y2fclxa31dq7zsi9cj9srmvd9agnpwzk4kqgzx"))))
895
896 ;; When cross-compiling, we need the cross Coreutils and sed.
897 ;; Otherwise just use those from %FINAL-INPUTS.
898 ,@(if (%current-target-system)
899 `(("coreutils" ,coreutils)
900 ("sed" ,sed))
901 '())))
902
903 (home-page "https://www.isc.org/products/DHCP/")
904 (synopsis "Dynamic Host Configuration Protocol (DHCP) tools")
905 (description
906 "ISC's Dynamic Host Configuration Protocol (DHCP) distribution provides a
907 reference implementation of all aspects of DHCP, through a suite of DHCP
908 tools: server, client, and relay agent.")
909 (license license:mpl2.0)
910 (properties '((cpe-name . "dhcp"))))))
911
912 (define-public libpcap
913 (package
914 (name "libpcap")
915 (version "1.9.1")
916 (source (origin
917 (method url-fetch)
918 (uri (string-append "https://www.tcpdump.org/release/libpcap-"
919 version ".tar.gz"))
920 (sha256
921 (base32
922 "153h1378diqyc27jjgz6gg5nxmb4ddk006d9xg69nqavgiikflk3"))))
923 (build-system gnu-build-system)
924 (native-inputs
925 `(("bison" ,bison)
926 ("flex" ,flex)))
927 (arguments
928 ;; There are some tests in testprogs/, but no automated test suite.
929 '(#:tests? #f))
930 (home-page "https://www.tcpdump.org")
931 (synopsis "Network packet capture library")
932 (description
933 "libpcap is an interface for user-level packet capture. It provides a
934 portable framework for low-level network monitoring. Applications include
935 network statistics collection, security monitoring, network debugging, etc.")
936 (license (list license:bsd-4 ; fad-*.c and several other source files
937 license:bsd-3 ; pcap/, sockutils.* & others
938 license:bsd-2)))) ; the rest
939
940 (define-public tcpdump
941 (package
942 (name "tcpdump")
943 (version "4.9.3")
944 (source (origin
945 (method url-fetch)
946 (uri (string-append "https://www.tcpdump.org/release/tcpdump-"
947 version ".tar.gz"))
948 (sha256
949 (base32
950 "0434vdcnbqaia672rggjzdn4bb8p8dchz559yiszzdk0sjrprm1c"))))
951 (build-system gnu-build-system)
952 (inputs `(("libpcap" ,libpcap)
953 ("openssl" ,openssl)))
954 (native-inputs `(("perl" ,perl))) ; for tests
955 (home-page "https://www.tcpdump.org/")
956 (synopsis "Network packet analyzer")
957 (description
958 "Tcpdump is a command-line tool to analyze network traffic passing
959 through the network interface controller.")
960 (license license:bsd-3)))
961
962 (define-public jnettop
963 (package
964 (name "jnettop")
965 (version "0.13.0")
966 (source (origin
967 (method url-fetch)
968 (uri
969 (string-append "https://web.archive.org/web/20161221100811/"
970 "http://jnettop.kubs.info/dist/jnettop-"
971 version ".tar.gz"))
972 (sha256
973 (base32
974 "1855np7c4b0bqzhf1l1dyzxb90fpnvrirdisajhci5am6als31z9"))))
975 (build-system gnu-build-system)
976 (native-inputs
977 `(("pkg-config" ,pkg-config)))
978 (inputs
979 `(("glib" ,glib)
980 ("ncurses" ,ncurses)
981 ("libpcap" ,libpcap)))
982 (home-page
983 "https://web.archive.org/web/20160703195221/http://jnettop.kubs.info/wiki/")
984 (synopsis "Visualize network traffic by bandwidth use")
985 (description
986 "Jnettop is a traffic visualiser, which captures traffic going
987 through the host it is running from and displays streams sorted
988 by bandwidth they use.")
989 (license license:gpl2+)))
990
991 (define-public clusterssh
992 (package
993 (name "clusterssh")
994 (version "4.13.2")
995 (source (origin
996 (method url-fetch)
997 (uri (string-append "mirror://sourceforge/clusterssh/"
998 "2.%20ClusterSSH%20Series%204/"
999 "App-ClusterSSH-v" version ".tar.gz"))
1000 (sha256
1001 (base32
1002 "0rmk2p3f2wz1h092anidjclh212rv3gxyk0c641qk3frlrjnw6mp"))))
1003 (build-system perl-build-system)
1004 (arguments
1005 `(#:phases
1006 (modify-phases %standard-phases
1007 (add-after 'unpack 'refer-to-inputs
1008 (lambda* (#:key inputs #:allow-other-keys)
1009 (substitute* (list "lib/App/ClusterSSH/Config.pm"
1010 "t/15config.t")
1011 (("xterm")
1012 (which "xterm")))
1013 #t))
1014 (add-before 'check 'delete-failing-tests
1015 (lambda _
1016 ;; This checks whether all code is nicely formatted. The above
1017 ;; ‘refer-to-inputs’ phase breaks this pedantry, so disable it.
1018 (delete-file "t/perltidy.t")
1019 ;; Update the manifest so t/manifest.t happily passes.
1020 (substitute* "MANIFEST"
1021 (("t/perltidy.t\n") ""))
1022 #t))
1023 (add-after 'install 'augment-library-path
1024 (lambda* (#:key inputs outputs #:allow-other-keys)
1025 (let* ((out (assoc-ref outputs "out"))
1026 (bin (string-append out "/bin")))
1027 (with-directory-excursion bin
1028 (for-each
1029 (lambda (program)
1030 (wrap-program program
1031 `("PERL5LIB" ":" prefix
1032 ,(map (lambda (file-name)
1033 (string-append file-name
1034 "/lib/perl5/site_perl"))
1035 (cons out
1036 (map (lambda (input)
1037 (assoc-ref inputs input))
1038 ;; These may be propagated and hence
1039 ;; not explicitly listed as inputs.
1040 (list "perl-class-data-inheritable"
1041 "perl-devel-stacktrace"
1042 "perl-exception-class"
1043 "perl-tk"
1044 "perl-try-tiny"
1045 "perl-x11-protocol"
1046 "perl-x11-protocol-other")))))))
1047 (find-files "." ".*")))
1048 #t))))))
1049 (native-inputs
1050 `(("perl-cpan-changes" ,perl-cpan-changes)
1051 ("perl-file-slurp" ,perl-file-slurp)
1052 ("perl-file-which" ,perl-file-which)
1053 ("perl-module-build" ,perl-module-build)
1054 ("perl-readonly" ,perl-readonly)
1055 ("perl-test-differences" ,perl-test-differences)
1056 ("perl-test-distmanifest" ,perl-test-distmanifest)
1057 ("perl-test-perltidy" ,perl-test-perltidy)
1058 ("perl-test-pod" ,perl-test-pod)
1059 ("perl-test-pod-coverage" ,perl-test-pod-coverage)
1060 ("perl-test-trap" ,perl-test-trap)
1061 ("perltidy" ,perltidy)))
1062 (inputs
1063 `(("perl-exception-class" ,perl-exception-class)
1064 ("perl-sort-naturally" ,perl-sort-naturally)
1065 ("perl-tk" ,perl-tk)
1066 ("perl-try-tiny" ,perl-try-tiny)
1067 ("perl-x11-protocol" ,perl-x11-protocol)
1068 ("perl-x11-protocol-other" ,perl-x11-protocol-other)
1069 ("xterm" ,xterm)))
1070 ;; The clusterssh.sourceforge.net address requires login to view
1071 (home-page "https://sourceforge.net/projects/clusterssh/")
1072 (synopsis "Secure concurrent multi-server terminal control")
1073 (description
1074 "ClusterSSH controls a number of xterm windows via a single graphical
1075 console window to allow commands to be interactively run on multiple servers
1076 over ssh connections.")
1077 (license license:gpl2+)))
1078
1079 (define-public rename
1080 (package
1081 (name "rename")
1082 (version "1.10")
1083 (source (origin
1084 (method url-fetch)
1085 (uri (string-append
1086 "mirror://cpan/authors/id/R/RM/RMBARKER/File-Rename-"
1087 version ".tar.gz"))
1088 (sha256
1089 (base32
1090 "137m8s06r4n038ivlr5r1d9a7q9l7shmwpvnyx053r9ndhvbnkh5"))))
1091 (build-system perl-build-system)
1092 (arguments
1093 `(#:phases
1094 (modify-phases %standard-phases
1095 (add-after 'install 'find-itself
1096 ;; Fix run-time 'Can't locate File/Rename.pm in @INC' failure.
1097 (lambda* (#:key outputs #:allow-other-keys)
1098 (let* ((out (assoc-ref outputs "out"))
1099 (bin (string-append out "/bin")))
1100 (with-directory-excursion bin
1101 (for-each
1102 (lambda (program)
1103 (wrap-program program
1104 `("PERL5LIB" ":" prefix
1105 (,(string-append out "/lib/perl5/site_perl")))))
1106 (find-files "." ".*")))
1107 #t))))))
1108 (native-inputs
1109 `(("perl-module-build" ,perl-module-build)
1110 ("perl-test-pod" ,perl-test-pod)
1111 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1112 (home-page "https://metacpan.org/pod/distribution/File-Rename/rename.PL")
1113 (synopsis "Perl extension for renaming multiple files")
1114 (description
1115 "This package provides a Perl interface (@code{Perl::Rename}) as well
1116 as a command-line utility (@command{rename}) that can rename multiple files
1117 at once based on a Perl regular expression.")
1118 (license license:perl-license)))
1119
1120 (define-public rottlog
1121 (package
1122 (name "rottlog")
1123 (version "0.72.2")
1124 (source (origin
1125 (method url-fetch)
1126 (uri (string-append "mirror://gnu/rottlog/rottlog-"
1127 version ".tar.gz"))
1128 (sha256
1129 (base32
1130 "0751mb9l2f0jrk3vj6q8ilanifd121dliwk0c34g8k0dlzsv3kd7"))
1131 (modules '((guix build utils)))
1132 (snippet
1133 '(begin
1134 (substitute* "Makefile.in"
1135 (("-o \\$\\{LOG_OWN\\} -g \\$\\{LOG_GROUP\\}")
1136 ;; Don't try to chown root.
1137 "")
1138 (("mkdir -p \\$\\(ROTT_STATDIR\\)")
1139 ;; Don't attempt to create /var/lib/rottlog.
1140 "true"))
1141 #t))))
1142 (build-system gnu-build-system)
1143 (arguments
1144 '(#:configure-flags (list "ROTT_ETCDIR=/etc/rottlog" ;rc file location
1145 "--localstatedir=/var")
1146
1147 ;; Install example config files in OUT/etc.
1148 #:make-flags (list (string-append "ROTT_ETCDIR="
1149 (assoc-ref %outputs "out")
1150 "/etc"))
1151
1152 #:phases (modify-phases %standard-phases
1153 (add-after 'unpack 'patch-paths
1154 (lambda _
1155 (substitute* "rc/rc"
1156 (("/usr/sbin/sendmail") "sendmail"))
1157 #t))
1158 (add-after 'build 'set-packdir
1159 (lambda _
1160 ;; Set a default location for archived logs.
1161 (substitute* "rc/rc"
1162 (("packdir=\"\"")
1163 "packdir=\"/var/log\""))
1164 #t))
1165 (add-before 'install 'tweak-rc-weekly
1166 (lambda _
1167 (substitute* "rc/weekly"
1168 (("/bin/kill")
1169 (which "kill"))
1170 (("syslogd\\.pid")
1171 ;; The file is called 'syslog.pid' (no 'd').
1172 "syslog.pid"))
1173 #t))
1174 (add-after 'install 'install-info
1175 (lambda _
1176 (invoke "make" "install-info"))))))
1177 (native-inputs `(("texinfo" ,texinfo)
1178 ("util-linux" ,util-linux))) ; for 'cal'
1179 (home-page "https://www.gnu.org/software/rottlog/")
1180 (synopsis "Log rotation and management")
1181 (description
1182 "GNU Rot[t]log is a program for managing log files. It is used to
1183 automatically rotate out log files when they have reached a given size or
1184 according to a given schedule. It can also be used to automatically compress
1185 and archive such logs. Rot[t]log will mail reports of its activity to the
1186 system administrator.")
1187 (license license:gpl3+)))
1188
1189 (define-public sudo
1190 (package
1191 (name "sudo")
1192 (version "1.8.29")
1193 (source (origin
1194 (method url-fetch)
1195 (uri
1196 (list (string-append "https://www.sudo.ws/sudo/dist/sudo-"
1197 version ".tar.gz")
1198 (string-append "ftp://ftp.sudo.ws/pub/sudo/OLD/sudo-"
1199 version ".tar.gz")))
1200 (sha256
1201 (base32
1202 "0z4wyadh9cks17gdpfgx4kvbrlnyb6nai2sd6chk7qh4jsngylyf"))
1203 (modules '((guix build utils)))
1204 (snippet
1205 '(begin
1206 (delete-file-recursively "lib/zlib")
1207 #t))))
1208 (build-system gnu-build-system)
1209 (arguments
1210 `(#:configure-flags
1211 (list "--with-logpath=/var/log/sudo.log"
1212 "--with-rundir=/var/run/sudo" ; must be cleaned up at boot time
1213 "--with-vardir=/var/db/sudo"
1214 "--with-iologdir=/var/log/sudo-io"
1215
1216 ;; 'visudo.c' expects _PATH_MV to be defined, but glibc doesn't
1217 ;; provide it.
1218 (string-append "CPPFLAGS=-D_PATH_MV='\""
1219 (assoc-ref %build-inputs "coreutils")
1220 "/bin/mv\"'"))
1221
1222 ;; Avoid non-determinism; see <http://bugs.gnu.org/21918>.
1223 #:parallel-build? #f
1224
1225 #:phases
1226 (modify-phases %standard-phases
1227 (add-before 'configure 'pre-configure
1228 (lambda _
1229 (substitute* "src/sudo_usage.h.in"
1230 ;; Do not capture 'configure' arguments since we would
1231 ;; unduly retain references, and also because the
1232 ;; CPPFLAGS above would close the string literal
1233 ;; prematurely.
1234 (("@CONFIGURE_ARGS@") "\"\""))
1235 (substitute* (find-files "." "Makefile\\.in")
1236 (("-o [[:graph:]]+ -g [[:graph:]]+")
1237 ;; Allow installation as non-root.
1238 "")
1239 (("^install: (.*)install-sudoers(.*)" _ before after)
1240 ;; Don't try to create /etc/sudoers.
1241 (string-append "install: " before after "\n"))
1242 (("\\$\\(DESTDIR\\)\\$\\(rundir\\)")
1243 ;; Don't try to create /run/sudo.
1244 "$(TMPDIR)/dummy")
1245 (("\\$\\(DESTDIR\\)\\$\\(vardir\\)")
1246 ;; Don't try to create /var/db/sudo.
1247 "$(TMPDIR)/dummy"))
1248
1249 ;; ‘Checking existing [/etc/]sudoers file for syntax errors’ is
1250 ;; not the task of the build system, and fails.
1251 (substitute* "plugins/sudoers/Makefile.in"
1252 (("^pre-install:" match)
1253 (string-append match "\ndisabled-" match)))
1254 #t)))
1255
1256 ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
1257 ;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
1258 #:tests? #f))
1259 (inputs
1260 `(("groff" ,groff)
1261 ("linux-pam" ,linux-pam)
1262 ("zlib" ,zlib)
1263 ("coreutils" ,coreutils)))
1264 (home-page "https://www.sudo.ws/")
1265 (synopsis "Run commands as root")
1266 (description
1267 "Sudo (su \"do\") allows a system administrator to delegate authority to
1268 give certain users (or groups of users) the ability to run some (or all)
1269 commands as root or another user while providing an audit trail of the
1270 commands and their arguments.")
1271
1272 ;; See <http://www.sudo.ws/sudo/license.html>.
1273 (license license:x11)))
1274
1275 (define-public wpa-supplicant-minimal
1276 (package
1277 (name "wpa-supplicant-minimal")
1278 (version "2.9")
1279 (source (origin
1280 (method url-fetch)
1281 (uri (string-append
1282 "https://w1.fi/releases/wpa_supplicant-"
1283 version ".tar.gz"))
1284 (sha256
1285 (base32
1286 "05qzak1mssnxcgdrafifxh9w86a4ha69qabkg4bsigk499xyxggw"))
1287 (modules '((guix build utils)))
1288 (snippet
1289 '(begin
1290 (substitute* "wpa_supplicant/defconfig"
1291 ;; Disable D-Bus to save ~14MiB on the closure size.
1292 (("^CONFIG_CTRL_IFACE_DBUS" line _)
1293 (string-append "#" line)))
1294 #t))))
1295 (build-system gnu-build-system)
1296 (arguments
1297 '(#:phases
1298 (modify-phases %standard-phases
1299 (replace 'configure
1300 (lambda* (#:key outputs #:allow-other-keys)
1301 (chdir "wpa_supplicant")
1302 (copy-file "defconfig" ".config")
1303 (let ((port (open-file ".config" "al")))
1304 (display "
1305 CONFIG_DEBUG_SYSLOG=y
1306
1307 CONFIG_TLS=openssl
1308
1309 CONFIG_DRIVER_NL80211=y
1310 CFLAGS += $(shell pkg-config libnl-3.0 --cflags)
1311 CONFIG_LIBNL32=y
1312 CONFIG_READLINE=y\n" port)
1313 (close-port port))
1314 #t))
1315 (add-after 'install 'install-documentation
1316 (lambda* (#:key outputs #:allow-other-keys)
1317 (let* ((out (assoc-ref outputs "out"))
1318 (doc (string-append out "/share/doc/wpa-supplicant"))
1319 (man (string-append out "/share/man"))
1320 (man5 (string-append man "/man5"))
1321 (man8 (string-append man "/man8")))
1322 (define (copy-man-page target)
1323 (lambda (file)
1324 (install-file file target)))
1325
1326 (mkdir-p man5) (mkdir man8)
1327 (for-each (copy-man-page man5)
1328 (find-files "doc/docbook" "\\.5"))
1329 (for-each (copy-man-page man8)
1330 (find-files "doc/docbook" "\\.8"))
1331
1332 ;; wpa_supplicant.conf(5) does not explain all configuration
1333 ;; options but refers to the example config file, so install it
1334 ;; along with READMEs.
1335 (for-each (lambda (file)
1336 (install-file file doc))
1337 '("README" "README-DPP" "README-HS20"
1338 "README-P2P" "README-WPS"
1339 "wpa_supplicant.conf"))
1340 #t))))
1341
1342 #:make-flags (list "CC=gcc"
1343 (string-append "BINDIR=" (assoc-ref %outputs "out")
1344 "/sbin")
1345 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1346 "/lib"))
1347 #:tests? #f))
1348 (inputs
1349 `(("readline" ,readline)
1350 ("libnl" ,libnl)
1351 ("openssl" ,openssl)))
1352 (native-inputs
1353 `(("pkg-config" ,pkg-config)))
1354 (home-page "https://w1.fi/wpa_supplicant/")
1355 (synopsis "Connecting to WPA and WPA2-protected wireless networks")
1356 (description
1357 "wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
1358 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in
1359 the client stations. It implements key negotiation with a WPA Authenticator
1360 and it controls the roaming and IEEE 802.11 authentication/association of the
1361 WLAN driver.
1362
1363 This package provides the @code{wpa_supplicant} daemon and the @code{wpa_cli}
1364 command.")
1365
1366 ;; In practice, this is linked against Readline, which makes it GPLv3+.
1367 (license license:bsd-3)
1368
1369 (properties `((cpe-name . "wpa_supplicant")))))
1370
1371 (define-public wpa-supplicant
1372 (package (inherit wpa-supplicant-minimal)
1373 (name "wpa-supplicant")
1374 (inputs `(("dbus" ,dbus)
1375 ,@(package-inputs wpa-supplicant-minimal)))
1376 (arguments
1377 (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
1378 ((#:phases phases)
1379 `(modify-phases ,phases
1380 (add-after 'configure 'configure-for-dbus
1381 (lambda _
1382 (let ((port (open-file ".config" "al")))
1383 (display "
1384 CONFIG_CTRL_IFACE_DBUS_NEW=y
1385 CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
1386 (close-port port))
1387 #t))
1388 (add-after 'install-documentation 'install-dbus-conf
1389 (lambda* (#:key outputs #:allow-other-keys)
1390 (let* ((out (assoc-ref outputs "out"))
1391 (dir (string-append out "/etc/dbus-1/system.d")))
1392 (mkdir-p dir)
1393 (copy-file "dbus/dbus-wpa_supplicant.conf"
1394 (string-append dir "/wpa_supplicant.conf")))
1395 #t))))))))
1396
1397 (define-public wpa-supplicant-gui
1398 (package
1399 (inherit wpa-supplicant)
1400 (name "wpa-supplicant-gui")
1401 (inputs `(("qtbase" ,qtbase)
1402 ("qtsvg" ,qtsvg)
1403 ,@(package-inputs wpa-supplicant)))
1404 (native-inputs
1405 ;; For icons.
1406 `(("imagemagick" ,imagemagick)
1407 ("inkscape" ,inkscape)
1408 ,@(package-native-inputs wpa-supplicant)))
1409 (arguments
1410 `(#:phases (modify-phases %standard-phases
1411 (add-after 'unpack 'chdir
1412 (lambda _
1413 (chdir "wpa_supplicant/wpa_gui-qt4")
1414 #t))
1415 (delete 'configure)
1416 (replace 'build
1417 (lambda _
1418 (invoke "qmake" "wpa_gui.pro")
1419 (invoke "make" "-j" (number->string (parallel-job-count)))
1420 (invoke "make" "-C" "icons")))
1421 (replace 'install
1422 (lambda* (#:key inputs outputs #:allow-other-keys)
1423 (let ((out (assoc-ref outputs "out"))
1424 (qt '("qtbase" "qtsvg")))
1425 (install-file "wpa_gui" (string-append out "/bin"))
1426 (install-file "wpa_gui.desktop"
1427 (string-append out "/share/applications"))
1428 (copy-recursively "icons/hicolor"
1429 (string-append out "/share/icons/hicolor"))
1430 (wrap-program (string-append out "/bin/wpa_gui")
1431 `("QT_PLUGIN_PATH" ":" prefix
1432 ,(map (lambda (label)
1433 (string-append (assoc-ref inputs label)
1434 "/lib/qt5/plugins/"))
1435 qt)))
1436 #t))))))
1437 (synopsis "Graphical user interface for WPA supplicant")))
1438
1439 (define-public hostapd
1440 (package
1441 (name "hostapd")
1442 (version "2.8")
1443 (source (origin
1444 (method url-fetch)
1445 (uri (string-append "https://w1.fi/releases/hostapd-" version
1446 ".tar.gz"))
1447 (sha256
1448 (base32
1449 "1c74rrazkhy4lr7pwgwa2igzca7h9l4brrs7672kiv7fwqmm57wj"))))
1450 (build-system gnu-build-system)
1451 (arguments
1452 '(#:phases
1453 (modify-phases %standard-phases
1454 (replace 'configure
1455 (lambda* (#:key outputs #:allow-other-keys)
1456 ;; This is mostly copied from 'wpa-supplicant' above.
1457 (chdir "hostapd")
1458 (copy-file "defconfig" ".config")
1459 (let ((port (open-file ".config" "al")))
1460 (display "
1461 CONFIG_LIBNL32=y
1462 CONFIG_IEEE80211R=y
1463 CONFIG_IEEE80211N=y
1464 CONFIG_IEEE80211AC=y\n" port)
1465 (close-port port))
1466 #t))
1467 (add-after 'install 'install-man-pages
1468 (lambda* (#:key outputs #:allow-other-keys)
1469 (let* ((out (assoc-ref outputs "out"))
1470 (man (string-append out "/share/man"))
1471 (man1 (string-append man "/man1"))
1472 (man8 (string-append man "/man8")))
1473 (define (copy-man-page target)
1474 (lambda (file)
1475 (install-file file target)))
1476
1477 (for-each (copy-man-page man1)
1478 (find-files "." "\\.1"))
1479 (for-each (copy-man-page man8)
1480 (find-files "." "\\.8"))
1481 #t))))
1482
1483 #:make-flags (list "CC=gcc"
1484 (string-append "BINDIR=" (assoc-ref %outputs "out")
1485 "/sbin")
1486 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1487 "/lib"))
1488 #:tests? #f))
1489 (native-inputs `(("pkg-config" ,pkg-config)))
1490
1491 ;; There's an optional dependency on SQLite.
1492 (inputs `(("openssl" ,openssl)
1493 ("libnl" ,libnl)))
1494 (home-page "https://w1.fi/hostapd/")
1495 (synopsis "Daemon for Wi-Fi access points and authentication servers")
1496 (description
1497 "hostapd is a user-space daemon for WiFi access points and authentication
1498 servers. It implements IEEE 802.11 access point management, IEEE
1499 802.1X/WPA/WPA2/EAP Authenticators, RADIUS client, EAP server, and RADIUS
1500 authentication server.")
1501
1502 ;; Same license as wpa_supplicant.
1503 (license license:bsd-3)))
1504
1505 (define-public wakelan
1506 (package
1507 (name "wakelan")
1508 (version "1.1")
1509 (source (origin
1510 (method url-fetch)
1511 (uri (string-append
1512 "ftp://ftp.gwdg.de/pub/linux/metalab/system/network/misc/wakelan-"
1513 version ".tar.gz"))
1514 (sha256
1515 (base32
1516 "0vydqpf44146ir6k87gmqaq6xy66xhc1gkr3nsd7jj3nhy7ypx9x"))))
1517 (build-system gnu-build-system)
1518 (arguments
1519 '(#:phases
1520 (modify-phases %standard-phases
1521 (replace 'configure
1522 (lambda* (#:key outputs #:allow-other-keys)
1523 (let ((out (assoc-ref outputs "out")))
1524 (mkdir-p (string-append out "/bin"))
1525 (mkdir-p (string-append out "/share/man/man1"))
1526
1527 ;; It's an old configure script that doesn't understand
1528 ;; the extra options we pass.
1529 (setenv "CONFIG_SHELL" (which "bash"))
1530 (invoke "./configure"
1531 (string-append "--prefix=" out)
1532 (string-append "--mandir=" out
1533 "/share/man"))))))
1534 #:tests? #f))
1535 (home-page "https://www.kernel.org") ; really, no home page
1536 (synopsis "Send a wake-on-LAN packet")
1537 (description
1538 "WakeLan broadcasts a properly formatted UDP packet across the local area
1539 network, which causes enabled computers to power on.")
1540 (license license:gpl2+)))
1541
1542 (define-public dmidecode
1543 (package
1544 (name "dmidecode")
1545 (version "3.2")
1546 (source (origin
1547 (method url-fetch)
1548 (uri (string-append
1549 "mirror://savannah/dmidecode/dmidecode-"
1550 version ".tar.xz"))
1551 (sha256
1552 (base32
1553 "1pcfhcgs2ifdjwp7amnsr3lq95pgxpr150bjhdinvl505px0cw07"))))
1554 (build-system gnu-build-system)
1555 (arguments
1556 '(#:phases (modify-phases %standard-phases (delete 'configure))
1557 #:tests? #f ; no 'check' target
1558 #:make-flags (list (string-append "prefix="
1559 (assoc-ref %outputs "out")))))
1560 (home-page "https://www.nongnu.org/dmidecode/")
1561 (synopsis "Read hardware information from the BIOS")
1562 (description
1563 "Dmidecode reports information about your system's hardware as described
1564 in your system BIOS according to the SMBIOS/DMI standard. This typically
1565 includes system manufacturer, model name, serial number, BIOS version, asset
1566 tag as well as a lot of other details of varying level of interest and
1567 reliability depending on the manufacturer. This will often include usage
1568 status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory
1569 module slots, and the list of I/O ports (e.g. serial, parallel, USB).")
1570 (license license:gpl2+)))
1571
1572 (define-public acpica
1573 (package
1574 (name "acpica")
1575 (version "20190816")
1576 (source (origin
1577 (method url-fetch)
1578 (uri (string-append
1579 "https://acpica.org/sites/acpica/files/acpica-unix2-"
1580 version ".tar.gz"))
1581 (sha256
1582 (base32
1583 "0lipy3jwl498lvgwzj6xcvmg61myl7hhilpallh1cf3ppgrq13l8"))))
1584 (build-system gnu-build-system)
1585 (native-inputs `(("flex" ,flex)
1586 ("bison" ,bison)))
1587 (arguments
1588 '(#:make-flags (list (string-append "PREFIX=" %output)
1589 "CC=gcc"
1590 "HOST=_LINUX"
1591 "OPT_CFLAGS=-Wall -fno-strict-aliasing")
1592 #:tests? #f ; no 'check' target
1593 #:phases (modify-phases %standard-phases (delete 'configure))))
1594 (home-page "https://acpica.org/")
1595 (synopsis "Tools for the development and debug of ACPI tables")
1596 (description
1597 "The ACPI Component Architecture (@dfn{ACPICA}) project provides an
1598 OS-independent reference implementation of the Advanced Configuration and
1599 Power Interface Specification (@dfn{ACPI}). ACPICA code contains those portions
1600 of ACPI meant to be directly integrated into the host OS as a kernel-resident
1601 subsystem, and a small set of tools to assist in developing and debugging ACPI
1602 tables. This package contains only the user-space tools needed for ACPI table
1603 development, not the kernel implementation of ACPI.")
1604 (license license:gpl2))) ; dual GPLv2/ACPICA Licence
1605
1606 (define-public s-tui
1607 (package
1608 (name "s-tui")
1609 (version "0.8.3")
1610 (source
1611 (origin
1612 (method url-fetch)
1613 (uri (pypi-uri "s-tui" version))
1614 (sha256
1615 (base32
1616 "00lsh2v4i8rwfyjyxx5lijd6rnk9smcfffhzg5sv94ijpcnh216m"))))
1617 (build-system python-build-system)
1618 (inputs
1619 `(("python-psutil" ,python-psutil)
1620 ("python-urwid" ,python-urwid)))
1621 (home-page "https://github.com/amanusk/s-tui")
1622 (synopsis "Interactive terminal stress test and monitoring tool")
1623 (description
1624 "The Stress Terminal UI displays graphs of the CPU frequency,
1625 utilization, temperature and power.")
1626 (license license:gpl2+)))
1627
1628 (define-public stress
1629 (package
1630 (name "stress")
1631 (version "1.0.4")
1632 (source (origin
1633 (method url-fetch)
1634 (uri (string-append "mirror://debian/pool/main/s/stress/stress_"
1635 version ".orig.tar.gz"))
1636 (sha256
1637 (base32
1638 "0nw210jajk38m3y7h8s130ps2qsbz7j75wab07hi2r3hlz14yzh5"))))
1639 (build-system gnu-build-system)
1640 (home-page "https://packages.debian.org/sid/stress")
1641 (synopsis "Impose load on and stress test a computer system")
1642 (description
1643 "Stress is a tool that imposes a configurable amount of CPU, memory, I/O,
1644 or disk stress on a POSIX-compliant operating system and reports any errors it
1645 detects.
1646
1647 Stress is not a benchmark. It is a tool used by system administrators to
1648 evaluate how well their systems will scale, by kernel programmers to evaluate
1649 perceived performance characteristics, and by systems programmers to expose
1650 the classes of bugs which only or more frequently manifest themselves when the
1651 system is under heavy load.")
1652 (license license:gpl2+)))
1653
1654 (define-public detox
1655 (package
1656 (name "detox")
1657 (version "1.3.0")
1658 (source (origin
1659 (method git-fetch)
1660 (uri (git-reference
1661 (url "https://github.com/dharple/detox.git")
1662 (commit (string-append "v" version))))
1663 (file-name (git-file-name name version))
1664 (sha256
1665 (base32
1666 "1dd608c7g65s5lj02cddvani3q9kzirddgkjqa22ap9d4f8b9xgr"))))
1667 (build-system gnu-build-system)
1668 (native-inputs
1669 `(("autoconf" ,autoconf)
1670 ("automake" ,automake)
1671 ("flex" ,flex)))
1672 (arguments
1673 `(#:tests? #f ;no 'check' target
1674 #:phases (modify-phases %standard-phases
1675 (add-after 'unpack 'delete-configure
1676 ;; The "configure" script is present, but otherwise the
1677 ;; project is not bootstrapped: missing install-sh and
1678 ;; Makefile.in, so delete it so the bootstrap phase will
1679 ;; take over.
1680 (lambda _ (delete-file "configure") #t)))))
1681 (home-page "https://github.com/dharple/detox")
1682 (synopsis "Clean up file names")
1683 (description
1684 "Detox is a program that renames files to make them easier to work with
1685 under Unix and related operating systems. Spaces and various other unsafe
1686 characters (such as \"$\") get replaced with \"_\". ISO 8859-1 (Latin-1)
1687 characters can be replaced as well, as can UTF-8 characters.")
1688 (license license:bsd-3)))
1689
1690 (define-public testdisk
1691 (package
1692 (name "testdisk")
1693 (version "7.1")
1694 (source (origin
1695 (method url-fetch)
1696 (uri (string-append "https://www.cgsecurity.org/testdisk-"
1697 version ".tar.bz2"))
1698 (sha256
1699 (base32
1700 "1zlh44w67py416hkvw6nrfmjickc2d43v51vcli5p374d5sw84ql"))))
1701 (build-system gnu-build-system)
1702 (inputs
1703 `(("ntfs-3g" ,ntfs-3g)
1704 ("util-linux" ,util-linux)
1705 ("openssl" ,openssl)
1706 ;; FIXME: add reiserfs.
1707 ("zlib" ,zlib)
1708 ("e2fsprogs" ,e2fsprogs)
1709 ("libjpeg" ,libjpeg)
1710 ("ncurses" ,ncurses)))
1711 (home-page "https://www.cgsecurity.org/wiki/TestDisk")
1712 (synopsis "Data recovery tool")
1713 (description
1714 "TestDisk is a program for data recovery, primarily designed to help
1715 recover lost partitions and/or make non-booting disks bootable again.")
1716 (license license:gpl2+)))
1717
1718 (define-public tree
1719 (package
1720 (name "tree")
1721 (version "1.8.0")
1722 (source (origin
1723 (method url-fetch)
1724 (uri (string-append
1725 "http://mama.indstate.edu/users/ice/tree/src/tree-"
1726 version ".tgz"))
1727 (sha256
1728 (base32 "1hmpz6k0mr6salv0nprvm1g0rdjva1kx03bdf1scw8a38d5mspbi"))))
1729 (build-system gnu-build-system)
1730 (arguments
1731 '(#:phases (modify-phases %standard-phases (delete 'configure))
1732 #:tests? #f ; no check target
1733 #:make-flags (let ((out (assoc-ref %outputs "out")))
1734 (list (string-append "prefix=" out)))))
1735 (synopsis "Recursively list the contents of a directory")
1736 (description
1737 "Tree is a recursive directory listing command that produces a depth
1738 indented listing of files, which is colorized ala dircolors if the LS_COLORS
1739 environment variable is set and output is to tty.")
1740 (home-page "http://mama.indstate.edu/users/ice/tree/")
1741 (license license:gpl2+)))
1742
1743 (define-public direvent
1744 (package
1745 (name "direvent")
1746 (version "5.2")
1747 (source (origin
1748 (method url-fetch)
1749 (uri (string-append "mirror://gnu/direvent/direvent-"
1750 version ".tar.gz"))
1751 (sha256
1752 (base32
1753 "0m9vi01b1km0cpknflyzsjnknbava0s1n6393b2bpjwyvb6j5613"))
1754 (modules '((guix build utils)))
1755 (snippet '(begin
1756 (substitute* "tests/testsuite"
1757 (("#![[:blank:]]?/bin/sh")
1758 "#!$SHELL"))
1759 #t))))
1760 (build-system gnu-build-system)
1761 (arguments
1762 '(#:phases
1763 (modify-phases %standard-phases
1764 (add-before 'build 'patch-/bin/sh
1765 (lambda* (#:key inputs #:allow-other-keys)
1766 ;; Use the right shell when executing the watcher and
1767 ;; user-provided shell commands.
1768 (let ((bash (assoc-ref inputs "bash")))
1769 (substitute* '("src/direvent.c" "src/progman.c")
1770 (("\"/bin/sh\"")
1771 (string-append "\"" bash "/bin/sh\"")))
1772
1773 ;; Adjust the 'shell.at' test accordingly.
1774 (substitute* "tests/testsuite"
1775 (("SHELL=/bin/sh")
1776 (string-append "SHELL=" bash "/bin/sh")))
1777
1778 #t))))))
1779 (home-page "https://www.gnu.org/software/direvent/")
1780 (synopsis "Daemon to monitor directories for events such as file removal")
1781 (description
1782 "A daemon that monitors directories for events, such as creating,
1783 deleting or modifying files. It can monitor different sets of directories for
1784 different events. When an event is detected, direvent calls a specified
1785 external program with information about the event, such as the location
1786 within the file system where it occurred. Thus, \"direvent\" provides an
1787 easy way to react immediately if given files undergo changes, for example, to
1788 track changes in important system configuration files.")
1789 (license license:gpl3+)))
1790
1791 (define-public libcap-ng
1792 (package
1793 (name "libcap-ng")
1794 (version "0.7.10")
1795 (source (origin
1796 (method url-fetch)
1797 (uri (string-append
1798 "https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-"
1799 version ".tar.gz"))
1800 (sha256
1801 (base32
1802 "1gzzy12agfa9ddipdf72h9y68zqqnvsjjylv4vnq6hj4w2safk58"))))
1803 (build-system gnu-build-system)
1804 (arguments
1805 `(#:configure-flags
1806 (list "--without-python")))
1807 (home-page "https://people.redhat.com/sgrubb/libcap-ng/")
1808 (synopsis "Library for more easily working with POSIX capabilities")
1809 (description
1810 "The libcap-ng library is intended to make programming with POSIX
1811 capabilities easier than the traditional libcap library. It includes
1812 utilities that can analyse all currently running applications and print out
1813 any capabilities and whether or not it has an open ended bounding set. The
1814 included utilities are designed to let admins and developers spot apps from
1815 various ways that may be running with too much privilege.")
1816 ;; The library is lgpl2.1+, but also ships some utils which are gpl2+.
1817 (license (list license:lgpl2.1+ license:gpl2+))))
1818
1819 (define-public smartmontools
1820 (package
1821 (name "smartmontools")
1822 (version "7.0")
1823 (source (origin
1824 (method url-fetch)
1825 (uri (string-append
1826 "mirror://sourceforge/smartmontools/smartmontools/"
1827 version "/smartmontools-" version ".tar.gz"))
1828 (sha256
1829 (base32
1830 "077nx2rn9szrg6isdh0938zbp7vr3dsyxl4jdyyzv1xwhqksrqg5"))))
1831 (build-system gnu-build-system)
1832 (inputs `(("libcap-ng" ,libcap-ng)))
1833 (home-page "https://www.smartmontools.org/")
1834 (synopsis "S.M.A.R.T. harddisk control and monitoring tools")
1835 (description
1836 "The smartmontools package contains utility programs to control and
1837 monitor storage systems using the Self-Monitoring, Analysis and Reporting
1838 Technology System (@dfn{S.M.A.R.T.}) built into most modern ATA and SCSI hard
1839 disks. In many cases, these utilities will provide advanced warning of disk
1840 degradation and failure.")
1841 (license license:gpl2+)))
1842
1843 (define-public fdupes
1844 (package
1845 (name "fdupes")
1846 (version "1.6.1")
1847 (source
1848 (origin
1849 (method git-fetch)
1850 (uri (git-reference
1851 (url "https://github.com/adrianlopezroche/fdupes.git")
1852 (commit (string-append "v" version))))
1853 (file-name (git-file-name name version))
1854 (sha256
1855 (base32 "19b6vqblddaw8ccw4sn0qsqzbswlhrz8ia6n4m3hymvcxn8skpz9"))))
1856 (build-system gnu-build-system)
1857 (arguments
1858 '(#:phases (modify-phases %standard-phases
1859 (delete 'configure))
1860 #:tests? #f ; no 'check' target
1861 #:make-flags (list "CC=gcc"
1862 (string-append "PREFIX="
1863 (assoc-ref %outputs "out")))))
1864 (home-page "https://github.com/adrianlopezroche/fdupes")
1865 (synopsis "Identify duplicate files")
1866 (description
1867 "fdupes is a program for identifying duplicate files residing within
1868 specified directories.")
1869 (license license:expat)))
1870
1871 (define-public graphios
1872 (package
1873 (name "graphios")
1874 (version "2.0.3")
1875 (source
1876 (origin
1877 (method url-fetch)
1878 (uri (pypi-uri "graphios" version))
1879 (sha256
1880 (base32
1881 "1h87hvc315wg6lklbf4l7csd3n5pgljwrfli1p3nasdi0izgn66i"))))
1882 (build-system python-build-system)
1883 (arguments
1884 ;; Be warned: Building with Python 3 succeeds, but the build process
1885 ;; throws a syntax error that is ignored.
1886 `(#:python ,python-2
1887 #:phases
1888 (modify-phases %standard-phases
1889 (add-before 'build 'fix-setup.py
1890 (lambda* (#:key outputs #:allow-other-keys)
1891 ;; Fix hardcoded, unprefixed file names.
1892 (let ((out (assoc-ref outputs "out")))
1893 (substitute* '("setup.py")
1894 (("/etc") (string-append out "/etc"))
1895 (("/usr") out)
1896 (("distro_ver = .*") "distro_ver = ''"))
1897 #t))))))
1898 (home-page "https://github.com/shawn-sterling/graphios")
1899 (synopsis "Emit Nagios metrics to Graphite, Statsd, and Librato")
1900 (description
1901 "Graphios is a script to emit nagios perfdata to various upstream metrics
1902 processing and time-series systems. It's currently compatible with Graphite,
1903 Statsd, Librato and InfluxDB. Graphios can emit Nagios metrics to any number
1904 of supported upstream metrics systems simultaneously.")
1905 (license license:gpl2+)))
1906
1907 (define-public ansible
1908 (package
1909 (name "ansible")
1910 (version "2.8.5")
1911 (source
1912 (origin
1913 (method url-fetch)
1914 (uri (pypi-uri "ansible" version))
1915 (sha256
1916 (base32 "11k94ifp42psivzx147xwbmq1ak7qnjdgkb6c1xz53nfapkh754f"))))
1917 (build-system python-build-system)
1918 (native-inputs
1919 `(("python-bcrypt" ,python-bcrypt)
1920 ("python-pynacl" ,python-pynacl)
1921 ("python-httplib2" ,python-httplib2)
1922 ("python-passlib" ,python-passlib)
1923 ("python-nose" ,python-nose)
1924 ("python-mock" ,python-mock)
1925 ("python-jinja2" ,python-jinja2)
1926 ("python-pyyaml" ,python-pyyaml)
1927 ("python-paramiko" ,python-paramiko)))
1928 (inputs
1929 `(("python-cryptography" ,python-cryptography)
1930 ("python-jinja2" ,python-jinja2)
1931 ("python-pyyaml" ,python-pyyaml)
1932 ("python-paramiko" ,python-paramiko)))
1933 (arguments
1934 `(#:phases
1935 (modify-phases %standard-phases
1936 ;; Several ansible commands (ansible-config, ansible-console, etc.)
1937 ;; are just symlinks to a single ansible executable. The ansible
1938 ;; executable behaves differently based on the value of
1939 ;; sys.argv[0]. This does not work well with our wrap phase, and
1940 ;; therefore the following two phases are required as a workaround.
1941 (add-after 'unpack 'hide-wrapping
1942 (lambda _
1943 ;; Overwrite sys.argv[0] to hide the wrapper script from it.
1944 (substitute* "bin/ansible"
1945 (("import traceback" all)
1946 (string-append all "
1947 import re
1948 sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
1949 ")))
1950 #t))
1951 (add-after 'install 'replace-symlinks
1952 (lambda* (#:key outputs #:allow-other-keys)
1953 ;; Replace symlinks with duplicate copies of the ansible
1954 ;; executable.
1955 (let ((out (assoc-ref outputs "out")))
1956 (for-each
1957 (lambda (subprogram)
1958 (delete-file (string-append out "/bin/ansible-" subprogram))
1959 (copy-file (string-append out "/bin/ansible")
1960 (string-append out "/bin/ansible-" subprogram)))
1961 (list "config" "console" "doc" "galaxy"
1962 "inventory" "playbook" "pull" "vault")))
1963 #t)))))
1964 (home-page "https://www.ansible.com/")
1965 (synopsis "Radically simple IT automation")
1966 (description "Ansible is a radically simple IT automation system. It
1967 handles configuration management, application deployment, cloud provisioning,
1968 ad hoc task execution, and multinode orchestration---including trivializing
1969 things like zero-downtime rolling updates with load balancers.")
1970 (license license:gpl3+)))
1971
1972 (define-public debops
1973 (package
1974 (name "debops")
1975 (version "1.1.0")
1976 (source
1977 (origin
1978 (method git-fetch)
1979 (uri (git-reference
1980 (url "https://github.com/debops/debops")
1981 (commit (string-append "v" version))))
1982 (file-name (git-file-name name version))
1983 (sha256
1984 (base32 "052b2dykdn35pdpn9s4prawl6nl6yzih8nyf54hpvhpisvjrm1v5"))
1985 (patches
1986 (search-patches "debops-constants-for-external-program-names.patch"
1987 "debops-debops-defaults-fall-back-to-less.patch"))))
1988 (build-system python-build-system)
1989 (native-inputs
1990 `(("git" ,git)))
1991 (inputs
1992 `(("ansible" ,ansible)
1993 ("encfs" ,encfs)
1994 ("fuse" ,fuse)
1995 ("util-linux" ,util-linux) ;; for umount
1996 ("findutils" ,findutils)
1997 ("gnupg" ,gnupg)
1998 ("which" ,which)))
1999 (propagated-inputs
2000 `(("python-future" ,python-future)
2001 ("python-distro" ,python-distro)))
2002 (arguments
2003 `(#:tests? #f
2004 #:phases
2005 (modify-phases %standard-phases
2006 (add-after 'unpack 'nuke-debops-update
2007 (lambda _
2008 (chmod "bin/debops-update" #o755) ; FIXME work-around git-fetch issue
2009 (with-output-to-file "bin/debops-update"
2010 (lambda ()
2011 (format #t "#!/bin/sh
2012 echo 'debops is installed via guix. guix-update is useless in this case.
2013 Please use `guix package -u debops` instead.'")))
2014 #t))
2015 ;; patch shebangs only in actuall scripts, not in files included in
2016 ;; roles (which are to be delivered to the targte systems)
2017 (delete `patch-generated-file-shebangs)
2018 (replace 'patch-source-shebangs
2019 (lambda _
2020 (for-each patch-shebang
2021 (find-files "bin"
2022 (lambda (file stat)
2023 ;; Filter out symlinks.
2024 (eq? 'regular (stat:type stat)))
2025 #:stat lstat))))
2026 (add-after 'unpack 'fix-paths
2027 (lambda _
2028 (define (substitute-program-names file)
2029 ;; e.g. ANSIBLE_PLAYBOOK = '/gnu/store/…/bin/ansible-playbook'
2030 (for-each
2031 (lambda (name)
2032 (let ((varname (string-upcase
2033 (string-map
2034 (lambda (c) (if (char=? c #\-) #\_ c))
2035 name))))
2036 (substitute* file
2037 (((string-append "^(" varname " = )'.*'") line prefix)
2038 (string-append prefix "'" (which name) "'")))))
2039 '("ansible-playbook" "encfs" "find" "fusermount"
2040 "umount" "gpg" "ansible" "which")))
2041 (for-each substitute-program-names
2042 '("bin/debops"
2043 "bin/debops-padlock"
2044 "bin/debops-task"
2045 "debops/__init__.py"
2046 "debops/cmds/__init__.py"))
2047 #t)))))
2048 (home-page "https://www.debops.org/")
2049 (synopsis "Collection of general-purpose Ansible roles")
2050 (description "The Ansible roles provided by that can be used to manage
2051 Debian or Ubuntu hosts. In addition, a default set of Ansible playbooks can
2052 be used to apply the provided roles in a controlled way, using Ansible
2053 inventory groups.
2054
2055 The roles are written with a high customization in mind, which can be done
2056 using Ansible inventory. This way the role and playbook code can be shared
2057 between multiple environments, with different configuration in to each one.
2058
2059 Services can be managed on a single host, or spread between multiple hosts.
2060 DebOps provides support for different SQL and NoSQL databases, web servers,
2061 programming languages and specialized applications useful in a data center
2062 environment or in a cluster. The project can also be used to deploy
2063 virtualization environments using KVM/libvirt, Docker or LXC technologies to
2064 manage virtual machines and/or containers.")
2065 (license license:gpl3+)))
2066
2067 (define-public emacs-ansible-doc
2068 (let ((commit "86083a7bb2ed0468ca64e52076b06441a2f8e9e0"))
2069 (package
2070 (name "emacs-ansible-doc")
2071 (version (git-version "0.4" "1" commit))
2072 (source
2073 (origin
2074 (method git-fetch)
2075 (uri (git-reference
2076 (url "https://github.com/lunaryorn/ansible-doc.el")
2077 (commit commit)))
2078 (file-name (git-file-name name version))
2079 (sha256
2080 (base32
2081 "0lap404ch74w99n3xip176jr42b38xhyzkfnkyqg0g3wk2cd3aq8"))))
2082 (build-system emacs-build-system)
2083 ;; Unmaintained by upstream.
2084 (home-page "https://github.com/lunaryorn/ansible-doc.el")
2085 (synopsis "Ansible documentation for Emacs")
2086 (description
2087 "This package provides an Ansible documentation for GNU Emacs.
2088
2089 @code{ansible-doc} allows you to view the documentation of an Ansible
2090 module and @code{ansible-doc-mode} minor mode adds documentation
2091 lookup to YAML Mode. You could enable the mode with @code{(add-hook
2092 'yaml-mode-hook #'ansible-doc-mode)}.")
2093 (license license:gpl3+))))
2094
2095 (define-public cpulimit
2096 (package
2097 (name "cpulimit")
2098 (version "0.2")
2099 (source
2100 (origin
2101 (method git-fetch)
2102 (uri (git-reference
2103 (url "https://github.com/opsengine/cpulimit.git")
2104 (commit (string-append "v" version))))
2105 (file-name (git-file-name name version))
2106 (sha256
2107 (base32 "1dz045yhcsw1rdamzpz4bk8mw888in7fyqk1q1b3m1yk4pd1ahkh"))))
2108 (build-system gnu-build-system)
2109 (arguments
2110 `(#:phases (modify-phases %standard-phases
2111 (delete 'configure)
2112 (replace 'build
2113 (lambda _
2114 (invoke "make" "CC=gcc" "-Csrc")))
2115 (replace 'check
2116 (lambda _
2117 (invoke "make" "CC=gcc" "-Ctests")))
2118 (replace 'install
2119 (lambda* (#:key outputs #:allow-other-keys)
2120 (let* ((out (assoc-ref outputs "out"))
2121 (bin (string-append out "/bin")))
2122 (install-file "src/cpulimit" bin))
2123 #t)))))
2124 (home-page "https://github.com/opsengine/cpulimit")
2125 (synopsis "Limit CPU usage")
2126 (description
2127 "Cpulimit limits the CPU usage of a process. It does not change the nice
2128 value or other scheduling priority settings, but the real CPU usage, and is
2129 able to adapt itself dynamically to the overall system load. Children
2130 processes and threads of the specified process may optionally share the same
2131 limits.")
2132 (license license:gpl2+)))
2133
2134 (define-public autojump
2135 (package
2136 (name "autojump")
2137 (version "22.5.3")
2138 (source
2139 (origin
2140 (method git-fetch)
2141 (uri (git-reference
2142 (url "https://github.com/wting/autojump.git")
2143 (commit (string-append "release-v" version))))
2144 (file-name (git-file-name name version))
2145 (sha256
2146 (base32 "1rgpsh70manr2dydna9da4x7p8ahii7dgdgwir5fka340n1wrcws"))))
2147 (build-system gnu-build-system)
2148 (native-inputs ; for tests
2149 `(("python-mock" ,python-mock)
2150 ("python-pytest" ,python-pytest)))
2151 (inputs
2152 `(("python" ,python-wrapper)))
2153 (arguments
2154 `(#:phases
2155 (modify-phases %standard-phases
2156 (add-after 'unpack 'make-git-checkout-writable
2157 ;; ‘install.py’ modifies files before installing them.
2158 (lambda _
2159 (for-each make-file-writable (find-files "."))
2160 #t))
2161 (delete 'configure)
2162 (delete 'build)
2163 (replace 'check
2164 (lambda _
2165 (invoke "python" "tests/unit/autojump_utils_test.py")))
2166 (replace 'install
2167 (lambda* (#:key outputs #:allow-other-keys)
2168 (setenv "SHELL" (which "bash"))
2169 (invoke "python" "install.py"
2170 (string-append "--destdir="
2171 (assoc-ref outputs "out"))))))))
2172 (home-page "https://github.com/wting/autojump")
2173 (synopsis "Shell extension for file system navigation")
2174 (description
2175 "Autojump provides a faster way to navigate your file system, with a \"cd
2176 command that learns\". It works by maintaining a database of the directories
2177 you use the most from the command line and allows you to \"jump\" to
2178 frequently used directories by typing only a small pattern.")
2179 (license license:gpl3+)))
2180
2181 (define-public fasd
2182 (package
2183 (name "fasd")
2184 (version "1.0.1")
2185 (source (origin
2186 (method git-fetch)
2187 (uri (git-reference
2188 (url "https://github.com/clvv/fasd.git")
2189 (commit version)))
2190 (file-name (git-file-name name version))
2191 (sha256
2192 (base32
2193 "1awi71jdv3mhjrmar2d4z1i90kn7apd7aq1w31sh6w4yibz9kiyj"))))
2194 (build-system gnu-build-system)
2195 (arguments
2196 `(#:phases (modify-phases %standard-phases
2197 (delete 'configure)) ;no configuration
2198 #:tests? #f ;no tests
2199 #:make-flags (list (string-append "PREFIX=" %output))))
2200 (home-page "https://github.com/clvv/fasd")
2201 (synopsis "Quick access to files and directories for shells")
2202 (description
2203 "Fasd (pronounced similar to \"fast\") is a command-line productivity
2204 booster. Fasd offers quick access to files and directories for POSIX shells.
2205 It is inspired by tools like autojump, z, and v. Fasd keeps track of files
2206 and directories you have accessed so that you can quickly reference them in
2207 the command line.")
2208 (license license:x11)))
2209
2210 (define-public iftop
2211 (package
2212 (name "iftop")
2213 (version "1.0pre4")
2214 (source (origin
2215 (method url-fetch)
2216 (uri (string-append "http://www.ex-parrot.com/~pdw/iftop/download"
2217 "/iftop-" version ".tar.gz"))
2218 (sha256
2219 (base32
2220 "15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp"))))
2221 (build-system gnu-build-system)
2222 (inputs
2223 `(("libpcap" ,libpcap)
2224 ("ncurses" ,ncurses)))
2225 (synopsis "Monitor network usage")
2226 (description "Iftop does for network usage what @command{top} does
2227 for CPU usage. It listens to network traffic on a named interface and
2228 displays a table of current bandwidth usage by pairs of hosts.")
2229 (home-page "http://www.ex-parrot.com/~pdw/iftop/")
2230 (license license:gpl2+)))
2231
2232 (define-public munge
2233 (package
2234 (name "munge")
2235 (version "0.5.13")
2236 (source (origin
2237 (method url-fetch)
2238 (uri (string-append "https://github.com/dun/munge/releases/"
2239 "download/munge-" version "/munge-"
2240 version ".tar.xz"))
2241 (sha256
2242 (base32
2243 "1nj486bbg1adfg298zck96vgx57kchcypc1zdz1n7w540vyksxcr"))
2244 (modules '((guix build utils)))
2245 (snippet
2246 '(begin
2247 ;; Don't insist on write access to /var.
2248 (substitute* "src/etc/Makefile.in"
2249 (("\\$\\(INSTALL\\)(.*)localstatedir" _ middle)
2250 (string-append "-$(INSTALL)" middle "localstatedir")))
2251 #t))))
2252 (inputs
2253 `(("openssl" ,openssl)
2254 ("libgcrypt" ,libgcrypt)))
2255 (build-system gnu-build-system)
2256 (arguments '(#:configure-flags '("--localstatedir=/var")))
2257 (home-page "https://dun.github.io/munge/")
2258 (synopsis "Cluster computing authentication service")
2259 (description
2260 "Munge is an authentication service for creating and validating
2261 credentials. It allows a process to authenticate the UID and GID of another
2262 local or remote process within a group of hosts having common users and
2263 groups. These hosts form a security realm that is defined by a shared
2264 cryptographic key. Clients within this security realm can create and validate
2265 credentials without the use of root privileges, reserved ports, or
2266 platform-specific methods.")
2267 (license license:gpl3+)))
2268
2269 (define-public audit
2270 (package
2271 (name "audit")
2272 (home-page "https://people.redhat.com/sgrubb/audit/")
2273 (version "2.8.5")
2274 (source (origin
2275 (method url-fetch)
2276 (uri (string-append home-page "audit-" version ".tar.gz"))
2277 (sha256
2278 (base32
2279 "1dzcwb2q78q7x41shcachn7f4aksxbxd470yk38zh03fch1l2p8f"))))
2280 (build-system gnu-build-system)
2281 (arguments
2282 `(#:configure-flags (list "--with-python=no"
2283 "--disable-static")))
2284 (inputs
2285 `(("openldap" ,openldap)
2286 ("gnutls" ,gnutls)
2287 ("sasl" ,cyrus-sasl)))
2288 (synopsis "User-space component to the Linux auditing system")
2289 (description
2290 "auditd is the user-space component to the Linux auditing system, which
2291 allows logging of system calls made by user-land processes. It's responsible
2292 for writing audit records to the disk. Viewing the logs is done with the
2293 @code{ausearch} or @code{aureport} utilities. Configuring the audit rules is
2294 done with the @code{auditctl} utility.")
2295 (license license:gpl2+)))
2296
2297 (define-public nmap
2298 (package
2299 (name "nmap")
2300 (version "7.80")
2301 (source (origin
2302 (method url-fetch)
2303 (uri (string-append "https://nmap.org/dist/nmap-" version
2304 ".tar.bz2"))
2305 (sha256
2306 (base32
2307 "1aizfys6l9f9grm82bk878w56mg0zpkfns3spzj157h98875mypw"))
2308 (modules '((guix build utils)))
2309 (snippet
2310 '(begin
2311 (for-each delete-file-recursively
2312 ;; Remove bundled lua, pcap, and pcre libraries.
2313 ;; FIXME: Remove bundled liblinear once packaged.
2314 '("liblua"
2315 "libpcap"
2316 "libpcre"
2317 ;; Remove pre-compiled binares.
2318 "mswin32"))
2319 #t))))
2320 (build-system gnu-build-system)
2321 (inputs
2322 `(("openssl" ,openssl)
2323 ("libpcap" ,libpcap)
2324 ("pcre" ,pcre)
2325 ("lua" ,lua)
2326 ("zlib" ,zlib) ;for NSE compression support
2327
2328 ;; For 'ndiff'.
2329 ("python" ,python-2)))
2330
2331 ;; TODO Add zenmap output.
2332 (outputs '("out" "ndiff"))
2333 (arguments
2334 `(#:configure-flags '("--without-zenmap")
2335 #:phases
2336 (modify-phases %standard-phases
2337 (add-after 'configure 'patch-Makefile
2338 (lambda _
2339 (substitute* "Makefile"
2340 ;; Do not attempt to build lua.
2341 (("build-dnet build-lua") "build-dnet"))
2342 #t))
2343 (replace 'install
2344 (lambda* (#:key outputs #:allow-other-keys)
2345 (define (make out . args)
2346 (apply invoke "make"
2347 (string-append "prefix=" out)
2348 args))
2349 (define (python-path dir)
2350 (string-append dir "/lib/python"
2351 ,(version-major+minor
2352 (package-version python))
2353 "/site-packages"))
2354 (let ((out (assoc-ref outputs "out"))
2355 (ndiff (assoc-ref outputs "ndiff")))
2356 (for-each mkdir-p (list out ndiff))
2357 (make out
2358 "install-nmap"
2359 "install-nse"
2360 "install-ncat"
2361 "install-nping")
2362 (make ndiff "install-ndiff")
2363 (wrap-program (string-append ndiff "/bin/ndiff")
2364 `("PYTHONPATH" prefix
2365 (,(python-path ndiff)))))
2366 #t))
2367 ;; These are the tests that do not require network access.
2368 (replace 'check
2369 (lambda _ (invoke "make"
2370 "check-nse"
2371 "check-ndiff"
2372 "check-dns"))))
2373 ;; Nmap can't cope with out-of-source building.
2374 #:out-of-source? #f))
2375 (home-page "https://nmap.org/")
2376 (synopsis "Network discovery and security auditing tool")
2377 (description
2378 "Nmap (\"Network Mapper\") is a network discovery and security auditing
2379 tool. It is also useful for tasks such as network inventory, managing service
2380 upgrade schedules, and monitoring host or service uptime. It also provides an
2381 advanced netcat implementation (ncat), a utility for comparing scan
2382 results (ndiff), and a packet generation and response analysis tool (nping).")
2383 ;; This package uses nmap's bundled versions of libdnet and liblinear, which
2384 ;; both use a 3-clause BSD license.
2385 (license (list license:nmap license:bsd-3))))
2386
2387 (define-public dstat
2388 (package
2389 (name "dstat")
2390 (version "0.7.4")
2391 (source
2392 (origin
2393 (method git-fetch)
2394 (uri (git-reference
2395 (url "https://github.com/dagwieers/dstat.git")
2396 (commit (string-append "v" version))))
2397 (file-name (git-file-name "dstat" version))
2398 (sha256
2399 (base32 "1qnmkhqmjd1m3if05jj29dvr5hn6kayq9bkkkh881w472c0zhp8v"))
2400 (patches (search-patches "dstat-fix-crash-when-specifying-delay.patch"
2401 "dstat-skip-devices-without-io.patch"))))
2402 (build-system gnu-build-system)
2403 (arguments
2404 `(#:tests? #f ; no make check
2405 #:make-flags (let ((out (assoc-ref %outputs "out")))
2406 (list (string-append "DESTDIR=" out)
2407 "prefix=/"))
2408 #:phases
2409 (modify-phases %standard-phases
2410 (add-after 'unpack 'fix-python3-DeprecationWarning
2411 (lambda _
2412 (substitute* "dstat"
2413 (("collections") "collections.abc"))
2414 #t))
2415 (delete 'configure) ; no configure script
2416 (add-after 'install 'wrap
2417 (lambda* (#:key outputs #:allow-other-keys)
2418 (let ((out (assoc-ref outputs "out")))
2419 (wrap-program (string-append out "/bin/dstat")
2420 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2421 #t))))))
2422 (inputs
2423 `(("python" ,python-wrapper)
2424 ("python-six" ,python-six)))
2425 (synopsis "Versatile resource statistics tool")
2426 (description "Dstat is a versatile replacement for @command{vmstat},
2427 @command{iostat}, @command{netstat}, and @command{ifstat}. Dstat overcomes
2428 some of their limitations and adds some extra features, more counters and
2429 flexibility. Dstat is handy for monitoring systems during performance tuning
2430 tests, benchmarks or troubleshooting.
2431
2432 Dstat allows you to view all of your system resources in real-time, you can,
2433 e.g., compare disk utilization in combination with interrupts from your IDE
2434 controller, or compare the network bandwidth numbers directly with the disk
2435 throughput (in the same interval).")
2436 (home-page "http://dag.wiee.rs/home-made/dstat/")
2437 (license license:gpl2+)))
2438
2439 (define-public thefuck
2440 (package
2441 (name "thefuck")
2442 (version "3.29")
2443 (source
2444 (origin
2445 (method git-fetch)
2446 (uri (git-reference
2447 (url "https://github.com/nvbn/thefuck.git")
2448 (commit version)))
2449 (file-name (git-file-name name version))
2450 (sha256
2451 (base32 "1qhxwjjgrzpqrqjv7l2847ywpln76lyd6j8bl9gz2r6kl0fx2fqs"))
2452 (patches (search-patches "thefuck-test-environ.patch"))))
2453 (build-system python-build-system)
2454 (arguments
2455 '(#:phases
2456 (modify-phases %standard-phases
2457 (delete 'check)
2458 (add-after 'install 'check
2459 (lambda* (#:key inputs outputs #:allow-other-keys)
2460 ;; Tests look for installed package
2461 (add-installed-pythonpath inputs outputs)
2462 ;; Some tests need write access to $HOME.
2463 (setenv "HOME" "/tmp")
2464 (invoke "py.test" "-v")
2465 #t)))))
2466 (propagated-inputs
2467 `(("python-colorama" ,python-colorama)
2468 ("python-decorator" ,python-decorator)
2469 ("python-psutil" ,python-psutil)
2470 ("python-pyte" ,python-pyte)
2471 ("python-six" ,python-six)))
2472 (native-inputs
2473 `(("python-mock" ,python-mock)
2474 ("python-pytest" ,python-pytest)
2475 ("python-pytest-mock" ,python-pytest-mock)))
2476 (home-page "https://github.com/nvbn/thefuck")
2477 (synopsis "Correct mistyped console command")
2478 (description
2479 "The Fuck tries to match a rule for a previous, mistyped command, creates
2480 a new command using the matched rule, and runs it.")
2481 (license license:x11)))
2482
2483 (define-public di
2484 (package
2485 (name "di")
2486 (version "4.47.2")
2487 (source
2488 (origin
2489 (method url-fetch)
2490 (uri (string-append "https://gentoo.com/di/di-" version ".tar.gz"))
2491 (sha256
2492 (base32 "1g97pp2hznskqlkhl6ppyzgdmv878bcqiwh633kdnm70d1pvh192"))))
2493 (build-system gnu-build-system)
2494 (arguments
2495 `(#:tests? #f ; obscure test failures
2496 #:phases
2497 (modify-phases %standard-phases
2498 (delete 'configure) ; no configure script
2499 (add-before 'build 'setup-environment
2500 (lambda* (#:key outputs #:allow-other-keys)
2501 (setenv "CC" "gcc")
2502 (setenv "prefix" (assoc-ref outputs "out"))
2503 #t)))
2504 #:make-flags (list "--environment-overrides")))
2505 (home-page "https://www.gentoo.com/di/")
2506 (synopsis "Advanced df like disk information utility")
2507 (description
2508 "@code{di} is a disk information utility, displaying everything that your
2509 @code{df} command does and more. It features the ability to display your disk
2510 usage in whatever format you prefer. It is designed to be highly portable and
2511 produce uniform output across heterogeneous networks.")
2512 (license license:zlib)))
2513
2514 (define-public cbatticon
2515 (package
2516 (name "cbatticon")
2517 (version "1.6.9")
2518 (source
2519 (origin
2520 (method git-fetch)
2521 (uri (git-reference
2522 (url "https://github.com/valr/cbatticon.git")
2523 (commit version)))
2524 (sha256
2525 (base32 "0kw09d678sd3m18fmi4380sl4a2m5lkfmq0kps16cdmq7z80rvaf"))
2526 (file-name (git-file-name name version))))
2527 (build-system gnu-build-system)
2528 (arguments
2529 `(#:tests? #f ; no tests
2530 #:make-flags
2531 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2532 "CC=gcc")
2533 #:phases
2534 (modify-phases %standard-phases
2535 (delete 'configure)))) ; no configure script
2536 (inputs
2537 `(("gtk+" ,gtk+)
2538 ("gettext" ,gettext-minimal)
2539 ("libnotify" ,libnotify)))
2540 (native-inputs
2541 `(("pkg-config" ,pkg-config)))
2542 (synopsis "Lightweight battery icon for the system tray")
2543 (description "cbatticon is a lightweight battery icon that displays
2544 the status of your battery in the system tray.")
2545 (home-page "https://github.com/valr/cbatticon")
2546 (license license:gpl2+)))
2547
2548 (define-public interrobang
2549 (let ((revision "1")
2550 (commit "896543735e1c99144765fdbd7b6e6b5afbd8b881"))
2551 (package
2552 (name "interrobang")
2553 (version (git-version "0.0.0" revision commit))
2554 (source
2555 (origin
2556 (method git-fetch)
2557 (uri (git-reference
2558 (url "https://github.com/TrilbyWhite/interrobang.git")
2559 (commit commit)))
2560 (file-name (git-file-name name version))
2561 (sha256
2562 (base32 "1n13m70p1hfba5dy3i8hfclbr6k9q3d9dai3dg4jvhdhmxcpjzdf"))))
2563 (build-system gnu-build-system)
2564 (arguments
2565 `(#:tests? #f ; no tests
2566 #:phases
2567 (modify-phases %standard-phases
2568 (delete 'configure)) ; no configure script
2569 #:make-flags (list (string-append "PREFIX="
2570 (assoc-ref %outputs "out")))))
2571 (inputs
2572 `(("libx11" ,libx11)))
2573 (native-inputs
2574 `(("pkg-config" ,pkg-config)))
2575 (synopsis "Scriptable launcher menu")
2576 (description "Interrobang is a scriptable launcher menu with a customizable
2577 shortcut syntax and completion options.")
2578 (home-page "https://github.com/TrilbyWhite/interrobang")
2579 (license license:gpl3+))))
2580
2581 (define-public pam-krb5
2582 (package
2583 (name "pam-krb5")
2584 (version "4.8")
2585 (source (origin
2586 (method url-fetch)
2587 (uri (string-append
2588 "https://archives.eyrie.org/software/kerberos/"
2589 "pam-krb5-" version ".tar.xz"))
2590 (sha256
2591 (base32
2592 "1qjp8i1s9bz7g6kiqrkzzkxn5pfspa4sy53b6z40fqmdf9przdfb"))))
2593 (build-system gnu-build-system)
2594 (arguments
2595 `(#:phases
2596 (modify-phases %standard-phases
2597 (add-before 'configure 'disable-tests
2598 (lambda _
2599 ;; The build container seems to interfere with some tests.
2600 (substitute* "tests/TESTS"
2601 (("module/basic\n") ""))
2602 (substitute* "tests/TESTS"
2603 (("pam-util/vector\n") ""))
2604 #t)))))
2605 (inputs
2606 `(("linux-pam" ,linux-pam)
2607 ("mit-krb5" ,mit-krb5)))
2608 (native-inputs
2609 `(("perl" ,perl)
2610 ("perl-test-pod" ,perl-test-pod))) ; required for tests
2611 (synopsis "Kerberos PAM module")
2612 (description
2613 "Pam-krb5 is a Kerberos PAM module for either MIT Kerberos or Heimdal.
2614 It supports ticket refreshing by screen savers, configurable
2615 authorization handling, authentication of non-local accounts for network
2616 services, password changing, and password expiration, as well as all the
2617 standard expected PAM features. It works correctly with OpenSSH, even
2618 with @code{ChallengeResponseAuthentication} and @code{PrivilegeSeparation}
2619 enabled, and supports extensive configuration either by PAM options or in
2620 krb5.conf or both. PKINIT is supported with recent versions of both MIT
2621 Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.")
2622 (home-page "https://www.eyrie.org/~eagle/software/pam-krb5")
2623 ;; Dual licenced under a homebrew non-copyleft OR GPL (any version)
2624 ;; However, the tarball does not contain a copy of the GPL, so unless
2625 ;; we put one in, we cannot distribute it under GPL without violating
2626 ;; clause requiring us to give all recipients a copy.
2627 (license license:gpl1+)))
2628
2629 (define-public sunxi-tools
2630 (package
2631 (name "sunxi-tools")
2632 (version "1.4.2")
2633 (source
2634 (origin
2635 (method git-fetch)
2636 (uri (git-reference
2637 (url "https://github.com/linux-sunxi/sunxi-tools.git")
2638 (commit (string-append "v" version))))
2639 (sha256
2640 (base32 "04f3jqg8ww4jxsf9c6ddcdgy2xbhkyp0b3l5f1hvvbv94p81rjxd"))
2641 (modules '((guix build utils)))
2642 (snippet
2643 ;; Remove binaries contained in the tarball which are only for the
2644 ;; target and can be regenerated anyway.
2645 '(begin
2646 (delete-file-recursively "bin")
2647 #t))
2648 (file-name (git-file-name name version))))
2649 (native-inputs
2650 `(("pkg-config" ,pkg-config)
2651 ("cross-gcc" ,(cross-gcc "arm-linux-gnueabihf"
2652 #:xbinutils (cross-binutils "arm-linux-gnueabihf")
2653 #:libc (cross-libc "arm-linux-gnueabihf")))
2654 ("cross-libc" ,(cross-libc "arm-linux-gnueabihf")) ; header files
2655 ("cross-libc-static" ,(cross-libc "arm-linux-gnueabihf") "static")))
2656 (inputs
2657 `(("libusb" ,libusb)))
2658 (build-system gnu-build-system)
2659 (arguments
2660 `(#:tests? #f ; no tests exist
2661 #:make-flags (list (string-append "PREFIX="
2662 (assoc-ref %outputs "out"))
2663 (string-append "CROSS_COMPILE="
2664 "arm-linux-gnueabihf-")
2665 "CC=gcc")
2666 #:phases
2667 (modify-phases %standard-phases
2668 (delete 'configure)
2669 (add-before 'build 'set-environment-up
2670 (lambda* (#:key make-flags #:allow-other-keys)
2671 (define (cross? x)
2672 (string-contains x "cross-arm-linux"))
2673 (define (filter-environment! filter-predicate
2674 environment-variable-names)
2675 (for-each
2676 (lambda (env-name)
2677 (when (getenv env-name)
2678 (let* ((env-value (getenv env-name))
2679 (search-path (search-path-as-string->list env-value))
2680 (new-search-path (filter filter-predicate
2681 search-path))
2682 (new-env-value (list->search-path-as-string
2683 new-search-path ":")))
2684 (setenv env-name new-env-value))))
2685 environment-variable-names))
2686 (setenv "CROSS_CPATH" (getenv "CPATH"))
2687 (setenv "CROSS_C_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
2688 (setenv "CROSS_CPLUS_INCLUDE_PATH" (getenv "CPLUS_INCLUDE_PATH"))
2689 (setenv "CROSS_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
2690 (filter-environment! cross?
2691 '("CROSS_CPATH" "CROSS_C_INCLUDE_PATH" "CROSS_CPLUS_INCLUDE_PATH"
2692 "CROSS_LIBRARY_PATH"))
2693 (filter-environment! (lambda (e) (not (cross? e)))
2694 '("CPATH" "C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH"
2695 "LIBRARY_PATH"))
2696 #t))
2697 (replace 'build
2698 (lambda* (#:key make-flags #:allow-other-keys)
2699 (apply invoke "make" "tools" "misc" make-flags)))
2700 (add-after 'build 'build-armhf
2701 (lambda* (#:key make-flags #:allow-other-keys)
2702 (setenv "LIBRARY_PATH" #f)
2703 (apply invoke "make" "target-tools" make-flags)))
2704 (replace 'install
2705 (lambda* (#:key make-flags #:allow-other-keys)
2706 (apply invoke "make" "install-all" "install-misc"
2707 make-flags))))))
2708 (home-page "https://github.com/linux-sunxi/sunxi-tools")
2709 (synopsis "Hardware management tools for Allwinner computers")
2710 (description "This package contains tools for Allwinner devices:
2711 @enumerate
2712 @item @command{sunxi-fexc}, @command{bin2fex}, @command{fex2bin}: Compile
2713 a textual description of a board (.fex) to a binary representation (.bin).
2714 @item @command{sunxi-fel}: Puts an Allwinner device into FEL mode which
2715 makes it register as a special USB device (rather than USB host).
2716 You can then connect it to another computer and flash it from there.
2717 @item @command{sunxi-nand-part}: Partitions NAND flash.
2718 @item @command{sunxi-bootinfo}: Reads out boot0 and boot1 (Allwinner
2719 bootloader) parameters.
2720 @item @command{sunxi-pio}: Sets GPIO parameters and oscillates a GPIO
2721 in order to be able to find it.
2722 @item @command{sunxi-meminfo}: Prints memory bus settings.
2723 @item @command{sunxi-nand-image-builder}: Prepares raw NAND images.
2724 @end enumerate")
2725 (license license:gpl2+)))
2726
2727 (define-public sedsed
2728 (package
2729 (name "sedsed")
2730 (version "1.1")
2731 (source
2732 (origin
2733 (method git-fetch)
2734 (uri (git-reference
2735 (url "https://github.com/aureliojargas/sedsed.git")
2736 (commit (string-append "v" version))))
2737 (file-name (git-file-name name version))
2738 (sha256
2739 (base32 "05cl35mwljdb9ynbbsfa8zx6ig8r0xncbg2cir9vwn5manndjj18"))))
2740 (build-system python-build-system)
2741 (arguments
2742 `(#:tests? #f ; no tests
2743 #:phases
2744 (modify-phases %standard-phases
2745 (add-after 'unpack 'patch-sed-in
2746 (lambda _
2747 (substitute* "sedsed.py"
2748 (("sedbin = 'sed'")
2749 (string-append "sedbin = '" (which "sed") "'")))
2750 #t))
2751 (delete 'build)
2752 (replace 'install
2753 (lambda* (#:key outputs #:allow-other-keys)
2754 (let* ((out (assoc-ref outputs "out"))
2755 (bin (string-append out "/bin")))
2756 ;; Just one file to copy around
2757 (install-file "sedsed.py" bin)
2758 #t)))
2759 (add-after 'wrap 'symlink
2760 ;; Create 'sedsed' symlink to "sedsed.py".
2761 (lambda* (#:key outputs #:allow-other-keys)
2762 (let* ((out (assoc-ref outputs "out"))
2763 (bin (string-append out "/bin"))
2764 (sed (string-append bin "/sedsed"))
2765 (sedpy (string-append bin "/sedsed.py")))
2766 (symlink sedpy sed)
2767 #t))))))
2768 (home-page "https://aurelio.net/projects/sedsed")
2769 (synopsis "Sed sed scripts")
2770 (description
2771 "@code{sedsed} can debug, indent, tokenize and HTMLize your @command{sed}
2772 script.
2773
2774 In debug mode, it reads your script and adds extra commands to it. When
2775 executed you can see the data flow between the commands, revealing all the
2776 magic sed performs on its internal buffers.
2777
2778 In indent mode, your script is reformatted with standard spacing.
2779
2780 In tokenize mode, you can see the elements of every command you use.
2781
2782 In HTMLize mode, your script is converted to a beautiful colored HTML file,
2783 with all the commands and parameters identified for your viewing pleasure.
2784
2785 With sedsed you can master any sed script. No more secrets, no more hidden
2786 buffers.")
2787 (license license:expat)))
2788
2789 (define-public igt-gpu-tools
2790 (package
2791 (name "igt-gpu-tools")
2792 (version "1.23")
2793 (source (origin
2794 (method url-fetch)
2795 (uri (string-append "https://cgit.freedesktop.org/xorg/app/"
2796 "intel-gpu-tools/snapshot/"
2797 "igt-gpu-tools-" version ".tar.gz"))
2798 (sha256
2799 (base32
2800 "0vzv2i4jfv2pkbqby5k3ap9pzidkmajwqmg3s7wnv8i1h33775iq"))))
2801 (build-system gnu-build-system)
2802 (arguments
2803 `(#:tests? #f ; many of the tests try to load kernel modules
2804 #:phases
2805 (modify-phases %standard-phases
2806 (replace 'bootstrap
2807 (lambda _
2808 ;; Don't run configure in this phase.
2809 (setenv "NOCONFIGURE" "1")
2810 (invoke "sh" "autogen.sh"))))))
2811 (inputs
2812 `(("cairo" ,cairo)
2813 ("eudev" ,eudev)
2814 ("glib" ,glib)
2815 ("kmod" ,kmod)
2816 ("libdrm" ,libdrm)
2817 ("libpciaccess" ,libpciaccess)
2818 ("libunwind" ,libunwind)
2819 ("libxrandr" ,libxrandr)
2820 ("openssl" ,openssl)
2821 ("procps" ,procps)
2822 ("util-macros" ,util-macros)))
2823 (native-inputs
2824 `(("autoconf" ,autoconf)
2825 ("automake" ,automake)
2826 ("libtool" ,libtool)
2827 ("pkg-config" ,pkg-config)))
2828 (home-page "https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/")
2829 (synopsis "Tools for development and testing of the Intel DRM driver")
2830 (description "IGT GPU Tools is a collection of tools for development and
2831 testing of the Intel DRM driver. There are many macro-level test suites that
2832 get used against the driver, including xtest, rendercheck, piglit, and
2833 oglconform, but failures from those can be difficult to track down to kernel
2834 changes, and many require complicated build procedures or specific testing
2835 environments to get useful results. Therefore, IGT GPU Tools includes
2836 low-level tools and tests specifically for development and testing of the
2837 Intel DRM Driver.")
2838 (supported-systems '("i686-linux" "x86_64-linux"))
2839 (license license:expat)))
2840
2841 (define-public intel-gpu-tools
2842 (deprecated-package "intel-gpu-tools" igt-gpu-tools))
2843
2844 (define-public fabric
2845 (package
2846 (name "fabric")
2847 (version "1.14.0")
2848 (source
2849 (origin
2850 (method url-fetch)
2851 (uri (pypi-uri "Fabric" version))
2852 (sha256
2853 (base32
2854 "13r0b0hllgf8j9rh6x1knmbgvingbdmx046aazv6vck2ll120mw1"))))
2855 (build-system python-build-system)
2856 (arguments
2857 `(#:python ,python-2 ; Python 2 only
2858 #:phases
2859 (modify-phases %standard-phases
2860 (replace 'check
2861 (lambda _
2862 (invoke
2863 "nosetests" "-v" "tests/"
2864 ;; This test hangs indefinitely when run on a single core VM
2865 ;; (see GNU bug #26647 and Debian bug #850230).
2866 "--exclude=test_nested_execution_with_explicit_ports"
2867 ;; This test randomly fails in certain environments causing too
2868 ;; much noise to be useful (see Debian bug #854686).
2869 "--exclude=test_should_use_sentinel_for_tasks_that_errored"))))))
2870 (native-inputs
2871 `(("python2-fudge" ,python2-fudge) ; Requires < 1.0
2872 ("python2-jinja2" ,python2-jinja2) ; Requires < 3.0
2873 ("python2-nose" ,python2-nose) ; Requires < 2.0
2874 ("python2-pynacl" ,python2-pynacl)
2875 ("python2-bcrypt" ,python2-bcrypt)))
2876 (propagated-inputs
2877 `(("python2-paramiko" ,python2-paramiko)))
2878 (home-page "http://fabfile.org")
2879 (synopsis "Simple Pythonic remote execution and deployment tool")
2880 (description
2881 "Fabric is designed to upload files and run shell commands on a number of
2882 servers in parallel or serially. These commands are grouped in tasks (which
2883 are regular Python functions) and specified in a @dfn{fabfile}.
2884
2885 It is similar to Capistrano, except it's implemented in Python and doesn't
2886 expect you to be deploying Rails applications. Fabric is a simple, Pythonic
2887 tool for remote execution and deployment.")
2888 (license license:bsd-2)))
2889
2890 (define-public neofetch
2891 (package
2892 (name "neofetch")
2893 (version "6.1.0")
2894 (source (origin
2895 (method git-fetch)
2896 (uri (git-reference
2897 (url "https://github.com/dylanaraps/neofetch")
2898 (commit version)))
2899 (file-name (git-file-name name version))
2900 (sha256
2901 (base32
2902 "022xzn9jk18k2f4b6011d8jk5nbl84i3mw3inlz4q52p2hvk8fch"))))
2903 (build-system gnu-build-system)
2904 (arguments
2905 `(#:tests? #f ; there are no tests
2906 #:make-flags
2907 (list (string-append "PREFIX=" %output))
2908 #:phases
2909 (modify-phases %standard-phases
2910 (delete 'configure)))) ; no configure script
2911 (home-page "https://github.com/dylanaraps/neofetch")
2912 (synopsis "System information script")
2913 (description "Neofetch is a command-line system information tool written in
2914 Bash. Neofetch displays information about your system next to an image, your OS
2915 logo, or any ASCII file of your choice. The main purpose of Neofetch is to be
2916 used in screenshots to show other users what operating system or distribution
2917 you are running, what theme or icon set you are using, etc.")
2918 (license license:expat)))
2919
2920 (define-public screenfetch
2921 (package
2922 (name "screenfetch")
2923 (version "3.9.0")
2924 (source (origin
2925 (method git-fetch)
2926 (uri (git-reference
2927 (url "https://github.com/KittyKatt/screenFetch")
2928 (commit (string-append "v" version))))
2929 (file-name (git-file-name name version))
2930 (sha256
2931 (base32
2932 "13i7dczbqwhws08zzrdraki1zkqv0qkbgx9c1r8vmg5qr9f7hfzg"))))
2933 (build-system trivial-build-system)
2934 (arguments
2935 `(#:modules ((guix build utils))
2936 #:builder
2937 (begin
2938 (use-modules (guix build utils))
2939 (let ((source (assoc-ref %build-inputs "source"))
2940 (out (assoc-ref %outputs "out")))
2941 (mkdir-p (string-append out "/bin/"))
2942 (copy-file (string-append source "/screenfetch-dev")
2943 (string-append out "/bin/screenfetch"))
2944 (install-file (string-append source "/screenfetch.1")
2945 (string-append out "/man/man1/"))
2946 (install-file (string-append source "/COPYING")
2947 (string-append out "/share/doc/" ,name "-" ,version))
2948 (substitute* (string-append out "/bin/screenfetch")
2949 (("/usr/bin/env bash")
2950 (string-append (assoc-ref %build-inputs "bash")
2951 "/bin/bash")))
2952 (wrap-program
2953 (string-append out "/bin/screenfetch")
2954 `("PATH" ":" prefix
2955 (,(string-append (assoc-ref %build-inputs "bc") "/bin:"
2956 (assoc-ref %build-inputs "scrot") "/bin:"
2957 (assoc-ref %build-inputs "xdpyinfo") "/bin"
2958 (assoc-ref %build-inputs "xprop") "/bin"))))
2959 (substitute* (string-append out "/bin/screenfetch")
2960 (("#!#f")
2961 (string-append "#!" (assoc-ref %build-inputs "bash")
2962 "/bin/bash")))))))
2963 (inputs
2964 `(("bash" ,bash)
2965 ("bc" ,bc)
2966 ("scrot" ,scrot)
2967 ("xdpyinfo" ,xdpyinfo)
2968 ("xprop" ,xprop)))
2969 (home-page "https://github.com/KittyKatt/screenFetch")
2970 (synopsis "System information script")
2971 (description "Bash screenshot information tool which can be used to
2972 generate those nifty terminal theme information and ASCII distribution logos in
2973 everyone's screenshots nowadays.")
2974 (license license:gpl3)))
2975
2976 (define-public nnn
2977 (package
2978 (name "nnn")
2979 (version "2.6")
2980 (source
2981 (origin
2982 (method url-fetch)
2983 (uri (string-append "https://github.com/jarun/nnn/releases/download/v"
2984 version "/nnn-v" version ".tar.gz"))
2985 (sha256
2986 (base32 "0xb6crd9vig3xgjwl8m4bmgcs4azfmfdpx3g8pdpzs28jdg7i3rr"))))
2987 (build-system gnu-build-system)
2988 (inputs
2989 `(("ncurses" ,ncurses)
2990 ("readline" ,readline)))
2991 (native-inputs
2992 `(("pkg-config" ,pkg-config)))
2993 (arguments
2994 '(#:tests? #f ; no tests
2995 #:phases
2996 (modify-phases %standard-phases
2997 (delete 'configure)) ; no configure script
2998 #:make-flags
2999 (list
3000 (string-append "PREFIX="
3001 (assoc-ref %outputs "out"))
3002 "CC=gcc")))
3003 (home-page "https://github.com/jarun/nnn")
3004 (synopsis "Terminal file browser")
3005 (description "@command{nnn} is a fork of @command{noice}, a blazing-fast
3006 lightweight terminal file browser with easy keyboard shortcuts for
3007 navigation, opening files and running tasks. There is no config file and
3008 mime associations are hard-coded. The incredible user-friendliness and speed
3009 make it a perfect utility on modern distros.")
3010 (license license:bsd-2)))
3011
3012 (define-public thermald
3013 (package
3014 (name "thermald")
3015 (version "1.8")
3016 (source
3017 (origin
3018 (method git-fetch)
3019 (uri (git-reference
3020 (url "https://github.com/01org/thermal_daemon")
3021 (commit (string-append "v" version))))
3022 (file-name (git-file-name name version))
3023 (sha256
3024 (base32 "1g1l7k8yxj8bl1ysdx8v6anv1s7xk9j072y44gwki70dy48n7j92"))
3025 (patches
3026 (search-patches "thermald-make-int-max32-visible.patch"))))
3027 (build-system gnu-build-system)
3028 (arguments
3029 `(#:configure-flags
3030 (let ((out (assoc-ref %outputs "out")))
3031 (list (string-append "--sysconfdir="
3032 out "/etc")
3033 (string-append "--with-dbus-sys-dir="
3034 out "/etc/dbus-1/system.d")
3035 "--localstatedir=/var"))))
3036 (native-inputs
3037 `(("autoconf" ,autoconf)
3038 ("automake" ,automake)
3039 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
3040 ("pkg-config" ,pkg-config)))
3041 (inputs
3042 `(("dbus-glib" ,dbus-glib)
3043 ("libxml2" ,libxml2)))
3044 (home-page "https://01.org/linux-thermal-daemon/")
3045 (synopsis "CPU scaling for thermal management")
3046 (description "The Linux Thermal Daemon helps monitor and control temperature
3047 on systems running the Linux kernel.")
3048 ;; arm and aarch64 don't have cpuid.h.
3049 (supported-systems '("i686-linux" "x86_64-linux"))
3050 (license license:gpl2+)))
3051
3052 (define-public masscan
3053 (package
3054 (name "masscan")
3055 (version "1.0.5")
3056 (source
3057 (origin
3058 (method git-fetch)
3059 (uri (git-reference
3060 (url "https://github.com/robertdavidgraham/masscan.git")
3061 (commit version)))
3062 (file-name (git-file-name name version))
3063 (sha256
3064 (base32 "0q0c7bsf0pbl8napry1qyg0gl4pd8wn872h4mz9b56dx4rx90vqg"))))
3065 (build-system gnu-build-system)
3066 (inputs
3067 `(("libpcap" ,libpcap)))
3068 (arguments
3069 '(#:test-target "regress"
3070 #:make-flags
3071 (list "CC=gcc"
3072 (string-append "PREFIX=" (assoc-ref %outputs "out")))
3073 #:phases
3074 (modify-phases %standard-phases
3075 (delete 'configure) ; no ./configure script
3076 (add-after 'unpack 'patch-path
3077 (lambda* (#:key outputs inputs #:allow-other-keys)
3078 (let* ((out (assoc-ref outputs "out"))
3079 (pcap (assoc-ref inputs "libpcap")))
3080 (substitute* "src/rawsock-pcap.c"
3081 (("libpcap.so") (string-append pcap "/lib/libpcap.so")))
3082 #t))))))
3083 (synopsis "TCP port scanner")
3084 (description "MASSCAN is an asynchronous TCP port scanner. It can detect
3085 open ports, and also complete the TCP connection and interact with the remote
3086 application, collecting the information received.")
3087 (home-page "https://github.com/robertdavidgraham/masscan")
3088 ;; 'src/siphash24.c' is the SipHash reference implementation, which
3089 ;; bears a CC0 Public Domain Dedication.
3090 (license license:agpl3+)))
3091
3092 (define-public hungrycat
3093 (package
3094 (name "hungrycat")
3095 (version "0.4.1")
3096 (source (origin
3097 (method url-fetch)
3098 (uri (string-append "https://github.com/jwilk/hungrycat/"
3099 "releases/download/" version "/"
3100 "hungrycat-" version ".tar.gz"))
3101 (sha256
3102 (base32
3103 "03fc1zsrf99lvxa7b4ps6pbi43304wbxh1f6ci4q0vkal370yfwh"))))
3104 (build-system gnu-build-system)
3105 (native-inputs
3106 ;; For tests.
3107 `(("python" ,python-wrapper)
3108 ("python-nose" ,python-nose)))
3109 (arguments
3110 `(#:test-target "test"))
3111 (synopsis "A single tool that combines @command{cat} & @command{rm}")
3112 (description
3113 "hungrycat prints the contents of a file to standard output, while
3114 simultaneously freeing the disk space it occupied. It is useful if you need
3115 to process a large file, don't have enough space to store both the input and
3116 output files, and don't need the input file afterwards.
3117 While similar in principle to running @command{cat} immediately followed by
3118 @command{rm}, @command{hungrycat} actually frees blocks as soon as they are
3119 printed instead of after the entire file has been read, which is often too
3120 late.")
3121 (home-page "https://jwilk.net/software/hungrycat")
3122 (license license:expat)))
3123
3124 (define-public launchmon
3125 (package
3126 (name "launchmon")
3127 (version "1.0.2")
3128 (source (origin
3129 (method url-fetch)
3130 (uri (string-append
3131 "https://github.com/LLNL/LaunchMON/releases/download/v"
3132 version "/launchmon-v" version ".tar.gz"))
3133 (sha256
3134 (base32
3135 "0fm3nd9mydm9v2bf7bh01dbgrfnpwkapxa3dsvy3x1z0rz61qc0x"))))
3136 (build-system gnu-build-system)
3137 (inputs
3138 `(("mpi" ,openmpi)
3139 ("munge" ,munge)
3140 ("boost" ,boost)
3141 ("libelf" ,libelf)
3142 ("libgcrypt" ,libgcrypt)
3143 ("libgpg-error" ,libgpg-error)))
3144 (synopsis "Infrastructue for large scale tool daemon launching")
3145 (description
3146 "LaunchMON is a software infrastructure that enables HPC run-time
3147 tools to co-locate tool daemons with a parallel job. Its API allows a
3148 tool to identify all the remote processes of a job and to scalably
3149 launch daemons into the relevant nodes.")
3150 (home-page "https://github.com/LLNL/LaunchMON")
3151 (supported-systems '("i686-linux" "x86_64-linux"))
3152 (license license:lgpl2.1)))
3153
3154 (define-public spindle
3155 (package
3156 (name "spindle")
3157 (version "0.10")
3158 (source (origin
3159 ;; We use git checkout to avoid github auto-generated tarballs
3160 (method git-fetch)
3161 (uri (git-reference
3162 (url "https://github.com/hpc/Spindle.git")
3163 (commit (string-append "v" version))))
3164 (file-name (git-file-name name version))
3165 (sha256
3166 (base32
3167 "15n3ay0qq81r5v7fif61q1vdjcq44pp2nynkh3fvbzc9fj3c39wd"))))
3168 (build-system gnu-build-system)
3169 (arguments '(#:configure-flags '("--enable-sec-launchmon"
3170 "--enable-sec-munge"
3171 "--enable-sec-none")))
3172 (inputs
3173 `(("mpi" ,openmpi)
3174 ("munge" ,munge)
3175 ("launchmon" ,launchmon)
3176 ("libgcrypt" ,libgcrypt)))
3177 (synopsis "Scalable library loading in HPC environments")
3178 (description
3179 "Spindle is a tool for improving the performance of dynamic library and
3180 Python loading in HPC environments.")
3181 (home-page "https://github.com/hpc/Spindle")
3182 ;; This package supports x86_64 and PowerPC64
3183 (supported-systems '("x86_64-linux"))
3184 (license license:lgpl2.1)))
3185
3186 (define-public inxi-minimal
3187 (let ((real-name "inxi"))
3188 (package
3189 (name "inxi-minimal")
3190 (version "3.0.34-1")
3191 (source
3192 (origin
3193 (method git-fetch)
3194 (uri (git-reference
3195 (url "https://github.com/smxi/inxi")
3196 (commit version)))
3197 (file-name (git-file-name real-name version))
3198 (sha256
3199 (base32 "0x2s40lwsan2pk292nspjgyw00f9f5fdfmwfvl50924pxhyxn2fh"))))
3200 (build-system trivial-build-system)
3201 (inputs
3202 `(("bash" ,bash-minimal)
3203 ("perl" ,perl)
3204 ("procps" ,procps)))
3205 (native-inputs
3206 `(("gzip" ,gzip)))
3207 (arguments
3208 `(#:modules
3209 ((guix build utils)
3210 (ice-9 match)
3211 (srfi srfi-26))
3212 #:builder
3213 (begin
3214 (use-modules (guix build utils)
3215 (ice-9 match)
3216 (srfi srfi-26))
3217 (setenv "PATH" (string-append
3218 (assoc-ref %build-inputs "bash") "/bin" ":"
3219 (assoc-ref %build-inputs "gzip") "/bin" ":"
3220 (assoc-ref %build-inputs "perl") "/bin" ":"))
3221 (copy-recursively (assoc-ref %build-inputs "source")
3222 ,(string-append real-name "-" version))
3223 (with-directory-excursion ,(string-append real-name "-" version)
3224 (with-fluids ((%default-port-encoding #f))
3225 (substitute* "inxi" (("/usr/bin/env perl") (which "perl"))))
3226 (let ((bin (string-append %output "/bin")))
3227 (install-file "inxi" bin)
3228 (wrap-program (string-append bin "/inxi")
3229 `("PATH" ":" =
3230 ("$PATH"
3231 ,@(map (lambda (input)
3232 (match input
3233 ((name . store)
3234 (let ((store-append
3235 (cut string-append store <>)))
3236 (cond
3237 ((member name '("util-linux"))
3238 (string-append (store-append "/bin") ":"
3239 (store-append "/sbin")))
3240 ((member name '("dmidecode" "iproute2"))
3241 (store-append "/sbin"))
3242 (else (store-append "/bin")))))))
3243 %build-inputs)))
3244 `("PERL5LIB" ":" =
3245 ,(delete
3246 ""
3247 (map (match-lambda
3248 (((? (cut string-prefix? "perl-" <>) name) . dir)
3249 (string-append dir "/lib/perl5/site_perl"))
3250 (_ ""))
3251 %build-inputs)))))
3252 (invoke "gzip" "inxi.1")
3253 (install-file "inxi.1.gz"
3254 (string-append %output "/share/man/man1")))
3255 #t)))
3256 (home-page "https://smxi.org/docs/inxi.htm")
3257 (synopsis "Full-featured system information script")
3258 (description "Inxi is a system information script that can display
3259 various things about your hardware and software to users in an IRC chatroom or
3260 support forum. It runs with the @code{/exec} command in most IRC clients.")
3261 (license license:gpl3+))))
3262
3263 (define-public inxi
3264 (package
3265 (inherit inxi-minimal)
3266 (name "inxi")
3267 (inputs
3268 `(("dmidecode" ,dmidecode)
3269 ("file" ,file)
3270 ("bind:utils" ,isc-bind "utils") ; dig
3271 ("gzip" ,gzip)
3272 ("iproute2" ,iproute) ; ip
3273 ("kmod" ,kmod) ; modinfo
3274 ("lm-sensors" ,lm-sensors)
3275 ("mesa-utils" ,mesa-utils)
3276 ("pciutils" ,pciutils)
3277 ("tar" ,tar)
3278 ("tree" ,tree)
3279 ("util-linux" ,util-linux) ; lsblk
3280 ("usbutils" ,usbutils) ; lsusb
3281 ("wmctrl" ,wmctrl)
3282 ("xdpyinfo" ,xdpyinfo)
3283 ("xprop" ,xprop)
3284 ("xrandr" ,xrandr)
3285 ("coreutils" ,coreutils) ; uptime
3286 ("inetutils" ,inetutils) ; ifconfig
3287 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
3288 ("perl-http-tiny" ,perl-http-tiny)
3289 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
3290 ("perl-json-xs" ,perl-json-xs)
3291 ("perl-time-hires" ,perl-time-hires)
3292 ;; TODO: Add more inputs:
3293 ;; ipmi-sensors
3294 ;; hddtemp
3295 ;; perl-xml-dumper
3296 ;; ipmitool
3297 ,@(package-inputs inxi-minimal)))))
3298
3299 (define-public pscircle
3300 (package
3301 (name "pscircle")
3302 (version "1.3.0")
3303 (source
3304 (origin
3305 (method git-fetch)
3306 (uri (git-reference
3307 (url "https://gitlab.com/mildlyparallel/pscircle.git")
3308 (commit (string-append "v" version))))
3309 (file-name (git-file-name name version))
3310 (sha256
3311 (base32
3312 "0qsif00dkqa8ky3vl2ycx5anx2yk62nrv47f5lrlqzclz91f00fx"))))
3313 (build-system meson-build-system)
3314 (native-inputs
3315 `(("pkg-config" ,pkg-config)))
3316 (inputs
3317 `(("cairo" ,cairo)
3318 ("libpng" ,libpng)
3319 ("libx11" ,libx11)))
3320 (home-page "https://gitlab.com/mildlyparallel/pscircle")
3321 (synopsis "Visualize Linux processes in a form of radial tree")
3322 (description
3323 "@code{pscircle} visualizes Linux processes in the form of a radial tree.")
3324 (license license:gpl2+)))
3325
3326 (define-public python-pyudev
3327 (package
3328 (name "python-pyudev")
3329 (version "0.21.0")
3330 (source
3331 (origin
3332 (method url-fetch)
3333 (uri (pypi-uri "pyudev" version))
3334 (sha256
3335 (base32
3336 "0arz0dqp75sszsmgm6vhg92n1lsx91ihddx3m944f4ah0487ljq9"))))
3337 (build-system python-build-system)
3338 (arguments
3339 `(#:tests? #f ; Tests require /sys
3340 #:phases
3341 (modify-phases %standard-phases
3342 (add-after 'unpack 'patch-ctypes-udev
3343 (lambda* (#:key inputs outputs #:allow-other-keys)
3344 (let ((eudev (assoc-ref inputs "eudev")))
3345 (substitute* "src/pyudev/core.py"
3346 (("'udev'")
3347 (string-append "'" eudev "/lib/libudev.so'")))
3348 (substitute* "src/pyudev/_ctypeslib/utils.py"
3349 ;; Use absolute paths instead of keys.
3350 (("= find_library") "= "))
3351 #t))))))
3352 (inputs
3353 `(("eudev" ,eudev)))
3354 (propagated-inputs
3355 `(("python-six" ,python-six)))
3356 (native-inputs
3357 `(("python-docutils" ,python-docutils)
3358 ("python-hypothesis" ,python-hypothesis)
3359 ("python-mock" ,python-mock)
3360 ("python-pytest" ,python-pytest)
3361 ("python-sphinx" ,python-sphinx)))
3362 (home-page "http://pyudev.readthedocs.org/")
3363 (synopsis "Python udev binding")
3364 (description "This package provides @code{udev} bindings for Python.")
3365 (license license:lgpl2.1)))
3366
3367 (define-public solaar
3368 (package
3369 (name "solaar")
3370 (version "0.9.2")
3371 (source (origin
3372 (method git-fetch)
3373 (uri (git-reference
3374 (url "https://github.com/pwr/Solaar.git")
3375 (commit version)))
3376 (file-name (git-file-name name version))
3377 (sha256
3378 (base32
3379 "085mfa13dap3wqik1dqlad0d7kff4rv7j4ljh99c7l8nhczkqgwm"))))
3380 (build-system python-build-system)
3381 (arguments
3382 `(#:phases
3383 (modify-phases %standard-phases
3384 (add-after 'unpack 'fix-prefix-detection
3385 (lambda _
3386 (substitute* "setup.py"
3387 (("'--prefix' in sys\\.argv")
3388 "len([x.startswith('--prefix=') for x in sys.argv]) > 0"))
3389 #t))
3390 (replace 'build
3391 (lambda _
3392 (invoke "python" "setup.py" "build")))
3393 (add-before 'check 'setenv-PATH
3394 (lambda _
3395 (setenv "PYTHONPATH" (string-append "lib:" (getenv "PYTHONPATH")))
3396 #t)))))
3397 (propagated-inputs
3398 `(("python-pygobject" ,python-pygobject)
3399 ("python-pyudev" ,python-pyudev)))
3400 (home-page "https://smxi.org/docs/inxi.htm")
3401 (synopsis "Linux devices manager for the Logitech Unifying Receiver")
3402 (description "This package provides tools to manage clients of the
3403 Logitech Unifying Receiver.")
3404 (license license:gpl2)))
3405
3406 (define-public lynis
3407 (package
3408 (name "lynis")
3409 ;; Also update the ‘lynis-sdk’ input to the commit matching this release.
3410 (version "2.7.5")
3411 (source
3412 (origin
3413 (method git-fetch)
3414 (uri (git-reference
3415 (url "https://github.com/CISOfy/lynis")
3416 (commit version)))
3417 (file-name (git-file-name name version))
3418 (sha256
3419 (base32 "1lkkbvxm0rgrrlx0szaxmf8ghc3d26wal96sgqk84m37mvs1f7p0"))
3420 (modules '((guix build utils)))
3421 (snippet
3422 '(begin
3423 ;; Remove proprietary plugins. As of now, all plugins supplied with
3424 ;; lynis are proprietary. In the future, if free plugins are
3425 ;; provided, whitelist them from deletion.
3426 (for-each delete-file (find-files "plugins"))
3427 #t))))
3428 (build-system gnu-build-system)
3429 (native-inputs
3430 `(;; For tests
3431 ("lynis-sdk"
3432 ,(origin
3433 (method git-fetch)
3434 (uri (git-reference
3435 (url "https://github.com/CISOfy/lynis-sdk")
3436 (commit "bf1c1d95121da9ca79a9eac5a15ed8d81e34094d")))
3437 (file-name (git-file-name "lynis-sdk" version))
3438 (sha256
3439 (base32 "1ndz5v0039dqa87cva2dk55a8hkw0fibsw8hh2ddmny9qkr4l3dp"))))))
3440 (arguments
3441 `(#:phases
3442 (modify-phases %standard-phases
3443 (replace 'configure
3444 (lambda* (#:key inputs outputs #:allow-other-keys)
3445 (substitute* "lynis"
3446 (("/usr/share/lynis")
3447 (string-append (assoc-ref outputs "out") "/share/lynis")))
3448 (substitute* "include/functions"
3449 (("/usr/local/etc/lynis")
3450 (string-append (assoc-ref outputs "out") "/etc/lynis")))
3451 #t))
3452 (delete 'build)
3453 (replace 'install
3454 (lambda* (#:key outputs #:allow-other-keys)
3455 (let ((out (assoc-ref outputs "out")))
3456 (install-file "lynis" (string-append out "/bin/"))
3457 (install-file "default.prf" (string-append out "/etc/lynis"))
3458 (for-each
3459 (lambda (dir)
3460 (copy-recursively dir (string-append out "/share/lynis/" dir)))
3461 (list "db" "include" "plugins"))
3462 (install-file "lynis.8" (string-append out "/share/man/man8"))
3463 #t)))
3464 (replace 'check
3465 (lambda* (#:key inputs #:allow-other-keys)
3466 (copy-recursively (assoc-ref inputs "lynis-sdk") "../lynis-sdk")
3467 (setenv "LANG" "en_US.UTF-8")
3468 (let ((lynis-dir (getcwd)))
3469 (with-directory-excursion "../lynis-sdk"
3470 (substitute* "config"
3471 (("\\.\\./lynis") lynis-dir))
3472 (substitute* "unit-tests/tests-language-translations.sh"
3473 (("\\.\\./lynis") lynis-dir))
3474 (invoke "sh" "lynis-devkit" "run" "unit-tests"))))))))
3475 (home-page "https://cisofy.com/lynis/")
3476 (synopsis "Security auditing tool")
3477 (description "Lynis is a security auditing tool. It performs an in-depth
3478 security scan and runs on the system itself. The primary goal is to test
3479 security defenses and provide tips for further system hardening. It will also
3480 scan for general system information, vulnerable software packages, and
3481 possible configuration issues.")
3482 (license license:gpl3+)))
3483
3484 (define-public ngrep
3485 (package
3486 (name "ngrep")
3487 (version "1.47")
3488 (source
3489 (origin
3490 (method git-fetch)
3491 (uri (git-reference
3492 (url "https://github.com/jpr5/ngrep/")
3493 (commit (string-append "V" (string-replace-substring version "." "_")))))
3494 (file-name (git-file-name name version))
3495 (sha256
3496 (base32
3497 "1x2fyd7wdqlj1r76ilal06cl2wmbz0ws6i3ys204sbjh1cj6dcl7"))))
3498 (build-system gnu-build-system)
3499 (inputs
3500 `(("libpcap" ,libpcap)))
3501 (arguments
3502 `(#:tests? #f ;; No tests.
3503 #:configure-flags (list (string-append "--with-pcap-includes="
3504 (assoc-ref %build-inputs "libpcap")
3505 "/include/pcap"))))
3506 (home-page "https://github.com/jpr5/ngrep/")
3507 (synopsis "Grep-like utility to search for network packets on an interface")
3508 (description "@command{ngrep} is like GNU grep applied to the network
3509 layer. It's a PCAP-based tool that allows you to specify an extended regular
3510 or hexadecimal expression to match against data payloads of packets. It
3511 understands many kinds of protocols, including IPv4/6, TCP, UDP, ICMPv4/6,
3512 IGMP and Raw, across a wide variety of interface types, and understands BPF
3513 filter logic in the same fashion as more common packet sniffing tools, such as
3514 tcpdump and snoop.")
3515 (license license:bsd-3)))