gnu: cbatticon: Update to 1.6.10.
[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, 2019 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
4 ;;; Copyright © 2014, 2015, 2016, 2018, 2019 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014, 2015, 2016, 2017, 2018 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, 2018, 2019 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 <ng0@n0.is>
16 ;;; Copyright © 2016, 2017, 2018, 2019 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, 2018 Marius Bakke <mbakke@fastmail.com>
22 ;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
23 ;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
24 ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
25 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
26 ;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
27 ;;; Copyright © 2019 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
28 ;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>
29 ;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
30 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
31 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
32 ;;;
33 ;;; This file is part of GNU Guix.
34 ;;;
35 ;;; GNU Guix is free software; you can redistribute it and/or modify it
36 ;;; under the terms of the GNU General Public License as published by
37 ;;; the Free Software Foundation; either version 3 of the License, or (at
38 ;;; your option) any later version.
39 ;;;
40 ;;; GNU Guix is distributed in the hope that it will be useful, but
41 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
42 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43 ;;; GNU General Public License for more details.
44 ;;;
45 ;;; You should have received a copy of the GNU General Public License
46 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
47
48 (define-module (gnu packages admin)
49 #:use-module ((guix licenses) #:prefix license:)
50 #:use-module (guix packages)
51 #:use-module (guix utils)
52 #:use-module (guix download)
53 #:use-module (guix git-download)
54 #:use-module (guix build-system cmake)
55 #:use-module (guix build-system emacs)
56 #:use-module (guix build-system gnu)
57 #:use-module (guix build-system meson)
58 #:use-module (guix build-system perl)
59 #:use-module (guix build-system python)
60 #:use-module (guix build-system trivial)
61 #:use-module (gnu packages)
62 #:use-module (gnu packages algebra)
63 #:use-module (gnu packages base)
64 #:use-module (gnu packages bash)
65 #:use-module (gnu packages c)
66 #:use-module (gnu packages check)
67 #:use-module (gnu packages crypto)
68 #:use-module (gnu packages cryptsetup)
69 #:use-module (gnu packages cyrus-sasl)
70 #:use-module (gnu packages dns)
71 #:use-module (gnu packages file)
72 #:use-module (gnu packages ncurses)
73 #:use-module (gnu packages readline)
74 #:use-module (gnu packages libbsd)
75 #:use-module (gnu packages linux)
76 #:use-module (gnu packages lua)
77 #:use-module (gnu packages guile)
78 #:use-module (gnu packages gettext)
79 #:use-module (gnu packages imagemagick)
80 #:use-module (gnu packages inkscape)
81 #:use-module (gnu packages pcre)
82 #:use-module (gnu packages perl)
83 #:use-module (gnu packages perl-check)
84 #:use-module (gnu packages tcl)
85 #:use-module (gnu packages compression)
86 #:use-module (gnu packages cross-base)
87 #:use-module (gnu packages tls)
88 #:use-module (gnu packages gnupg)
89 #:use-module (gnu packages bison)
90 #:use-module (gnu packages flex)
91 #:use-module (gnu packages gl)
92 #:use-module (gnu packages glib)
93 #:use-module (gnu packages openldap)
94 #:use-module (gnu packages mcrypt)
95 #:use-module (gnu packages patchutils)
96 #:use-module (gnu packages pkg-config)
97 #:use-module (gnu packages popt)
98 #:use-module (gnu packages python)
99 #:use-module (gnu packages python-crypto)
100 #:use-module (gnu packages python-web)
101 #:use-module (gnu packages python-xyz)
102 #:use-module (gnu packages qt)
103 #:use-module (gnu packages sphinx)
104 #:use-module (gnu packages terminals)
105 #:use-module (gnu packages texinfo)
106 #:use-module (gnu packages groff)
107 #:use-module (gnu packages pciutils)
108 #:use-module (gnu packages libunwind)
109 #:use-module (gnu packages libusb)
110 #:use-module (gnu packages libftdi)
111 #:use-module (gnu packages image)
112 #:use-module (gnu packages xorg)
113 #:use-module (gnu packages xdisorg)
114 #:use-module (gnu packages man)
115 #:use-module (gnu packages autotools)
116 #:use-module (gnu packages gnome)
117 #:use-module (gnu packages kerberos)
118 #:use-module (gnu packages gtk)
119 #:use-module (gnu packages xml)
120 #:use-module (gnu packages boost)
121 #:use-module (gnu packages elf)
122 #:use-module (gnu packages mpi)
123 #:use-module (gnu packages version-control)
124 #:use-module (gnu packages web))
125
126 (define-public aide
127 (package
128 (name "aide")
129 (version "0.16.2")
130 (source
131 (origin
132 (method url-fetch)
133 (uri (string-append "https://github.com/aide/aide/releases/download/v"
134 version "/aide-" version ".tar.gz"))
135 (sha256
136 (base32 "15xp47sz7kk1ciffw3f5xw2jg2mb2lqrbr3q6p4bkbz5dap9iy8p"))))
137 (build-system gnu-build-system)
138 (native-inputs
139 `(("bison" ,bison)
140 ("flex" ,flex)))
141 (inputs
142 `(("libgcrypt" ,libgcrypt)
143 ("libgpg-error" ,libgpg-error)
144 ("libmhash" ,libmhash)
145 ("pcre:static" ,pcre "static")
146 ("pcre" ,pcre)
147 ("zlib:static" ,zlib "static")
148 ("zlib" ,zlib)))
149 (synopsis "File and directory integrity checker")
150 (description
151 "AIDE (Advanced Intrusion Detection Environment) is a file and directory
152 integrity checker. It creates a database from the regular expression rules
153 that it finds from its configuration files. Once this database is initialized
154 it can be used to verify the integrity of the files. It has several message
155 digest algorithms that are used to check the integrity of files. All of the
156 usual file attributes can be checked for inconsistencies.")
157 (home-page "https://aide.github.io/")
158 (license license:gpl2+)))
159
160 (define-public progress
161 (package
162 (name "progress")
163 (version "0.14")
164 (source
165 (origin
166 (method git-fetch)
167 (uri (git-reference
168 (url "https://github.com/Xfennec/progress.git")
169 (commit (string-append "v" version))))
170 (sha256
171 (base32 "1lk2v4b767klib93an4g3f7z5qrv9kdk9jf7545vw1immc4kamrl"))
172 (file-name (git-file-name name version))))
173 (build-system gnu-build-system)
174 (native-inputs
175 `(("pkg-config" ,pkg-config)
176 ("which" ,which)))
177 (inputs
178 `(("ncurses" ,ncurses)))
179 (arguments
180 `(#:tests? #f ; no test suite
181 #:make-flags (list "CC=gcc"
182 (string-append "PREFIX=" (assoc-ref %outputs "out")))
183 #:phases
184 (modify-phases %standard-phases
185 (delete 'configure)))) ; no configure script
186 (home-page "https://github.com/Xfennec/progress")
187 (synopsis "Program to view the progress of the coreutils commands")
188 (description "A program that looks for coreutils basic commands (cp, mv,
189 dd, tar, gzip/gunzip, cat, etc.) currently running on your system and displays
190 the percentage of copied data. It can also show estimated time and throughput,
191 and provides a \"top-like\" mode (monitoring).")
192 (license license:gpl3+)))
193
194 (define-public shepherd
195 (package
196 (name "shepherd")
197 (version "0.6.1")
198 (source (origin
199 (method url-fetch)
200 (uri (string-append "mirror://gnu/shepherd/shepherd-"
201 version ".tar.gz"))
202 (sha256
203 (base32
204 "1xn6mb5bh8bpfgdrh09ja31jk0ln7bmxbbf0vjcqxkkixs2wl6sk"))))
205 (build-system gnu-build-system)
206 (arguments
207 '(#:configure-flags '("--localstatedir=/var")))
208 (native-inputs
209 `(("pkg-config" ,pkg-config)
210
211 ;; This is the Guile we use as a cross-compiler...
212 ("guile" ,guile-2.2)))
213 (inputs
214 ;; ... and this is the one that appears in shebangs when cross-compiling.
215 `(("guile" ,guile-2.2)
216
217 ;; The 'shepherd' command uses Readline when used interactively. It's
218 ;; an unusual use case though, so we don't propagate it.
219 ("guile-readline" ,guile-readline)))
220 (synopsis "System service manager")
221 (description
222 "The GNU Shepherd is a daemon-managing daemon, meaning that it supervises
223 the execution of system services, replacing similar functionality found in
224 typical init systems. It provides dependency-handling through a convenient
225 interface and is based on GNU Guile.")
226 (license license:gpl3+)
227 (home-page "https://www.gnu.org/software/shepherd/")))
228
229 (define-public cloud-utils
230 (package
231 (name "cloud-utils")
232 (version "0.31")
233 (source
234 (origin
235 (method url-fetch)
236 (uri (string-append
237 "https://launchpad.net/cloud-utils/trunk/"
238 version "/+download/cloud-utils-" version ".tar.gz"))
239 (sha256
240 (base32
241 "07fl3dlqwdzw4xx7mcxhpkks6dnmaxha80zgs9f6wmibgzni8z0r"))))
242 (build-system gnu-build-system)
243 (arguments
244 '(#:make-flags
245 (let ((out (assoc-ref %outputs "out")))
246 (list (string-append "BINDIR=" out "/bin")
247 (string-append "MANDIR=" out "/share/man/man1")
248 (string-append "DOCDIR=" out "/share/doc")))
249 #:phases
250 (modify-phases %standard-phases
251 (delete 'configure)
252 (delete 'check)
253 (add-after 'install 'wrap
254 (lambda* (#:key outputs inputs #:allow-other-keys)
255 (let ((growpart (string-append (assoc-ref outputs "out")
256 "/bin/growpart")))
257 (wrap-program growpart
258 `("PATH" ":" prefix (,(dirname (which "sfdisk"))
259 ,(dirname (which "readlink"))))))
260 #t)))))
261 (inputs
262 `(("python" ,python)
263 ("util-linux" ,util-linux))) ; contains sfdisk for growpart
264 (home-page "https://launchpad.net/cloud-utils")
265 (synopsis "Set of utilities for cloud computing environments")
266 (description
267 "This package contains a set of utilities for cloud computing
268 environments:
269
270 @itemize @bullet
271 @item @command{cloud-localds} Create a disk for cloud-init to utilize nocloud
272 @item @command{cloud-publish-image} Wrapper for cloud image publishing
273 @item @command{cloud-publish-tarball} Wrapper for publishing cloud tarballs
274 @item @command{cloud-publish-ubuntu} Import a Ubuntu cloud image
275 @item @command{ec2metadata} Query and display @acronym{EC2,Amazon Elastic
276 Compute Cloud} metadata
277 @item @command{growpart} Grow a partition to fill the device
278 @item @command{mount-image-callback} Mount a file and run a command
279 @item @command{resize-part-image} Resize a partition image to a new size
280 @item @command{ubuntu-cloudimg-query} Get the latest Ubuntu
281 @acronym{AMI,Amazon Machine Image}
282 @item @command{ubuntu-ec2-run} Run a @acronym{EC2,Amazon Elastic Compute
283 Cloud} instance using Ubuntu
284 @item @command{vcs-run} Obtain a repository, and run a command
285 @item @command{write-mime-multipart} Handle multipart
286 @acronym{MIME,Multipurpose Internet Mail Extensions} messages
287 @end itemize")
288 (license license:gpl3)))
289
290 (define-public daemontools
291 (package
292 (name "daemontools")
293 (version "0.76")
294 (source (origin
295 (method url-fetch)
296 (uri (string-append
297 "https://cr.yp.to/daemontools/"
298 "daemontools-" version ".tar.gz"))
299 (sha256
300 (base32
301 "07scvw88faxkscxi91031pjkpccql6wspk4yrlnsbrrb5c0kamd5"))))
302 (build-system gnu-build-system)
303 (arguments
304 `(#:tests? #f ;; No tests as far as I can tell.
305 #:phases
306 (modify-phases %standard-phases
307 (add-after 'unpack 'chdir
308 (lambda _
309 (chdir ,(string-append "daemontools-" version))
310 #t))
311 (delete 'configure)
312 (add-before 'build 'patch
313 (lambda _
314 (substitute* "src/error.h"
315 (("extern int errno;")
316 "#include <errno.h>"))
317 #t))
318 (replace 'build
319 (lambda _
320 (invoke "package/compile")))
321 (replace 'install
322 (lambda* (#:key outputs #:allow-other-keys)
323 (let* ((out (assoc-ref outputs "out"))
324 (bin (string-append out "/bin")))
325 (for-each (lambda (file)
326 (install-file file bin))
327 (find-files "command")))
328 #t)))))
329 (synopsis "Tools for managing UNIX style services")
330 (description
331 "@code{daemontools} is a collection of tools for managing UNIX
332 services.")
333 (license license:public-domain)
334 (home-page "https://cr.yp.to/daemontools.html")))
335
336 (define-public dfc
337 (package
338 (name "dfc")
339 (version "3.1.1")
340 (source
341 (origin
342 (method url-fetch)
343 (uri (string-append
344 "https://projects.gw-computing.net/attachments/download/615/dfc-"
345 version ".tar.gz"))
346 (sha256
347 (base32
348 "0m1fd7l85ckb7bq4c5c3g257bkjglm8gq7x42pkmpp87fkknc94n"))))
349 (build-system cmake-build-system)
350 (arguments '(#:tests? #f)) ; There are no tests.
351 (native-inputs `(("gettext" ,gettext-minimal)))
352 (home-page "https://projects.gw-computing.net/projects/dfc")
353 (synopsis "Display file system space usage using graphs and colors")
354 (description
355 "dfc (df color) is a modern version of df. It uses colors, draws pretty
356 graphs and can export its output to different formats.")
357 (license license:bsd-3)))
358
359 (define-public htop
360 (package
361 (name "htop")
362 (version "2.2.0")
363 (source (origin
364 (method url-fetch)
365 (uri (string-append "http://hisham.hm/htop/releases/"
366 version "/htop-" version ".tar.gz"))
367 (sha256
368 (base32
369 "0mrwpb3cpn3ai7ar33m31yklj64c3pp576vh1naqff6f21pq5mnr"))))
370 (build-system gnu-build-system)
371 (inputs
372 `(("ncurses" ,ncurses)))
373 (native-inputs
374 `(("python" ,python-wrapper))) ;for scripts/MakeHeader.py
375 (home-page "https://hisham.hm/htop/")
376 (synopsis "Interactive process viewer")
377 (description
378 "This is htop, an interactive process viewer. It is a text-mode
379 application (for console or X terminals) and requires ncurses.")
380 (license license:gpl2)))
381
382 (define-public pies
383 (package
384 (name "pies")
385 (version "1.4")
386 (source
387 (origin
388 (method url-fetch)
389 (uri (string-append "mirror://gnu/pies/pies-"
390 version ".tar.bz2"))
391 (sha256
392 (base32
393 "14jb4pa4zs26d5j2skxbaypnwhsx2lw8jgj1irrgs03c2dnf7gp6"))))
394 (build-system gnu-build-system)
395 (arguments
396 '(#:phases (modify-phases %standard-phases
397 (add-before 'build 'patch-/bin/sh
398 (lambda* (#:key inputs #:allow-other-keys)
399 ;; Use the right shell when executing user-provided
400 ;; shell commands.
401 (let ((bash (assoc-ref inputs "bash")))
402 (substitute* '("src/progman.c" "src/comp.c")
403 (("\"/bin/sh\"")
404 (string-append "\"" bash "/bin/sh\"")))
405 #t))))))
406 (home-page "https://www.gnu.org/software/pies/")
407 (synopsis "Program invocation and execution supervisor")
408 (description
409 "GNU pies is a program that supervises the invocation and execution of
410 other programs. It reads the list of programs to be started from its
411 configuration file, executes them, and then monitors their status,
412 re-executing them as necessary.")
413 (license license:gpl3+)))
414
415 (define-public inetutils
416 (package
417 (name "inetutils")
418 (version "1.9.4")
419 (source (origin
420 (method url-fetch)
421 (uri (string-append "mirror://gnu/inetutils/inetutils-"
422 version ".tar.gz"))
423 (sha256
424 (base32
425 "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy"))))
426 (build-system gnu-build-system)
427 (arguments
428 `(#:configure-flags '("--localstatedir=/var"
429
430 ;; Make sure 'PATH_PROCNET_DEV' gets defined when
431 ;; cross-compiling (by default it does not.)
432 ,@(if (%current-target-system)
433 '("--with-path-procnet-dev=/proc/net/dev")
434 '()))
435 ;; On some systems, 'libls.sh' may fail with an error such as:
436 ;; "Failed to tell switch -a apart from -A".
437 #:parallel-tests? #f))
438 (inputs `(("ncurses" ,ncurses)
439 ("readline" ,readline))) ;for 'ftp'
440 (native-inputs `(("netstat" ,net-tools))) ;for tests
441 (home-page "https://www.gnu.org/software/inetutils/")
442 (synopsis "Basic networking utilities")
443 (description
444 "Inetutils is a collection of common network programs, such as an ftp
445 client and server, a telnet client and server, an rsh client and server, and
446 hostname.")
447 (license license:gpl3+)))
448
449 (define-public shadow
450 (package
451 (name "shadow")
452 (version "4.7")
453 (source (origin
454 (method url-fetch)
455 (uri (string-append
456 "https://github.com/shadow-maint/shadow/releases/"
457 "download/" version "/shadow-" version ".tar.xz"))
458 (sha256
459 (base32
460 "0v71474rx38lg9kidrm4xbk35sg3icv3s5pk2b42icp3lyj9dqg5"))))
461 (build-system gnu-build-system)
462 (arguments
463 `(;; Assume System V `setpgrp (void)', which is the default on GNU
464 ;; variants (`AC_FUNC_SETPGRP' is not cross-compilation capable.)
465 #:configure-flags
466 '("--with-libpam" "ac_cv_func_setpgrp_void=yes")
467
468 #:phases
469 (modify-phases %standard-phases
470 (add-before 'build 'set-nscd-file-name
471 (lambda* (#:key inputs #:allow-other-keys)
472 ;; Use the right file name for nscd.
473 (let ((libc (assoc-ref inputs
474 ,(if (%current-target-system)
475 "cross-libc"
476 "libc"))))
477 (substitute* "lib/nscd.c"
478 (("/usr/sbin/nscd")
479 (string-append libc "/sbin/nscd")))
480 #t)))
481 (add-after 'install 'remove-groups
482 (lambda* (#:key outputs #:allow-other-keys)
483 ;; Remove `groups', which is already provided by Coreutils.
484 (let* ((out (assoc-ref outputs "out"))
485 (bin (string-append out "/bin"))
486 (man (string-append out "/share/man")))
487 (delete-file (string-append bin "/groups"))
488 (for-each delete-file (find-files man "^groups\\."))
489 #t))))))
490
491 (inputs (if (string-contains (or (%current-target-system)
492 (%current-system))
493 "-linux")
494 `(("linux-pam" ,linux-pam))
495 '()))
496 (home-page "https://github.com/shadow-maint/shadow")
497 (synopsis "Authentication-related tools such as passwd, su, and login")
498 (description
499 "Shadow provides a number of authentication-related tools, including:
500 login, passwd, su, groupadd, and useradd.")
501
502 ;; The `vipw' program is GPLv2+.
503 ;; libmisc/salt.c is public domain.
504 (license license:bsd-3)))
505
506 (define-public mingetty
507 (package
508 (name "mingetty")
509 (version "1.08")
510 (source (origin
511 (method url-fetch)
512 (uri (string-append "mirror://sourceforge/mingetty/mingetty/"
513 version "/mingetty-" version ".tar.gz"))
514 (sha256
515 (base32
516 "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"))))
517 (build-system gnu-build-system)
518 (arguments
519 `(#:phases
520 (modify-phases %standard-phases
521 (replace 'configure
522 (lambda* (#:key inputs outputs #:allow-other-keys)
523 (let* ((out (assoc-ref outputs "out"))
524 (man8 (string-append out "/share/man/man8"))
525 (sbin (string-append out "/sbin"))
526 (shadow (assoc-ref inputs "shadow"))
527 (login (string-append shadow "/bin/login")))
528 (substitute* "Makefile"
529 (("^SBINDIR.*")
530 (string-append "SBINDIR = " out
531 "/sbin\n"))
532 (("^MANDIR.*")
533 (string-append "MANDIR = " out
534 "/share/man/man8\n")))
535
536 ;; Pick the right 'login' by default.
537 (substitute* "mingetty.c"
538 (("\"/bin/login\"")
539 (string-append "\"" login "\"")))
540
541 (mkdir-p sbin)
542 (mkdir-p man8))
543 #t)))
544 #:tests? #f)) ; no tests
545 (inputs `(("shadow" ,shadow)))
546
547 (home-page "https://sourceforge.net/projects/mingetty")
548 (synopsis "Getty for the text console")
549 (description
550 "Small console getty that is started on the Linux text console,
551 asks for a login name and then transfers over to @code{login}. It is extended
552 to allow automatic login and starting any app.")
553 (license license:gpl2+)))
554
555 (define-public net-base
556 (package
557 (name "net-base")
558 (version "5.3")
559 (source (origin
560 (method url-fetch)
561 (uri (string-append
562 "mirror://debian/pool/main/n/netbase/netbase_"
563 version ".tar.xz"))
564 (sha256
565 (base32
566 "12xqjwg3p4rzmmh2iib6sigm9l29y3dgk74mmnw64k84jnbwdxl1"))))
567 (build-system trivial-build-system)
568 (arguments
569 `(#:modules ((guix build utils))
570 #:builder (begin
571 (use-modules (guix build utils)
572 (srfi srfi-26))
573
574 (let* ((source (assoc-ref %build-inputs "source"))
575 (tar (assoc-ref %build-inputs "tar"))
576 (xz (assoc-ref %build-inputs "xz"))
577 (output (assoc-ref %outputs "out"))
578 (etc (string-append output "/etc")))
579 (setenv "PATH" (string-append xz "/bin"))
580 (invoke (string-append tar "/bin/tar") "xvf"
581 source)
582 (chdir ,(string-append "netbase-" version))
583 (mkdir-p etc)
584 (for-each copy-file
585 '("etc-services" "etc-protocols" "etc-rpc")
586 (map (cut string-append etc "/" <>)
587 '("services" "protocols" "rpc")))
588 #t))))
589 (native-inputs `(("tar" ,tar)
590 ("xz" ,xz)))
591 (synopsis "IANA protocol, port, and RPC number assignments")
592 (description
593 "This package provides the /etc/services, /etc/protocols, and /etc/rpc
594 files, which contain information about the IANA-assigned port, protocol, and
595 ONC RPC numbers.")
596 (home-page "https://packages.debian.org/sid/netbase")
597 (license license:gpl2)))
598
599 (define-public netcat
600 (package
601 (name "netcat")
602 (version "0.7.1")
603 (source (origin
604 (method url-fetch)
605 (uri (string-append "mirror://sourceforge/netcat/netcat/" version
606 "/netcat-" version ".tar.bz2"))
607 (sha256
608 (base32
609 "1frjcdkhkpzk0f84hx6hmw5l0ynpmji8vcbaxg8h5k2svyxz0nmm"))))
610 (build-system gnu-build-system)
611 (arguments
612 `(#:configure-flags
613 ;; By default, man and info pages are put in PREFIX/{man,info},
614 ;; but we want them in PREFIX/share/{man,info}.
615 (let ((out (assoc-ref %outputs "out")))
616 (list (string-append "--mandir=" out "/share/man")
617 (string-append "--infodir=" out "/share/info")))))
618 (home-page "http://netcat.sourceforge.net")
619 (synopsis "Read and write data over TCP/IP")
620 (description
621 "Netcat is a featured networking utility which reads and writes data
622 across network connections, using the TCP/IP protocol. It is designed to be a
623 reliable \"back-end\" tool that can be used directly or easily driven by other
624 programs and scripts. At the same time, it is a feature-rich network debugging
625 and exploration tool, since it can create almost any kind of connection you
626 would need and has several interesting built-in capabilities.")
627 (license license:gpl2+)))
628
629 (define-public netcat-openbsd
630 (package
631 (name "netcat-openbsd")
632 (version "1.203-2")
633 (source (origin
634 (method git-fetch)
635 (uri (git-reference
636 (url "https://salsa.debian.org/debian/netcat-openbsd.git")
637 (commit (string-append "debian/" version))))
638 (file-name (git-file-name name version))
639 (sha256
640 (base32
641 "0j85gzbjzs6yrhgabh3zkwzd27qkr5s0zjjczl0hah8q7yhrjk3m"))))
642 (build-system gnu-build-system)
643 (arguments
644 `(#:tests? #f ; no test suite
645 #:make-flags
646 (list "CC=gcc"
647 (string-append "CFLAGS=-I" (assoc-ref %build-inputs "libbsd") "/include")
648 "LDFLAGS=-lbsd")
649 #:phases
650 (modify-phases %standard-phases
651 (delete 'configure)
652 (add-before 'build 'patch
653 (lambda _
654 (setenv "QUILT_PATCHES" "debian/patches")
655 (invoke "quilt" "push" "-a")
656 #t))
657 (replace 'install
658 (lambda* (#:key outputs #:allow-other-keys)
659 (let* ((out (assoc-ref outputs "out"))
660 (bin (string-append out "/bin"))
661 (man (string-append out "/share/man/man1"))
662 (doc (string-append out "/share/doc/netcat-openbsd-" ,version))
663 (examples (string-append doc "/examples")))
664 (install-file "nc" bin)
665 (install-file "nc.1" man)
666 (install-file "debian/copyright" doc)
667 (copy-recursively "debian/examples" examples)
668 #t))))))
669 (inputs `(("libbsd" ,libbsd)))
670 (native-inputs `(("pkg-config" ,pkg-config)
671 ("quilt" ,quilt)))
672 (home-page "https://packages.debian.org/sid/netcat-openbsd")
673 (synopsis "Read and write data over TCP/IP")
674 (description
675 "Netcat is a simple Unix utility which reads and writes data across
676 network connections using TCP or UDP protocol. It is designed to be a reliable
677 \"back-end\" tool that can be used directly or easily driven by other programs
678 and scripts. At the same time it is a feature-rich network debugging and
679 exploration tool, since it can create almost any kind of connection you would
680 need and has several interesting built-in capabilities.
681
682 This package contains the OpenBSD rewrite of netcat, including support for
683 IPv6, proxies, and Unix sockets.")
684 (license (list license:bsd-3
685 license:bsd-2)))) ; atomicio.*, socks.c
686
687 (define-public sipcalc
688 (package
689 (name "sipcalc")
690 (version "1.1.6")
691 (source
692 (origin
693 (method url-fetch)
694 (uri (string-append "http://www.routemeister.net/projects"
695 "/sipcalc/files/sipcalc" "-" version ".tar.gz"))
696 (sha256
697 (base32
698 "0mv3wndj4z2bsshh2k8d5sy3j8wxzgf8mzmmkvj1k8gpcz37dm6g"))))
699 (build-system gnu-build-system)
700 (home-page "http://www.routemeister.net/projects/sipcalc/")
701 (synopsis "Command-line IP subnet calculator")
702 (description
703 "Sipcalc is an advanced command-line IP subnet calculator. It can take
704 multiple forms of input (IPv4/IPv6/interface/hostname) and output a multitude
705 of information about a given subnet.
706
707 Features include:
708
709 @itemize @bullet
710 @item IPv4
711 @itemize
712 @item Retrieving of address information from interfaces.
713 @item Classfull and CIDR output.
714 @item Multiple address and netmask input and output formats (dotted quad, hex,
715 number of bits).
716 @item Output of broadcast address, network class, Cisco wildcard,
717 hosts/range, network range.
718 @item The ability to split a network based on a smaller netmask, now also with
719 recursive runs on the generated subnets. (also IPv6)
720 @end itemize
721 @item IPv6
722 @itemize
723 @item Compressed and expanded input and output addresses.
724 @item Standard IPv6 network output.
725 @item v4 in v6 output.
726 @item Reverse DNS address generation.
727 @end itemize
728 @end itemize\n")
729 (license license:bsd-3)))
730
731 (define-public alive
732 (package
733 (name "alive")
734 (version "2.0.2")
735 (source (origin
736 (method url-fetch)
737 (uri (string-append "mirror://gnu/alive/alive-"
738 version ".tar.xz"))
739 (sha256
740 (base32
741 "1vrzg51ai68x9yld7vbgl58sxaw5qpx8rbakwcxn4cqq6vpxj38j"))))
742 (build-system gnu-build-system)
743 (arguments '(#:configure-flags '("alive_cv_nice_ping=yes")))
744 (inputs `(("guile" ,guile-2.0)
745 ("inetutils" ,inetutils)))
746 (home-page "https://www.gnu.org/software/alive/")
747 (synopsis "Autologin and keep-alive daemon")
748 (description
749 "GNU Alive sends periodic pings to a server, generally to keep a
750 connection alive.")
751 (license license:gpl3+)))
752
753 (define-public isc-dhcp
754 (let* ((bind-major-version "9")
755 (bind-minor-version "11")
756 (bind-patch-version "13")
757 (bind-release-type "") ; for patch release, use "-P"
758 (bind-release-version "") ; for patch release, e.g. "6"
759 (bind-version (string-append bind-major-version
760 "."
761 bind-minor-version
762 "."
763 bind-patch-version
764 bind-release-type
765 bind-release-version)))
766 (package
767 (name "isc-dhcp")
768 (version "4.4.1")
769 (source (origin
770 (method url-fetch)
771 (uri (string-append "https://ftp.isc.org/isc/dhcp/"
772 version "/dhcp-" version ".tar.gz"))
773 (sha256
774 (base32
775 "025nfqx4zwdgv4b3rkw26ihcj312vir08jk6yi57ndmb4a4m08ia"))))
776 (build-system gnu-build-system)
777 (arguments
778 `(#:parallel-build? #f
779 #:phases
780 (modify-phases %standard-phases
781 (add-after 'unpack 'replace-bundled-bind
782 (lambda* (#:key inputs native-inputs #:allow-other-keys)
783 ;; XXX TODO: Remove the following invocation of 'patch' when
784 ;; isc-dhcp is updated. It should be needed only for 4.4.1.
785 (let ((patch (string-append (assoc-ref (or native-inputs inputs)
786 "patch")
787 "/bin/patch"))
788 (the-patch (assoc-ref (or native-inputs inputs)
789 "fixes-for-newer-bind.patch")))
790 (format #t "applying '~a'...~%" the-patch)
791 (invoke patch "--force" "--no-backup-if-mismatch"
792 "-p1" "--input" the-patch))
793
794 (delete-file "bind/bind.tar.gz")
795 (copy-file (assoc-ref inputs "bind-source-tarball")
796 "bind/bind.tar.gz")
797 (chmod "bind/bind.tar.gz" #o644)
798 (substitute* "bind/version.tmp"
799 (("^MAJORVER=.*")
800 (format #f "MAJORVER=~a\n" ,bind-major-version))
801 (("^MINORVER=.*")
802 (format #f "MINORVER=~a\n" ,bind-minor-version))
803 (("^PATCHVER=.*")
804 (format #f "PATCHVER=~a\n" ,bind-patch-version))
805 (("^RELEASETYPE=.*")
806 (format #f "RELEASETYPE=~a\n" ,bind-release-type))
807 (("^RELEASEVER=.*")
808 (format #f "RELEASEVER=~a\n" ,bind-release-version)))
809 #t))
810 (add-after 'configure 'post-configure
811 (lambda* (#:key outputs #:allow-other-keys)
812 ;; Point to the right client script, which will be
813 ;; installed in a later phase.
814 (substitute* "includes/dhcpd.h"
815 (("#define[[:blank:]]+_PATH_DHCLIENT_SCRIPT.*")
816 (let ((out (assoc-ref outputs "out")))
817 (string-append "#define _PATH_DHCLIENT_SCRIPT \""
818 out "/libexec/dhclient-script"
819 "\"\n"))))
820
821 ;; During the 'build' phase, 'bind.tar.gz' is extracted, so
822 ;; we must patch shebangs in there and make sure the right
823 ;; shell is used.
824 (with-directory-excursion "bind"
825 (substitute* "Makefile"
826 (("\\./configure ")
827 (let ((sh (which "sh")))
828 (string-append "./configure CONFIG_SHELL="
829 sh " SHELL=" sh " "))))
830
831 (let ((bind-directory (string-append "bind-" ,bind-version)))
832 (invoke "tar" "xf" "bind.tar.gz")
833 (for-each patch-shebang
834 (find-files bind-directory ".*"))
835 (substitute* (string-append bind-directory "/configure")
836 (("/usr/bin/file")
837 (which "file")))
838 (invoke "tar" "cf" "bind.tar.gz"
839 bind-directory
840 ;; avoid non-determinism in the archive
841 "--sort=name"
842 "--mtime=@0"
843 "--owner=root:0"
844 "--group=root:0")))))
845 (add-after 'install 'post-install
846 (lambda* (#:key inputs outputs #:allow-other-keys)
847 ;; Install the dhclient script for GNU/Linux and make sure
848 ;; if finds all the programs it needs.
849 (let* ((out (assoc-ref outputs "out"))
850 (libexec (string-append out "/libexec"))
851 (coreutils (assoc-ref inputs "coreutils"))
852 (inetutils (assoc-ref inputs "inetutils"))
853 (net-tools (assoc-ref inputs "net-tools"))
854 (sed (assoc-ref inputs "sed")))
855 (substitute* "client/scripts/linux"
856 (("/sbin/ip")
857 (string-append (assoc-ref inputs "iproute")
858 "/sbin/ip")))
859
860 (mkdir-p libexec)
861 (copy-file "client/scripts/linux"
862 (string-append libexec "/dhclient-script"))
863
864 (wrap-program
865 (string-append libexec "/dhclient-script")
866 `("PATH" ":" prefix
867 ,(map (lambda (dir)
868 (string-append dir "/bin:"
869 dir "/sbin"))
870 (list inetutils net-tools coreutils sed))))
871 #t))))))
872
873 (native-inputs
874 `(("perl" ,perl)
875 ("file" ,file)
876
877 ;; XXX TODO: Remove the following patch, and also the 'patch'
878 ;; program, when isc-dhcp is updated.
879 ("fixes-for-newer-bind.patch"
880 ,(search-patch "isc-dhcp-4.4.1-fixes-for-newer-bind.patch"))
881 ("patch" ,patch)))
882
883 (inputs `(("inetutils" ,inetutils)
884 ("net-tools" ,net-tools)
885 ("iproute" ,iproute)
886
887 ;; XXX isc-dhcp bundles a copy of bind that has security
888 ;; flaws, so we use a newer version.
889 ("bind-source-tarball"
890 ,(origin
891 (method url-fetch)
892 (uri (string-append "https://ftp.isc.org/isc/bind9/"
893 bind-version
894 "/bind-" bind-version ".tar.gz"))
895 (sha256
896 (base32
897 "0z8g81xinqx8j3y2fclxa31dq7zsi9cj9srmvd9agnpwzk4kqgzx"))))
898
899 ;; When cross-compiling, we need the cross Coreutils and sed.
900 ;; Otherwise just use those from %FINAL-INPUTS.
901 ,@(if (%current-target-system)
902 `(("coreutils" ,coreutils)
903 ("sed" ,sed))
904 '())))
905
906 (home-page "https://www.isc.org/products/DHCP/")
907 (synopsis "Dynamic Host Configuration Protocol (DHCP) tools")
908 (description
909 "ISC's Dynamic Host Configuration Protocol (DHCP) distribution provides a
910 reference implementation of all aspects of DHCP, through a suite of DHCP
911 tools: server, client, and relay agent.")
912 (license license:mpl2.0)
913 (properties '((cpe-name . "dhcp"))))))
914
915 (define-public libpcap
916 (package
917 (name "libpcap")
918 (version "1.9.1")
919 (source (origin
920 (method url-fetch)
921 (uri (string-append "https://www.tcpdump.org/release/libpcap-"
922 version ".tar.gz"))
923 (sha256
924 (base32
925 "153h1378diqyc27jjgz6gg5nxmb4ddk006d9xg69nqavgiikflk3"))))
926 (build-system gnu-build-system)
927 (native-inputs
928 `(("bison" ,bison)
929 ("flex" ,flex)))
930 (arguments
931 ;; There are some tests in testprogs/, but no automated test suite.
932 '(#:tests? #f))
933 (home-page "https://www.tcpdump.org")
934 (synopsis "Network packet capture library")
935 (description
936 "libpcap is an interface for user-level packet capture. It provides a
937 portable framework for low-level network monitoring. Applications include
938 network statistics collection, security monitoring, network debugging, etc.")
939 (license (list license:bsd-4 ; fad-*.c and several other source files
940 license:bsd-3 ; pcap/, sockutils.* & others
941 license:bsd-2)))) ; the rest
942
943 (define-public tcpdump
944 (package
945 (name "tcpdump")
946 (version "4.9.3")
947 (source (origin
948 (method url-fetch)
949 (uri (string-append "https://www.tcpdump.org/release/tcpdump-"
950 version ".tar.gz"))
951 (sha256
952 (base32
953 "0434vdcnbqaia672rggjzdn4bb8p8dchz559yiszzdk0sjrprm1c"))))
954 (build-system gnu-build-system)
955 (inputs `(("libpcap" ,libpcap)
956 ("openssl" ,openssl)))
957 (native-inputs `(("perl" ,perl))) ; for tests
958 (home-page "https://www.tcpdump.org/")
959 (synopsis "Network packet analyzer")
960 (description
961 "Tcpdump is a command-line tool to analyze network traffic passing
962 through the network interface controller.")
963 (license license:bsd-3)))
964
965 (define-public jnettop
966 (package
967 (name "jnettop")
968 (version "0.13.0")
969 (source (origin
970 (method url-fetch)
971 (uri
972 (string-append "https://web.archive.org/web/20161221100811/"
973 "http://jnettop.kubs.info/dist/jnettop-"
974 version ".tar.gz"))
975 (sha256
976 (base32
977 "1855np7c4b0bqzhf1l1dyzxb90fpnvrirdisajhci5am6als31z9"))))
978 (build-system gnu-build-system)
979 (native-inputs
980 `(("pkg-config" ,pkg-config)))
981 (inputs
982 `(("glib" ,glib)
983 ("ncurses" ,ncurses)
984 ("libpcap" ,libpcap)))
985 (home-page
986 "https://web.archive.org/web/20160703195221/http://jnettop.kubs.info/wiki/")
987 (synopsis "Visualize network traffic by bandwidth use")
988 (description
989 "Jnettop is a traffic visualiser, which captures traffic going
990 through the host it is running from and displays streams sorted
991 by bandwidth they use.")
992 (license license:gpl2+)))
993
994 (define-public clusterssh
995 (package
996 (name "clusterssh")
997 (version "4.13.2")
998 (source (origin
999 (method url-fetch)
1000 (uri (string-append "mirror://sourceforge/clusterssh/"
1001 "2.%20ClusterSSH%20Series%204/"
1002 "App-ClusterSSH-v" version ".tar.gz"))
1003 (sha256
1004 (base32
1005 "0rmk2p3f2wz1h092anidjclh212rv3gxyk0c641qk3frlrjnw6mp"))))
1006 (build-system perl-build-system)
1007 (arguments
1008 `(#:phases
1009 (modify-phases %standard-phases
1010 (add-after 'unpack 'refer-to-inputs
1011 (lambda* (#:key inputs #:allow-other-keys)
1012 (substitute* (list "lib/App/ClusterSSH/Config.pm"
1013 "t/15config.t")
1014 (("xterm")
1015 (which "xterm")))
1016 #t))
1017 (add-before 'check 'delete-failing-tests
1018 (lambda _
1019 ;; This checks whether all code is nicely formatted. The above
1020 ;; ‘refer-to-inputs’ phase breaks this pedantry, so disable it.
1021 (delete-file "t/perltidy.t")
1022 ;; Update the manifest so t/manifest.t happily passes.
1023 (substitute* "MANIFEST"
1024 (("t/perltidy.t\n") ""))
1025 #t))
1026 (add-after 'install 'augment-library-path
1027 (lambda* (#:key inputs outputs #:allow-other-keys)
1028 (let* ((out (assoc-ref outputs "out"))
1029 (bin (string-append out "/bin")))
1030 (with-directory-excursion bin
1031 (for-each
1032 (lambda (program)
1033 (wrap-program program
1034 `("PERL5LIB" ":" prefix
1035 ,(map (lambda (file-name)
1036 (string-append file-name
1037 "/lib/perl5/site_perl"))
1038 (cons out
1039 (map (lambda (input)
1040 (assoc-ref inputs input))
1041 ;; These may be propagated and hence
1042 ;; not explicitly listed as inputs.
1043 (list "perl-class-data-inheritable"
1044 "perl-devel-stacktrace"
1045 "perl-exception-class"
1046 "perl-tk"
1047 "perl-try-tiny"
1048 "perl-x11-protocol"
1049 "perl-x11-protocol-other")))))))
1050 (find-files "." ".*")))
1051 #t))))))
1052 (native-inputs
1053 `(("perl-cpan-changes" ,perl-cpan-changes)
1054 ("perl-file-slurp" ,perl-file-slurp)
1055 ("perl-file-which" ,perl-file-which)
1056 ("perl-module-build" ,perl-module-build)
1057 ("perl-readonly" ,perl-readonly)
1058 ("perl-test-differences" ,perl-test-differences)
1059 ("perl-test-distmanifest" ,perl-test-distmanifest)
1060 ("perl-test-perltidy" ,perl-test-perltidy)
1061 ("perl-test-pod" ,perl-test-pod)
1062 ("perl-test-pod-coverage" ,perl-test-pod-coverage)
1063 ("perl-test-trap" ,perl-test-trap)
1064 ("perltidy" ,perltidy)))
1065 (inputs
1066 `(("perl-exception-class" ,perl-exception-class)
1067 ("perl-sort-naturally" ,perl-sort-naturally)
1068 ("perl-tk" ,perl-tk)
1069 ("perl-try-tiny" ,perl-try-tiny)
1070 ("perl-x11-protocol" ,perl-x11-protocol)
1071 ("perl-x11-protocol-other" ,perl-x11-protocol-other)
1072 ("xterm" ,xterm)))
1073 ;; The clusterssh.sourceforge.net address requires login to view
1074 (home-page "https://sourceforge.net/projects/clusterssh/")
1075 (synopsis "Secure concurrent multi-server terminal control")
1076 (description
1077 "ClusterSSH controls a number of xterm windows via a single graphical
1078 console window to allow commands to be interactively run on multiple servers
1079 over ssh connections.")
1080 (license license:gpl2+)))
1081
1082 (define-public rename
1083 (package
1084 (name "rename")
1085 (version "1.10")
1086 (source (origin
1087 (method url-fetch)
1088 (uri (string-append
1089 "mirror://cpan/authors/id/R/RM/RMBARKER/File-Rename-"
1090 version ".tar.gz"))
1091 (sha256
1092 (base32
1093 "137m8s06r4n038ivlr5r1d9a7q9l7shmwpvnyx053r9ndhvbnkh5"))))
1094 (build-system perl-build-system)
1095 (arguments
1096 `(#:phases
1097 (modify-phases %standard-phases
1098 (add-after 'install 'find-itself
1099 ;; Fix run-time 'Can't locate File/Rename.pm in @INC' failure.
1100 (lambda* (#:key outputs #:allow-other-keys)
1101 (let* ((out (assoc-ref outputs "out"))
1102 (bin (string-append out "/bin")))
1103 (with-directory-excursion bin
1104 (for-each
1105 (lambda (program)
1106 (wrap-program program
1107 `("PERL5LIB" ":" prefix
1108 (,(string-append out "/lib/perl5/site_perl")))))
1109 (find-files "." ".*")))
1110 #t))))))
1111 (native-inputs
1112 `(("perl-module-build" ,perl-module-build)
1113 ("perl-test-pod" ,perl-test-pod)
1114 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1115 (home-page "https://metacpan.org/pod/distribution/File-Rename/rename.PL")
1116 (synopsis "Perl extension for renaming multiple files")
1117 (description
1118 "This package provides a Perl interface (@code{Perl::Rename}) as well
1119 as a command-line utility (@command{rename}) that can rename multiple files
1120 at once based on a Perl regular expression.")
1121 (license license:perl-license)))
1122
1123 (define-public rottlog
1124 (package
1125 (name "rottlog")
1126 (version "0.72.2")
1127 (source (origin
1128 (method url-fetch)
1129 (uri (string-append "mirror://gnu/rottlog/rottlog-"
1130 version ".tar.gz"))
1131 (sha256
1132 (base32
1133 "0751mb9l2f0jrk3vj6q8ilanifd121dliwk0c34g8k0dlzsv3kd7"))
1134 (modules '((guix build utils)))
1135 (snippet
1136 '(begin
1137 (substitute* "Makefile.in"
1138 (("-o \\$\\{LOG_OWN\\} -g \\$\\{LOG_GROUP\\}")
1139 ;; Don't try to chown root.
1140 "")
1141 (("mkdir -p \\$\\(ROTT_STATDIR\\)")
1142 ;; Don't attempt to create /var/lib/rottlog.
1143 "true"))
1144 #t))))
1145 (build-system gnu-build-system)
1146 (arguments
1147 '(#:configure-flags (list "ROTT_ETCDIR=/etc/rottlog" ;rc file location
1148 "--localstatedir=/var")
1149
1150 ;; Install example config files in OUT/etc.
1151 #:make-flags (list (string-append "ROTT_ETCDIR="
1152 (assoc-ref %outputs "out")
1153 "/etc"))
1154
1155 #:phases (modify-phases %standard-phases
1156 (add-after 'unpack 'patch-paths
1157 (lambda _
1158 (substitute* "rc/rc"
1159 (("/usr/sbin/sendmail") "sendmail"))
1160 #t))
1161 (add-after 'build 'set-packdir
1162 (lambda _
1163 ;; Set a default location for archived logs.
1164 (substitute* "rc/rc"
1165 (("packdir=\"\"")
1166 "packdir=\"/var/log\""))
1167 #t))
1168 (add-before 'install 'tweak-rc-weekly
1169 (lambda _
1170 (substitute* "rc/weekly"
1171 (("/bin/kill")
1172 (which "kill"))
1173 (("syslogd\\.pid")
1174 ;; The file is called 'syslog.pid' (no 'd').
1175 "syslog.pid"))
1176 #t))
1177 (add-after 'install 'install-info
1178 (lambda _
1179 (invoke "make" "install-info"))))))
1180 (native-inputs `(("texinfo" ,texinfo)
1181 ("util-linux" ,util-linux))) ; for 'cal'
1182 (home-page "https://www.gnu.org/software/rottlog/")
1183 (synopsis "Log rotation and management")
1184 (description
1185 "GNU Rot[t]log is a program for managing log files. It is used to
1186 automatically rotate out log files when they have reached a given size or
1187 according to a given schedule. It can also be used to automatically compress
1188 and archive such logs. Rot[t]log will mail reports of its activity to the
1189 system administrator.")
1190 (license license:gpl3+)))
1191
1192 (define-public sudo
1193 (package
1194 (name "sudo")
1195 (version "1.8.29")
1196 (source (origin
1197 (method url-fetch)
1198 (uri
1199 (list (string-append "https://www.sudo.ws/sudo/dist/sudo-"
1200 version ".tar.gz")
1201 (string-append "ftp://ftp.sudo.ws/pub/sudo/OLD/sudo-"
1202 version ".tar.gz")))
1203 (sha256
1204 (base32
1205 "0z4wyadh9cks17gdpfgx4kvbrlnyb6nai2sd6chk7qh4jsngylyf"))
1206 (modules '((guix build utils)))
1207 (snippet
1208 '(begin
1209 (delete-file-recursively "lib/zlib")
1210 #t))))
1211 (build-system gnu-build-system)
1212 (arguments
1213 `(#:configure-flags
1214 (list "--with-logpath=/var/log/sudo.log"
1215 "--with-rundir=/var/run/sudo" ; must be cleaned up at boot time
1216 "--with-vardir=/var/db/sudo"
1217 "--with-iologdir=/var/log/sudo-io"
1218
1219 ;; 'visudo.c' expects _PATH_MV to be defined, but glibc doesn't
1220 ;; provide it.
1221 (string-append "CPPFLAGS=-D_PATH_MV='\""
1222 (assoc-ref %build-inputs "coreutils")
1223 "/bin/mv\"'"))
1224
1225 ;; Avoid non-determinism; see <http://bugs.gnu.org/21918>.
1226 #:parallel-build? #f
1227
1228 #:phases
1229 (modify-phases %standard-phases
1230 (add-before 'configure 'pre-configure
1231 (lambda _
1232 (substitute* "src/sudo_usage.h.in"
1233 ;; Do not capture 'configure' arguments since we would
1234 ;; unduly retain references, and also because the
1235 ;; CPPFLAGS above would close the string literal
1236 ;; prematurely.
1237 (("@CONFIGURE_ARGS@") "\"\""))
1238 (substitute* (find-files "." "Makefile\\.in")
1239 (("-o [[:graph:]]+ -g [[:graph:]]+")
1240 ;; Allow installation as non-root.
1241 "")
1242 (("^install: (.*)install-sudoers(.*)" _ before after)
1243 ;; Don't try to create /etc/sudoers.
1244 (string-append "install: " before after "\n"))
1245 (("\\$\\(DESTDIR\\)\\$\\(rundir\\)")
1246 ;; Don't try to create /run/sudo.
1247 "$(TMPDIR)/dummy")
1248 (("\\$\\(DESTDIR\\)\\$\\(vardir\\)")
1249 ;; Don't try to create /var/db/sudo.
1250 "$(TMPDIR)/dummy"))
1251
1252 ;; ‘Checking existing [/etc/]sudoers file for syntax errors’ is
1253 ;; not the task of the build system, and fails.
1254 (substitute* "plugins/sudoers/Makefile.in"
1255 (("^pre-install:" match)
1256 (string-append match "\ndisabled-" match)))
1257 #t)))
1258
1259 ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
1260 ;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
1261 #:tests? #f))
1262 (inputs
1263 `(("groff" ,groff)
1264 ("linux-pam" ,linux-pam)
1265 ("zlib" ,zlib)
1266 ("coreutils" ,coreutils)))
1267 (home-page "https://www.sudo.ws/")
1268 (synopsis "Run commands as root")
1269 (description
1270 "Sudo (su \"do\") allows a system administrator to delegate authority to
1271 give certain users (or groups of users) the ability to run some (or all)
1272 commands as root or another user while providing an audit trail of the
1273 commands and their arguments.")
1274
1275 ;; See <http://www.sudo.ws/sudo/license.html>.
1276 (license license:x11)))
1277
1278 (define-public wpa-supplicant-minimal
1279 (package
1280 (name "wpa-supplicant-minimal")
1281 (version "2.9")
1282 (source (origin
1283 (method url-fetch)
1284 (uri (string-append
1285 "https://w1.fi/releases/wpa_supplicant-"
1286 version ".tar.gz"))
1287 (sha256
1288 (base32
1289 "05qzak1mssnxcgdrafifxh9w86a4ha69qabkg4bsigk499xyxggw"))
1290 (modules '((guix build utils)))
1291 (snippet
1292 '(begin
1293 (substitute* "wpa_supplicant/defconfig"
1294 ;; Disable D-Bus to save ~14MiB on the closure size.
1295 (("^CONFIG_CTRL_IFACE_DBUS" line _)
1296 (string-append "#" line)))
1297 #t))))
1298 (build-system gnu-build-system)
1299 (arguments
1300 '(#:phases
1301 (modify-phases %standard-phases
1302 (replace 'configure
1303 (lambda* (#:key outputs #:allow-other-keys)
1304 (chdir "wpa_supplicant")
1305 (copy-file "defconfig" ".config")
1306 (let ((port (open-file ".config" "al")))
1307 (display "
1308 CONFIG_DEBUG_SYSLOG=y
1309
1310 CONFIG_TLS=openssl
1311
1312 CONFIG_DRIVER_NL80211=y
1313 CFLAGS += $(shell pkg-config libnl-3.0 --cflags)
1314 CONFIG_LIBNL32=y
1315 CONFIG_READLINE=y\n" port)
1316 (close-port port))
1317 #t))
1318 (add-after 'install 'install-documentation
1319 (lambda* (#:key outputs #:allow-other-keys)
1320 (let* ((out (assoc-ref outputs "out"))
1321 (doc (string-append out "/share/doc/wpa-supplicant"))
1322 (man (string-append out "/share/man"))
1323 (man5 (string-append man "/man5"))
1324 (man8 (string-append man "/man8")))
1325 (define (copy-man-page target)
1326 (lambda (file)
1327 (install-file file target)))
1328
1329 (mkdir-p man5) (mkdir man8)
1330 (for-each (copy-man-page man5)
1331 (find-files "doc/docbook" "\\.5"))
1332 (for-each (copy-man-page man8)
1333 (find-files "doc/docbook" "\\.8"))
1334
1335 ;; wpa_supplicant.conf(5) does not explain all configuration
1336 ;; options but refers to the example config file, so install it
1337 ;; along with READMEs.
1338 (for-each (lambda (file)
1339 (install-file file doc))
1340 '("README" "README-DPP" "README-HS20"
1341 "README-P2P" "README-WPS"
1342 "wpa_supplicant.conf"))
1343 #t))))
1344
1345 #:make-flags (list "CC=gcc"
1346 (string-append "BINDIR=" (assoc-ref %outputs "out")
1347 "/sbin")
1348 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1349 "/lib"))
1350 #:tests? #f))
1351 (inputs
1352 `(("readline" ,readline)
1353 ("libnl" ,libnl)
1354 ("openssl" ,openssl)))
1355 (native-inputs
1356 `(("pkg-config" ,pkg-config)))
1357 (home-page "https://w1.fi/wpa_supplicant/")
1358 (synopsis "Connecting to WPA and WPA2-protected wireless networks")
1359 (description
1360 "wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
1361 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in
1362 the client stations. It implements key negotiation with a WPA Authenticator
1363 and it controls the roaming and IEEE 802.11 authentication/association of the
1364 WLAN driver.
1365
1366 This package provides the @code{wpa_supplicant} daemon and the @code{wpa_cli}
1367 command.")
1368
1369 ;; In practice, this is linked against Readline, which makes it GPLv3+.
1370 (license license:bsd-3)
1371
1372 (properties `((cpe-name . "wpa_supplicant")))))
1373
1374 (define-public wpa-supplicant
1375 (package (inherit wpa-supplicant-minimal)
1376 (name "wpa-supplicant")
1377 (inputs `(("dbus" ,dbus)
1378 ,@(package-inputs wpa-supplicant-minimal)))
1379 (arguments
1380 (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
1381 ((#:phases phases)
1382 `(modify-phases ,phases
1383 (add-after 'configure 'configure-for-dbus
1384 (lambda _
1385 (let ((port (open-file ".config" "al")))
1386 (display "
1387 CONFIG_CTRL_IFACE_DBUS_NEW=y
1388 CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
1389 (close-port port))
1390 #t))
1391 (add-after 'install-documentation 'install-dbus-conf
1392 (lambda* (#:key outputs #:allow-other-keys)
1393 (let* ((out (assoc-ref outputs "out"))
1394 (dir (string-append out "/etc/dbus-1/system.d")))
1395 (mkdir-p dir)
1396 (copy-file "dbus/dbus-wpa_supplicant.conf"
1397 (string-append dir "/wpa_supplicant.conf")))
1398 #t))))))))
1399
1400 (define-public wpa-supplicant-gui
1401 (package
1402 (inherit wpa-supplicant)
1403 (name "wpa-supplicant-gui")
1404 (inputs `(("qtbase" ,qtbase)
1405 ("qtsvg" ,qtsvg)
1406 ,@(package-inputs wpa-supplicant)))
1407 (native-inputs
1408 ;; For icons.
1409 `(("imagemagick" ,imagemagick)
1410 ("inkscape" ,inkscape)
1411 ,@(package-native-inputs wpa-supplicant)))
1412 (arguments
1413 `(#:phases (modify-phases %standard-phases
1414 (add-after 'unpack 'chdir
1415 (lambda _
1416 (chdir "wpa_supplicant/wpa_gui-qt4")
1417 #t))
1418 (delete 'configure)
1419 (replace 'build
1420 (lambda _
1421 (invoke "qmake" "wpa_gui.pro")
1422 (invoke "make" "-j" (number->string (parallel-job-count)))
1423 (invoke "make" "-C" "icons")))
1424 (replace 'install
1425 (lambda* (#:key inputs outputs #:allow-other-keys)
1426 (let ((out (assoc-ref outputs "out"))
1427 (qt '("qtbase" "qtsvg")))
1428 (install-file "wpa_gui" (string-append out "/bin"))
1429 (install-file "wpa_gui.desktop"
1430 (string-append out "/share/applications"))
1431 (copy-recursively "icons/hicolor"
1432 (string-append out "/share/icons/hicolor"))
1433 (wrap-program (string-append out "/bin/wpa_gui")
1434 `("QT_PLUGIN_PATH" ":" prefix
1435 ,(map (lambda (label)
1436 (string-append (assoc-ref inputs label)
1437 "/lib/qt5/plugins/"))
1438 qt)))
1439 #t))))))
1440 (synopsis "Graphical user interface for WPA supplicant")))
1441
1442 (define-public hostapd
1443 (package
1444 (name "hostapd")
1445 (version "2.8")
1446 (source (origin
1447 (method url-fetch)
1448 (uri (string-append "https://w1.fi/releases/hostapd-" version
1449 ".tar.gz"))
1450 (sha256
1451 (base32
1452 "1c74rrazkhy4lr7pwgwa2igzca7h9l4brrs7672kiv7fwqmm57wj"))))
1453 (build-system gnu-build-system)
1454 (arguments
1455 '(#:phases
1456 (modify-phases %standard-phases
1457 (replace 'configure
1458 (lambda* (#:key outputs #:allow-other-keys)
1459 ;; This is mostly copied from 'wpa-supplicant' above.
1460 (chdir "hostapd")
1461 (copy-file "defconfig" ".config")
1462 (let ((port (open-file ".config" "al")))
1463 (display "
1464 CONFIG_LIBNL32=y
1465 CONFIG_IEEE80211R=y
1466 CONFIG_IEEE80211N=y
1467 CONFIG_IEEE80211AC=y\n" port)
1468 (close-port port))
1469 #t))
1470 (add-after 'install 'install-man-pages
1471 (lambda* (#:key outputs #:allow-other-keys)
1472 (let* ((out (assoc-ref outputs "out"))
1473 (man (string-append out "/share/man"))
1474 (man1 (string-append man "/man1"))
1475 (man8 (string-append man "/man8")))
1476 (define (copy-man-page target)
1477 (lambda (file)
1478 (install-file file target)))
1479
1480 (for-each (copy-man-page man1)
1481 (find-files "." "\\.1"))
1482 (for-each (copy-man-page man8)
1483 (find-files "." "\\.8"))
1484 #t))))
1485
1486 #:make-flags (list "CC=gcc"
1487 (string-append "BINDIR=" (assoc-ref %outputs "out")
1488 "/sbin")
1489 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1490 "/lib"))
1491 #:tests? #f))
1492 (native-inputs `(("pkg-config" ,pkg-config)))
1493
1494 ;; There's an optional dependency on SQLite.
1495 (inputs `(("openssl" ,openssl)
1496 ("libnl" ,libnl)))
1497 (home-page "https://w1.fi/hostapd/")
1498 (synopsis "Daemon for Wi-Fi access points and authentication servers")
1499 (description
1500 "hostapd is a user-space daemon for WiFi access points and authentication
1501 servers. It implements IEEE 802.11 access point management, IEEE
1502 802.1X/WPA/WPA2/EAP Authenticators, RADIUS client, EAP server, and RADIUS
1503 authentication server.")
1504
1505 ;; Same license as wpa_supplicant.
1506 (license license:bsd-3)))
1507
1508 (define-public wakelan
1509 (package
1510 (name "wakelan")
1511 (version "1.1")
1512 (source (origin
1513 (method url-fetch)
1514 (uri (string-append
1515 "ftp://ftp.gwdg.de/pub/linux/metalab/system/network/misc/wakelan-"
1516 version ".tar.gz"))
1517 (sha256
1518 (base32
1519 "0vydqpf44146ir6k87gmqaq6xy66xhc1gkr3nsd7jj3nhy7ypx9x"))))
1520 (build-system gnu-build-system)
1521 (arguments
1522 '(#:phases
1523 (modify-phases %standard-phases
1524 (replace 'configure
1525 (lambda* (#:key outputs #:allow-other-keys)
1526 (let ((out (assoc-ref outputs "out")))
1527 (mkdir-p (string-append out "/bin"))
1528 (mkdir-p (string-append out "/share/man/man1"))
1529
1530 ;; It's an old configure script that doesn't understand
1531 ;; the extra options we pass.
1532 (setenv "CONFIG_SHELL" (which "bash"))
1533 (invoke "./configure"
1534 (string-append "--prefix=" out)
1535 (string-append "--mandir=" out
1536 "/share/man"))))))
1537 #:tests? #f))
1538 (home-page "https://www.kernel.org") ; really, no home page
1539 (synopsis "Send a wake-on-LAN packet")
1540 (description
1541 "WakeLan broadcasts a properly formatted UDP packet across the local area
1542 network, which causes enabled computers to power on.")
1543 (license license:gpl2+)))
1544
1545 (define-public dmidecode
1546 (package
1547 (name "dmidecode")
1548 (version "3.2")
1549 (source (origin
1550 (method url-fetch)
1551 (uri (string-append
1552 "mirror://savannah/dmidecode/dmidecode-"
1553 version ".tar.xz"))
1554 (sha256
1555 (base32
1556 "1pcfhcgs2ifdjwp7amnsr3lq95pgxpr150bjhdinvl505px0cw07"))))
1557 (build-system gnu-build-system)
1558 (arguments
1559 '(#:phases (modify-phases %standard-phases (delete 'configure))
1560 #:tests? #f ; no 'check' target
1561 #:make-flags (list (string-append "prefix="
1562 (assoc-ref %outputs "out")))))
1563 (home-page "https://www.nongnu.org/dmidecode/")
1564 (synopsis "Read hardware information from the BIOS")
1565 (description
1566 "Dmidecode reports information about your system's hardware as described
1567 in your system BIOS according to the SMBIOS/DMI standard. This typically
1568 includes system manufacturer, model name, serial number, BIOS version, asset
1569 tag as well as a lot of other details of varying level of interest and
1570 reliability depending on the manufacturer. This will often include usage
1571 status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory
1572 module slots, and the list of I/O ports (e.g. serial, parallel, USB).")
1573 (license license:gpl2+)))
1574
1575 (define-public acpica
1576 (package
1577 (name "acpica")
1578 (version "20191018")
1579 (source (origin
1580 (method url-fetch)
1581 (uri (string-append
1582 "https://acpica.org/sites/acpica/files/acpica-unix2-"
1583 version ".tar.gz"))
1584 (sha256
1585 (base32
1586 "0k6xr9v46pnw8kl7jh23zfafs2vq3gk2sgkmjdf9a8jx8n3aifgd"))))
1587 (build-system gnu-build-system)
1588 (native-inputs `(("flex" ,flex)
1589 ("bison" ,bison)))
1590 (arguments
1591 '(#:make-flags (list (string-append "PREFIX=" %output)
1592 "CC=gcc"
1593 "HOST=_LINUX"
1594 "OPT_CFLAGS=-Wall -fno-strict-aliasing")
1595 #:tests? #f ; no 'check' target
1596 #:phases (modify-phases %standard-phases (delete 'configure))))
1597 (home-page "https://acpica.org/")
1598 (synopsis "Tools for the development and debug of ACPI tables")
1599 (description
1600 "The ACPI Component Architecture (@dfn{ACPICA}) project provides an
1601 OS-independent reference implementation of the Advanced Configuration and
1602 Power Interface Specification (@dfn{ACPI}). ACPICA code contains those portions
1603 of ACPI meant to be directly integrated into the host OS as a kernel-resident
1604 subsystem, and a small set of tools to assist in developing and debugging ACPI
1605 tables. This package contains only the user-space tools needed for ACPI table
1606 development, not the kernel implementation of ACPI.")
1607 (license license:gpl2))) ; dual GPLv2/ACPICA Licence
1608
1609 (define-public s-tui
1610 (package
1611 (name "s-tui")
1612 (version "0.8.3")
1613 (source
1614 (origin
1615 (method url-fetch)
1616 (uri (pypi-uri "s-tui" version))
1617 (sha256
1618 (base32
1619 "00lsh2v4i8rwfyjyxx5lijd6rnk9smcfffhzg5sv94ijpcnh216m"))))
1620 (build-system python-build-system)
1621 (inputs
1622 `(("python-psutil" ,python-psutil)
1623 ("python-urwid" ,python-urwid)))
1624 (home-page "https://github.com/amanusk/s-tui")
1625 (synopsis "Interactive terminal stress test and monitoring tool")
1626 (description
1627 "The Stress Terminal UI displays graphs of the CPU frequency,
1628 utilization, temperature and power.")
1629 (license license:gpl2+)))
1630
1631 (define-public stress
1632 (package
1633 (name "stress")
1634 (version "1.0.4")
1635 (source (origin
1636 (method url-fetch)
1637 (uri (string-append "mirror://debian/pool/main/s/stress/stress_"
1638 version ".orig.tar.gz"))
1639 (sha256
1640 (base32
1641 "0nw210jajk38m3y7h8s130ps2qsbz7j75wab07hi2r3hlz14yzh5"))))
1642 (build-system gnu-build-system)
1643 (home-page "https://packages.debian.org/sid/stress")
1644 (synopsis "Impose load on and stress test a computer system")
1645 (description
1646 "Stress is a tool that imposes a configurable amount of CPU, memory, I/O,
1647 or disk stress on a POSIX-compliant operating system and reports any errors it
1648 detects.
1649
1650 Stress is not a benchmark. It is a tool used by system administrators to
1651 evaluate how well their systems will scale, by kernel programmers to evaluate
1652 perceived performance characteristics, and by systems programmers to expose
1653 the classes of bugs which only or more frequently manifest themselves when the
1654 system is under heavy load.")
1655 (license license:gpl2+)))
1656
1657 (define-public detox
1658 (package
1659 (name "detox")
1660 (version "1.3.0")
1661 (source (origin
1662 (method git-fetch)
1663 (uri (git-reference
1664 (url "https://github.com/dharple/detox.git")
1665 (commit (string-append "v" version))))
1666 (file-name (git-file-name name version))
1667 (sha256
1668 (base32
1669 "1dd608c7g65s5lj02cddvani3q9kzirddgkjqa22ap9d4f8b9xgr"))))
1670 (build-system gnu-build-system)
1671 (native-inputs
1672 `(("autoconf" ,autoconf)
1673 ("automake" ,automake)
1674 ("flex" ,flex)))
1675 (arguments
1676 `(#:tests? #f ;no 'check' target
1677 #:phases (modify-phases %standard-phases
1678 (add-after 'unpack 'delete-configure
1679 ;; The "configure" script is present, but otherwise the
1680 ;; project is not bootstrapped: missing install-sh and
1681 ;; Makefile.in, so delete it so the bootstrap phase will
1682 ;; take over.
1683 (lambda _ (delete-file "configure") #t)))))
1684 (home-page "https://github.com/dharple/detox")
1685 (synopsis "Clean up file names")
1686 (description
1687 "Detox is a program that renames files to make them easier to work with
1688 under Unix and related operating systems. Spaces and various other unsafe
1689 characters (such as \"$\") get replaced with \"_\". ISO 8859-1 (Latin-1)
1690 characters can be replaced as well, as can UTF-8 characters.")
1691 (license license:bsd-3)))
1692
1693 (define-public testdisk
1694 (package
1695 (name "testdisk")
1696 (version "7.1")
1697 (source (origin
1698 (method url-fetch)
1699 (uri (string-append "https://www.cgsecurity.org/testdisk-"
1700 version ".tar.bz2"))
1701 (sha256
1702 (base32
1703 "1zlh44w67py416hkvw6nrfmjickc2d43v51vcli5p374d5sw84ql"))))
1704 (build-system gnu-build-system)
1705 (inputs
1706 `(("ntfs-3g" ,ntfs-3g)
1707 ("util-linux" ,util-linux)
1708 ("openssl" ,openssl)
1709 ;; FIXME: add reiserfs.
1710 ("zlib" ,zlib)
1711 ("e2fsprogs" ,e2fsprogs)
1712 ("libjpeg" ,libjpeg)
1713 ("ncurses" ,ncurses)))
1714 (home-page "https://www.cgsecurity.org/wiki/TestDisk")
1715 (synopsis "Data recovery tool")
1716 (description
1717 "TestDisk is a program for data recovery, primarily designed to help
1718 recover lost partitions and/or make non-booting disks bootable again.")
1719 (license license:gpl2+)))
1720
1721 (define-public tree
1722 (package
1723 (name "tree")
1724 (version "1.8.0")
1725 (source (origin
1726 (method url-fetch)
1727 (uri (string-append
1728 "http://mama.indstate.edu/users/ice/tree/src/tree-"
1729 version ".tgz"))
1730 (sha256
1731 (base32 "1hmpz6k0mr6salv0nprvm1g0rdjva1kx03bdf1scw8a38d5mspbi"))))
1732 (build-system gnu-build-system)
1733 (arguments
1734 '(#:phases (modify-phases %standard-phases (delete 'configure))
1735 #:tests? #f ; no check target
1736 #:make-flags (let ((out (assoc-ref %outputs "out")))
1737 (list (string-append "prefix=" out)))))
1738 (synopsis "Recursively list the contents of a directory")
1739 (description
1740 "Tree is a recursive directory listing command that produces a depth
1741 indented listing of files, which is colorized ala dircolors if the LS_COLORS
1742 environment variable is set and output is to tty.")
1743 (home-page "http://mama.indstate.edu/users/ice/tree/")
1744 (license license:gpl2+)))
1745
1746 (define-public direvent
1747 (package
1748 (name "direvent")
1749 (version "5.2")
1750 (source (origin
1751 (method url-fetch)
1752 (uri (string-append "mirror://gnu/direvent/direvent-"
1753 version ".tar.gz"))
1754 (sha256
1755 (base32
1756 "0m9vi01b1km0cpknflyzsjnknbava0s1n6393b2bpjwyvb6j5613"))
1757 (modules '((guix build utils)))
1758 (snippet '(begin
1759 (substitute* "tests/testsuite"
1760 (("#![[:blank:]]?/bin/sh")
1761 "#!$SHELL"))
1762 #t))))
1763 (build-system gnu-build-system)
1764 (arguments
1765 '(#:phases
1766 (modify-phases %standard-phases
1767 (add-before 'build 'patch-/bin/sh
1768 (lambda* (#:key inputs #:allow-other-keys)
1769 ;; Use the right shell when executing the watcher and
1770 ;; user-provided shell commands.
1771 (let ((bash (assoc-ref inputs "bash")))
1772 (substitute* '("src/direvent.c" "src/progman.c")
1773 (("\"/bin/sh\"")
1774 (string-append "\"" bash "/bin/sh\"")))
1775
1776 ;; Adjust the 'shell.at' test accordingly.
1777 (substitute* "tests/testsuite"
1778 (("SHELL=/bin/sh")
1779 (string-append "SHELL=" bash "/bin/sh")))
1780
1781 #t))))))
1782 (home-page "https://www.gnu.org/software/direvent/")
1783 (synopsis "Daemon to monitor directories for events such as file removal")
1784 (description
1785 "A daemon that monitors directories for events, such as creating,
1786 deleting or modifying files. It can monitor different sets of directories for
1787 different events. When an event is detected, direvent calls a specified
1788 external program with information about the event, such as the location
1789 within the file system where it occurred. Thus, \"direvent\" provides an
1790 easy way to react immediately if given files undergo changes, for example, to
1791 track changes in important system configuration files.")
1792 (license license:gpl3+)))
1793
1794 (define-public libcap-ng
1795 (package
1796 (name "libcap-ng")
1797 (version "0.7.10")
1798 (source (origin
1799 (method url-fetch)
1800 (uri (string-append
1801 "https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-"
1802 version ".tar.gz"))
1803 (sha256
1804 (base32
1805 "1gzzy12agfa9ddipdf72h9y68zqqnvsjjylv4vnq6hj4w2safk58"))))
1806 (build-system gnu-build-system)
1807 (arguments
1808 `(#:configure-flags
1809 (list "--without-python")))
1810 (home-page "https://people.redhat.com/sgrubb/libcap-ng/")
1811 (synopsis "Library for more easily working with POSIX capabilities")
1812 (description
1813 "The libcap-ng library is intended to make programming with POSIX
1814 capabilities easier than the traditional libcap library. It includes
1815 utilities that can analyse all currently running applications and print out
1816 any capabilities and whether or not it has an open ended bounding set. The
1817 included utilities are designed to let admins and developers spot apps from
1818 various ways that may be running with too much privilege.")
1819 ;; The library is lgpl2.1+, but also ships some utils which are gpl2+.
1820 (license (list license:lgpl2.1+ license:gpl2+))))
1821
1822 (define-public smartmontools
1823 (package
1824 (name "smartmontools")
1825 (version "7.0")
1826 (source (origin
1827 (method url-fetch)
1828 (uri (string-append
1829 "mirror://sourceforge/smartmontools/smartmontools/"
1830 version "/smartmontools-" version ".tar.gz"))
1831 (sha256
1832 (base32
1833 "077nx2rn9szrg6isdh0938zbp7vr3dsyxl4jdyyzv1xwhqksrqg5"))))
1834 (build-system gnu-build-system)
1835 (inputs `(("libcap-ng" ,libcap-ng)))
1836 (home-page "https://www.smartmontools.org/")
1837 (synopsis "S.M.A.R.T. harddisk control and monitoring tools")
1838 (description
1839 "The smartmontools package contains utility programs to control and
1840 monitor storage systems using the Self-Monitoring, Analysis and Reporting
1841 Technology System (@dfn{S.M.A.R.T.}) built into most modern ATA and SCSI hard
1842 disks. In many cases, these utilities will provide advanced warning of disk
1843 degradation and failure.")
1844 (license license:gpl2+)))
1845
1846 (define-public fdupes
1847 (package
1848 (name "fdupes")
1849 (version "1.6.1")
1850 (source
1851 (origin
1852 (method git-fetch)
1853 (uri (git-reference
1854 (url "https://github.com/adrianlopezroche/fdupes.git")
1855 (commit (string-append "v" version))))
1856 (file-name (git-file-name name version))
1857 (sha256
1858 (base32 "19b6vqblddaw8ccw4sn0qsqzbswlhrz8ia6n4m3hymvcxn8skpz9"))))
1859 (build-system gnu-build-system)
1860 (arguments
1861 '(#:phases (modify-phases %standard-phases
1862 (delete 'configure))
1863 #:tests? #f ; no 'check' target
1864 #:make-flags (list "CC=gcc"
1865 (string-append "PREFIX="
1866 (assoc-ref %outputs "out")))))
1867 (home-page "https://github.com/adrianlopezroche/fdupes")
1868 (synopsis "Identify duplicate files")
1869 (description
1870 "fdupes is a program for identifying duplicate files residing within
1871 specified directories.")
1872 (license license:expat)))
1873
1874 (define-public graphios
1875 (package
1876 (name "graphios")
1877 (version "2.0.3")
1878 (source
1879 (origin
1880 (method url-fetch)
1881 (uri (pypi-uri "graphios" version))
1882 (sha256
1883 (base32
1884 "1h87hvc315wg6lklbf4l7csd3n5pgljwrfli1p3nasdi0izgn66i"))))
1885 (build-system python-build-system)
1886 (arguments
1887 ;; Be warned: Building with Python 3 succeeds, but the build process
1888 ;; throws a syntax error that is ignored.
1889 `(#:python ,python-2
1890 #:phases
1891 (modify-phases %standard-phases
1892 (add-before 'build 'fix-setup.py
1893 (lambda* (#:key outputs #:allow-other-keys)
1894 ;; Fix hardcoded, unprefixed file names.
1895 (let ((out (assoc-ref outputs "out")))
1896 (substitute* '("setup.py")
1897 (("/etc") (string-append out "/etc"))
1898 (("/usr") out)
1899 (("distro_ver = .*") "distro_ver = ''"))
1900 #t))))))
1901 (home-page "https://github.com/shawn-sterling/graphios")
1902 (synopsis "Emit Nagios metrics to Graphite, Statsd, and Librato")
1903 (description
1904 "Graphios is a script to emit nagios perfdata to various upstream metrics
1905 processing and time-series systems. It's currently compatible with Graphite,
1906 Statsd, Librato and InfluxDB. Graphios can emit Nagios metrics to any number
1907 of supported upstream metrics systems simultaneously.")
1908 (license license:gpl2+)))
1909
1910 (define-public ansible
1911 (package
1912 (name "ansible")
1913 (version "2.8.5")
1914 (source
1915 (origin
1916 (method url-fetch)
1917 (uri (pypi-uri "ansible" version))
1918 (sha256
1919 (base32 "11k94ifp42psivzx147xwbmq1ak7qnjdgkb6c1xz53nfapkh754f"))))
1920 (build-system python-build-system)
1921 (native-inputs
1922 `(("python-bcrypt" ,python-bcrypt)
1923 ("python-pynacl" ,python-pynacl)
1924 ("python-httplib2" ,python-httplib2)
1925 ("python-passlib" ,python-passlib)
1926 ("python-nose" ,python-nose)
1927 ("python-mock" ,python-mock)
1928 ("python-jinja2" ,python-jinja2)
1929 ("python-pyyaml" ,python-pyyaml)
1930 ("python-paramiko" ,python-paramiko)))
1931 (inputs
1932 `(("python-cryptography" ,python-cryptography)
1933 ("python-jinja2" ,python-jinja2)
1934 ("python-pyyaml" ,python-pyyaml)
1935 ("python-paramiko" ,python-paramiko)))
1936 (arguments
1937 `(#:phases
1938 (modify-phases %standard-phases
1939 ;; Several ansible commands (ansible-config, ansible-console, etc.)
1940 ;; are just symlinks to a single ansible executable. The ansible
1941 ;; executable behaves differently based on the value of
1942 ;; sys.argv[0]. This does not work well with our wrap phase, and
1943 ;; therefore the following two phases are required as a workaround.
1944 (add-after 'unpack 'hide-wrapping
1945 (lambda _
1946 ;; Overwrite sys.argv[0] to hide the wrapper script from it.
1947 (substitute* "bin/ansible"
1948 (("import traceback" all)
1949 (string-append all "
1950 import re
1951 sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
1952 ")))
1953 #t))
1954 (add-after 'install 'replace-symlinks
1955 (lambda* (#:key outputs #:allow-other-keys)
1956 ;; Replace symlinks with duplicate copies of the ansible
1957 ;; executable.
1958 (let ((out (assoc-ref outputs "out")))
1959 (for-each
1960 (lambda (subprogram)
1961 (delete-file (string-append out "/bin/ansible-" subprogram))
1962 (copy-file (string-append out "/bin/ansible")
1963 (string-append out "/bin/ansible-" subprogram)))
1964 (list "config" "console" "doc" "galaxy"
1965 "inventory" "playbook" "pull" "vault")))
1966 #t)))))
1967 (home-page "https://www.ansible.com/")
1968 (synopsis "Radically simple IT automation")
1969 (description "Ansible is a radically simple IT automation system. It
1970 handles configuration management, application deployment, cloud provisioning,
1971 ad hoc task execution, and multinode orchestration---including trivializing
1972 things like zero-downtime rolling updates with load balancers.")
1973 (license license:gpl3+)))
1974
1975 (define-public debops
1976 (package
1977 (name "debops")
1978 (version "1.1.0")
1979 (source
1980 (origin
1981 (method git-fetch)
1982 (uri (git-reference
1983 (url "https://github.com/debops/debops")
1984 (commit (string-append "v" version))))
1985 (file-name (git-file-name name version))
1986 (sha256
1987 (base32 "052b2dykdn35pdpn9s4prawl6nl6yzih8nyf54hpvhpisvjrm1v5"))
1988 (patches
1989 (search-patches "debops-constants-for-external-program-names.patch"
1990 "debops-debops-defaults-fall-back-to-less.patch"))))
1991 (build-system python-build-system)
1992 (native-inputs
1993 `(("git" ,git)))
1994 (inputs
1995 `(("ansible" ,ansible)
1996 ("encfs" ,encfs)
1997 ("fuse" ,fuse)
1998 ("util-linux" ,util-linux) ;; for umount
1999 ("findutils" ,findutils)
2000 ("gnupg" ,gnupg)
2001 ("which" ,which)))
2002 (propagated-inputs
2003 `(("python-future" ,python-future)
2004 ("python-distro" ,python-distro)))
2005 (arguments
2006 `(#:tests? #f
2007 #:phases
2008 (modify-phases %standard-phases
2009 (add-after 'unpack 'nuke-debops-update
2010 (lambda _
2011 (chmod "bin/debops-update" #o755) ; FIXME work-around git-fetch issue
2012 (with-output-to-file "bin/debops-update"
2013 (lambda ()
2014 (format #t "#!/bin/sh
2015 echo 'debops is installed via guix. guix-update is useless in this case.
2016 Please use `guix package -u debops` instead.'")))
2017 #t))
2018 ;; patch shebangs only in actuall scripts, not in files included in
2019 ;; roles (which are to be delivered to the targte systems)
2020 (delete `patch-generated-file-shebangs)
2021 (replace 'patch-source-shebangs
2022 (lambda _
2023 (for-each patch-shebang
2024 (find-files "bin"
2025 (lambda (file stat)
2026 ;; Filter out symlinks.
2027 (eq? 'regular (stat:type stat)))
2028 #:stat lstat))))
2029 (add-after 'unpack 'fix-paths
2030 (lambda _
2031 (define (substitute-program-names file)
2032 ;; e.g. ANSIBLE_PLAYBOOK = '/gnu/store/…/bin/ansible-playbook'
2033 (for-each
2034 (lambda (name)
2035 (let ((varname (string-upcase
2036 (string-map
2037 (lambda (c) (if (char=? c #\-) #\_ c))
2038 name))))
2039 (substitute* file
2040 (((string-append "^(" varname " = )'.*'") line prefix)
2041 (string-append prefix "'" (which name) "'")))))
2042 '("ansible-playbook" "encfs" "find" "fusermount"
2043 "umount" "gpg" "ansible" "which")))
2044 (for-each substitute-program-names
2045 '("bin/debops"
2046 "bin/debops-padlock"
2047 "bin/debops-task"
2048 "debops/__init__.py"
2049 "debops/cmds/__init__.py"))
2050 #t)))))
2051 (home-page "https://www.debops.org/")
2052 (synopsis "Collection of general-purpose Ansible roles")
2053 (description "The Ansible roles provided by that can be used to manage
2054 Debian or Ubuntu hosts. In addition, a default set of Ansible playbooks can
2055 be used to apply the provided roles in a controlled way, using Ansible
2056 inventory groups.
2057
2058 The roles are written with a high customization in mind, which can be done
2059 using Ansible inventory. This way the role and playbook code can be shared
2060 between multiple environments, with different configuration in to each one.
2061
2062 Services can be managed on a single host, or spread between multiple hosts.
2063 DebOps provides support for different SQL and NoSQL databases, web servers,
2064 programming languages and specialized applications useful in a data center
2065 environment or in a cluster. The project can also be used to deploy
2066 virtualization environments using KVM/libvirt, Docker or LXC technologies to
2067 manage virtual machines and/or containers.")
2068 (license license:gpl3+)))
2069
2070 (define-public emacs-ansible-doc
2071 (let ((commit "86083a7bb2ed0468ca64e52076b06441a2f8e9e0"))
2072 (package
2073 (name "emacs-ansible-doc")
2074 (version (git-version "0.4" "1" commit))
2075 (source
2076 (origin
2077 (method git-fetch)
2078 (uri (git-reference
2079 (url "https://github.com/lunaryorn/ansible-doc.el")
2080 (commit commit)))
2081 (file-name (git-file-name name version))
2082 (sha256
2083 (base32
2084 "0lap404ch74w99n3xip176jr42b38xhyzkfnkyqg0g3wk2cd3aq8"))))
2085 (build-system emacs-build-system)
2086 ;; Unmaintained by upstream.
2087 (home-page "https://github.com/lunaryorn/ansible-doc.el")
2088 (synopsis "Ansible documentation for Emacs")
2089 (description
2090 "This package provides an Ansible documentation for GNU Emacs.
2091
2092 @code{ansible-doc} allows you to view the documentation of an Ansible
2093 module and @code{ansible-doc-mode} minor mode adds documentation
2094 lookup to YAML Mode. You could enable the mode with @code{(add-hook
2095 'yaml-mode-hook #'ansible-doc-mode)}.")
2096 (license license:gpl3+))))
2097
2098 (define-public cpulimit
2099 (package
2100 (name "cpulimit")
2101 (version "0.2")
2102 (source
2103 (origin
2104 (method git-fetch)
2105 (uri (git-reference
2106 (url "https://github.com/opsengine/cpulimit.git")
2107 (commit (string-append "v" version))))
2108 (file-name (git-file-name name version))
2109 (sha256
2110 (base32 "1dz045yhcsw1rdamzpz4bk8mw888in7fyqk1q1b3m1yk4pd1ahkh"))))
2111 (build-system gnu-build-system)
2112 (arguments
2113 `(#:phases (modify-phases %standard-phases
2114 (delete 'configure)
2115 (replace 'build
2116 (lambda _
2117 (invoke "make" "CC=gcc" "-Csrc")))
2118 (replace 'check
2119 (lambda _
2120 (invoke "make" "CC=gcc" "-Ctests")))
2121 (replace 'install
2122 (lambda* (#:key outputs #:allow-other-keys)
2123 (let* ((out (assoc-ref outputs "out"))
2124 (bin (string-append out "/bin")))
2125 (install-file "src/cpulimit" bin))
2126 #t)))))
2127 (home-page "https://github.com/opsengine/cpulimit")
2128 (synopsis "Limit CPU usage")
2129 (description
2130 "Cpulimit limits the CPU usage of a process. It does not change the nice
2131 value or other scheduling priority settings, but the real CPU usage, and is
2132 able to adapt itself dynamically to the overall system load. Children
2133 processes and threads of the specified process may optionally share the same
2134 limits.")
2135 (license license:gpl2+)))
2136
2137 (define-public autojump
2138 (package
2139 (name "autojump")
2140 (version "22.5.3")
2141 (source
2142 (origin
2143 (method git-fetch)
2144 (uri (git-reference
2145 (url "https://github.com/wting/autojump.git")
2146 (commit (string-append "release-v" version))))
2147 (file-name (git-file-name name version))
2148 (sha256
2149 (base32 "1rgpsh70manr2dydna9da4x7p8ahii7dgdgwir5fka340n1wrcws"))))
2150 (build-system gnu-build-system)
2151 (native-inputs ; for tests
2152 `(("python-mock" ,python-mock)
2153 ("python-pytest" ,python-pytest)))
2154 (inputs
2155 `(("python" ,python-wrapper)))
2156 (arguments
2157 `(#:phases
2158 (modify-phases %standard-phases
2159 (add-after 'unpack 'make-git-checkout-writable
2160 ;; ‘install.py’ modifies files before installing them.
2161 (lambda _
2162 (for-each make-file-writable (find-files "."))
2163 #t))
2164 (delete 'configure)
2165 (delete 'build)
2166 (replace 'check
2167 (lambda _
2168 (invoke "python" "tests/unit/autojump_utils_test.py")))
2169 (replace 'install
2170 (lambda* (#:key outputs #:allow-other-keys)
2171 (setenv "SHELL" (which "bash"))
2172 (invoke "python" "install.py"
2173 (string-append "--destdir="
2174 (assoc-ref outputs "out"))))))))
2175 (home-page "https://github.com/wting/autojump")
2176 (synopsis "Shell extension for file system navigation")
2177 (description
2178 "Autojump provides a faster way to navigate your file system, with a \"cd
2179 command that learns\". It works by maintaining a database of the directories
2180 you use the most from the command line and allows you to \"jump\" to
2181 frequently used directories by typing only a small pattern.")
2182 (license license:gpl3+)))
2183
2184 (define-public fasd
2185 (package
2186 (name "fasd")
2187 (version "1.0.1")
2188 (source (origin
2189 (method git-fetch)
2190 (uri (git-reference
2191 (url "https://github.com/clvv/fasd.git")
2192 (commit version)))
2193 (file-name (git-file-name name version))
2194 (sha256
2195 (base32
2196 "1awi71jdv3mhjrmar2d4z1i90kn7apd7aq1w31sh6w4yibz9kiyj"))))
2197 (build-system gnu-build-system)
2198 (arguments
2199 `(#:phases (modify-phases %standard-phases
2200 (delete 'configure)) ;no configuration
2201 #:tests? #f ;no tests
2202 #:make-flags (list (string-append "PREFIX=" %output))))
2203 (home-page "https://github.com/clvv/fasd")
2204 (synopsis "Quick access to files and directories for shells")
2205 (description
2206 "Fasd (pronounced similar to \"fast\") is a command-line productivity
2207 booster. Fasd offers quick access to files and directories for POSIX shells.
2208 It is inspired by tools like autojump, z, and v. Fasd keeps track of files
2209 and directories you have accessed so that you can quickly reference them in
2210 the command line.")
2211 (license license:x11)))
2212
2213 (define-public iftop
2214 (package
2215 (name "iftop")
2216 (version "1.0pre4")
2217 (source (origin
2218 (method url-fetch)
2219 (uri (string-append "http://www.ex-parrot.com/~pdw/iftop/download"
2220 "/iftop-" version ".tar.gz"))
2221 (sha256
2222 (base32
2223 "15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp"))))
2224 (build-system gnu-build-system)
2225 (inputs
2226 `(("libpcap" ,libpcap)
2227 ("ncurses" ,ncurses)))
2228 (synopsis "Monitor network usage")
2229 (description "Iftop does for network usage what @command{top} does
2230 for CPU usage. It listens to network traffic on a named interface and
2231 displays a table of current bandwidth usage by pairs of hosts.")
2232 (home-page "http://www.ex-parrot.com/~pdw/iftop/")
2233 (license license:gpl2+)))
2234
2235 (define-public munge
2236 (package
2237 (name "munge")
2238 (version "0.5.13")
2239 (source (origin
2240 (method url-fetch)
2241 (uri (string-append "https://github.com/dun/munge/releases/"
2242 "download/munge-" version "/munge-"
2243 version ".tar.xz"))
2244 (sha256
2245 (base32
2246 "1nj486bbg1adfg298zck96vgx57kchcypc1zdz1n7w540vyksxcr"))
2247 (modules '((guix build utils)))
2248 (snippet
2249 '(begin
2250 ;; Don't insist on write access to /var.
2251 (substitute* "src/etc/Makefile.in"
2252 (("\\$\\(INSTALL\\)(.*)localstatedir" _ middle)
2253 (string-append "-$(INSTALL)" middle "localstatedir")))
2254 #t))))
2255 (inputs
2256 `(("openssl" ,openssl)
2257 ("libgcrypt" ,libgcrypt)))
2258 (build-system gnu-build-system)
2259 (arguments '(#:configure-flags '("--localstatedir=/var")))
2260 (home-page "https://dun.github.io/munge/")
2261 (synopsis "Cluster computing authentication service")
2262 (description
2263 "Munge is an authentication service for creating and validating
2264 credentials. It allows a process to authenticate the UID and GID of another
2265 local or remote process within a group of hosts having common users and
2266 groups. These hosts form a security realm that is defined by a shared
2267 cryptographic key. Clients within this security realm can create and validate
2268 credentials without the use of root privileges, reserved ports, or
2269 platform-specific methods.")
2270 (license license:gpl3+)))
2271
2272 (define-public audit
2273 (package
2274 (name "audit")
2275 (home-page "https://people.redhat.com/sgrubb/audit/")
2276 (version "2.8.5")
2277 (source (origin
2278 (method url-fetch)
2279 (uri (string-append home-page "audit-" version ".tar.gz"))
2280 (sha256
2281 (base32
2282 "1dzcwb2q78q7x41shcachn7f4aksxbxd470yk38zh03fch1l2p8f"))))
2283 (build-system gnu-build-system)
2284 (arguments
2285 `(#:configure-flags (list "--with-python=no"
2286 "--disable-static")))
2287 (inputs
2288 `(("openldap" ,openldap)
2289 ("gnutls" ,gnutls)
2290 ("sasl" ,cyrus-sasl)))
2291 (synopsis "User-space component to the Linux auditing system")
2292 (description
2293 "auditd is the user-space component to the Linux auditing system, which
2294 allows logging of system calls made by user-land processes. It's responsible
2295 for writing audit records to the disk. Viewing the logs is done with the
2296 @code{ausearch} or @code{aureport} utilities. Configuring the audit rules is
2297 done with the @code{auditctl} utility.")
2298 (license license:gpl2+)))
2299
2300 (define-public nmap
2301 (package
2302 (name "nmap")
2303 (version "7.80")
2304 (source (origin
2305 (method url-fetch)
2306 (uri (string-append "https://nmap.org/dist/nmap-" version
2307 ".tar.bz2"))
2308 (sha256
2309 (base32
2310 "1aizfys6l9f9grm82bk878w56mg0zpkfns3spzj157h98875mypw"))
2311 (modules '((guix build utils)))
2312 (snippet
2313 '(begin
2314 (for-each delete-file-recursively
2315 ;; Remove bundled lua, pcap, and pcre libraries.
2316 ;; FIXME: Remove bundled liblinear once packaged.
2317 '("liblua"
2318 "libpcap"
2319 "libpcre"
2320 ;; Remove pre-compiled binares.
2321 "mswin32"))
2322 #t))))
2323 (build-system gnu-build-system)
2324 (inputs
2325 `(("openssl" ,openssl)
2326 ("libpcap" ,libpcap)
2327 ("pcre" ,pcre)
2328 ("lua" ,lua)
2329 ("zlib" ,zlib) ;for NSE compression support
2330
2331 ;; For 'ndiff'.
2332 ("python" ,python-2)))
2333
2334 ;; TODO Add zenmap output.
2335 (outputs '("out" "ndiff"))
2336 (arguments
2337 `(#:configure-flags '("--without-zenmap")
2338 #:phases
2339 (modify-phases %standard-phases
2340 (add-after 'configure 'patch-Makefile
2341 (lambda _
2342 (substitute* "Makefile"
2343 ;; Do not attempt to build lua.
2344 (("build-dnet build-lua") "build-dnet"))
2345 #t))
2346 (replace 'install
2347 (lambda* (#:key outputs #:allow-other-keys)
2348 (define (make out . args)
2349 (apply invoke "make"
2350 (string-append "prefix=" out)
2351 args))
2352 (define (python-path dir)
2353 (string-append dir "/lib/python"
2354 ,(version-major+minor
2355 (package-version python))
2356 "/site-packages"))
2357 (let ((out (assoc-ref outputs "out"))
2358 (ndiff (assoc-ref outputs "ndiff")))
2359 (for-each mkdir-p (list out ndiff))
2360 (make out
2361 "install-nmap"
2362 "install-nse"
2363 "install-ncat"
2364 "install-nping")
2365 (make ndiff "install-ndiff")
2366 (wrap-program (string-append ndiff "/bin/ndiff")
2367 `("PYTHONPATH" prefix
2368 (,(python-path ndiff)))))
2369 #t))
2370 ;; These are the tests that do not require network access.
2371 (replace 'check
2372 (lambda _ (invoke "make"
2373 "check-nse"
2374 "check-ndiff"
2375 "check-dns"))))
2376 ;; Nmap can't cope with out-of-source building.
2377 #:out-of-source? #f))
2378 (home-page "https://nmap.org/")
2379 (synopsis "Network discovery and security auditing tool")
2380 (description
2381 "Nmap (\"Network Mapper\") is a network discovery and security auditing
2382 tool. It is also useful for tasks such as network inventory, managing service
2383 upgrade schedules, and monitoring host or service uptime. It also provides an
2384 advanced netcat implementation (ncat), a utility for comparing scan
2385 results (ndiff), and a packet generation and response analysis tool (nping).")
2386 ;; This package uses nmap's bundled versions of libdnet and liblinear, which
2387 ;; both use a 3-clause BSD license.
2388 (license (list license:nmap license:bsd-3))))
2389
2390 (define-public dstat
2391 (package
2392 (name "dstat")
2393 (version "0.7.4")
2394 (source
2395 (origin
2396 (method git-fetch)
2397 (uri (git-reference
2398 (url "https://github.com/dagwieers/dstat.git")
2399 (commit (string-append "v" version))))
2400 (file-name (git-file-name "dstat" version))
2401 (sha256
2402 (base32 "1qnmkhqmjd1m3if05jj29dvr5hn6kayq9bkkkh881w472c0zhp8v"))
2403 (patches (search-patches "dstat-fix-crash-when-specifying-delay.patch"
2404 "dstat-skip-devices-without-io.patch"))))
2405 (build-system gnu-build-system)
2406 (arguments
2407 `(#:tests? #f ; no make check
2408 #:make-flags (let ((out (assoc-ref %outputs "out")))
2409 (list (string-append "DESTDIR=" out)
2410 "prefix=/"))
2411 #:phases
2412 (modify-phases %standard-phases
2413 (add-after 'unpack 'fix-python3-DeprecationWarning
2414 (lambda _
2415 (substitute* "dstat"
2416 (("collections") "collections.abc"))
2417 #t))
2418 (delete 'configure) ; no configure script
2419 (add-after 'install 'wrap
2420 (lambda* (#:key outputs #:allow-other-keys)
2421 (let ((out (assoc-ref outputs "out")))
2422 (wrap-program (string-append out "/bin/dstat")
2423 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2424 #t))))))
2425 (inputs
2426 `(("python" ,python-wrapper)
2427 ("python-six" ,python-six)))
2428 (synopsis "Versatile resource statistics tool")
2429 (description "Dstat is a versatile replacement for @command{vmstat},
2430 @command{iostat}, @command{netstat}, and @command{ifstat}. Dstat overcomes
2431 some of their limitations and adds some extra features, more counters and
2432 flexibility. Dstat is handy for monitoring systems during performance tuning
2433 tests, benchmarks or troubleshooting.
2434
2435 Dstat allows you to view all of your system resources in real-time, you can,
2436 e.g., compare disk utilization in combination with interrupts from your IDE
2437 controller, or compare the network bandwidth numbers directly with the disk
2438 throughput (in the same interval).")
2439 (home-page "http://dag.wiee.rs/home-made/dstat/")
2440 (license license:gpl2+)))
2441
2442 (define-public thefuck
2443 (package
2444 (name "thefuck")
2445 (version "3.29")
2446 (source
2447 (origin
2448 (method git-fetch)
2449 (uri (git-reference
2450 (url "https://github.com/nvbn/thefuck.git")
2451 (commit version)))
2452 (file-name (git-file-name name version))
2453 (sha256
2454 (base32 "1qhxwjjgrzpqrqjv7l2847ywpln76lyd6j8bl9gz2r6kl0fx2fqs"))
2455 (patches (search-patches "thefuck-test-environ.patch"))))
2456 (build-system python-build-system)
2457 (arguments
2458 '(#:phases
2459 (modify-phases %standard-phases
2460 (delete 'check)
2461 (add-after 'install 'check
2462 (lambda* (#:key inputs outputs #:allow-other-keys)
2463 ;; Tests look for installed package
2464 (add-installed-pythonpath inputs outputs)
2465 ;; Some tests need write access to $HOME.
2466 (setenv "HOME" "/tmp")
2467 (invoke "py.test" "-v")
2468 #t)))))
2469 (propagated-inputs
2470 `(("python-colorama" ,python-colorama)
2471 ("python-decorator" ,python-decorator)
2472 ("python-psutil" ,python-psutil)
2473 ("python-pyte" ,python-pyte)
2474 ("python-six" ,python-six)))
2475 (native-inputs
2476 `(("python-mock" ,python-mock)
2477 ("python-pytest" ,python-pytest)
2478 ("python-pytest-mock" ,python-pytest-mock)))
2479 (home-page "https://github.com/nvbn/thefuck")
2480 (synopsis "Correct mistyped console command")
2481 (description
2482 "The Fuck tries to match a rule for a previous, mistyped command, creates
2483 a new command using the matched rule, and runs it.")
2484 (license license:x11)))
2485
2486 (define-public di
2487 (package
2488 (name "di")
2489 (version "4.47.2")
2490 (source
2491 (origin
2492 (method url-fetch)
2493 (uri (string-append "https://gentoo.com/di/di-" version ".tar.gz"))
2494 (sha256
2495 (base32 "1g97pp2hznskqlkhl6ppyzgdmv878bcqiwh633kdnm70d1pvh192"))))
2496 (build-system gnu-build-system)
2497 (arguments
2498 `(#:tests? #f ; obscure test failures
2499 #:phases
2500 (modify-phases %standard-phases
2501 (delete 'configure) ; no configure script
2502 (add-before 'build 'setup-environment
2503 (lambda* (#:key outputs #:allow-other-keys)
2504 (setenv "CC" "gcc")
2505 (setenv "prefix" (assoc-ref outputs "out"))
2506 #t)))
2507 #:make-flags (list "--environment-overrides")))
2508 (home-page "https://www.gentoo.com/di/")
2509 (synopsis "Advanced df like disk information utility")
2510 (description
2511 "@code{di} is a disk information utility, displaying everything that your
2512 @code{df} command does and more. It features the ability to display your disk
2513 usage in whatever format you prefer. It is designed to be highly portable and
2514 produce uniform output across heterogeneous networks.")
2515 (license license:zlib)))
2516
2517 (define-public cbatticon
2518 (package
2519 (name "cbatticon")
2520 (version "1.6.10")
2521 (source
2522 (origin
2523 (method git-fetch)
2524 (uri (git-reference
2525 (url "https://github.com/valr/cbatticon.git")
2526 (commit version)))
2527 (sha256
2528 (base32 "0ivm2dzhsa9ir25ry418r2qg2llby9j7a6m3arbvq5c3kaj8m9jr"))
2529 (file-name (git-file-name name version))))
2530 (build-system gnu-build-system)
2531 (arguments
2532 `(#:tests? #f ; no tests
2533 #:make-flags
2534 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2535 "CC=gcc")
2536 #:phases
2537 (modify-phases %standard-phases
2538 (delete 'configure)))) ; no configure script
2539 (inputs
2540 `(("gtk+" ,gtk+)
2541 ("gettext" ,gettext-minimal)
2542 ("libnotify" ,libnotify)))
2543 (native-inputs
2544 `(("pkg-config" ,pkg-config)))
2545 (synopsis "Lightweight battery icon for the system tray")
2546 (description "cbatticon is a lightweight battery icon that displays
2547 the status of your battery in the system tray.")
2548 (home-page "https://github.com/valr/cbatticon")
2549 (license license:gpl2+)))
2550
2551 (define-public interrobang
2552 (let ((revision "1")
2553 (commit "896543735e1c99144765fdbd7b6e6b5afbd8b881"))
2554 (package
2555 (name "interrobang")
2556 (version (git-version "0.0.0" revision commit))
2557 (source
2558 (origin
2559 (method git-fetch)
2560 (uri (git-reference
2561 (url "https://github.com/TrilbyWhite/interrobang.git")
2562 (commit commit)))
2563 (file-name (git-file-name name version))
2564 (sha256
2565 (base32 "1n13m70p1hfba5dy3i8hfclbr6k9q3d9dai3dg4jvhdhmxcpjzdf"))))
2566 (build-system gnu-build-system)
2567 (arguments
2568 `(#:tests? #f ; no tests
2569 #:phases
2570 (modify-phases %standard-phases
2571 (delete 'configure)) ; no configure script
2572 #:make-flags (list (string-append "PREFIX="
2573 (assoc-ref %outputs "out")))))
2574 (inputs
2575 `(("libx11" ,libx11)))
2576 (native-inputs
2577 `(("pkg-config" ,pkg-config)))
2578 (synopsis "Scriptable launcher menu")
2579 (description "Interrobang is a scriptable launcher menu with a customizable
2580 shortcut syntax and completion options.")
2581 (home-page "https://github.com/TrilbyWhite/interrobang")
2582 (license license:gpl3+))))
2583
2584 (define-public pam-krb5
2585 (package
2586 (name "pam-krb5")
2587 (version "4.8")
2588 (source (origin
2589 (method url-fetch)
2590 (uri (string-append
2591 "https://archives.eyrie.org/software/kerberos/"
2592 "pam-krb5-" version ".tar.xz"))
2593 (sha256
2594 (base32
2595 "1qjp8i1s9bz7g6kiqrkzzkxn5pfspa4sy53b6z40fqmdf9przdfb"))))
2596 (build-system gnu-build-system)
2597 (arguments
2598 `(#:phases
2599 (modify-phases %standard-phases
2600 (add-before 'configure 'disable-tests
2601 (lambda _
2602 ;; The build container seems to interfere with some tests.
2603 (substitute* "tests/TESTS"
2604 (("module/basic\n") ""))
2605 (substitute* "tests/TESTS"
2606 (("pam-util/vector\n") ""))
2607 #t)))))
2608 (inputs
2609 `(("linux-pam" ,linux-pam)
2610 ("mit-krb5" ,mit-krb5)))
2611 (native-inputs
2612 `(("perl" ,perl)
2613 ("perl-test-pod" ,perl-test-pod))) ; required for tests
2614 (synopsis "Kerberos PAM module")
2615 (description
2616 "Pam-krb5 is a Kerberos PAM module for either MIT Kerberos or Heimdal.
2617 It supports ticket refreshing by screen savers, configurable
2618 authorization handling, authentication of non-local accounts for network
2619 services, password changing, and password expiration, as well as all the
2620 standard expected PAM features. It works correctly with OpenSSH, even
2621 with @code{ChallengeResponseAuthentication} and @code{PrivilegeSeparation}
2622 enabled, and supports extensive configuration either by PAM options or in
2623 krb5.conf or both. PKINIT is supported with recent versions of both MIT
2624 Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.")
2625 (home-page "https://www.eyrie.org/~eagle/software/pam-krb5")
2626 ;; Dual licenced under a homebrew non-copyleft OR GPL (any version)
2627 ;; However, the tarball does not contain a copy of the GPL, so unless
2628 ;; we put one in, we cannot distribute it under GPL without violating
2629 ;; clause requiring us to give all recipients a copy.
2630 (license license:gpl1+)))
2631
2632 (define-public sunxi-tools
2633 (package
2634 (name "sunxi-tools")
2635 (version "1.4.2")
2636 (source
2637 (origin
2638 (method git-fetch)
2639 (uri (git-reference
2640 (url "https://github.com/linux-sunxi/sunxi-tools.git")
2641 (commit (string-append "v" version))))
2642 (sha256
2643 (base32 "04f3jqg8ww4jxsf9c6ddcdgy2xbhkyp0b3l5f1hvvbv94p81rjxd"))
2644 (modules '((guix build utils)))
2645 (snippet
2646 ;; Remove binaries contained in the tarball which are only for the
2647 ;; target and can be regenerated anyway.
2648 '(begin
2649 (delete-file-recursively "bin")
2650 #t))
2651 (file-name (git-file-name name version))))
2652 (native-inputs
2653 `(("pkg-config" ,pkg-config)
2654 ("cross-gcc" ,(cross-gcc "arm-linux-gnueabihf"
2655 #:xbinutils (cross-binutils "arm-linux-gnueabihf")
2656 #:libc (cross-libc "arm-linux-gnueabihf")))
2657 ("cross-libc" ,(cross-libc "arm-linux-gnueabihf")) ; header files
2658 ("cross-libc-static" ,(cross-libc "arm-linux-gnueabihf") "static")))
2659 (inputs
2660 `(("libusb" ,libusb)))
2661 (build-system gnu-build-system)
2662 (arguments
2663 `(#:tests? #f ; no tests exist
2664 #:make-flags (list (string-append "PREFIX="
2665 (assoc-ref %outputs "out"))
2666 (string-append "CROSS_COMPILE="
2667 "arm-linux-gnueabihf-")
2668 "CC=gcc")
2669 #:phases
2670 (modify-phases %standard-phases
2671 (delete 'configure)
2672 (add-before 'build 'set-environment-up
2673 (lambda* (#:key make-flags #:allow-other-keys)
2674 (define (cross? x)
2675 (string-contains x "cross-arm-linux"))
2676 (define (filter-environment! filter-predicate
2677 environment-variable-names)
2678 (for-each
2679 (lambda (env-name)
2680 (when (getenv env-name)
2681 (let* ((env-value (getenv env-name))
2682 (search-path (search-path-as-string->list env-value))
2683 (new-search-path (filter filter-predicate
2684 search-path))
2685 (new-env-value (list->search-path-as-string
2686 new-search-path ":")))
2687 (setenv env-name new-env-value))))
2688 environment-variable-names))
2689 (setenv "CROSS_CPATH" (getenv "CPATH"))
2690 (setenv "CROSS_C_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
2691 (setenv "CROSS_CPLUS_INCLUDE_PATH" (getenv "CPLUS_INCLUDE_PATH"))
2692 (setenv "CROSS_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
2693 (filter-environment! cross?
2694 '("CROSS_CPATH" "CROSS_C_INCLUDE_PATH" "CROSS_CPLUS_INCLUDE_PATH"
2695 "CROSS_LIBRARY_PATH"))
2696 (filter-environment! (lambda (e) (not (cross? e)))
2697 '("CPATH" "C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH"
2698 "LIBRARY_PATH"))
2699 #t))
2700 (replace 'build
2701 (lambda* (#:key make-flags #:allow-other-keys)
2702 (apply invoke "make" "tools" "misc" make-flags)))
2703 (add-after 'build 'build-armhf
2704 (lambda* (#:key make-flags #:allow-other-keys)
2705 (setenv "LIBRARY_PATH" #f)
2706 (apply invoke "make" "target-tools" make-flags)))
2707 (replace 'install
2708 (lambda* (#:key make-flags #:allow-other-keys)
2709 (apply invoke "make" "install-all" "install-misc"
2710 make-flags))))))
2711 (home-page "https://github.com/linux-sunxi/sunxi-tools")
2712 (synopsis "Hardware management tools for Allwinner computers")
2713 (description "This package contains tools for Allwinner devices:
2714 @enumerate
2715 @item @command{sunxi-fexc}, @command{bin2fex}, @command{fex2bin}: Compile
2716 a textual description of a board (.fex) to a binary representation (.bin).
2717 @item @command{sunxi-fel}: Puts an Allwinner device into FEL mode which
2718 makes it register as a special USB device (rather than USB host).
2719 You can then connect it to another computer and flash it from there.
2720 @item @command{sunxi-nand-part}: Partitions NAND flash.
2721 @item @command{sunxi-bootinfo}: Reads out boot0 and boot1 (Allwinner
2722 bootloader) parameters.
2723 @item @command{sunxi-pio}: Sets GPIO parameters and oscillates a GPIO
2724 in order to be able to find it.
2725 @item @command{sunxi-meminfo}: Prints memory bus settings.
2726 @item @command{sunxi-nand-image-builder}: Prepares raw NAND images.
2727 @end enumerate")
2728 (license license:gpl2+)))
2729
2730 (define-public sedsed
2731 (package
2732 (name "sedsed")
2733 (version "1.1")
2734 (source
2735 (origin
2736 (method git-fetch)
2737 (uri (git-reference
2738 (url "https://github.com/aureliojargas/sedsed.git")
2739 (commit (string-append "v" version))))
2740 (file-name (git-file-name name version))
2741 (sha256
2742 (base32 "05cl35mwljdb9ynbbsfa8zx6ig8r0xncbg2cir9vwn5manndjj18"))))
2743 (build-system python-build-system)
2744 (arguments
2745 `(#:tests? #f ; no tests
2746 #:phases
2747 (modify-phases %standard-phases
2748 (add-after 'unpack 'patch-sed-in
2749 (lambda _
2750 (substitute* "sedsed.py"
2751 (("sedbin = 'sed'")
2752 (string-append "sedbin = '" (which "sed") "'")))
2753 #t))
2754 (delete 'build)
2755 (replace 'install
2756 (lambda* (#:key outputs #:allow-other-keys)
2757 (let* ((out (assoc-ref outputs "out"))
2758 (bin (string-append out "/bin")))
2759 ;; Just one file to copy around
2760 (install-file "sedsed.py" bin)
2761 #t)))
2762 (add-after 'wrap 'symlink
2763 ;; Create 'sedsed' symlink to "sedsed.py".
2764 (lambda* (#:key outputs #:allow-other-keys)
2765 (let* ((out (assoc-ref outputs "out"))
2766 (bin (string-append out "/bin"))
2767 (sed (string-append bin "/sedsed"))
2768 (sedpy (string-append bin "/sedsed.py")))
2769 (symlink sedpy sed)
2770 #t))))))
2771 (home-page "https://aurelio.net/projects/sedsed")
2772 (synopsis "Sed sed scripts")
2773 (description
2774 "@code{sedsed} can debug, indent, tokenize and HTMLize your @command{sed}
2775 script.
2776
2777 In debug mode, it reads your script and adds extra commands to it. When
2778 executed you can see the data flow between the commands, revealing all the
2779 magic sed performs on its internal buffers.
2780
2781 In indent mode, your script is reformatted with standard spacing.
2782
2783 In tokenize mode, you can see the elements of every command you use.
2784
2785 In HTMLize mode, your script is converted to a beautiful colored HTML file,
2786 with all the commands and parameters identified for your viewing pleasure.
2787
2788 With sedsed you can master any sed script. No more secrets, no more hidden
2789 buffers.")
2790 (license license:expat)))
2791
2792 (define-public igt-gpu-tools
2793 (package
2794 (name "igt-gpu-tools")
2795 (version "1.23")
2796 (source (origin
2797 (method url-fetch)
2798 (uri (string-append "https://cgit.freedesktop.org/xorg/app/"
2799 "intel-gpu-tools/snapshot/"
2800 "igt-gpu-tools-" version ".tar.gz"))
2801 (sha256
2802 (base32
2803 "0vzv2i4jfv2pkbqby5k3ap9pzidkmajwqmg3s7wnv8i1h33775iq"))))
2804 (build-system gnu-build-system)
2805 (arguments
2806 `(#:tests? #f ; many of the tests try to load kernel modules
2807 #:phases
2808 (modify-phases %standard-phases
2809 (replace 'bootstrap
2810 (lambda _
2811 ;; Don't run configure in this phase.
2812 (setenv "NOCONFIGURE" "1")
2813 (invoke "sh" "autogen.sh"))))))
2814 (inputs
2815 `(("cairo" ,cairo)
2816 ("eudev" ,eudev)
2817 ("glib" ,glib)
2818 ("kmod" ,kmod)
2819 ("libdrm" ,libdrm)
2820 ("libpciaccess" ,libpciaccess)
2821 ("libunwind" ,libunwind)
2822 ("libxrandr" ,libxrandr)
2823 ("openssl" ,openssl)
2824 ("procps" ,procps)
2825 ("util-macros" ,util-macros)))
2826 (native-inputs
2827 `(("autoconf" ,autoconf)
2828 ("automake" ,automake)
2829 ("libtool" ,libtool)
2830 ("pkg-config" ,pkg-config)))
2831 (home-page "https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/")
2832 (synopsis "Tools for development and testing of the Intel DRM driver")
2833 (description "IGT GPU Tools is a collection of tools for development and
2834 testing of the Intel DRM driver. There are many macro-level test suites that
2835 get used against the driver, including xtest, rendercheck, piglit, and
2836 oglconform, but failures from those can be difficult to track down to kernel
2837 changes, and many require complicated build procedures or specific testing
2838 environments to get useful results. Therefore, IGT GPU Tools includes
2839 low-level tools and tests specifically for development and testing of the
2840 Intel DRM Driver.")
2841 (supported-systems '("i686-linux" "x86_64-linux"))
2842 (license license:expat)))
2843
2844 (define-public intel-gpu-tools
2845 (deprecated-package "intel-gpu-tools" igt-gpu-tools))
2846
2847 (define-public fabric
2848 (package
2849 (name "fabric")
2850 (version "1.14.0")
2851 (source
2852 (origin
2853 (method url-fetch)
2854 (uri (pypi-uri "Fabric" version))
2855 (sha256
2856 (base32
2857 "13r0b0hllgf8j9rh6x1knmbgvingbdmx046aazv6vck2ll120mw1"))))
2858 (build-system python-build-system)
2859 (arguments
2860 `(#:python ,python-2 ; Python 2 only
2861 #:phases
2862 (modify-phases %standard-phases
2863 (replace 'check
2864 (lambda _
2865 (invoke
2866 "nosetests" "-v" "tests/"
2867 ;; This test hangs indefinitely when run on a single core VM
2868 ;; (see GNU bug #26647 and Debian bug #850230).
2869 "--exclude=test_nested_execution_with_explicit_ports"
2870 ;; This test randomly fails in certain environments causing too
2871 ;; much noise to be useful (see Debian bug #854686).
2872 "--exclude=test_should_use_sentinel_for_tasks_that_errored"))))))
2873 (native-inputs
2874 `(("python2-fudge" ,python2-fudge) ; Requires < 1.0
2875 ("python2-jinja2" ,python2-jinja2) ; Requires < 3.0
2876 ("python2-nose" ,python2-nose) ; Requires < 2.0
2877 ("python2-pynacl" ,python2-pynacl)
2878 ("python2-bcrypt" ,python2-bcrypt)))
2879 (propagated-inputs
2880 `(("python2-paramiko" ,python2-paramiko)))
2881 (home-page "http://fabfile.org")
2882 (synopsis "Simple Pythonic remote execution and deployment tool")
2883 (description
2884 "Fabric is designed to upload files and run shell commands on a number of
2885 servers in parallel or serially. These commands are grouped in tasks (which
2886 are regular Python functions) and specified in a @dfn{fabfile}.
2887
2888 It is similar to Capistrano, except it's implemented in Python and doesn't
2889 expect you to be deploying Rails applications. Fabric is a simple, Pythonic
2890 tool for remote execution and deployment.")
2891 (license license:bsd-2)))
2892
2893 (define-public neofetch
2894 (package
2895 (name "neofetch")
2896 (version "6.1.0")
2897 (source (origin
2898 (method git-fetch)
2899 (uri (git-reference
2900 (url "https://github.com/dylanaraps/neofetch")
2901 (commit version)))
2902 (file-name (git-file-name name version))
2903 (sha256
2904 (base32
2905 "022xzn9jk18k2f4b6011d8jk5nbl84i3mw3inlz4q52p2hvk8fch"))))
2906 (build-system gnu-build-system)
2907 (arguments
2908 `(#:tests? #f ; there are no tests
2909 #:make-flags
2910 (list (string-append "PREFIX=" %output))
2911 #:phases
2912 (modify-phases %standard-phases
2913 (delete 'configure)))) ; no configure script
2914 (home-page "https://github.com/dylanaraps/neofetch")
2915 (synopsis "System information script")
2916 (description "Neofetch is a command-line system information tool written in
2917 Bash. Neofetch displays information about your system next to an image, your OS
2918 logo, or any ASCII file of your choice. The main purpose of Neofetch is to be
2919 used in screenshots to show other users what operating system or distribution
2920 you are running, what theme or icon set you are using, etc.")
2921 (license license:expat)))
2922
2923 (define-public screenfetch
2924 (package
2925 (name "screenfetch")
2926 (version "3.9.0")
2927 (source (origin
2928 (method git-fetch)
2929 (uri (git-reference
2930 (url "https://github.com/KittyKatt/screenFetch")
2931 (commit (string-append "v" version))))
2932 (file-name (git-file-name name version))
2933 (sha256
2934 (base32
2935 "13i7dczbqwhws08zzrdraki1zkqv0qkbgx9c1r8vmg5qr9f7hfzg"))))
2936 (build-system trivial-build-system)
2937 (arguments
2938 `(#:modules ((guix build utils))
2939 #:builder
2940 (begin
2941 (use-modules (guix build utils))
2942 (let ((source (assoc-ref %build-inputs "source"))
2943 (out (assoc-ref %outputs "out")))
2944 (mkdir-p (string-append out "/bin/"))
2945 (copy-file (string-append source "/screenfetch-dev")
2946 (string-append out "/bin/screenfetch"))
2947 (install-file (string-append source "/screenfetch.1")
2948 (string-append out "/man/man1/"))
2949 (install-file (string-append source "/COPYING")
2950 (string-append out "/share/doc/" ,name "-" ,version))
2951 (substitute* (string-append out "/bin/screenfetch")
2952 (("/usr/bin/env bash")
2953 (string-append (assoc-ref %build-inputs "bash")
2954 "/bin/bash")))
2955 (wrap-program
2956 (string-append out "/bin/screenfetch")
2957 `("PATH" ":" prefix
2958 (,(string-append (assoc-ref %build-inputs "bc") "/bin:"
2959 (assoc-ref %build-inputs "scrot") "/bin:"
2960 (assoc-ref %build-inputs "xdpyinfo") "/bin"
2961 (assoc-ref %build-inputs "xprop") "/bin"))))
2962 (substitute* (string-append out "/bin/screenfetch")
2963 (("#!#f")
2964 (string-append "#!" (assoc-ref %build-inputs "bash")
2965 "/bin/bash")))))))
2966 (inputs
2967 `(("bash" ,bash)
2968 ("bc" ,bc)
2969 ("scrot" ,scrot)
2970 ("xdpyinfo" ,xdpyinfo)
2971 ("xprop" ,xprop)))
2972 (home-page "https://github.com/KittyKatt/screenFetch")
2973 (synopsis "System information script")
2974 (description "Bash screenshot information tool which can be used to
2975 generate those nifty terminal theme information and ASCII distribution logos in
2976 everyone's screenshots nowadays.")
2977 (license license:gpl3)))
2978
2979 (define-public nnn
2980 (package
2981 (name "nnn")
2982 (version "2.6")
2983 (source
2984 (origin
2985 (method url-fetch)
2986 (uri (string-append "https://github.com/jarun/nnn/releases/download/v"
2987 version "/nnn-v" version ".tar.gz"))
2988 (sha256
2989 (base32 "0xb6crd9vig3xgjwl8m4bmgcs4azfmfdpx3g8pdpzs28jdg7i3rr"))))
2990 (build-system gnu-build-system)
2991 (inputs
2992 `(("ncurses" ,ncurses)
2993 ("readline" ,readline)))
2994 (native-inputs
2995 `(("pkg-config" ,pkg-config)))
2996 (arguments
2997 '(#:tests? #f ; no tests
2998 #:phases
2999 (modify-phases %standard-phases
3000 (delete 'configure)) ; no configure script
3001 #:make-flags
3002 (list
3003 (string-append "PREFIX="
3004 (assoc-ref %outputs "out"))
3005 "CC=gcc")))
3006 (home-page "https://github.com/jarun/nnn")
3007 (synopsis "Terminal file browser")
3008 (description "@command{nnn} is a fork of @command{noice}, a blazing-fast
3009 lightweight terminal file browser with easy keyboard shortcuts for
3010 navigation, opening files and running tasks. There is no config file and
3011 mime associations are hard-coded. The incredible user-friendliness and speed
3012 make it a perfect utility on modern distros.")
3013 (license license:bsd-2)))
3014
3015 (define-public thermald
3016 (package
3017 (name "thermald")
3018 (version "1.8")
3019 (source
3020 (origin
3021 (method git-fetch)
3022 (uri (git-reference
3023 (url "https://github.com/01org/thermal_daemon")
3024 (commit (string-append "v" version))))
3025 (file-name (git-file-name name version))
3026 (sha256
3027 (base32 "1g1l7k8yxj8bl1ysdx8v6anv1s7xk9j072y44gwki70dy48n7j92"))
3028 (patches
3029 (search-patches "thermald-make-int-max32-visible.patch"))))
3030 (build-system gnu-build-system)
3031 (arguments
3032 `(#:configure-flags
3033 (let ((out (assoc-ref %outputs "out")))
3034 (list (string-append "--sysconfdir="
3035 out "/etc")
3036 (string-append "--with-dbus-sys-dir="
3037 out "/etc/dbus-1/system.d")
3038 "--localstatedir=/var"))))
3039 (native-inputs
3040 `(("autoconf" ,autoconf)
3041 ("automake" ,automake)
3042 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
3043 ("pkg-config" ,pkg-config)))
3044 (inputs
3045 `(("dbus-glib" ,dbus-glib)
3046 ("libxml2" ,libxml2)))
3047 (home-page "https://01.org/linux-thermal-daemon/")
3048 (synopsis "CPU scaling for thermal management")
3049 (description "The Linux Thermal Daemon helps monitor and control temperature
3050 on systems running the Linux kernel.")
3051 ;; arm and aarch64 don't have cpuid.h.
3052 (supported-systems '("i686-linux" "x86_64-linux"))
3053 (license license:gpl2+)))
3054
3055 (define-public masscan
3056 (package
3057 (name "masscan")
3058 (version "1.0.5")
3059 (source
3060 (origin
3061 (method git-fetch)
3062 (uri (git-reference
3063 (url "https://github.com/robertdavidgraham/masscan.git")
3064 (commit version)))
3065 (file-name (git-file-name name version))
3066 (sha256
3067 (base32 "0q0c7bsf0pbl8napry1qyg0gl4pd8wn872h4mz9b56dx4rx90vqg"))))
3068 (build-system gnu-build-system)
3069 (inputs
3070 `(("libpcap" ,libpcap)))
3071 (arguments
3072 '(#:test-target "regress"
3073 #:make-flags
3074 (list "CC=gcc"
3075 (string-append "PREFIX=" (assoc-ref %outputs "out")))
3076 #:phases
3077 (modify-phases %standard-phases
3078 (delete 'configure) ; no ./configure script
3079 (add-after 'unpack 'patch-path
3080 (lambda* (#:key outputs inputs #:allow-other-keys)
3081 (let* ((out (assoc-ref outputs "out"))
3082 (pcap (assoc-ref inputs "libpcap")))
3083 (substitute* "src/rawsock-pcap.c"
3084 (("libpcap.so") (string-append pcap "/lib/libpcap.so")))
3085 #t))))))
3086 (synopsis "TCP port scanner")
3087 (description "MASSCAN is an asynchronous TCP port scanner. It can detect
3088 open ports, and also complete the TCP connection and interact with the remote
3089 application, collecting the information received.")
3090 (home-page "https://github.com/robertdavidgraham/masscan")
3091 ;; 'src/siphash24.c' is the SipHash reference implementation, which
3092 ;; bears a CC0 Public Domain Dedication.
3093 (license license:agpl3+)))
3094
3095 (define-public hungrycat
3096 (package
3097 (name "hungrycat")
3098 (version "0.4.1")
3099 (source (origin
3100 (method url-fetch)
3101 (uri (string-append "https://github.com/jwilk/hungrycat/"
3102 "releases/download/" version "/"
3103 "hungrycat-" version ".tar.gz"))
3104 (sha256
3105 (base32
3106 "03fc1zsrf99lvxa7b4ps6pbi43304wbxh1f6ci4q0vkal370yfwh"))))
3107 (build-system gnu-build-system)
3108 (native-inputs
3109 ;; For tests.
3110 `(("python" ,python-wrapper)
3111 ("python-nose" ,python-nose)))
3112 (arguments
3113 `(#:test-target "test"))
3114 (synopsis "A single tool that combines @command{cat} & @command{rm}")
3115 (description
3116 "hungrycat prints the contents of a file to standard output, while
3117 simultaneously freeing the disk space it occupied. It is useful if you need
3118 to process a large file, don't have enough space to store both the input and
3119 output files, and don't need the input file afterwards.
3120 While similar in principle to running @command{cat} immediately followed by
3121 @command{rm}, @command{hungrycat} actually frees blocks as soon as they are
3122 printed instead of after the entire file has been read, which is often too
3123 late.")
3124 (home-page "https://jwilk.net/software/hungrycat")
3125 (license license:expat)))
3126
3127 (define-public launchmon
3128 (package
3129 (name "launchmon")
3130 (version "1.0.2")
3131 (source (origin
3132 (method url-fetch)
3133 (uri (string-append
3134 "https://github.com/LLNL/LaunchMON/releases/download/v"
3135 version "/launchmon-v" version ".tar.gz"))
3136 (sha256
3137 (base32
3138 "0fm3nd9mydm9v2bf7bh01dbgrfnpwkapxa3dsvy3x1z0rz61qc0x"))))
3139 (build-system gnu-build-system)
3140 (inputs
3141 `(("mpi" ,openmpi)
3142 ("munge" ,munge)
3143 ("boost" ,boost)
3144 ("libelf" ,libelf)
3145 ("libgcrypt" ,libgcrypt)
3146 ("libgpg-error" ,libgpg-error)))
3147 (synopsis "Infrastructue for large scale tool daemon launching")
3148 (description
3149 "LaunchMON is a software infrastructure that enables HPC run-time
3150 tools to co-locate tool daemons with a parallel job. Its API allows a
3151 tool to identify all the remote processes of a job and to scalably
3152 launch daemons into the relevant nodes.")
3153 (home-page "https://github.com/LLNL/LaunchMON")
3154 (supported-systems '("i686-linux" "x86_64-linux"))
3155 (license license:lgpl2.1)))
3156
3157 (define-public spindle
3158 (package
3159 (name "spindle")
3160 (version "0.10")
3161 (source (origin
3162 ;; We use git checkout to avoid github auto-generated tarballs
3163 (method git-fetch)
3164 (uri (git-reference
3165 (url "https://github.com/hpc/Spindle.git")
3166 (commit (string-append "v" version))))
3167 (file-name (git-file-name name version))
3168 (sha256
3169 (base32
3170 "15n3ay0qq81r5v7fif61q1vdjcq44pp2nynkh3fvbzc9fj3c39wd"))))
3171 (build-system gnu-build-system)
3172 (arguments '(#:configure-flags '("--enable-sec-launchmon"
3173 "--enable-sec-munge"
3174 "--enable-sec-none")))
3175 (inputs
3176 `(("mpi" ,openmpi)
3177 ("munge" ,munge)
3178 ("launchmon" ,launchmon)
3179 ("libgcrypt" ,libgcrypt)))
3180 (synopsis "Scalable library loading in HPC environments")
3181 (description
3182 "Spindle is a tool for improving the performance of dynamic library and
3183 Python loading in HPC environments.")
3184 (home-page "https://github.com/hpc/Spindle")
3185 ;; This package supports x86_64 and PowerPC64
3186 (supported-systems '("x86_64-linux"))
3187 (license license:lgpl2.1)))
3188
3189 (define-public inxi-minimal
3190 (let ((real-name "inxi"))
3191 (package
3192 (name "inxi-minimal")
3193 (version "3.0.34-1")
3194 (source
3195 (origin
3196 (method git-fetch)
3197 (uri (git-reference
3198 (url "https://github.com/smxi/inxi")
3199 (commit version)))
3200 (file-name (git-file-name real-name version))
3201 (sha256
3202 (base32 "0x2s40lwsan2pk292nspjgyw00f9f5fdfmwfvl50924pxhyxn2fh"))))
3203 (build-system trivial-build-system)
3204 (inputs
3205 `(("bash" ,bash-minimal)
3206 ("perl" ,perl)
3207 ("procps" ,procps)))
3208 (native-inputs
3209 `(("gzip" ,gzip)))
3210 (arguments
3211 `(#:modules
3212 ((guix build utils)
3213 (ice-9 match)
3214 (srfi srfi-26))
3215 #:builder
3216 (begin
3217 (use-modules (guix build utils)
3218 (ice-9 match)
3219 (srfi srfi-26))
3220 (setenv "PATH" (string-append
3221 (assoc-ref %build-inputs "bash") "/bin" ":"
3222 (assoc-ref %build-inputs "gzip") "/bin" ":"
3223 (assoc-ref %build-inputs "perl") "/bin" ":"))
3224 (copy-recursively (assoc-ref %build-inputs "source")
3225 ,(string-append real-name "-" version))
3226 (with-directory-excursion ,(string-append real-name "-" version)
3227 (with-fluids ((%default-port-encoding #f))
3228 (substitute* "inxi" (("/usr/bin/env perl") (which "perl"))))
3229 (let ((bin (string-append %output "/bin")))
3230 (install-file "inxi" bin)
3231 (wrap-program (string-append bin "/inxi")
3232 `("PATH" ":" =
3233 ("$PATH"
3234 ,@(map (lambda (input)
3235 (match input
3236 ((name . store)
3237 (let ((store-append
3238 (cut string-append store <>)))
3239 (cond
3240 ((member name '("util-linux"))
3241 (string-append (store-append "/bin") ":"
3242 (store-append "/sbin")))
3243 ((member name '("dmidecode" "iproute2"))
3244 (store-append "/sbin"))
3245 (else (store-append "/bin")))))))
3246 %build-inputs)))
3247 `("PERL5LIB" ":" =
3248 ,(delete
3249 ""
3250 (map (match-lambda
3251 (((? (cut string-prefix? "perl-" <>) name) . dir)
3252 (string-append dir "/lib/perl5/site_perl"))
3253 (_ ""))
3254 %build-inputs)))))
3255 (invoke "gzip" "inxi.1")
3256 (install-file "inxi.1.gz"
3257 (string-append %output "/share/man/man1")))
3258 #t)))
3259 (home-page "https://smxi.org/docs/inxi.htm")
3260 (synopsis "Full-featured system information script")
3261 (description "Inxi is a system information script that can display
3262 various things about your hardware and software to users in an IRC chatroom or
3263 support forum. It runs with the @code{/exec} command in most IRC clients.")
3264 (license license:gpl3+))))
3265
3266 (define-public inxi
3267 (package
3268 (inherit inxi-minimal)
3269 (name "inxi")
3270 (inputs
3271 `(("dmidecode" ,dmidecode)
3272 ("file" ,file)
3273 ("bind:utils" ,isc-bind "utils") ; dig
3274 ("gzip" ,gzip)
3275 ("iproute2" ,iproute) ; ip
3276 ("kmod" ,kmod) ; modinfo
3277 ("lm-sensors" ,lm-sensors)
3278 ("mesa-utils" ,mesa-utils)
3279 ("pciutils" ,pciutils)
3280 ("tar" ,tar)
3281 ("tree" ,tree)
3282 ("util-linux" ,util-linux) ; lsblk
3283 ("usbutils" ,usbutils) ; lsusb
3284 ("wmctrl" ,wmctrl)
3285 ("xdpyinfo" ,xdpyinfo)
3286 ("xprop" ,xprop)
3287 ("xrandr" ,xrandr)
3288 ("coreutils" ,coreutils) ; uptime
3289 ("inetutils" ,inetutils) ; ifconfig
3290 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
3291 ("perl-http-tiny" ,perl-http-tiny)
3292 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
3293 ("perl-json-xs" ,perl-json-xs)
3294 ("perl-time-hires" ,perl-time-hires)
3295 ;; TODO: Add more inputs:
3296 ;; ipmi-sensors
3297 ;; hddtemp
3298 ;; perl-xml-dumper
3299 ;; ipmitool
3300 ,@(package-inputs inxi-minimal)))))
3301
3302 (define-public pscircle
3303 (package
3304 (name "pscircle")
3305 (version "1.3.0")
3306 (source
3307 (origin
3308 (method git-fetch)
3309 (uri (git-reference
3310 (url "https://gitlab.com/mildlyparallel/pscircle.git")
3311 (commit (string-append "v" version))))
3312 (file-name (git-file-name name version))
3313 (sha256
3314 (base32
3315 "0qsif00dkqa8ky3vl2ycx5anx2yk62nrv47f5lrlqzclz91f00fx"))))
3316 (build-system meson-build-system)
3317 (native-inputs
3318 `(("pkg-config" ,pkg-config)))
3319 (inputs
3320 `(("cairo" ,cairo)
3321 ("libpng" ,libpng)
3322 ("libx11" ,libx11)))
3323 (home-page "https://gitlab.com/mildlyparallel/pscircle")
3324 (synopsis "Visualize Linux processes in a form of radial tree")
3325 (description
3326 "@code{pscircle} visualizes Linux processes in the form of a radial tree.")
3327 (license license:gpl2+)))
3328
3329 (define-public python-pyudev
3330 (package
3331 (name "python-pyudev")
3332 (version "0.21.0")
3333 (source
3334 (origin
3335 (method url-fetch)
3336 (uri (pypi-uri "pyudev" version))
3337 (sha256
3338 (base32
3339 "0arz0dqp75sszsmgm6vhg92n1lsx91ihddx3m944f4ah0487ljq9"))))
3340 (build-system python-build-system)
3341 (arguments
3342 `(#:tests? #f ; Tests require /sys
3343 #:phases
3344 (modify-phases %standard-phases
3345 (add-after 'unpack 'patch-ctypes-udev
3346 (lambda* (#:key inputs outputs #:allow-other-keys)
3347 (let ((eudev (assoc-ref inputs "eudev")))
3348 (substitute* "src/pyudev/core.py"
3349 (("'udev'")
3350 (string-append "'" eudev "/lib/libudev.so'")))
3351 (substitute* "src/pyudev/_ctypeslib/utils.py"
3352 ;; Use absolute paths instead of keys.
3353 (("= find_library") "= "))
3354 #t))))))
3355 (inputs
3356 `(("eudev" ,eudev)))
3357 (propagated-inputs
3358 `(("python-six" ,python-six)))
3359 (native-inputs
3360 `(("python-docutils" ,python-docutils)
3361 ("python-hypothesis" ,python-hypothesis)
3362 ("python-mock" ,python-mock)
3363 ("python-pytest" ,python-pytest)
3364 ("python-sphinx" ,python-sphinx)))
3365 (home-page "http://pyudev.readthedocs.org/")
3366 (synopsis "Python udev binding")
3367 (description "This package provides @code{udev} bindings for Python.")
3368 (license license:lgpl2.1)))
3369
3370 (define-public solaar
3371 (package
3372 (name "solaar")
3373 (version "0.9.2")
3374 (source (origin
3375 (method git-fetch)
3376 (uri (git-reference
3377 (url "https://github.com/pwr/Solaar.git")
3378 (commit version)))
3379 (file-name (git-file-name name version))
3380 (sha256
3381 (base32
3382 "085mfa13dap3wqik1dqlad0d7kff4rv7j4ljh99c7l8nhczkqgwm"))))
3383 (build-system python-build-system)
3384 (arguments
3385 `(#:phases
3386 (modify-phases %standard-phases
3387 (add-after 'unpack 'fix-prefix-detection
3388 (lambda _
3389 (substitute* "setup.py"
3390 (("'--prefix' in sys\\.argv")
3391 "len([x.startswith('--prefix=') for x in sys.argv]) > 0"))
3392 #t))
3393 (replace 'build
3394 (lambda _
3395 (invoke "python" "setup.py" "build")))
3396 (add-before 'check 'setenv-PATH
3397 (lambda _
3398 (setenv "PYTHONPATH" (string-append "lib:" (getenv "PYTHONPATH")))
3399 #t)))))
3400 (propagated-inputs
3401 `(("python-pygobject" ,python-pygobject)
3402 ("python-pyudev" ,python-pyudev)))
3403 (home-page "https://smxi.org/docs/inxi.htm")
3404 (synopsis "Linux devices manager for the Logitech Unifying Receiver")
3405 (description "This package provides tools to manage clients of the
3406 Logitech Unifying Receiver.")
3407 (license license:gpl2)))
3408
3409 (define-public lynis
3410 (package
3411 (name "lynis")
3412 ;; Also update the ‘lynis-sdk’ input to the commit matching this release.
3413 (version "2.7.5")
3414 (source
3415 (origin
3416 (method git-fetch)
3417 (uri (git-reference
3418 (url "https://github.com/CISOfy/lynis")
3419 (commit version)))
3420 (file-name (git-file-name name version))
3421 (sha256
3422 (base32 "1lkkbvxm0rgrrlx0szaxmf8ghc3d26wal96sgqk84m37mvs1f7p0"))
3423 (modules '((guix build utils)))
3424 (snippet
3425 '(begin
3426 ;; Remove proprietary plugins. As of now, all plugins supplied with
3427 ;; lynis are proprietary. In the future, if free plugins are
3428 ;; provided, whitelist them from deletion.
3429 (for-each delete-file (find-files "plugins"))
3430 #t))))
3431 (build-system gnu-build-system)
3432 (native-inputs
3433 `(;; For tests
3434 ("lynis-sdk"
3435 ,(origin
3436 (method git-fetch)
3437 (uri (git-reference
3438 (url "https://github.com/CISOfy/lynis-sdk")
3439 (commit "bf1c1d95121da9ca79a9eac5a15ed8d81e34094d")))
3440 (file-name (git-file-name "lynis-sdk" version))
3441 (sha256
3442 (base32 "1ndz5v0039dqa87cva2dk55a8hkw0fibsw8hh2ddmny9qkr4l3dp"))))))
3443 (arguments
3444 `(#:phases
3445 (modify-phases %standard-phases
3446 (replace 'configure
3447 (lambda* (#:key inputs outputs #:allow-other-keys)
3448 (substitute* "lynis"
3449 (("/usr/share/lynis")
3450 (string-append (assoc-ref outputs "out") "/share/lynis")))
3451 (substitute* "include/functions"
3452 (("/usr/local/etc/lynis")
3453 (string-append (assoc-ref outputs "out") "/etc/lynis")))
3454 #t))
3455 (delete 'build)
3456 (replace 'install
3457 (lambda* (#:key outputs #:allow-other-keys)
3458 (let ((out (assoc-ref outputs "out")))
3459 (install-file "lynis" (string-append out "/bin/"))
3460 (install-file "default.prf" (string-append out "/etc/lynis"))
3461 (for-each
3462 (lambda (dir)
3463 (copy-recursively dir (string-append out "/share/lynis/" dir)))
3464 (list "db" "include" "plugins"))
3465 (install-file "lynis.8" (string-append out "/share/man/man8"))
3466 #t)))
3467 (replace 'check
3468 (lambda* (#:key inputs #:allow-other-keys)
3469 (copy-recursively (assoc-ref inputs "lynis-sdk") "../lynis-sdk")
3470 (setenv "LANG" "en_US.UTF-8")
3471 (let ((lynis-dir (getcwd)))
3472 (with-directory-excursion "../lynis-sdk"
3473 (substitute* "config"
3474 (("\\.\\./lynis") lynis-dir))
3475 (substitute* "unit-tests/tests-language-translations.sh"
3476 (("\\.\\./lynis") lynis-dir))
3477 (invoke "sh" "lynis-devkit" "run" "unit-tests"))))))))
3478 (home-page "https://cisofy.com/lynis/")
3479 (synopsis "Security auditing tool")
3480 (description "Lynis is a security auditing tool. It performs an in-depth
3481 security scan and runs on the system itself. The primary goal is to test
3482 security defenses and provide tips for further system hardening. It will also
3483 scan for general system information, vulnerable software packages, and
3484 possible configuration issues.")
3485 (license license:gpl3+)))
3486
3487 (define-public ngrep
3488 (package
3489 (name "ngrep")
3490 (version "1.47")
3491 (source
3492 (origin
3493 (method git-fetch)
3494 (uri (git-reference
3495 (url "https://github.com/jpr5/ngrep/")
3496 (commit (string-append "V" (string-replace-substring version "." "_")))))
3497 (file-name (git-file-name name version))
3498 (sha256
3499 (base32
3500 "1x2fyd7wdqlj1r76ilal06cl2wmbz0ws6i3ys204sbjh1cj6dcl7"))))
3501 (build-system gnu-build-system)
3502 (inputs
3503 `(("libpcap" ,libpcap)))
3504 (arguments
3505 `(#:tests? #f ;; No tests.
3506 #:configure-flags (list (string-append "--with-pcap-includes="
3507 (assoc-ref %build-inputs "libpcap")
3508 "/include/pcap"))))
3509 (home-page "https://github.com/jpr5/ngrep/")
3510 (synopsis "Grep-like utility to search for network packets on an interface")
3511 (description "@command{ngrep} is like GNU grep applied to the network
3512 layer. It's a PCAP-based tool that allows you to specify an extended regular
3513 or hexadecimal expression to match against data payloads of packets. It
3514 understands many kinds of protocols, including IPv4/6, TCP, UDP, ICMPv4/6,
3515 IGMP and Raw, across a wide variety of interface types, and understands BPF
3516 filter logic in the same fashion as more common packet sniffing tools, such as
3517 tcpdump and snoop.")
3518 (license license:bsd-3)))
3519
3520 (define-public pam-mount
3521 (package
3522 (name "pam-mount")
3523 (version "2.16")
3524 (source
3525 (origin
3526 (method url-fetch)
3527 (uri (string-append "mirror://sourceforge/pam-mount/pam_mount/"
3528 version "/pam_mount-" version ".tar.xz"))
3529 (sha256
3530 (base32
3531 "1rvi4irb7ylsbhvx1cr6islm2xxw1a4b19q6z4a9864ndkm0f0mf"))
3532 (patches
3533 ;; Patch adding support for encrypted volumes in LUKS2 format.
3534 ;; It comes from the Gentoo package definition for sys-auth/pam_mount.
3535 (search-patches "pam-mount-luks2-support.patch"))))
3536 (build-system gnu-build-system)
3537 (native-inputs
3538 `(("perl" ,perl)
3539 ("pkg-config" ,pkg-config)))
3540 (inputs
3541 `(("cryptsetup" ,cryptsetup)
3542 ("libhx" ,libhx)
3543 ("libxml2" ,libxml2)
3544 ("linux-pam" ,linux-pam)
3545 ("lvm2" ,lvm2)
3546 ("openssl" ,openssl)
3547 ("pcre" ,pcre)
3548 ("util-linux" ,util-linux)))
3549 (arguments
3550 `(#:configure-flags
3551 (list (string-append "--with-slibdir=" %output "/lib")
3552 (string-append "--with-ssbindir=" %output "/sbin"))
3553 #:phases
3554 (modify-phases %standard-phases
3555 (add-after 'unpack 'fix-program-paths
3556 (lambda* (#:key inputs outputs #:allow-other-keys)
3557 (let ((util-linux (assoc-ref inputs "util-linux"))
3558 (out (assoc-ref outputs "out")))
3559 (substitute* "src/mtcrypt.c"
3560 (("\"mount\";")
3561 (string-append "\"" util-linux "/bin/mount\";"))
3562 (("\"umount\";")
3563 (string-append "\"" util-linux "/bin/umount\";"))
3564 (("\"fsck\",")
3565 (string-append "\"" util-linux "/sbin/fsck\",")))
3566 (substitute* "src/rdconf1.c"
3567 (("\"mount\", \"")
3568 (string-append "\"" util-linux "/bin/mount\", \""))
3569 (("\"umount\", \"")
3570 (string-append "\"" util-linux "/bin/umount\", \""))
3571 (("\"fsck\", \"")
3572 (string-append "\"" util-linux "/sbin/fsck\", \""))
3573 (("\"pmvarrun\", \"")
3574 (string-append "\"" out "/sbin/pmvarrun\", \""))))
3575 #t)))))
3576 (home-page "http://pam-mount.sourceforge.net")
3577 (synopsis "PAM module to mount volumes for a user session")
3578 (description
3579 "Pam-mount is a PAM module that can mount volumes when a user logs in.
3580 It supports mounting local filesystems of any kind the normal mount utility
3581 supports. It can also mount encrypted LUKS volumes using the password
3582 supplied by the user when logging in.")
3583 (license (list license:gpl2+ license:lgpl2.1+))))