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