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