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