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