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