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