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