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