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