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