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