gnu: smartmontools: Update to 6.6.
[jackhill/guix/guix.git] / gnu / packages / admin.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
4 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014, 2015, 2016, 2017 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 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 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2016 Peter Feigl <peter.feigl@nexoid.at>
14 ;;; Copyright © 2016 John J. Foerch <jjfoerch@earthlink.net>
15 ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
16 ;;; Copyright © 2016, 2017 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 ;;;
22 ;;; This file is part of GNU Guix.
23 ;;;
24 ;;; GNU Guix is free software; you can redistribute it and/or modify it
25 ;;; under the terms of the GNU General Public License as published by
26 ;;; the Free Software Foundation; either version 3 of the License, or (at
27 ;;; your option) any later version.
28 ;;;
29 ;;; GNU Guix is distributed in the hope that it will be useful, but
30 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
31 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 ;;; GNU General Public License for more details.
33 ;;;
34 ;;; You should have received a copy of the GNU General Public License
35 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
36
37 (define-module (gnu packages admin)
38 #:use-module ((guix licenses) #:prefix license:)
39 #:use-module (guix packages)
40 #:use-module (guix utils)
41 #:use-module (guix download)
42 #:use-module (guix git-download)
43 #:use-module (guix build-system cmake)
44 #:use-module (guix build-system gnu)
45 #:use-module (guix build-system python)
46 #:use-module (guix build-system trivial)
47 #:use-module (gnu packages)
48 #:use-module (gnu packages base)
49 #:use-module (gnu packages cyrus-sasl)
50 #:use-module (gnu packages ncurses)
51 #:use-module (gnu packages readline)
52 #:use-module (gnu packages linux)
53 #:use-module (gnu packages lua)
54 #:use-module (gnu packages guile)
55 #:use-module (gnu packages gettext)
56 #:use-module (gnu packages pcre)
57 #:use-module (gnu packages perl)
58 #:use-module (gnu packages perl-check)
59 #:use-module (gnu packages tcl)
60 #:use-module (gnu packages compression)
61 #:use-module (gnu packages cross-base)
62 #:use-module (gnu packages tls)
63 #:use-module (gnu packages gnupg)
64 #:use-module (gnu packages bison)
65 #:use-module (gnu packages flex)
66 #:use-module (gnu packages glib)
67 #:use-module (gnu packages openldap)
68 #:use-module (gnu packages mcrypt)
69 #:use-module (gnu packages pkg-config)
70 #:use-module (gnu packages popt)
71 #:use-module (gnu packages python)
72 #:use-module (gnu packages python-web)
73 #:use-module (gnu packages texinfo)
74 #:use-module (gnu packages groff)
75 #:use-module (gnu packages pciutils)
76 #:use-module (gnu packages libunwind)
77 #:use-module (gnu packages libusb)
78 #:use-module (gnu packages libftdi)
79 #:use-module (gnu packages image)
80 #:use-module (gnu packages xorg)
81 #:use-module (gnu packages xdisorg)
82 #:use-module (gnu packages man)
83 #:use-module (gnu packages autotools)
84 #:use-module (gnu packages gnome)
85 #:use-module (gnu packages kerberos)
86 #:use-module (gnu packages gtk)
87 #:use-module (gnu packages xml))
88
89 (define-public aide
90 (package
91 (name "aide")
92 (version "0.16")
93 (source (origin
94 (method url-fetch)
95 (uri (string-append "mirror://sourceforge/aide/aide/"
96 version "/aide-" version ".tar.gz"))
97 (sha256
98 (base32
99 "0ibkv4z2gk14fn014kq13rp2ysiq6nn2cflv2q5i7zf466hm6758"))))
100 (build-system gnu-build-system)
101 (native-inputs
102 `(("bison" ,bison)
103 ("flex" ,flex)))
104 (inputs
105 `(("libgcrypt" ,libgcrypt)
106 ("libgpg-error" ,libgpg-error)
107 ("libmhash" ,libmhash)
108 ("pcre" ,pcre)
109 ("zlib" ,zlib)))
110 (synopsis "File and directory integrity checker")
111 (description
112 "AIDE (Advanced Intrusion Detection Environment) is a file and directory
113 integrity checker. It creates a database from the regular expression rules
114 that it finds from its configuration files. Once this database is initialized
115 it can be used to verify the integrity of the files. It has several message
116 digest algorithms that are used to check the integrity of files. All of the
117 usual file attributes can be checked for inconsistencies.")
118 (home-page "http://aide.sourceforge.net/")
119 (license license:gpl2+)))
120
121 (define-public progress
122 (package
123 (name "progress")
124 (version "0.13.1")
125 (source (origin
126 (method url-fetch)
127 (uri (string-append "https://github.com/Xfennec/"
128 name "/archive/v" version ".tar.gz"))
129 (sha256
130 (base32 "199rk6608q9m6l0fbjm0xl2w1c5krf8245dqnksdp4rqp7l9ak06"))
131 (file-name (string-append name "-" version ".tar.gz"))))
132 (build-system gnu-build-system)
133 (native-inputs
134 `(("pkg-config" ,pkg-config)
135 ("which" ,which)))
136 (inputs
137 `(("ncurses" ,ncurses)))
138 (arguments
139 `(#:tests? #f ; There is no test suite.
140 #:make-flags (list "CC=gcc"
141 (string-append "PREFIX=" (assoc-ref %outputs "out")))
142 #:phases
143 (modify-phases %standard-phases
144 (delete 'configure)))) ; There's no configure phase.
145 (home-page "https://github.com/Xfennec/progress")
146 (synopsis "Program to view the progress of the coreutils commands")
147 (description "A program that looks for coreutils basic commands (cp, mv,
148 dd, tar, gzip/gunzip, cat, etc.) currently running on your system and displays
149 the percentage of copied data. It can also show estimated time and throughput,
150 and provides a \"top-like\" mode (monitoring).")
151 (license license:gpl3+)))
152
153 (define-public shepherd
154 (package
155 (name "shepherd")
156 (version "0.3.2")
157 (source (origin
158 (method url-fetch)
159 (uri (string-append "ftp://alpha.gnu.org/gnu/dmd/shepherd-"
160 version ".tar.gz"))
161 (sha256
162 (base32
163 "174q1qg7yg6w1hfvlfv720hr6hid4h5xzw15y3ycfpspllzldhcb"))))
164 (build-system gnu-build-system)
165 (arguments
166 '(#:configure-flags '("--localstatedir=/var")))
167 (native-inputs
168 `(("pkg-config" ,pkg-config)
169
170 ;; This is the Guile we use as a cross-compiler...
171 ("guile" ,guile-2.2)))
172 (inputs
173 ;; ... and this is the one that appears in shebangs when cross-compiling.
174 `(("guile" ,guile-2.2)))
175 (synopsis "System service manager")
176 (description
177 "The GNU Shepherd is a daemon-managing daemon, meaning that it supervises
178 the execution of system services, replacing similar functionality found in
179 typical init systems. It provides dependency-handling through a convenient
180 interface and is based on GNU Guile.")
181 (license license:gpl3+)
182 (home-page "https://www.gnu.org/software/shepherd/")
183 (properties '((ftp-server . "alpha.gnu.org")))))
184
185 (define-public dfc
186 (package
187 (name "dfc")
188 (version "3.0.4")
189 (source
190 (origin
191 (method url-fetch)
192 (uri (string-append
193 "http://projects.gw-computing.net/attachments/download/79/dfc-"
194 version ".tar.gz"))
195 (sha256
196 (base32
197 "0zk1ppx93ijimf4sbgqilxxikpsa2gmpbynknyh41xy7jbdjxp0b"))))
198 (build-system cmake-build-system)
199 (arguments '(#:tests? #f)) ; There are no tests.
200 (native-inputs `(("gettext" ,gettext-minimal)))
201 (home-page "http://projects.gw-computing.net/projects/dfc")
202 (synopsis "Display file system space usage using graphs and colors")
203 (description
204 "dfc (df color) is a modern version of df. It uses colors, draws pretty
205 graphs and can export its output to different formats.")
206 (license license:bsd-3)))
207
208 (define-public htop
209 (package
210 (name "htop")
211 (version "2.0.2")
212 (source (origin
213 (method url-fetch)
214 (uri (string-append "http://hisham.hm/htop/releases/"
215 version "/htop-" version ".tar.gz"))
216 (sha256
217 (base32
218 "11zlwadm6dpkrlfvf3z3xll26yyffa7qrxd1w72y1kl0rgffk6qp"))))
219 (build-system gnu-build-system)
220 (inputs
221 `(("ncurses" ,ncurses)))
222 (home-page "http://htop.sourceforge.net/")
223 (synopsis "Interactive process viewer")
224 (description
225 "This is htop, an interactive process viewer. It is a text-mode
226 application (for console or X terminals) and requires ncurses.")
227 (license license:gpl2)))
228
229 (define-public pies
230 (package
231 (name "pies")
232 (version "1.3")
233 (source
234 (origin
235 (method url-fetch)
236 (uri (string-append "mirror://gnu/pies/pies-"
237 version ".tar.bz2"))
238 (sha256
239 (base32
240 "12r7rjjyibjdj08dvwbp0iflfpzl4s0zhn6cr6zj3hwf9gbzgl1g"))))
241 (build-system gnu-build-system)
242 (arguments
243 '(#:phases (modify-phases %standard-phases
244 (add-before 'build 'patch-/bin/sh
245 (lambda* (#:key inputs #:allow-other-keys)
246 ;; Use the right shell when executing user-provided
247 ;; shell commands.
248 (let ((bash (assoc-ref inputs "bash")))
249 (substitute* "src/progman.c"
250 (("\"/bin/sh\"")
251 (string-append "\"" bash "/bin/sh\"")))
252 #t))))))
253 (home-page "https://www.gnu.org/software/pies/")
254 (synopsis "Program invocation and execution supervisor")
255 (description
256 "GNU pies is a program that supervises the invocation and execution of
257 other programs. It reads the list of programs to be started from its
258 configuration file, executes them, and then monitors their status,
259 re-executing them as necessary.")
260 (license license:gpl3+)))
261
262 (define-public inetutils
263 (package
264 (name "inetutils")
265 (version "1.9.4")
266 (source (origin
267 (method url-fetch)
268 (uri (string-append "mirror://gnu/inetutils/inetutils-"
269 version ".tar.gz"))
270 (sha256
271 (base32
272 "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy"))))
273 (build-system gnu-build-system)
274 (arguments
275 `(#:configure-flags '("--localstatedir=/var"
276
277 ;; Make sure 'PATH_PROCNET_DEV' gets defined when
278 ;; cross-compiling (by default it does not.)
279 ,@(if (%current-target-system)
280 '("--with-path-procnet-dev=/proc/net/dev")
281 '()))
282 ;; On some systems, 'libls.sh' may fail with an error such as:
283 ;; "Failed to tell switch -a apart from -A".
284 #:parallel-tests? #f))
285 (inputs `(("ncurses" ,ncurses)
286 ("readline" ,readline))) ;for 'ftp'
287 (native-inputs `(("netstat" ,net-tools))) ;for tests
288 (home-page "https://www.gnu.org/software/inetutils/")
289 (synopsis "Basic networking utilities")
290 (description
291 "Inetutils is a collection of common network programs, such as an ftp
292 client and server, a telnet client and server, an rsh client and server, and
293 hostname.")
294 (license license:gpl3+)))
295
296 (define-public shadow
297 (package
298 (name "shadow")
299 (version "4.5")
300 (source (origin
301 (method url-fetch)
302 (uri (string-append
303 "https://github.com/shadow-maint/shadow/releases/"
304 "download/" version "/shadow-" version ".tar.xz"))
305 (sha256
306 (base32
307 "0hdpai78n63l3v3fgr3kkiqzhd0awrpfnnzz4mf7lmxdh61qb37w"))))
308 (build-system gnu-build-system)
309 (arguments
310 `(;; Assume System V `setpgrp (void)', which is the default on GNU
311 ;; variants (`AC_FUNC_SETPGRP' is not cross-compilation capable.)
312 #:configure-flags
313 '("--with-libpam" "ac_cv_func_setpgrp_void=yes")
314
315 #:phases
316 (modify-phases %standard-phases
317 (add-before 'build 'set-nscd-file-name
318 (lambda* (#:key inputs #:allow-other-keys)
319 ;; Use the right file name for nscd.
320 (let ((libc (assoc-ref inputs
321 ,(if (%current-target-system)
322 "cross-libc"
323 "libc"))))
324 (substitute* "lib/nscd.c"
325 (("/usr/sbin/nscd")
326 (string-append libc "/sbin/nscd"))))))
327 (add-after 'install 'remove-groups
328 (lambda* (#:key outputs #:allow-other-keys)
329 ;; Remove `groups', which is already provided by Coreutils.
330 (let* ((out (assoc-ref outputs "out"))
331 (bin (string-append out "/bin"))
332 (man (string-append out "/share/man")))
333 (delete-file (string-append bin "/groups"))
334 (for-each delete-file (find-files man "^groups\\."))
335 #t))))))
336
337 (inputs (if (string-contains (or (%current-target-system)
338 (%current-system))
339 "-linux")
340 `(("linux-pam" ,linux-pam))
341 '()))
342 (home-page "http://pkg-shadow.alioth.debian.org/")
343 (synopsis "Authentication-related tools such as passwd, su, and login")
344 (description
345 "Shadow provides a number of authentication-related tools, including:
346 login, passwd, su, groupadd, and useradd.")
347
348 ;; The `vipw' program is GPLv2+.
349 ;; libmisc/salt.c is public domain.
350 (license license:bsd-3)))
351
352 (define-public mingetty
353 (package
354 (name "mingetty")
355 (version "1.08")
356 (source (origin
357 (method url-fetch)
358 (uri (string-append "mirror://sourceforge/mingetty/mingetty/"
359 version "/mingetty-" version ".tar.gz"))
360 (sha256
361 (base32
362 "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"))))
363 (build-system gnu-build-system)
364 (arguments
365 `(#:phases
366 (modify-phases %standard-phases
367 (replace 'configure
368 (lambda* (#:key inputs outputs #:allow-other-keys)
369 (let* ((out (assoc-ref outputs "out"))
370 (man8 (string-append out "/share/man/man8"))
371 (sbin (string-append out "/sbin"))
372 (shadow (assoc-ref inputs "shadow"))
373 (login (string-append shadow "/bin/login")))
374 (substitute* "Makefile"
375 (("^SBINDIR.*")
376 (string-append "SBINDIR = " out
377 "/sbin\n"))
378 (("^MANDIR.*")
379 (string-append "MANDIR = " out
380 "/share/man/man8\n")))
381
382 ;; Pick the right 'login' by default.
383 (substitute* "mingetty.c"
384 (("\"/bin/login\"")
385 (string-append "\"" login "\"")))
386
387 (mkdir-p sbin)
388 (mkdir-p man8))
389 #t)))
390 #:tests? #f)) ; no tests
391 (inputs `(("shadow" ,shadow)))
392
393 (home-page "https://sourceforge.net/projects/mingetty")
394 (synopsis "Getty for the text console")
395 (description
396 "Small console getty that is started on the Linux text console,
397 asks for a login name and then transfers over to 'login'. It is extended to
398 allow automatic login and starting any app.")
399 (license license:gpl2+)))
400
401 (define-public net-base
402 (package
403 (name "net-base")
404 (version "5.3")
405 (source (origin
406 (method url-fetch)
407 (uri (string-append
408 "mirror://debian/pool/main/n/netbase/netbase_"
409 version ".tar.xz"))
410 (sha256
411 (base32
412 "12xqjwg3p4rzmmh2iib6sigm9l29y3dgk74mmnw64k84jnbwdxl1"))))
413 (build-system trivial-build-system)
414 (arguments
415 `(#:modules ((guix build utils))
416 #:builder (begin
417 (use-modules (guix build utils)
418 (srfi srfi-26))
419
420 (let* ((source (assoc-ref %build-inputs "source"))
421 (tar (assoc-ref %build-inputs "tar"))
422 (xz (assoc-ref %build-inputs "xz"))
423 (output (assoc-ref %outputs "out"))
424 (etc (string-append output "/etc")))
425 (setenv "PATH" (string-append xz "/bin"))
426 (system* (string-append tar "/bin/tar") "xvf"
427 source)
428 (chdir ,(string-append "netbase-" version))
429 (mkdir-p etc)
430 (for-each copy-file
431 '("etc-services" "etc-protocols" "etc-rpc")
432 (map (cut string-append etc "/" <>)
433 '("services" "protocols" "rpc")))
434 #t))))
435 (native-inputs `(("tar" ,tar)
436 ("xz" ,xz)))
437 (synopsis "IANA protocol, port, and RPC number assignments")
438 (description
439 "This package provides the /etc/services, /etc/protocols, and /etc/rpc
440 files, which contain information about the IANA-assigned port, protocol, and
441 ONC RPC numbers.")
442 (home-page "http://packages.debian.org/sid/netbase")
443 (license license:gpl2)))
444
445 (define-public netcat
446 (package
447 (name "netcat")
448 (version "0.7.1")
449 (source (origin
450 (method url-fetch)
451 (uri (string-append "mirror://sourceforge/netcat/netcat/" version
452 "/netcat-" version ".tar.bz2"))
453 (sha256
454 (base32
455 "1frjcdkhkpzk0f84hx6hmw5l0ynpmji8vcbaxg8h5k2svyxz0nmm"))))
456 (build-system gnu-build-system)
457 (arguments
458 `(#:configure-flags
459 ;; By default, man and info pages are put in PREFIX/{man,info},
460 ;; but we want them in PREFIX/share/{man,info}.
461 (let ((out (assoc-ref %outputs "out")))
462 (list (string-append "--mandir=" out "/share/man")
463 (string-append "--infodir=" out "/share/info")))))
464 (home-page "http://netcat.sourceforge.net")
465 (synopsis "Read and write data over TCP/IP")
466 (description
467 "Netcat is a featured networking utility which reads and writes data
468 across network connections, using the TCP/IP protocol. It is designed to be a
469 reliable \"back-end\" tool that can be used directly or easily driven by other
470 programs and scripts. At the same time, it is a feature-rich network debugging
471 and exploration tool, since it can create almost any kind of connection you
472 would need and has several interesting built-in capabilities.")
473 (license license:gpl2+)))
474
475 (define-public alive
476 (package
477 (name "alive")
478 (version "2.0.2")
479 (source (origin
480 (method url-fetch)
481 (uri (string-append "mirror://gnu/alive/alive-"
482 version ".tar.xz"))
483 (sha256
484 (base32
485 "1vrzg51ai68x9yld7vbgl58sxaw5qpx8rbakwcxn4cqq6vpxj38j"))))
486 (build-system gnu-build-system)
487 (arguments '(#:configure-flags '("alive_cv_nice_ping=yes")))
488 (inputs `(("guile" ,guile-2.0)
489 ("inetutils" ,inetutils)))
490 (home-page "https://www.gnu.org/software/alive/")
491 (synopsis "Autologin and keep-alive daemon")
492 (description
493 "GNU Alive sends periodic pings to a server, generally to keep a
494 connection alive.")
495 (license license:gpl3+)))
496
497 (define-public isc-dhcp
498 (let* ((bind-major-version "9")
499 (bind-minor-version "9")
500 (bind-patch-version "10")
501 (bind-release-type "-P") ; for patch release, use "-P"
502 (bind-release-version "3") ; for patch release, e.g. "6"
503 (bind-version (string-append bind-major-version
504 "."
505 bind-minor-version
506 "."
507 bind-patch-version
508 bind-release-type
509 bind-release-version)))
510 (package
511 (name "isc-dhcp")
512 (version "4.3.5")
513 (source (origin
514 (method url-fetch)
515 (uri (string-append "http://ftp.isc.org/isc/dhcp/"
516 version "/dhcp-" version ".tar.gz"))
517 (sha256
518 (base32
519 "0m7rwxvpb7xrmfl9ynpckhl0hi0xgm9bq1fmbp2r68sxy5mr75gb"))))
520 (build-system gnu-build-system)
521 (arguments
522 `(#:parallel-build? #f
523 #:phases
524 (modify-phases %standard-phases
525 (add-after 'unpack 'replace-bundled-bind
526 (lambda* (#:key inputs #:allow-other-keys)
527 (delete-file "bind/bind.tar.gz")
528 (copy-file (assoc-ref inputs "bind-source-tarball")
529 "bind/bind.tar.gz")
530 (chmod "bind/bind.tar.gz" #o644)
531 (substitute* "bind/version.tmp"
532 (("^MAJORVER=.*")
533 (format #f "MAJORVER=~a\n" ,bind-major-version))
534 (("^MINORVER=.*")
535 (format #f "MINORVER=~a\n" ,bind-minor-version))
536 (("^PATCHVER=.*")
537 (format #f "PATCHVER=~a\n" ,bind-patch-version))
538 (("^RELEASETYPE=.*")
539 (format #f "RELEASETYPE=~a\n" ,bind-release-type))
540 (("^RELEASEVER=.*")
541 (format #f "RELEASEVER=~a\n" ,bind-release-version)))
542 #t))
543 (add-after 'configure 'post-configure
544 (lambda* (#:key outputs #:allow-other-keys)
545 ;; Point to the right client script, which will be
546 ;; installed in a later phase.
547 (substitute* "includes/dhcpd.h"
548 (("#define[[:blank:]]+_PATH_DHCLIENT_SCRIPT.*")
549 (let ((out (assoc-ref outputs "out")))
550 (string-append "#define _PATH_DHCLIENT_SCRIPT \""
551 out "/libexec/dhclient-script"
552 "\"\n"))))
553
554 ;; During the 'build' phase, 'bind.tar.gz' is extracted, so
555 ;; we must patch shebangs in there and make sure the right
556 ;; shell is used.
557 (with-directory-excursion "bind"
558 (substitute* "Makefile"
559 (("\\./configure")
560 (let ((sh (which "sh")))
561 (string-append "./configure CONFIG_SHELL="
562 sh " SHELL=" sh))))
563
564 (let ((bind-directory (string-append "bind-" ,bind-version)))
565 (system* "tar" "xf" "bind.tar.gz")
566 (for-each patch-shebang
567 (find-files bind-directory ".*"))
568 (zero? (system* "tar" "cf" "bind.tar.gz"
569 bind-directory
570 ;; avoid non-determinism in the archive
571 "--sort=name"
572 "--mtime=@0"
573 "--owner=root:0"
574 "--group=root:0"))))))
575 (add-after 'install 'post-install
576 (lambda* (#:key inputs outputs #:allow-other-keys)
577 ;; Install the dhclient script for GNU/Linux and make sure
578 ;; if finds all the programs it needs.
579 (let* ((out (assoc-ref outputs "out"))
580 (libexec (string-append out "/libexec"))
581 (coreutils (assoc-ref inputs "coreutils"))
582 (inetutils (assoc-ref inputs "inetutils"))
583 (net-tools (assoc-ref inputs "net-tools"))
584 (sed (assoc-ref inputs "sed")))
585 (substitute* "client/scripts/linux"
586 (("/sbin/ip")
587 (string-append (assoc-ref inputs "iproute")
588 "/sbin/ip")))
589
590 (mkdir-p libexec)
591 (copy-file "client/scripts/linux"
592 (string-append libexec "/dhclient-script"))
593
594 (wrap-program
595 (string-append libexec "/dhclient-script")
596 `("PATH" ":" prefix
597 ,(map (lambda (dir)
598 (string-append dir "/bin:"
599 dir "/sbin"))
600 (list inetutils net-tools coreutils sed))))))))))
601
602 (native-inputs `(("perl" ,perl)))
603
604 (inputs `(("inetutils" ,inetutils)
605 ("net-tools" ,net-tools)
606 ("iproute" ,iproute)
607
608 ;; XXX isc-dhcp bundles a copy of bind that has security
609 ;; flaws, so we use a newer version.
610 ("bind-source-tarball"
611 ,(origin
612 (method url-fetch)
613 (uri (string-append "http://ftp.isc.org/isc/bind9/"
614 bind-version
615 "/bind-" bind-version ".tar.gz"))
616 (sha256
617 (base32
618 "00yh1d5shrq7y0kfwacax4f8dc0akaa2fha430j92n7mshms65m1"))))
619
620 ;; When cross-compiling, we need the cross Coreutils and sed.
621 ;; Otherwise just use those from %FINAL-INPUTS.
622 ,@(if (%current-target-system)
623 `(("coreutils" ,coreutils)
624 ("sed" ,sed))
625 '())))
626
627 (home-page "http://www.isc.org/products/DHCP/")
628 (synopsis "Dynamic Host Configuration Protocol (DHCP) tools")
629 (description
630 "ISC's Dynamic Host Configuration Protocol (DHCP) distribution provides a
631 reference implementation of all aspects of DHCP, through a suite of DHCP
632 tools: server, client, and relay agent.")
633 (license license:isc)
634 (properties '((cpe-name . "dhcp"))))))
635
636 (define-public libpcap
637 (package
638 (name "libpcap")
639 (version "1.8.1")
640 (source (origin
641 (method url-fetch)
642 (uri (string-append "http://www.tcpdump.org/release/libpcap-"
643 version ".tar.gz"))
644 (sha256
645 (base32
646 "07jlhc66z76dipj4j5v3dig8x6h3k6cb36kmnmpsixf3zmlvqgb7"))))
647 (build-system gnu-build-system)
648 (native-inputs `(("bison" ,bison) ("flex" ,flex)))
649 (arguments '(#:configure-flags '("--with-pcap=linux")
650 #:tests? #f)) ; no 'check' target
651 (home-page "http://www.tcpdump.org")
652 (synopsis "Network packet capture library")
653 (description
654 "libpcap is an interface for user-level packet capture. It provides a
655 portable framework for low-level network monitoring. Applications include
656 network statistics collection, security monitoring, network debugging, etc.")
657
658 ;; fad-*.c and a couple other files are BSD-4, but the rest is BSD-3.
659 (license license:bsd-3)))
660
661 (define-public tcpdump
662 (package
663 (name "tcpdump")
664 (version "4.9.2")
665 (source (origin
666 (method url-fetch)
667 (uri (string-append "http://www.tcpdump.org/release/tcpdump-"
668 version ".tar.gz"))
669 (sha256
670 (base32
671 "0ygy0layzqaj838r5xd613iraz09wlfgpyh7pc6cwclql8v3b2vr"))))
672 (build-system gnu-build-system)
673 (inputs `(("libpcap" ,libpcap)
674 ("openssl" ,openssl)))
675 (native-inputs `(("perl" ,perl))) ; for tests
676 (home-page "http://www.tcpdump.org/")
677 (synopsis "Network packet analyzer")
678 (description
679 "Tcpdump is a command-line tool to analyze network traffic passing
680 through the network interface controller.")
681 (license license:bsd-3)))
682
683 (define-public jnettop
684 (package
685 (name "jnettop")
686 (version "0.13.0")
687 (source (origin
688 (method url-fetch)
689 (uri (string-append "http://jnettop.kubs.info/dist/jnettop-"
690 version ".tar.gz"))
691 (sha256
692 (base32
693 "1855np7c4b0bqzhf1l1dyzxb90fpnvrirdisajhci5am6als31z9"))))
694 (build-system gnu-build-system)
695 (native-inputs
696 `(("pkg-config" ,pkg-config)))
697 (inputs
698 `(("glib" ,glib)
699 ("ncurses" ,ncurses)
700 ("libpcap" ,libpcap)))
701 (home-page "http://jnettop.kubs.info/")
702 (synopsis "Visualize network traffic by bandwidth use")
703 (description
704 "Jnettop is a traffic visualiser, which captures traffic going
705 through the host it is running from and displays streams sorted
706 by bandwidth they use.")
707 (license license:gpl2+)))
708
709 (define-public clusterssh
710 (package
711 (name "clusterssh")
712 (version "3.28")
713 (source (origin
714 (method url-fetch)
715 (uri (string-append "mirror://sourceforge/clusterssh/"
716 "1.%20ClusterSSH%20Series%203/" version
717 "/clusterssh-" version ".tar.gz"))
718 (sha256
719 (base32
720 "1bwggpvaj2al5blg1ynapviv2kpydffpzq2zkhi81najnvzc1rr7"))))
721 (build-system gnu-build-system)
722 (inputs `(("perl" ,perl)))
723 (propagated-inputs `(("xterm" ,xterm)
724 ("perl-tk" ,perl-tk)
725 ("perl-x11-protocol" ,perl-x11-protocol)))
726 (arguments
727 `(#:phases
728 (modify-phases %standard-phases
729 (add-after 'install 'set-load-paths
730 (lambda* (#:key inputs outputs #:allow-other-keys)
731 ;; Put the perl-tk and perl-x11-protocol modules in the perl inc
732 ;; path for PROG
733 (let* ((out (assoc-ref outputs "out"))
734 (prog (string-append out "/bin/cssh"))
735 (perl-ver ,(package-version perl))
736 (x11-inc (string-append
737 (assoc-ref inputs "perl-x11-protocol")
738 "/lib/perl5/site_perl/" perl-ver))
739 (tk-inc (string-append
740 (assoc-ref inputs "perl-tk")
741 "/lib/perl5/site_perl/" perl-ver
742 "/x86_64-linux")))
743 (wrap-program
744 prog
745 `("PERL5LIB" ":" prefix (,x11-inc ,tk-inc))))
746 #t)))))
747 ;; The clusterssh.sourceforge.net address requires login to view
748 (home-page "https://sourceforge.net/projects/clusterssh/")
749 (synopsis "Secure concurrent multi-server terminal control")
750 (description
751 "ClusterSSH controls a number of xterm windows via a single graphical
752 console window to allow commands to be interactively run on multiple servers
753 over ssh connections.")
754 (license license:gpl2+)))
755
756 (define-public rottlog
757 (package
758 (name "rottlog")
759 (version "0.72.2")
760 (source (origin
761 (method url-fetch)
762 (uri (string-append "mirror://gnu/rottlog/rottlog-"
763 version ".tar.gz"))
764 (sha256
765 (base32
766 "0751mb9l2f0jrk3vj6q8ilanifd121dliwk0c34g8k0dlzsv3kd7"))
767 (modules '((guix build utils)))
768 (snippet
769 '(substitute* "Makefile.in"
770 (("-o \\$\\{LOG_OWN\\} -g \\$\\{LOG_GROUP\\}")
771 ;; Don't try to chown root.
772 "")
773 (("mkdir -p \\$\\(ROTT_STATDIR\\)")
774 ;; Don't attempt to create /var/lib/rottlog.
775 "true")))))
776 (build-system gnu-build-system)
777 (arguments
778 '(#:configure-flags (list "ROTT_ETCDIR=/etc/rottlog" ;rc file location
779 "--localstatedir=/var")
780
781 ;; Install example config files in OUT/etc.
782 #:make-flags (list (string-append "ROTT_ETCDIR="
783 (assoc-ref %outputs "out")
784 "/etc"))
785
786 #:phases (modify-phases %standard-phases
787 (add-after 'unpack 'patch-paths
788 (lambda _
789 (substitute* "rc/rc"
790 (("/usr/sbin/sendmail") "sendmail"))
791 #t))
792 (add-after 'build 'set-packdir
793 (lambda _
794 ;; Set a default location for archived logs.
795 (substitute* "rc/rc"
796 (("packdir=\"\"")
797 "packdir=\"/var/log\""))
798 #t))
799 (add-before 'install 'tweak-rc-weekly
800 (lambda _
801 (substitute* "rc/weekly"
802 (("/bin/kill")
803 (which "kill"))
804 (("syslogd\\.pid")
805 ;; The file is called 'syslog.pid' (no 'd').
806 "syslog.pid"))
807 #t))
808 (add-after 'install 'install-info
809 (lambda _
810 (zero? (system* "make" "install-info")))))))
811 (native-inputs `(("texinfo" ,texinfo)
812 ("util-linux" ,util-linux))) ; for 'cal'
813 (home-page "https://www.gnu.org/software/rottlog/")
814 (synopsis "Log rotation and management")
815 (description
816 "GNU Rot[t]log is a program for managing log files. It is used to
817 automatically rotate out log files when they have reached a given size or
818 according to a given schedule. It can also be used to automatically compress
819 and archive such logs. Rot[t]log will mail reports of its activity to the
820 system administrator.")
821 (license license:gpl3+)))
822
823 (define-public sudo
824 (package
825 (name "sudo")
826 (version "1.8.21p2")
827 (source (origin
828 (method url-fetch)
829 (uri
830 (list (string-append "https://www.sudo.ws/sudo/dist/sudo-"
831 version ".tar.gz")
832 (string-append "ftp://ftp.sudo.ws/pub/sudo/OLD/sudo-"
833 version ".tar.gz")))
834 (sha256
835 (base32
836 "0s33szq6q59v5s377l4v6ybsdy7pfq6sz7y364j4x09ssdn79ibl"))
837 (modules '((guix build utils)))
838 (snippet
839 '(delete-file-recursively "lib/zlib"))))
840 (build-system gnu-build-system)
841 (arguments
842 `(#:configure-flags
843 (list "--with-logpath=/var/log/sudo.log"
844 "--with-rundir=/var/run/sudo" ;must be cleaned up at boot time
845 "--with-vardir=/var/db/sudo"
846 "--with-iologdir=/var/log/sudo-io"
847
848 ;; 'visudo.c' expects _PATH_MV to be defined, but glibc doesn't
849 ;; provide it.
850 (string-append "CPPFLAGS=-D_PATH_MV='\""
851 (assoc-ref %build-inputs "coreutils")
852 "/bin/mv\"'"))
853
854 ;; Avoid non-determinism; see <http://bugs.gnu.org/21918>.
855 #:parallel-build? #f
856
857 #:phases
858 (modify-phases %standard-phases
859 (add-before 'configure 'pre-configure
860 (lambda _
861 (substitute* "src/sudo_usage.h.in"
862 ;; Do not capture 'configure' arguments since we would
863 ;; unduly retain references, and also because the
864 ;; CPPFLAGS above would close the string literal
865 ;; prematurely.
866 (("@CONFIGURE_ARGS@") "\"\""))
867 (substitute* (find-files "." "Makefile\\.in")
868 (("-o [[:graph:]]+ -g [[:graph:]]+")
869 ;; Allow installation as non-root.
870 "")
871 (("^install: (.*)install-sudoers(.*)" _ before after)
872 ;; Don't try to create /etc/sudoers.
873 (string-append "install: " before after "\n"))
874 (("\\$\\(DESTDIR\\)\\$\\(rundir\\)")
875 ;; Don't try to create /run/sudo.
876 "$(TMPDIR)/dummy")
877 (("\\$\\(DESTDIR\\)\\$\\(vardir\\)")
878 ;; Don't try to create /var/db/sudo.
879 "$(TMPDIR)/dummy"))
880 #t)))
881
882 ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
883 ;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
884 #:tests? #f))
885 (inputs
886 `(("groff" ,groff)
887 ("linux-pam" ,linux-pam)
888 ("zlib" ,zlib)
889 ("coreutils" ,coreutils)))
890 (home-page "https://www.sudo.ws/")
891 (synopsis "Run commands as root")
892 (description
893 "Sudo (su \"do\") allows a system administrator to delegate authority to
894 give certain users (or groups of users) the ability to run some (or all)
895 commands as root or another user while providing an audit trail of the
896 commands and their arguments.")
897
898 ;; See <http://www.sudo.ws/sudo/license.html>.
899 (license license:x11)))
900
901 (define-public wpa-supplicant-minimal
902 (package
903 (name "wpa-supplicant-minimal")
904 (version "2.6")
905 (source (origin
906 (method url-fetch)
907 (uri (string-append
908 "http://w1.fi/releases/wpa_supplicant-"
909 version
910 ".tar.gz"))
911 (patches (search-patches "wpa-supplicant-CVE-2017-13082.patch"
912 "wpa-supplicant-fix-key-reuse.patch"
913 "wpa-supplicant-fix-zeroed-keys.patch"
914 "wpa-supplicant-fix-nonce-reuse.patch"
915 "wpa-supplicant-krack-followups.patch"))
916 (sha256
917 (base32
918 "0l0l5gz3d5j9bqjsbjlfcv4w4jwndllp9fmyai4x9kg6qhs6v4xl"))))
919 (build-system gnu-build-system)
920 (arguments
921 '(#:phases
922 (modify-phases %standard-phases
923 (replace 'configure
924 (lambda* (#:key outputs #:allow-other-keys)
925 (chdir "wpa_supplicant")
926 (copy-file "defconfig" ".config")
927 (let ((port (open-file ".config" "al")))
928 (display "
929 CONFIG_DEBUG_SYSLOG=y
930
931 # Choose GnuTLS (the default is OpenSSL.)
932 CONFIG_TLS=gnutls
933
934 CONFIG_DRIVER_NL80211=y
935 CFLAGS += $(shell pkg-config libnl-3.0 --cflags)
936 CONFIG_LIBNL32=y
937 CONFIG_READLINE=y\n" port)
938 (close-port port))))
939 (add-after 'install 'install-man-pages
940 (lambda* (#:key outputs #:allow-other-keys)
941 (let* ((out (assoc-ref outputs "out"))
942 (man (string-append out "/share/man"))
943 (man5 (string-append man "/man5"))
944 (man8 (string-append man "/man8")))
945 (define (copy-man-page target)
946 (lambda (file)
947 (install-file file target)))
948
949 (mkdir-p man5) (mkdir man8)
950 (for-each (copy-man-page man5)
951 (find-files "doc/docbook" "\\.5"))
952 (for-each (copy-man-page man8)
953 (find-files "doc/docbook" "\\.8"))
954 #t))))
955
956 #:make-flags (list "CC=gcc"
957 (string-append "BINDIR=" (assoc-ref %outputs "out")
958 "/sbin")
959 (string-append "LIBDIR=" (assoc-ref %outputs "out")
960 "/lib"))
961 #:tests? #f))
962 (inputs
963 `(("readline" ,readline)
964 ("libnl" ,libnl)
965 ("gnutls" ,gnutls)
966 ("libgcrypt" ,libgcrypt))) ;needed by crypto_gnutls.c
967 (native-inputs
968 `(("pkg-config" ,pkg-config)))
969 (home-page "http://w1.fi/wpa_supplicant/")
970 (synopsis "Connecting to WPA and WPA2-protected wireless networks")
971 (description
972 "wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
973 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in
974 the client stations. It implements key negotiation with a WPA Authenticator
975 and it controls the roaming and IEEE 802.11 authentication/association of the
976 WLAN driver.
977
978 This package provides the 'wpa_supplicant' daemon and the 'wpa_cli' command.")
979
980 ;; In practice, this is linked against Readline, which makes it GPLv3+.
981 (license license:bsd-3)))
982
983 (define-public wpa-supplicant
984 (package (inherit wpa-supplicant-minimal)
985 (name "wpa-supplicant")
986 (inputs `(("dbus" ,dbus)
987 ,@(package-inputs wpa-supplicant-minimal)))
988 (arguments
989 (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
990 ((#:phases phases)
991 `(modify-phases ,phases
992 (add-after 'configure 'configure-for-dbus
993 (lambda _
994 (let ((port (open-file ".config" "al")))
995 (display "
996 CONFIG_CTRL_IFACE_DBUS=y
997 CONFIG_CTRL_IFACE_DBUS_NEW=y
998 CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
999 (close-port port))
1000 #t))
1001 (add-after 'install-man-pages 'install-dbus-conf
1002 (lambda* (#:key outputs #:allow-other-keys)
1003 (let* ((out (assoc-ref outputs "out"))
1004 (dir (string-append out "/etc/dbus-1/system.d")))
1005 (mkdir-p dir)
1006 (copy-file "dbus/dbus-wpa_supplicant.conf"
1007 (string-append dir "/wpa_supplicant.conf")))
1008 #t))))))))
1009
1010 (define-public wakelan
1011 (package
1012 (name "wakelan")
1013 (version "1.1")
1014 (source (origin
1015 (method url-fetch)
1016 (uri (string-append
1017 "ftp://ftp.gwdg.de/pub/linux/metalab/system/network/misc/wakelan-"
1018 version ".tar.gz"))
1019 (sha256
1020 (base32
1021 "0vydqpf44146ir6k87gmqaq6xy66xhc1gkr3nsd7jj3nhy7ypx9x"))))
1022 (build-system gnu-build-system)
1023 (arguments
1024 '(#:phases
1025 (modify-phases %standard-phases
1026 (replace 'configure
1027 (lambda* (#:key outputs #:allow-other-keys)
1028 (let ((out (assoc-ref outputs "out")))
1029 (mkdir-p (string-append out "/bin"))
1030 (mkdir-p (string-append out "/share/man/man1"))
1031
1032 ;; It's an old configure script that doesn't understand
1033 ;; the extra options we pass.
1034 (setenv "CONFIG_SHELL" (which "bash"))
1035 (zero?
1036 (system* "./configure"
1037 (string-append "--prefix=" out)
1038 (string-append "--mandir=" out
1039 "/share/man")))))))
1040 #:tests? #f))
1041 (home-page "http://kernel.org") ; really, no home page
1042 (synopsis "Send a wake-on-LAN packet")
1043 (description
1044 "WakeLan broadcasts a properly formatted UDP packet across the local area
1045 network, which causes enabled computers to power on.")
1046 (license license:gpl2+)))
1047
1048 (define-public dmidecode
1049 (package
1050 (name "dmidecode")
1051 (version "3.0")
1052 (source (origin
1053 (method url-fetch)
1054 (uri (string-append
1055 "mirror://savannah/dmidecode/dmidecode-"
1056 version ".tar.xz"))
1057 (sha256
1058 (base32
1059 "0iby0xfk5x3cdr0x0gxj5888jjyjhafvaq0l79civ73jjfqmphvy"))))
1060 (build-system gnu-build-system)
1061 (arguments
1062 '(#:phases (modify-phases %standard-phases (delete 'configure))
1063 #:tests? #f ; no 'check' target
1064 #:make-flags (list (string-append "prefix="
1065 (assoc-ref %outputs "out")))))
1066 (home-page "http://www.nongnu.org/dmidecode/")
1067 (synopsis "Read hardware information from the BIOS")
1068 (description
1069 "Dmidecode reports information about your system's hardware as described
1070 in your system BIOS according to the SMBIOS/DMI standard. This typically
1071 includes system manufacturer, model name, serial number, BIOS version, asset
1072 tag as well as a lot of other details of varying level of interest and
1073 reliability depending on the manufacturer. This will often include usage
1074 status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory
1075 module slots, and the list of I/O ports (e.g. serial, parallel, USB).")
1076 (license license:gpl2+)))
1077
1078 (define-public acpica
1079 (package
1080 (name "acpica")
1081 (version "20150410")
1082 (source (origin
1083 (method url-fetch)
1084 (uri (string-append
1085 "https://acpica.org/sites/acpica/files/acpica-unix2-"
1086 version ".tar.gz"))
1087 (sha256
1088 (base32
1089 "0q1fjwkyw9x6gsva6fd0zbn7ly4fx0ha4853f416np9kf2irillw"))))
1090 (build-system gnu-build-system)
1091 (native-inputs `(("flex" ,flex)
1092 ("bison" ,bison)))
1093 (arguments
1094 '(#:make-flags (list (string-append "PREFIX=" %output)
1095 "HOST=_LINUX"
1096 "OPT_CFLAGS=-Wall -fno-strict-aliasing")
1097 #:tests? #f ; no 'check' target.
1098 #:phases (modify-phases %standard-phases (delete 'configure))))
1099 (home-page "http://acpica.org/")
1100 (synopsis "Tools for the development and debug of ACPI tables")
1101 (description
1102 "The ACPI Component Architecture (ACPICA) project provides an
1103 OS-independent reference implementation of the Advanced Configuration and
1104 Power Interface Specification (ACPI). ACPICA code contains those portions of
1105 ACPI meant to be directly integrated into the host OS as a kernel-resident
1106 subsystem, and a small set of tools to assist in developing and debugging ACPI
1107 tables. This package contains only the user-space tools needed for ACPI table
1108 development, not the kernel implementation of ACPI.")
1109 (license license:gpl2))) ; Dual GPLv2/ACPICA Licence
1110
1111 (define-public stress
1112 (package
1113 (name "stress")
1114 (version "1.0.1")
1115 (source (origin
1116 (method url-fetch)
1117 (uri (string-append "mirror://debian/pool/main/s/stress/stress_"
1118 version ".orig.tar.gz"))
1119 (sha256
1120 (base32
1121 "1v9vnzlihqfjsxa93hdbrq72pqqk00dkylmlg8jpxhm7s1w9qfl1"))))
1122 (build-system gnu-build-system)
1123 (home-page "http://packages.debian.org/wheezy/stress")
1124 (synopsis "Impose load on and stress test a computer system")
1125 (description
1126 "Stress is a tool that imposes a configurable amount of CPU, memory, I/O,
1127 or disk stress on a POSIX-compliant operating system and reports any errors it
1128 detects.
1129
1130 Stress is not a benchmark. It is a tool used by system administrators to
1131 evaluate how well their systems will scale, by kernel programmers to evaluate
1132 perceived performance characteristics, and by systems programmers to expose
1133 the classes of bugs which only or more frequently manifest themselves when the
1134 system is under heavy load.")
1135 (license license:gpl2+)))
1136
1137 (define-public detox
1138 (package
1139 (name "detox")
1140 (version "1.2.0")
1141 (source (origin
1142 (method url-fetch)
1143 (uri (string-append "mirror://sourceforge/detox/detox/" version
1144 "/detox-" version ".tar.bz2"))
1145 (sha256
1146 (base32
1147 "1y6vvjqsg54kl49cry73jbfhr04s7wjs779vrr9zrq6kww7dkymb"))))
1148 (build-system gnu-build-system)
1149 ;; Both flex and popt are used in this case for their runtime libraries
1150 ;; (libfl and libpopt).
1151 (inputs
1152 `(("flex" ,flex)
1153 ("popt" ,popt)))
1154 (arguments
1155 `(#:configure-flags `(,(string-append "--with-popt="
1156 (assoc-ref %build-inputs "popt")))
1157 #:tests? #f)) ;no 'check' target
1158 (home-page "http://detox.sourceforge.net")
1159 (synopsis "Clean up file names")
1160 (description
1161 "Detox is a program that renames files to make them easier to work with
1162 under Unix and related operating systems. Spaces and various other unsafe
1163 characters (such as \"$\") get replaced with \"_\". ISO 8859-1 (Latin-1)
1164 characters can be replaced as well, as can UTF-8 characters.")
1165 (license license:bsd-3)))
1166
1167 (define-public testdisk
1168 (package
1169 (name "testdisk")
1170 (version "7.0")
1171 (source (origin
1172 (method url-fetch)
1173 (uri (string-append "http://www.cgsecurity.org/testdisk-"
1174 version ".tar.bz2"))
1175 (sha256
1176 (base32
1177 "0ba4wfz2qrf60vwvb1qsq9l6j0pgg81qgf7fh22siaz649mkpfq0"))))
1178 (build-system gnu-build-system)
1179 (inputs
1180 `(("ntfs-3g" ,ntfs-3g)
1181 ("util-linux" ,util-linux)
1182 ("openssl" ,openssl)
1183 ;; FIXME: add reiserfs
1184 ("zlib" ,zlib)
1185 ("e2fsprogs" ,e2fsprogs)
1186 ("libjpeg" ,libjpeg)
1187 ("ncurses" ,ncurses)))
1188 (home-page "http://www.cgsecurity.org/wiki/TestDisk")
1189 (synopsis "Data recovery tool")
1190 (description
1191 "TestDisk is a program for data recovery, primarily designed to help
1192 recover lost partitions and/or make non-booting disks bootable again.")
1193 (license license:gpl2+)))
1194
1195 (define-public tree
1196 (package
1197 (name "tree")
1198 (version "1.7.0")
1199 (source (origin
1200 (method url-fetch)
1201 (uri (string-append
1202 "http://mama.indstate.edu/users/ice/tree/src/tree-"
1203 version ".tgz"))
1204 (sha256
1205 (base32 "04kviw799qxly08zb8n5mgxfd96gyis6x69q2qiw86jnh87c4mv9"))))
1206 (build-system gnu-build-system)
1207 (arguments
1208 '(#:phases (modify-phases %standard-phases (delete 'configure))
1209 #:tests? #f ; no check target
1210 #:make-flags (let ((out (assoc-ref %outputs "out")))
1211 (list (string-append "prefix=" out)))))
1212 (synopsis "Recursively list the contents of a directory")
1213 (description
1214 "Tree is a recursive directory listing command that produces a depth
1215 indented listing of files, which is colorized ala dircolors if the LS_COLORS
1216 environment variable is set and output is to tty.")
1217 (home-page "http://mama.indstate.edu/users/ice/tree/")
1218 (license license:gpl2+)))
1219
1220 (define-public direvent
1221 (package
1222 (name "direvent")
1223 (version "5.1")
1224 (source (origin
1225 (method url-fetch)
1226 (uri (string-append "mirror://gnu/direvent/direvent-"
1227 version ".tar.gz"))
1228 (sha256
1229 (base32
1230 "1nwvjmx7kb14ni34c0b8x9a3791pc20gvhj7xaj66d8q4h6n0qf4"))
1231 (modules '((guix build utils)))
1232 (snippet '(substitute* "tests/testsuite"
1233 (("#![[:blank:]]?/bin/sh")
1234 "#!$SHELL")))))
1235 (build-system gnu-build-system)
1236 (arguments
1237 '(#:phases
1238 (modify-phases %standard-phases
1239 (add-before 'build 'patch-/bin/sh
1240 (lambda* (#:key inputs #:allow-other-keys)
1241 ;; Use the right shell when executing the watcher and
1242 ;; user-provided shell commands.
1243 (let ((bash (assoc-ref inputs "bash")))
1244 (substitute* '("src/direvent.c" "src/progman.c")
1245 (("\"/bin/sh\"")
1246 (string-append "\"" bash "/bin/sh\"")))
1247
1248 ;; Adjust the 'shell.at' test accordingly.
1249 (substitute* "tests/testsuite"
1250 (("SHELL=/bin/sh")
1251 (string-append "SHELL=" bash "/bin/sh")))
1252
1253 #t))))))
1254 (home-page "https://www.gnu.org/software/direvent/")
1255 (synopsis "Daemon to monitor directories for events such as file removal")
1256 (description
1257 "A daemon that monitors directories for events, such as creating,
1258 deleting or modifying files. It can monitor different sets of directories for
1259 different events. When an event is detected, direvent calls a specified
1260 external program with information about the event, such as the location
1261 within the file system where it occurred. Thus, \"direvent\" provides an
1262 easy way to react immediately if given files undergo changes, for example, to
1263 track changes in important system configuration files.")
1264 (license license:gpl3+)))
1265
1266 (define-public libcap-ng
1267 (package
1268 (name "libcap-ng")
1269 (version "0.7.4")
1270 (source (origin
1271 (method url-fetch)
1272 (uri (string-append
1273 "http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-"
1274 version ".tar.gz"))
1275 (sha256
1276 (base32
1277 "0ssvnh4cvhya0c1j6k6192zvqcq7nc0x01fb5nwhr0prfqr0i8j8"))))
1278 (build-system gnu-build-system)
1279 (inputs `(("python" ,python)))
1280 (home-page "http://people.redhat.com/sgrubb/libcap-ng/")
1281 (synopsis "Library for more easily working with POSIX capabilities")
1282 (description
1283 "The libcap-ng library is intended to make programming with POSIX
1284 capabilities easier than the traditional libcap library. It includes
1285 utilities that can analyse all currently running applications and print out
1286 any capabilities and whether or not it has an open ended bounding set. The
1287 included utilities are designed to let admins and developers spot apps from
1288 various ways that may be running with too much privilege.")
1289 ;; The library is lgpl2.1+, but also ships some utils which are gpl2+.
1290 (license (list license:lgpl2.1+ license:gpl2+))))
1291
1292 (define-public smartmontools
1293 (package
1294 (name "smartmontools")
1295 (version "6.6")
1296 (source (origin
1297 (method url-fetch)
1298 (uri (string-append
1299 "mirror://sourceforge/smartmontools/smartmontools/"
1300 version "/smartmontools-" version ".tar.gz"))
1301 (sha256
1302 (base32
1303 "0m1hllbb78rr6cxkbalmz1gqkl0psgq8rrmv4gwcmz34n07kvx2i"))))
1304 (build-system gnu-build-system)
1305 (inputs `(("libcap-ng" ,libcap-ng)))
1306 (home-page "https://www.smartmontools.org/")
1307 (synopsis "S.M.A.R.T. harddisk control and monitoring tools")
1308 (description
1309 "The smartmontools package contains utility programs to control and
1310 monitor storage systems using the Self-Monitoring, Analysis and Reporting
1311 Technology System (S.M.A.R.T.) built into most modern ATA and SCSI harddisks.
1312 In many cases, these utilities will provide advanced warning of disk
1313 degradation and failure.")
1314 (license license:gpl2+)))
1315
1316 (define-public fdupes
1317 (package
1318 (name "fdupes")
1319 (version "1.6.1")
1320 (source
1321 (origin
1322 (method url-fetch)
1323 (uri (string-append
1324 "https://github.com/adrianlopezroche/fdupes/archive/v"
1325 version ".tar.gz"))
1326 (file-name (string-append name "-" version ".tar.gz"))
1327 (sha256
1328 (base32
1329 "1sj9pa40pbz6xdwbxfwhdhkvhdf1xc5gvggk9mdq26c41gdnyswx"))))
1330 (build-system gnu-build-system)
1331 (arguments
1332 '(#:phases (modify-phases %standard-phases
1333 (delete 'configure))
1334 #:tests? #f ; no 'check' target
1335 #:make-flags (list "CC=gcc"
1336 (string-append "PREFIX="
1337 (assoc-ref %outputs "out")))))
1338 (home-page "https://github.com/adrianlopezroche/fdupes")
1339 (synopsis "Identify duplicate files")
1340 (description
1341 "fdupes is a program for identifying duplicate files residing within
1342 specified directories.")
1343 (license license:expat)))
1344
1345 (define-public graphios
1346 (package
1347 (name "graphios")
1348 (version "2.0.3")
1349 (source
1350 (origin
1351 (method url-fetch)
1352 (uri (string-append
1353 "https://pypi.python.org/packages/source/g/graphios/graphios-"
1354 version ".tar.gz"))
1355 (sha256
1356 (base32
1357 "1h87hvc315wg6lklbf4l7csd3n5pgljwrfli1p3nasdi0izgn66i"))))
1358 (build-system python-build-system)
1359 (arguments
1360 ;; Be warned: Building with Python 3 succeeds, but the build process
1361 ;; throws a syntax error that is ignored.
1362 `(#:python ,python-2
1363 #:phases
1364 (modify-phases %standard-phases
1365 (add-before 'build 'fix-setup.py
1366 (lambda* (#:key outputs #:allow-other-keys)
1367 ;; Fix hardcoded, unprefixed file names.
1368 (let ((out (assoc-ref outputs "out")))
1369 (substitute* '("setup.py")
1370 (("/etc") (string-append out "/etc"))
1371 (("/usr") out)
1372 (("distro_ver = .*") "distro_ver = ''"))
1373 #t))))))
1374 (home-page "https://github.com/shawn-sterling/graphios")
1375 (synopsis "Emit Nagios metrics to Graphite, Statsd, and Librato")
1376 (description
1377 "Graphios is a script to emit nagios perfdata to various upstream metrics
1378 processing and time-series systems. It's currently compatible with Graphite,
1379 Statsd, Librato and InfluxDB. Graphios can emit Nagios metrics to any number
1380 of supported upstream metrics systems simultaneously.")
1381 (license license:gpl2+)))
1382
1383 (define-public ansible
1384 (package
1385 (name "ansible")
1386 (version "2.4.1.0")
1387 (source
1388 (origin
1389 (method url-fetch)
1390 (uri (pypi-uri "ansible" version))
1391 (sha256
1392 (base32
1393 "0spv0kjaicwss4q52s727b6grdizcxpa0bbsfg26pgf5kjrayqfs"))
1394 (patches (search-patches "ansible-wrap-program-hack.patch"))))
1395 (build-system python-build-system)
1396 (native-inputs
1397 `(("python2-pycrypto" ,python2-pycrypto)
1398 ("python2-httplib2" ,python2-httplib2)
1399 ("python2-passlib" ,python2-passlib)
1400 ("python2-nose" ,python2-nose)
1401 ("python2-mock" ,python2-mock)
1402 ("python2-jinja2" ,python2-jinja2)
1403 ("python2-pyyaml" ,python2-pyyaml)
1404 ("python2-paramiko" ,python2-paramiko)))
1405 (inputs
1406 `(("python2-pycrypto" ,python2-pycrypto)
1407 ("python2-jinja2" ,python2-jinja2)
1408 ("python2-pyyaml" ,python2-pyyaml)
1409 ("python2-paramiko" ,python2-paramiko)))
1410 (arguments
1411 `(#:python ,python-2)) ; incompatible with Python 3
1412 (home-page "http://ansible.com/")
1413 (synopsis "Radically simple IT automation")
1414 (description "Ansible is a radically simple IT automation system. It
1415 handles configuration-management, application deployment, cloud provisioning,
1416 ad-hoc task-execution, and multinode orchestration - including trivializing
1417 things like zero downtime rolling updates with load balancers.")
1418 (license license:gpl3+)))
1419
1420 (define-public cpulimit
1421 (package
1422 (name "cpulimit")
1423 (version "0.2")
1424 (source
1425 (origin
1426 (method url-fetch)
1427 (uri (string-append "https://github.com/opsengine/cpulimit/archive/v"
1428 version ".tar.gz"))
1429 (file-name (string-append name "-" version ".tar.gz"))
1430 (sha256
1431 (base32
1432 "1nn2w849xd5bw4y5sqnll29nxdwl5h0cv4smc7dwmpb9qnd2ycb4"))))
1433 (build-system gnu-build-system)
1434 (arguments
1435 `(#:phases (modify-phases %standard-phases
1436 (delete 'configure)
1437 (replace
1438 'build
1439 (lambda _
1440 (zero? (system* "make" "CC=gcc" "-Csrc"))))
1441 (replace
1442 'check
1443 (lambda _
1444 (zero? (system* "make" "CC=gcc" "-Ctests"))))
1445 (replace
1446 'install
1447 (lambda* (#:key outputs #:allow-other-keys)
1448 (let* ((out (assoc-ref outputs "out"))
1449 (bin (string-append out "/bin")))
1450 (install-file "src/cpulimit" bin)))))))
1451 (home-page "https://github.com/opsengine/cpulimit")
1452 (synopsis "Limit CPU usage")
1453 (description
1454 "Cpulimit limits the CPU usage of a process. It does not change the nice
1455 value or other scheduling priority settings, but the real CPU usage, and is
1456 able to adapt itself dynamically to the overall system load. Children
1457 processes and threads of the specified process may optionally share the same
1458 limits.")
1459 (license license:gpl2+)))
1460
1461 (define-public autojump
1462 (package
1463 (name "autojump")
1464 (version "22.3.4")
1465 (source
1466 (origin
1467 (method url-fetch)
1468 (uri (string-append "https://github.com/wting/autojump/archive/"
1469 "release-v" version ".tar.gz"))
1470 (file-name (string-append name "-" version ".tar.gz"))
1471 (sha256
1472 (base32
1473 "113rcpr37ngf2xs8da41qdarq5qmj0dwx8ggqy3lhlb0kvqq7g9z"))))
1474 (build-system gnu-build-system)
1475 (native-inputs ;for tests
1476 `(("python-mock" ,python-mock)
1477 ("python-pytest" ,python-pytest)))
1478 (inputs
1479 `(("python" ,python-wrapper)))
1480 (arguments
1481 `(#:phases (modify-phases %standard-phases
1482 (delete 'configure)
1483 (delete 'build)
1484 (replace 'check
1485 (lambda _
1486 (zero?
1487 (system* "python" "tests/unit/autojump_utils_test.py"))))
1488 (replace 'install
1489 ;; The install.py script doesn't allow system installation
1490 ;; into an arbitrary prefix, so do our own install.
1491 (lambda* (#:key outputs #:allow-other-keys)
1492 (let* ((out (assoc-ref outputs "out"))
1493 (bin (string-append out "/bin"))
1494 (share (string-append out "/share/autojump"))
1495 (py (string-append out "/lib/python"
1496 ,(version-major+minor
1497 (package-version python-wrapper))
1498 "/site-packages"))
1499 (man (string-append out "/share/man/man1")))
1500 (install-file "bin/autojump" bin)
1501 (for-each (λ (f) (install-file f py))
1502 (find-files "bin" "\\.py$"))
1503 (for-each (λ (f) (install-file f share))
1504 (find-files "bin" "autojump\\..*$"))
1505 (substitute* (string-append share "/autojump.sh")
1506 (("/usr/local") out))
1507 (install-file "docs/autojump.1" man)
1508 (wrap-program (string-append bin "/autojump")
1509 `("PYTHONPATH" ":" prefix (,py)))
1510 #t))))))
1511 (home-page "https://github.com/wting/autojump")
1512 (synopsis "Shell extension for file system navigation")
1513 (description
1514 "Autojump provides a faster way to navigate your file system, with a \"cd
1515 command that learns\". It works by maintaining a database of the directories
1516 you use the most from the command line and allows you to \"jump\" to
1517 frequently used directories by typing only a small pattern.")
1518 (license license:gpl3+)))
1519
1520 (define-public iftop
1521 (package
1522 (name "iftop")
1523 (version "1.0pre4")
1524 (source (origin
1525 (method url-fetch)
1526 (uri (string-append "http://www.ex-parrot.com/~pdw/iftop/download"
1527 "/iftop-" version ".tar.gz"))
1528 (sha256
1529 (base32
1530 "15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp"))))
1531 (build-system gnu-build-system)
1532 (inputs
1533 `(("libpcap" ,libpcap)
1534 ("ncurses" ,ncurses)))
1535 (synopsis "Monitor network usage")
1536 (description "Iftop does for network usage what @command{top} does
1537 for CPU usage. It listens to network traffic on a named interface and
1538 displays a table of current bandwidth usage by pairs of hosts.")
1539 (home-page "http://www.ex-parrot.com/~pdw/iftop/")
1540 (license license:gpl2+)))
1541
1542 (define-public munge
1543 (package
1544 (name "munge")
1545 (version "0.5.13")
1546 (source (origin
1547 (method url-fetch)
1548 (uri (string-append "https://github.com/dun/munge/releases/"
1549 "download/munge-" version "/munge-"
1550 version ".tar.xz"))
1551 (sha256
1552 (base32
1553 "1nj486bbg1adfg298zck96vgx57kchcypc1zdz1n7w540vyksxcr"))))
1554 (inputs
1555 `(("openssl" ,openssl)
1556 ("libgcrypt" ,libgcrypt)))
1557 (build-system gnu-build-system)
1558 (home-page "https://dun.github.io/munge/")
1559 (synopsis "Cluster computing authentication service")
1560 (description
1561 "Munge is an authentication service for creating and validating
1562 credentials. It allows a process to authenticate the UID and GID of another
1563 local or remote process within a group of hosts having common users and
1564 groups. These hosts form a security realm that is defined by a shared
1565 cryptographic key. Clients within this security realm can create and validate
1566 credentials without the use of root privileges, reserved ports, or
1567 platform-specific methods.")
1568 (license license:gpl3+)))
1569
1570 (define-public audit
1571 (package
1572 (name "audit")
1573 (version "2.4.5")
1574 (source (origin
1575 (method url-fetch)
1576 (uri (string-append "http://people.redhat.com/sgrubb/audit/"
1577 "audit-" version ".tar.gz"))
1578 (sha256
1579 (base32
1580 "1q1q51dvxscbi4kbakmd4bn0xrvwwaiwvaya79925cbrqwzxsg77"))))
1581 (build-system gnu-build-system)
1582 (home-page "http://people.redhat.com/sgrubb/audit/")
1583 (arguments
1584 `(#:configure-flags (list "--with-python=no")
1585 #:phases
1586 (modify-phases %standard-phases
1587 (add-after 'unpack 'fix-tests
1588 (lambda _
1589 ;; In the build environmnte /etc/passwd does not contain an entry
1590 ;; for root/0, so we have to patch the expected value.
1591 (substitute* "auparse/test/auparse_test.ref"
1592 (("=0 \\(root\\)") "=0 (unknown(0))"))
1593 #t)))))
1594 (inputs
1595 `(("openldap" ,openldap)
1596 ("gnutls" ,gnutls)
1597 ("sasl" ,cyrus-sasl)))
1598 (synopsis "User-space component to the Linux auditing system")
1599 (description
1600 "auditd is the user-space component to the Linux auditing system, which
1601 allows logging of system calls made by user-land processes. It's responsible
1602 for writing audit records to the disk. Viewing the logs is done with the
1603 @code{ausearch} or @code{aureport} utilities. Configuring the audit rules is
1604 done with the @code{auditctl} utility.")
1605 (license license:gpl2+)))
1606
1607 (define-public nmap
1608 (package
1609 (name "nmap")
1610 (version "7.60")
1611 (source (origin
1612 (method url-fetch)
1613 (uri (string-append "https://nmap.org/dist/nmap-" version
1614 ".tar.bz2"))
1615 (sha256
1616 (base32
1617 "08bga42ipymmbxd7wy4x5sl26c0ir1fm3n9rc6nqmhx69z66wyd8"))
1618 (modules '((guix build utils)))
1619 (snippet
1620 '(map delete-file-recursively
1621 ;; Remove bundled lua, pcap, and pcre libraries.
1622 ;; FIXME: Remove bundled liblinear once packaged.
1623 '("liblua"
1624 "libpcap"
1625 "libpcre"
1626 ;; Remove pre-compiled binares.
1627 "mswin32")))))
1628 (build-system gnu-build-system)
1629 (inputs
1630 `(("openssl" ,openssl)
1631 ("libpcap" ,libpcap)
1632 ("pcre" ,pcre)
1633 ("lua" ,lua)
1634 ;; For 'ndiff'.
1635 ("python" ,python-2)))
1636
1637 ;; TODO Add zenmap output.
1638 (outputs '("out" "ndiff"))
1639 (arguments
1640 '(#:configure-flags '("--without-zenmap")
1641 #:phases
1642 (modify-phases %standard-phases
1643 (add-after 'configure 'patch-Makefile
1644 (lambda _
1645 (substitute* "Makefile"
1646 ;; Do not attempt to build lua.
1647 (("build-dnet build-lua") "build-dnet"))
1648 #t))
1649 (replace 'install
1650 (lambda* (#:key outputs #:allow-other-keys)
1651 (define (make out . args)
1652 (unless (zero? (apply system* "make"
1653 (string-append "prefix=" out)
1654 args))
1655 (error "make failed")))
1656 (define (python-path dir)
1657 (string-append dir "/lib/python2.7/site-packages"))
1658 (let ((out (assoc-ref outputs "out"))
1659 (ndiff (assoc-ref outputs "ndiff")))
1660 (for-each mkdir-p (list out ndiff))
1661 (make out
1662 "install-nmap"
1663 "install-nse"
1664 "install-ncat"
1665 "install-nping")
1666 (make ndiff "install-ndiff")
1667 (wrap-program (string-append ndiff "/bin/ndiff")
1668 `("PYTHONPATH" prefix
1669 (,(python-path ndiff)))))))
1670 ;; These are the tests that do not require network access.
1671 (replace 'check
1672 (lambda _ (zero? (system* "make"
1673 "check-nse"
1674 "check-ndiff"
1675 "check-dns")))))
1676 ;; Nmap can't cope with out-of-source building.
1677 #:out-of-source? #f))
1678 (home-page "https://nmap.org/")
1679 (synopsis "Network discovery and security auditing tool")
1680 (description
1681 "Nmap (\"Network Mapper\") is a network discovery and security auditing
1682 tool. It is also useful for tasks such as network inventory, managing service
1683 upgrade schedules, and monitoring host or service uptime. It also provides an
1684 advanced netcat implementation (ncat), a utility for comparing scan
1685 results (ndiff), and a packet generation and response analysis tool (nping).")
1686 ;; This package uses nmap's bundled versions of libdnet and liblinear, which
1687 ;; both use a 3-clause BSD license.
1688 (license (list license:nmap license:bsd-3))))
1689
1690 (define-public dstat
1691 (package
1692 (name "dstat")
1693 (version "0.7.3")
1694 (source (origin
1695 (method url-fetch)
1696 (uri (string-append
1697 "https://github.com/dagwieers/dstat/archive/"
1698 version ".tar.gz"))
1699 (file-name (string-append "dstat-" version ".tar.gz"))
1700 (sha256
1701 (base32
1702 "16286z3y2lc9nsq8njzjkv6k2vyxrj9xiixj1k3gnsbvhlhkirj6"))))
1703 (build-system gnu-build-system)
1704 (arguments
1705 `(#:tests? #f ;; no make check
1706 #:make-flags (let ((out (assoc-ref %outputs "out")))
1707 (list (string-append "DESTDIR=" out)
1708 "prefix=/"))
1709 ;; no configure script
1710 #:phases (modify-phases %standard-phases (delete 'configure))))
1711 (inputs `(("python-2" ,python-2)))
1712 (synopsis "Versatile resource statistics tool")
1713 (description "Dstat is a versatile replacement for @command{vmstat},
1714 @command{iostat}, @command{netstat}, and @command{ifstat}. Dstat overcomes
1715 some of their limitations and adds some extra features, more counters and
1716 flexibility. Dstat is handy for monitoring systems during performance tuning
1717 tests, benchmarks or troubleshooting.
1718
1719 Dstat allows you to view all of your system resources in real-time, you can,
1720 e.g., compare disk utilization in combination with interrupts from your IDE
1721 controller, or compare the network bandwidth numbers directly with the disk
1722 throughput (in the same interval).")
1723 (home-page "http://dag.wiee.rs/home-made/dstat/")
1724 (license license:gpl2+)))
1725
1726 (define-public thefuck
1727 (package
1728 (name "thefuck")
1729 (version "3.19")
1730 (source (origin
1731 (method url-fetch)
1732 (uri (string-append "https://github.com/nvbn/thefuck/archive/"
1733 version ".tar.gz"))
1734 (file-name (string-append name "-" version ".tar.gz"))
1735 (sha256
1736 (base32
1737 "191zbvkyc02h0wwd46xwj4zzg7jhlr8xv0ji6knqkgjnk0nvqq01"))
1738 (patches (search-patches "thefuck-test-environ.patch"))))
1739 (build-system python-build-system)
1740 (arguments
1741 '(#:phases
1742 (modify-phases %standard-phases
1743 (delete 'check)
1744 (add-after 'install 'check
1745 (lambda* (#:key inputs outputs #:allow-other-keys)
1746 ;; Tests look for installed package
1747 (add-installed-pythonpath inputs outputs)
1748 ;; Some tests need write access to $HOME.
1749 (setenv "HOME" "/tmp")
1750 (zero? (system* "py.test" "-v")))))))
1751 (propagated-inputs
1752 `(("python-colorama" ,python-colorama)
1753 ("python-decorator" ,python-decorator)
1754 ("python-psutil" ,python-psutil)
1755 ("python-six" ,python-six)))
1756 (native-inputs
1757 `(("python-mock" ,python-mock)
1758 ("python-pytest" ,python-pytest)
1759 ("python-pytest-mock" ,python-pytest-mock)
1760 ;; Requires setuptools >= 17.1 due to some features used, while our
1761 ;; python currently only includes 12.0. TODO: Remove this input.
1762 ("python-setuptools" ,python-setuptools)))
1763 (home-page "https://github.com/nvbn/thefuck")
1764 (synopsis "Correct mistyped console command")
1765 (description
1766 "The Fuck tries to match a rule for a previous, mistyped command, creates
1767 a new command using the matched rule, and runs it.")
1768 (license license:x11)))
1769
1770 (define-public di
1771 (package
1772 (name "di")
1773 (version "4.43")
1774 (source
1775 (origin
1776 (method url-fetch)
1777 (uri (string-append "https://gentoo.com/di/di-" version ".tar.gz"))
1778 (sha256
1779 (base32 "1q25jy51qfzsym9b2w0cqzscq2j492gn60dy6gbp88m8nwm4sdy8"))))
1780 (build-system gnu-build-system)
1781 (arguments
1782 `(#:tests? #f ; Obscure test failures.
1783 #:phases
1784 (modify-phases %standard-phases
1785 (delete 'configure)
1786 (add-before 'build 'setup-environment
1787 (lambda* (#:key outputs #:allow-other-keys)
1788 (setenv "CC" "gcc")
1789 (setenv "prefix" (assoc-ref outputs "out"))
1790 #t)))
1791 #:make-flags (list "--environment-overrides")))
1792 (home-page "https://www.gentoo.com/di/")
1793 (synopsis "Advanced df like disk information utility")
1794 (description
1795 "'di' is a disk information utility, displaying everything
1796 (and more) that your @code{df} command does. It features the ability to
1797 display your disk usage in whatever format you prefer. It is designed to be
1798 highly portable. Great for heterogeneous networks.")
1799 (license license:zlib)))
1800
1801 (define-public cbatticon
1802 (package
1803 (name "cbatticon")
1804 (version "1.6.6")
1805 (source (origin
1806 (method url-fetch)
1807 (uri (string-append "https://github.com/valr/"
1808 name "/archive/" version ".tar.gz"))
1809 (sha256
1810 (base32
1811 "1rxlrwd817f2zl4fsc5ha43wjzfidq3yyagq4lgyi150qg36svv3"))
1812 (file-name (string-append name "-" version ".tar.gz"))))
1813 (build-system gnu-build-system)
1814 (arguments
1815 `(#:tests? #f ; no tests
1816 #:make-flags
1817 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1818 "CC=gcc")
1819 #:phases
1820 (modify-phases %standard-phases
1821 (delete 'configure)))) ; no configure script
1822 (inputs
1823 `(("gtk+" ,gtk+)
1824 ("gettext" ,gettext-minimal)
1825 ("libnotify" ,libnotify)))
1826 (native-inputs
1827 `(("pkg-config" ,pkg-config)))
1828 (synopsis "Lightweight battery icon for the system tray")
1829 (description "cbatticon is a lightweight battery icon that displays
1830 the status of your battery in the system tray.")
1831 (home-page "https://github.com/valr/cbatticon")
1832 (license license:gpl2+)))
1833
1834 (define-public interrobang
1835 (let ((revision "1")
1836 (commit "896543735e1c99144765fdbd7b6e6b5afbd8b881"))
1837 (package
1838 (name "interrobang")
1839 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
1840 (source (origin
1841 (method git-fetch)
1842 (uri (git-reference
1843 (url "https://github.com/TrilbyWhite/interrobang")
1844 (commit commit)))
1845 (file-name (string-append name "-" version))
1846 (sha256
1847 (base32
1848 "1n13m70p1hfba5dy3i8hfclbr6k9q3d9dai3dg4jvhdhmxcpjzdf"))))
1849 (build-system gnu-build-system)
1850 (arguments
1851 `(#:tests? #f ; no tests
1852 #:phases
1853 (modify-phases %standard-phases
1854 (delete 'configure)) ; no configure script
1855 #:make-flags (list (string-append "PREFIX="
1856 (assoc-ref %outputs "out")))))
1857 (inputs
1858 `(("libx11" ,libx11)))
1859 (native-inputs
1860 `(("pkg-config" ,pkg-config)))
1861 (synopsis "Scriptable launcher menu")
1862 (description "Interrobang is a scriptable launcher menu with a customizable
1863 shortcut syntax and completion options.")
1864 (home-page "https://github.com/TrilbyWhite/interrobang")
1865 (license license:gpl3+))))
1866
1867
1868
1869 (define-public pam-krb5
1870 (package
1871 (name "pam-krb5")
1872 (version "4.7")
1873 (source (origin
1874 (method url-fetch)
1875 (uri (string-append
1876 "https://archives.eyrie.org/software/kerberos/" name "-"
1877 version ".tar.xz"))
1878 (sha256
1879 (base32
1880 "0abf8cfpkprmhw5ca8iyqgrggh65lgqvmfllc1y6qz7zw1gas894"))))
1881 (build-system gnu-build-system)
1882 (arguments
1883 `(#:phases
1884 (modify-phases %standard-phases
1885 (add-before 'configure 'disable-tests
1886 (lambda _
1887 ;; The build container seems to interfere with some tests.
1888 (substitute* "tests/TESTS"
1889 (("module/basic\n") ""))
1890 (substitute* "tests/TESTS"
1891 (("pam-util/vector\n") ""))
1892 #t)))))
1893 (inputs
1894 `(("linux-pam" ,linux-pam)
1895 ("mit-krb5" ,mit-krb5)))
1896 (native-inputs
1897 `(("perl" ,perl)
1898 ("perl-test-pod" ,perl-test-pod))) ; required for tests
1899 (synopsis "Kerberos PAM module")
1900 (description
1901 "Pam-krb5 is a Kerberos PAM module for either MIT Kerberos or Heimdal.
1902 It supports ticket refreshing by screen savers, configurable
1903 authorization handling, authentication of non-local accounts for network
1904 services, password changing, and password expiration, as well as all the
1905 standard expected PAM features. It works correctly with OpenSSH, even
1906 with ChallengeResponseAuthentication and PrivilegeSeparation enabled,
1907 and supports extensive configuration either by PAM options or in
1908 krb5.conf or both. PKINIT is supported with recent versions of both MIT
1909 Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.")
1910 (home-page "http://www.eyrie.org/~eagle/software/pam-krb5")
1911 ;; Dual licenced under a homebrew non-copyleft OR GPL (any version)
1912 ;; However, the tarball does not contain a copy of the GPL, so unless
1913 ;; we put one in, we cannot distribute it under GPL without violating
1914 ;; clause requiring us to give all recipients a copy.
1915 (license license:gpl1+)))
1916
1917 ;;http://archives.eyrie.org/software/kerberos/pam-krb5-4.7.tar.xz
1918
1919 (define-public sunxi-tools
1920 (package
1921 (name "sunxi-tools")
1922 (version "1.4.2")
1923 (source
1924 (origin
1925 (method url-fetch)
1926 (uri (string-append "https://github.com/linux-sunxi/"
1927 "sunxi-tools/archive/v" version ".tar.gz"))
1928 (sha256
1929 (base32 "08iqwj95qw2s7ilhrdi2lkbc8dx64zk5lzz1qk587jr0lla81x41"))
1930 (modules '((guix build utils)))
1931 (snippet
1932 ;; Remove binaries contained in the tarball which are only for the
1933 ;; target and can be regenerated anyway.
1934 '(delete-file-recursively "bin"))
1935 (file-name (string-append name "-" version ".tar.gz"))))
1936 (native-inputs
1937 `(("pkg-config" ,pkg-config)
1938 ("cross-gcc" ,(cross-gcc "arm-linux-gnueabihf"
1939 #:xbinutils (cross-binutils "arm-linux-gnueabihf")
1940 #:libc (cross-libc "arm-linux-gnueabihf")))
1941 ("cross-libc" ,(cross-libc "arm-linux-gnueabihf"))))
1942 (inputs
1943 `(("libusb" ,libusb)))
1944 (build-system gnu-build-system)
1945 (arguments
1946 `(#:tests? #f ; no tests exist
1947 #:make-flags (list (string-append "PREFIX="
1948 (assoc-ref %outputs "out"))
1949 (string-append "CROSS_COMPILE="
1950 "arm-linux-gnueabihf-")
1951 "CC=gcc")
1952 #:phases
1953 (modify-phases %standard-phases
1954 (delete 'configure)
1955 (add-before 'build 'set-environment-up
1956 (lambda* (#:key make-flags #:allow-other-keys)
1957 (define (cross? x)
1958 (string-contains x "cross-arm-linux"))
1959 (setenv "CROSS_C_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
1960 (setenv "CROSS_CPLUS_INCLUDE_PATH" (getenv "CPLUS_INCLUDE_PATH"))
1961 (setenv "CROSS_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1962 (for-each
1963 (lambda (env-name)
1964 (let* ((env-value (getenv env-name))
1965 (search-path (search-path-as-string->list env-value))
1966 (new-search-path (filter (lambda (e) (not (cross? e)))
1967 search-path))
1968 (new-env-value (list->search-path-as-string
1969 new-search-path ":")))
1970 (setenv env-name new-env-value)))
1971 '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH" "LIBRARY_PATH"))
1972 #t))
1973 (replace 'build
1974 (lambda* (#:key make-flags #:allow-other-keys)
1975 (zero? (apply system* "make" "tools" "misc" make-flags))))
1976 (add-after 'build 'build-armhf
1977 (lambda* (#:key make-flags #:allow-other-keys)
1978 (zero? (apply system* "make" "target-tools" make-flags))))
1979 (replace 'install
1980 (lambda* (#:key make-flags #:allow-other-keys)
1981 (zero? (apply system* "make" "install-all" "install-misc"
1982 make-flags)))))))
1983 (home-page "https://github.com/linux-sunxi/sunxi-tools")
1984 (synopsis "Hardware management tools for Allwinner computers")
1985 (description "This package contains tools for Allwinner devices:
1986 @enumerate
1987 @item @command{sunxi-fexc}, @command{bin2fex}, @command{fex2bin}: Compile
1988 a textual description of a board (.fex) to a binary representation (.bin).
1989 @item @command{sunxi-fel}: Puts an Allwinner device into FEL mode which
1990 makes it register as a special USB device (rather than USB host).
1991 You can then connect it to another computer and flash it from there.
1992 @item @command{sunxi-nand-part}: Partitions NAND flash.
1993 @item @command{sunxi-bootinfo}: Reads out boot0 and boot1 (Allwinner
1994 bootloader) parameters.
1995 @item @command{sunxi-pio}: Sets GPIO parameters and oscillates a GPIO
1996 in order to be able to find it.
1997 @item @command{sunxi-meminfo}: Prints memory bus settings.
1998 @item @command{sunxi-nand-image-builder}: Prepares raw NAND images.
1999 @end enumerate")
2000 (license license:gpl2+)))
2001
2002 (define-public sedsed
2003 (package
2004 (name "sedsed")
2005 (version "1.0")
2006 (source
2007 (origin
2008 (method url-fetch)
2009 (uri (string-append "https://github.com/aureliojargas/sedsed/"
2010 "archive/v" version ".tar.gz"))
2011 (file-name (string-append name "-" version ".tar.gz"))
2012 (sha256
2013 (base32
2014 "0139jkqvm8ipiwfj7k69ry2f9b1ffgpk79arpz4r7w9kf6h23bnh"))))
2015 (build-system python-build-system)
2016 (arguments
2017 `(#:tests? #f ; No tests.
2018 #:python ,python-2
2019 #:phases
2020 (modify-phases %standard-phases
2021 (add-after 'unpack 'patch-sed-in
2022 (lambda _
2023 (substitute* "sedsed.py"
2024 (("sedbin = 'sed'")
2025 (string-append "sedbin = '" (which "sed") "'")))
2026 #t))
2027 (delete 'build)
2028 (replace 'install
2029 (lambda* (#:key outputs #:allow-other-keys)
2030 (let* ((out (assoc-ref outputs "out"))
2031 (bin (string-append out "/bin")))
2032 ;; Just one file to copy around
2033 (install-file "sedsed.py" bin)
2034 #t)))
2035 (add-after 'install 'symlink
2036 ;; Create 'sedsed' symlink to "sedsed.py".
2037 (lambda* (#:key outputs #:allow-other-keys)
2038 (let* ((out (assoc-ref outputs "out"))
2039 (bin (string-append out "/bin"))
2040 (sed (string-append bin "/sedsed"))
2041 (sedpy (string-append bin "/sedsed.py")))
2042 (symlink sedpy sed)
2043 #t))))))
2044 (home-page "http://aurelio.net/projects/sedsed")
2045 (synopsis "Sed sed scripts")
2046 (description
2047 "@code{sedsed} can debug, indent, tokenize and HTMLize your sed(1) script.
2048
2049 In debug mode it reads your script and add extra commands to it. When
2050 executed you can see the data flow between the commands, revealing all the
2051 magic sed does on its internal buffers.
2052
2053 In indent mode your script is reformatted with standard spacing.
2054
2055 In tokenize mode you can see the elements of every command you use.
2056
2057 In HTMLize mode your script is converted to a beautiful colored HTML file,
2058 with all the commands and parameters identified for your viewing pleasure.
2059
2060 With sedsed you can master any sed script. No more secrets, no more hidden
2061 buffers.")
2062 (license license:expat)))
2063
2064 (define-public intel-gpu-tools
2065 (package
2066 (name "intel-gpu-tools")
2067 (version "1.18")
2068 (source (origin
2069 (method url-fetch)
2070 (uri (string-append "https://cgit.freedesktop.org/xorg/app/"
2071 "intel-gpu-tools/snapshot/"
2072 "intel-gpu-tools-" version ".tar.gz"))
2073 (sha256
2074 (base32
2075 "0w7djk0y5w76hzn1b3cm39zd5c6w9za1wfn80wd857h0v313rzq3"))))
2076 (build-system gnu-build-system)
2077 (arguments
2078 `(#:tests? #f ; many of the tests try to load kernel modules
2079 #:phases
2080 (modify-phases %standard-phases
2081 (add-after 'unpack 'autogen
2082 (lambda _
2083 ;; Don't run configure in this phase
2084 (setenv "NOCONFIGURE" "1")
2085 (zero? (system* "sh" "autogen.sh")))))))
2086 (inputs
2087 `(("util-macros" ,util-macros)
2088 ("libdrm" ,libdrm)
2089 ("libpciaccess" ,libpciaccess)
2090 ("kmod" ,kmod)
2091 ("procps" ,procps)
2092 ("cairo" ,cairo)
2093 ("libunwind" ,libunwind)
2094 ("libxrandr" ,libxrandr)
2095 ("glib" ,glib)))
2096 (native-inputs
2097 `(("autoconf" ,autoconf)
2098 ("automake" ,automake)
2099 ("libtool" ,libtool)
2100 ("pkg-config" ,pkg-config)))
2101 (home-page "https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/")
2102 (synopsis "Tools for development and testing of the Intel DRM driver")
2103 (description "Intel GPU Tools is a collection of tools for development and
2104 testing of the Intel DRM driver. There are many macro-level test suites that
2105 get used against the driver, including xtest, rendercheck, piglit, and
2106 oglconform, but failures from those can be difficult to track down to kernel
2107 changes, and many require complicated build procedures or specific testing
2108 environments to get useful results. Therefore, Intel GPU Tools includes
2109 low-level tools and tests specifically for development and testing of the
2110 Intel DRM Driver.")
2111 (license license:expat)))
2112
2113 (define-public fabric
2114 (package
2115 (name "fabric")
2116 (version "1.13.2")
2117 (source
2118 (origin
2119 (method url-fetch)
2120 (uri (pypi-uri "Fabric" version))
2121 (sha256
2122 (base32
2123 "0k944dxr41whw7ib6380q9x15wyskx7fqni656icdn8rzshn9bwq"))))
2124 (build-system python-build-system)
2125 (arguments
2126 `(#:python ,python-2)) ; Python 2 only
2127 (native-inputs
2128 `(("python2-fudge" ,python2-fudge)
2129 ("python2-jinja2" ,python2-jinja2)
2130 ("python2-nose" ,python2-nose)))
2131 (propagated-inputs
2132 `(("python2-paramiko" ,python2-paramiko)))
2133 (home-page "http://fabfile.org")
2134 (synopsis "Simple Pythonic remote execution and deployment tool")
2135 (description
2136 "Fabric is designed to upload files and run shell commands on a number of
2137 servers in parallel or serially. These commands are grouped in tasks (which
2138 are regular Python functions) and specified in a @dfn{fabfile}.
2139
2140 It is similar to Capistrano, except it's implemented in Python and doesn't
2141 expect you to be deploying Rails applications. Fabric is a simple, Pythonic
2142 tool for remote execution and deployment.")
2143 (license license:bsd-2)))
2144
2145 (define-public neofetch
2146 (package
2147 (name "neofetch")
2148 (version "3.3.0")
2149 (source (origin
2150 (method url-fetch)
2151 (uri (string-append "https://github.com/dylanaraps/neofetch/"
2152 "archive/" version ".tar.gz"))
2153 (file-name (string-append name "-" version ".tar.gz"))
2154 (sha256
2155 (base32
2156 "15p69q0jchfms1fpb4i7kq8b28w2xpgh2zmynln618qxv1myf228"))))
2157 (build-system gnu-build-system)
2158 (arguments
2159 `(#:tests? #f ; there are no tests
2160 #:make-flags
2161 (list (string-append "PREFIX=" %output))
2162 #:phases
2163 (modify-phases %standard-phases
2164 (add-after 'unpack 'patch-target-directories
2165 (lambda* (#:key outputs #:allow-other-keys)
2166 (let ((out (assoc-ref outputs "out")))
2167 (substitute* "Makefile"
2168 (("\\$\\(DESTDIR\\)/etc/")
2169 "$(PREFIX)/etc/"))
2170 (substitute* "neofetch"
2171 (("\"/etc/neofetch")
2172 (string-append "\"" out "/etc/neofetch"))
2173 (("\"/usr/share/neofetch")
2174 (string-append "\"" out "/share/neofetch"))))
2175 #t))
2176 (delete 'configure) ; no configure script
2177 (replace 'install
2178 (lambda* (#:key make-flags outputs #:allow-other-keys)
2179 (let* ((out (assoc-ref outputs "out"))
2180 (doc (string-append out "/share/doc/" ,name "-" ,version))
2181 (etc (string-append doc "/examples/etc")))
2182 (zero? (apply system* `("make" ,@make-flags
2183 ,(string-append "SYSCONFDIR=" etc)
2184 "install")))))))))
2185 (home-page "https://github.com/dylanaraps/neofetch")
2186 (synopsis "System info script")
2187 (description "Neofetch is a CLI system information tool written in Bash.
2188 Neofetch displays information about your system next to an image, your OS
2189 logo, or any ASCII file of your choice. The main purpose of Neofetch is to be
2190 used in screenshots to show other users what operating system or distribution
2191 you are running, what theme or icon set you are using, etc.")
2192 (license license:expat)))
2193
2194 (define-public nnn
2195 (package
2196 (name "nnn")
2197 (version "1.5")
2198 (source (origin
2199 (method url-fetch)
2200 (uri (string-append "https://github.com/jarun/nnn/"
2201 "archive/v" version ".tar.gz"))
2202 (file-name (string-append name "-" version ".tar.gz"))
2203 (sha256
2204 (base32
2205 "0zswf8lb29zr1z642i1d0zi1y2mxal8qjqdrpdiqjh197jamj3zm"))))
2206 (build-system gnu-build-system)
2207 (inputs `(("ncurses" ,ncurses)
2208 ("readline" ,readline)))
2209 (arguments
2210 '(#:tests? #f ; no tests
2211 #:phases
2212 ;; We do not provide `ncurses.h' within an `ncursesw'
2213 ;; sub-directory, so patch the source accordingly. See
2214 ;; <http://bugs.gnu.org/19018>.
2215 ;; Thanks to gtypist maintainer.
2216 (modify-phases %standard-phases
2217 (add-after 'unpack 'patch-curses-lib
2218 (lambda* (#:key outputs #:allow-other-keys)
2219 (let ((out (assoc-ref outputs "out")))
2220 (substitute* "Makefile"
2221 (("-lncursesw")
2222 "-lncurses"))
2223 (substitute* "nnn.c"
2224 (("ncursesw\\/curses.h")
2225 "ncurses.h")))
2226 #t))
2227 (delete 'configure))
2228 #:make-flags
2229 (list
2230 (string-append "PREFIX="
2231 (assoc-ref %outputs "out"))
2232 (string-append "-Wl,-rpath="
2233 %output "/lib")
2234 "CC=gcc")))
2235 (home-page "https://github.com/jarun/nnn")
2236 (synopsis "Terminal file browser")
2237 (description "@command{nnn} is a fork of @command{noice}, a blazing-fast
2238 lightweight terminal file browser with easy keyboard shortcuts for
2239 navigation, opening files and running tasks. There is no config file and
2240 mime associations are hard-coded. The incredible user-friendliness and speed
2241 make it a perfect utility on modern distros.")
2242 (license license:bsd-2)))
2243
2244 (define-public thermald
2245 (package
2246 (name "thermald")
2247 (version "1.6")
2248 (source
2249 (origin
2250 (method url-fetch)
2251 (uri (string-append "https://github.com/01org/thermal_daemon/archive/v"
2252 version ".tar.gz"))
2253 (file-name (string-append name "-" version ".tar.gz"))
2254 (sha256 (base32
2255 "14klz9fnvi9jdlaqwrp61xa5nh051n8ykrs1fh1wxd7j66qf2fn6"))))
2256 (build-system gnu-build-system)
2257 (arguments
2258 `(#:phases (modify-phases %standard-phases
2259 (add-after
2260 'unpack 'autogen.sh-and-fix-paths
2261 (lambda* (#:key outputs #:allow-other-keys)
2262 (let ((out (assoc-ref outputs "out")))
2263 ;; upstartconfir is hardcoded to /etc/init and the build
2264 ;; system tries to mkdir that. We don't even need upstart
2265 ;; files at all; this is a fast and kludgy workaround
2266 (substitute* "data/Makefile.am"
2267 (("upstartconfdir = /etc/init")
2268 (string-append "upstartconfdir = "
2269 out "/etc/init")))
2270 ;; Now run autogen
2271 (zero? (system* "sh" "autogen.sh"))))))
2272 #:configure-flags
2273 (let ((out (assoc-ref %outputs "out")))
2274 (list (string-append "--sysconfdir="
2275 out "/etc")
2276 (string-append "--with-udev-dir="
2277 out "/lib/udev")
2278 (string-append "--with-dbus-sys-dir="
2279 out "/etc/dbus-1/system.d")
2280 "--localstatedir=/var"))))
2281 (native-inputs
2282 `(("autoconf" ,autoconf)
2283 ("automake" ,automake)
2284 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
2285 ("pkg-config" ,pkg-config)))
2286 (inputs
2287 `(("dbus-glib" ,dbus-glib)
2288 ("libxml2" ,libxml2)))
2289 (home-page "https://01.org/linux-thermal-daemon/")
2290 (synopsis "CPU scaling for thermal management")
2291 (description "The Linux Thermal Daemon helps monitor and control temperature
2292 on systems running the Linux kernel.")
2293 ;; arm and aarch64 don't have cpuid.h
2294 (supported-systems '("i686-linux" "x86_64-linux"))
2295 (license license:gpl2+)))