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