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