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