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