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