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