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