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