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