gnu: direvent: Use G-expressions.
[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, 2021 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
4 ;;; Copyright © 2014, 2015, 2016, 2018, 2019, 2020 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2020, 2021 Eric Bavier <bavier@posteo.net>
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, 2020 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, 2020, 2021, 2022 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–2021 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 Christine Lemmer-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, 2021 Guillaume Le Vaillant <glv@posteo.net>
32 ;;; Copyright © 2019, 2020, 2021 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, 2021 Michael Rohleder <mike@rohleder.de>
36 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
37 ;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
38 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
39 ;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
40 ;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
41 ;;; Copyright © 2021 qblade <qblade@protonmail.com>
42 ;;; Copyright © 2021 Hyunseok Kim <lasnesne@lagunposprasihopre.org>
43 ;;; Copyright © 2021 David Larsson <david.larsson@selfhosted.xyz>
44 ;;; Copyright © 2021 WinterHound <winterhound@yandex.com>
45 ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
46 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
47 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
48 ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
49 ;;; Copyright © 2021 Artyom V. Poptsov <poptsov.artyom@gmail.com>
50 ;;;
51 ;;; This file is part of GNU Guix.
52 ;;;
53 ;;; GNU Guix is free software; you can redistribute it and/or modify it
54 ;;; under the terms of the GNU General Public License as published by
55 ;;; the Free Software Foundation; either version 3 of the License, or (at
56 ;;; your option) any later version.
57 ;;;
58 ;;; GNU Guix is distributed in the hope that it will be useful, but
59 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
60 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
61 ;;; GNU General Public License for more details.
62 ;;;
63 ;;; You should have received a copy of the GNU General Public License
64 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
65
66 (define-module (gnu packages admin)
67 #:use-module (guix build-system cmake)
68 #:use-module (guix build-system emacs)
69 #:use-module (guix build-system glib-or-gtk)
70 #:use-module (guix build-system gnu)
71 #:use-module (guix build-system go)
72 #:use-module (guix build-system meson)
73 #:use-module (guix build-system perl)
74 #:use-module (guix build-system python)
75 #:use-module (guix build-system ruby)
76 #:use-module (guix build-system trivial)
77 #:use-module (guix download)
78 #:use-module (guix git-download)
79 #:use-module (guix gexp)
80 #:use-module ((guix licenses) #:prefix license:)
81 #:use-module (guix packages)
82 #:use-module (guix utils)
83 #:use-module (gnu packages)
84 #:use-module (gnu packages algebra)
85 #:use-module (gnu packages autogen)
86 #:use-module (gnu packages autotools)
87 #:use-module (gnu packages base)
88 #:use-module (gnu packages bash)
89 #:use-module (gnu packages bison)
90 #:use-module (gnu packages boost)
91 #:use-module (gnu packages c)
92 #:use-module (gnu packages check)
93 #:use-module (gnu packages compression)
94 #:use-module (gnu packages cross-base)
95 #:use-module (gnu packages crypto)
96 #:use-module (gnu packages cryptsetup)
97 #:use-module (gnu packages cyrus-sasl)
98 #:use-module (gnu packages dns)
99 #:use-module (gnu packages elf)
100 #:use-module (gnu packages file)
101 #:use-module (gnu packages flex)
102 #:use-module (gnu packages gawk)
103 #:use-module (gnu packages gettext)
104 #:use-module (gnu packages gl)
105 #:use-module (gnu packages glib)
106 #:use-module (gnu packages gnome)
107 #:use-module (gnu packages gnupg)
108 #:use-module (gnu packages golang)
109 #:use-module (gnu packages groff)
110 #:use-module (gnu packages gtk)
111 #:use-module (gnu packages guile)
112 #:use-module (gnu packages hurd)
113 #:use-module (gnu packages image)
114 #:use-module (gnu packages imagemagick)
115 #:use-module (gnu packages inkscape)
116 #:use-module (gnu packages kerberos)
117 #:use-module (gnu packages libbsd)
118 #:use-module (gnu packages libftdi)
119 #:use-module (gnu packages libunwind)
120 #:use-module (gnu packages libusb)
121 #:use-module (gnu packages linux)
122 #:use-module (gnu packages lua)
123 #:use-module (gnu packages m4)
124 #:use-module (gnu packages mail)
125 #:use-module (gnu packages man)
126 #:use-module (gnu packages mcrypt)
127 #:use-module (gnu packages mpi)
128 #:use-module (gnu packages ncurses)
129 #:use-module (gnu packages openldap)
130 #:use-module (gnu packages patchutils)
131 #:use-module (gnu packages pciutils)
132 #:use-module (gnu packages pcre)
133 #:use-module (gnu packages perl)
134 #:use-module (gnu packages perl-check)
135 #:use-module (gnu packages pkg-config)
136 #:use-module (gnu packages polkit)
137 #:use-module (gnu packages popt)
138 #:use-module (gnu packages python)
139 #:use-module (gnu packages python-crypto)
140 #:use-module (gnu packages python-web)
141 #:use-module (gnu packages python-xyz)
142 #:use-module (gnu packages qt)
143 #:use-module (gnu packages readline)
144 #:use-module (gnu packages ruby)
145 #:use-module (gnu packages selinux)
146 #:use-module (gnu packages serialization)
147 #:use-module (gnu packages ssh)
148 #:use-module (gnu packages sphinx)
149 #:use-module (gnu packages tcl)
150 #:use-module (gnu packages terminals)
151 #:use-module (gnu packages texinfo)
152 #:use-module (gnu packages time)
153 #:use-module (gnu packages tls)
154 #:use-module (gnu packages version-control)
155 #:use-module (gnu packages web)
156 #:use-module (gnu packages xdisorg)
157 #:use-module (gnu packages xml)
158 #:use-module (gnu packages xorg))
159
160 ;; This package uses su instead of sudo (because of SpaceFM).
161 (define-public ktsuss
162 (package
163 (name "ktsuss")
164 (version "2.1")
165 (source
166 (origin
167 (method git-fetch)
168 (uri
169 (git-reference
170 (url "https://github.com/nomius/ktsuss")
171 (commit version)))
172 (sha256
173 (base32 "0q9931f9hp47v1n8scli4bdg2rkjpf5jf8v7jj2gdn83aia1r2hz"))
174 (file-name (git-file-name name version))))
175 (build-system glib-or-gtk-build-system)
176 (arguments
177 `(#:phases
178 (modify-phases %standard-phases
179 (add-after 'unpack 'patch-file-names
180 (lambda _
181 (substitute* "configure.ac"
182 (("supath=`which su 2>/dev/null`")
183 "supath=/run/setuid-programs/su"))
184 #t)))))
185 (native-inputs
186 (list autoconf automake libtool pkg-config))
187 (inputs
188 (list glib gtk+-2))
189 (synopsis "Graphical front end for @command{su}")
190 (description
191 "Ktsuss stands for ``Keep the @command{su} simple, stupid''.
192 It is a graphical version of @command{su} written in C and GTK+ 2, with
193 simplicity in mind.")
194 (home-page "https://github.com/nomius/ktsuss")
195 (license license:bsd-3)))
196
197 (define-public aide
198 (package
199 (name "aide")
200 (version "0.16.2")
201 (source
202 (origin
203 (method url-fetch)
204 (uri (string-append "https://github.com/aide/aide/releases/download/v"
205 version "/aide-" version ".tar.gz"))
206 (sha256
207 (base32 "15xp47sz7kk1ciffw3f5xw2jg2mb2lqrbr3q6p4bkbz5dap9iy8p"))))
208 (build-system gnu-build-system)
209 (native-inputs
210 (list bison flex))
211 (inputs
212 (list libgcrypt
213 libgpg-error
214 libmhash
215 `(,pcre "static")
216 pcre
217 `(,zlib "static")
218 zlib))
219 (synopsis "File and directory integrity checker")
220 (description
221 "AIDE (Advanced Intrusion Detection Environment) is a file and directory
222 integrity checker. It creates a database from the regular expression rules
223 that it finds from its configuration files. Once this database is initialized
224 it can be used to verify the integrity of the files. It has several message
225 digest algorithms that are used to check the integrity of files. All of the
226 usual file attributes can be checked for inconsistencies.")
227 (home-page "https://aide.github.io/")
228 (license license:gpl2+)))
229
230 (define-public progress
231 (package
232 (name "progress")
233 (version "0.16")
234 (source
235 (origin
236 (method git-fetch)
237 (uri (git-reference
238 (url "https://github.com/Xfennec/progress")
239 (commit (string-append "v" version))))
240 (sha256
241 (base32 "0gf10j9zd8spain94b5kigknwbdqajiy6fjsa5hhwsc1biz34hcj"))
242 (file-name (git-file-name name version))))
243 (build-system gnu-build-system)
244 (native-inputs
245 (list pkg-config which))
246 (inputs
247 (list ncurses))
248 (arguments
249 `(#:tests? #f ; no test suite
250 #:make-flags
251 (let ((target ,(%current-target-system)))
252 (list ,(string-append "CC=" (cc-for-target))
253 (string-append "PKG_CONFIG="
254 (if target
255 (string-append target "-pkg-config")
256 "pkg-config"))
257 (string-append "PREFIX=" (assoc-ref %outputs "out"))))
258 #:phases
259 (modify-phases %standard-phases
260 (delete 'configure)))) ; no configure script
261 (home-page "https://github.com/Xfennec/progress")
262 (synopsis "Program to view the progress of the coreutils commands")
263 (description "A program that looks for coreutils basic commands (cp, mv,
264 dd, tar, gzip/gunzip, cat, etc.) currently running on your system and displays
265 the percentage of copied data. It can also show estimated time and throughput,
266 and provides a \"top-like\" mode (monitoring).")
267 (license license:gpl3+)))
268
269 (define-public shepherd
270 (package
271 (name "shepherd")
272 (version "0.8.1")
273 (source (origin
274 (method url-fetch)
275 (uri (string-append "mirror://gnu/shepherd/shepherd-"
276 version ".tar.gz"))
277 (sha256
278 (base32
279 "0x9zr0x3xvk4qkb6jnda451d5iyrl06cz1bjzjsm0lxvjj3fabyk"))
280 (modules '((guix build utils)))
281 (snippet
282 '(begin
283 ;; Build with -O1 to work around <https://bugs.gnu.org/48368>.
284 (substitute* "Makefile.in"
285 (("compile --target")
286 "compile -O1 --target"))))))
287 (build-system gnu-build-system)
288 (arguments
289 '(#:configure-flags '("--localstatedir=/var")
290 #:make-flags '("GUILE_AUTO_COMPILE=0")))
291 (native-inputs
292 (list pkg-config
293 ;; This is the Guile we use as a cross-compiler...
294 guile-3.0))
295 (inputs
296 ;; ... and this is the one that appears in shebangs when cross-compiling.
297 (list guile-3.0
298 ;; The 'shepherd' command uses Readline when used interactively. It's
299 ;; an unusual use case though, so we don't propagate it.
300 guile-readline))
301 (synopsis "System service manager")
302 (description
303 "The GNU Shepherd is a daemon-managing daemon, meaning that it supervises
304 the execution of system services, replacing similar functionality found in
305 typical init systems. It provides dependency-handling through a convenient
306 interface and is based on GNU Guile.")
307 (license license:gpl3+)
308 (home-page "https://www.gnu.org/software/shepherd/")))
309
310 (define-public guile2.2-shepherd
311 (package
312 (inherit shepherd)
313 (name "guile2.2-shepherd")
314 (native-inputs
315 (list pkg-config guile-2.2))
316 (inputs
317 (list guile-2.2 guile2.2-readline))))
318
319 (define-public guile2.0-shepherd
320 (package
321 (inherit shepherd)
322 (name "guile2.0-shepherd")
323 (native-inputs
324 (list help2man pkg-config guile-2.0))
325 (inputs
326 (list guile-2.0))
327 (arguments
328 `(#:phases
329 (modify-phases %standard-phases
330 (add-after 'unpack 'patch-source
331 (lambda _
332 ;; (ice-9 threads) isn't available in guile-2.0
333 (substitute* "modules/shepherd.scm"
334 ((".*\\(ice-9 threads\\).*") ""))
335 #t)))
336 ,@(package-arguments shepherd)))))
337
338 (define-public cfm
339 (package
340 (name "cfm")
341 (version "0.6.6")
342 (source
343 (origin
344 (method git-fetch)
345 (uri (git-reference
346 (url "https://github.com/WillEccles/cfm")
347 (commit (string-append "v" version))))
348 (file-name (git-file-name name version))
349 (sha256
350 (base32 "14gapia902f29wa4dlrrj8jcwcff9bfvyhjccw9ddy2gxx2g8wmr"))))
351 (build-system gnu-build-system)
352 (arguments
353 `(#:tests? #f ; no test suite
354 #:make-flags
355 (list (string-append "CC=" ,(cc-for-target))
356 (string-append "PREFIX=" (assoc-ref %outputs "out")))
357 #:phases
358 (modify-phases %standard-phases
359 ;; Keeping xdg-open optional avoids a size increase of 293%.
360 (delete 'configure)))) ; no configure script
361 (home-page "https://eccles.dev/cfm/")
362 (synopsis
363 "Simple terminal file manager with @command{vi}-inspired key bindings")
364 (description
365 "The Cactus File Manager (@command{cfm}) helps you manage your files
366 visually from a text terminal. It aims to be simple and fast, with key bindings
367 inspired by @command{vi}.")
368 (license license:mpl2.0)))
369
370 (define-public cloud-utils
371 (package
372 (name "cloud-utils")
373 (version "0.32")
374 (source
375 (origin
376 (method url-fetch)
377 (uri (string-append
378 "https://launchpad.net/cloud-utils/trunk/"
379 version "/+download/cloud-utils-" version ".tar.gz"))
380 (sha256
381 (base32
382 "0xxdi55lzw7j91zfajw7jhd2ilsqj2dy04i9brlk8j3pvb5ma8hk"))))
383 (build-system gnu-build-system)
384 (arguments
385 '(#:make-flags
386 (let ((out (assoc-ref %outputs "out")))
387 (list (string-append "BINDIR=" out "/bin")
388 (string-append "MANDIR=" out "/share/man/man1")
389 (string-append "DOCDIR=" out "/share/doc")))
390 #:phases
391 (modify-phases %standard-phases
392 (delete 'configure)
393 (delete 'check)
394 (add-after 'install 'wrap
395 (lambda* (#:key outputs inputs #:allow-other-keys)
396 (let ((growpart (string-append (assoc-ref outputs "out")
397 "/bin/growpart")))
398 (wrap-program growpart
399 `("PATH" ":" prefix (,(dirname (which "sfdisk"))
400 ,(dirname (which "readlink"))))))
401 #t)))))
402 (inputs
403 (list python util-linux)) ; contains sfdisk for growpart
404 (home-page "https://launchpad.net/cloud-utils")
405 (synopsis "Set of utilities for cloud computing environments")
406 (description
407 "This package contains a set of utilities for cloud computing
408 environments:
409
410 @itemize @bullet
411 @item @command{cloud-localds} Create a disk for cloud-init to utilize nocloud
412 @item @command{cloud-publish-image} Wrapper for cloud image publishing
413 @item @command{cloud-publish-tarball} Wrapper for publishing cloud tarballs
414 @item @command{cloud-publish-ubuntu} Import a Ubuntu cloud image
415 @item @command{ec2metadata} Query and display @acronym{EC2,Amazon Elastic
416 Compute Cloud} metadata
417 @item @command{growpart} Grow a partition to fill the device
418 @item @command{mount-image-callback} Mount a file and run a command
419 @item @command{resize-part-image} Resize a partition image to a new size
420 @item @command{ubuntu-cloudimg-query} Get the latest Ubuntu
421 @acronym{AMI,Amazon Machine Image}
422 @item @command{ubuntu-ec2-run} Run a @acronym{EC2,Amazon Elastic Compute
423 Cloud} instance using Ubuntu
424 @item @command{vcs-run} Obtain a repository, and run a command
425 @item @command{write-mime-multipart} Handle multipart
426 @acronym{MIME,Multipurpose Internet Mail Extensions} messages
427 @end itemize")
428 (license license:gpl3)))
429
430 (define-public daemontools
431 (package
432 (name "daemontools")
433 (version "0.76")
434 (source (origin
435 (method url-fetch)
436 (uri (string-append
437 "https://cr.yp.to/daemontools/"
438 "daemontools-" version ".tar.gz"))
439 (sha256
440 (base32
441 "07scvw88faxkscxi91031pjkpccql6wspk4yrlnsbrrb5c0kamd5"))))
442 (build-system gnu-build-system)
443 (arguments
444 `(#:tests? #f ;; No tests as far as I can tell.
445 #:phases
446 (modify-phases %standard-phases
447 (add-after 'unpack 'chdir
448 (lambda _
449 (chdir ,(string-append "daemontools-" version))
450 #t))
451 (delete 'configure)
452 (add-before 'build 'patch
453 (lambda _
454 (substitute* "src/error.h"
455 (("extern int errno;")
456 "#include <errno.h>"))
457 #t))
458 (replace 'build
459 (lambda _
460 (invoke "package/compile")))
461 (replace 'install
462 (lambda* (#:key outputs #:allow-other-keys)
463 (let* ((out (assoc-ref outputs "out"))
464 (bin (string-append out "/bin")))
465 (for-each (lambda (file)
466 (install-file file bin))
467 (find-files "command")))
468 #t)))))
469 (synopsis "Tools for managing UNIX style services")
470 (description
471 "@code{daemontools} is a collection of tools for managing UNIX
472 services.")
473 (license license:public-domain)
474 (home-page "https://cr.yp.to/daemontools.html")))
475
476 (define-public daemonize
477 (package
478 (name "daemonize")
479 (version "1.7.8")
480 (source
481 (origin
482 (method git-fetch)
483 (uri (git-reference
484 (url "https://github.com/bmc/daemonize")
485 (commit (string-append "release-" version))))
486 (file-name (git-file-name name version))
487 (sha256
488 (base32 "0w4g0iyssyw7dd0061881z8s5czcl01mz6v00znax57zfxjqpvnm"))))
489 (build-system gnu-build-system)
490 (arguments '(#:tests? #f)) ; No tests available.
491 (home-page "http://software.clapper.org/daemonize/")
492 (synopsis "Command line utility to run a program as a daemon")
493 (description
494 "daemonize runs a command as a Unix daemon. It will close all open file
495 descriptors, change working directory of the process to the root filesystem,
496 reset its umask, run in the background, ignore I/O signals, handle
497 @code{SIGCLD}, etc. Most programs that are designed to be run as daemons do
498 that work for themselves. However, you’ll occasionally run across one that
499 does not. When you must run a daemon program that does not properly make
500 itself into a true Unix daemon, you can use daemonize to force it to run as a
501 true daemon.")
502 (license license:bsd-3)))
503
504 (define-public dfc
505 (package
506 (name "dfc")
507 (version "3.1.1")
508 (source
509 (origin
510 (method url-fetch)
511 (uri (string-append
512 "https://projects.gw-computing.net/attachments/download/615/dfc-"
513 version ".tar.gz"))
514 (sha256
515 (base32
516 "0m1fd7l85ckb7bq4c5c3g257bkjglm8gq7x42pkmpp87fkknc94n"))))
517 (build-system cmake-build-system)
518 (arguments '(#:tests? #f)) ; There are no tests.
519 (native-inputs `(("gettext" ,gettext-minimal)))
520 (home-page "https://projects.gw-computing.net/projects/dfc")
521 (synopsis "Display file system space usage using graphs and colors")
522 (description
523 "dfc (df color) is a modern version of df. It uses colors, draws pretty
524 graphs and can export its output to different formats.")
525 (license license:bsd-3)))
526
527 (define-public facter
528 (package
529 (name "facter")
530 (version "4.0.52")
531 (source (origin
532 (method git-fetch)
533 (uri (git-reference
534 (url "https://github.com/puppetlabs/facter")
535 (commit version)))
536 (file-name (git-file-name name version))
537 (sha256
538 (base32
539 "05j4q87sak1f1isj7ngzr59h3j3xskfwjjwfv0xd7lhwcaxg3a3c"))))
540 (build-system ruby-build-system)
541 (arguments
542 `(#:phases
543 (modify-phases %standard-phases
544 (add-after 'unpack 'delete-facter-ng-gemspec
545 (lambda _
546 ;; XXX: ruby-build-system incorrectly finds
547 ;; facter-ng.gemspec from this directory and tries to
548 ;; build that instead of the proper facter.gemspec.
549 ;; Just delete it as a workaround, as it appears to
550 ;; only exist for backwards-compatibility after the
551 ;; facter-ng->facter rename.
552 (delete-file "agent/facter-ng.gemspec")
553 #t))
554 (add-after 'unpack 'embed-absolute-references
555 ;; Refer to absolute executable file names to avoid propagation.
556 (lambda* (#:key inputs #:allow-other-keys)
557 (substitute* (find-files "lib/facter/resolvers" "\\.rb$")
558 (("execute\\('(which |)([^ ']+)" _ _ name)
559 (string-append "execute('" (or (which name)
560 name))))
561 #t))
562 (delete 'check)
563 (add-after 'wrap 'check
564 (lambda* (#:key tests? outputs #:allow-other-keys)
565 ;; XXX: The test suite wants to run Bundler and
566 ;; complains that the gemspec is invalid. For now
567 ;; just make sure that we can run the wrapped
568 ;; executable directly.
569 (if tests?
570 (invoke (string-append (assoc-ref outputs "out")
571 "/bin/facter")
572 ;; Many facts depend on /sys, /etc/os-release,
573 ;; etc, so we only run a small sample.
574 "facterversion" "architecture"
575 "kernel" "kernelversion")
576 (format #t "tests disabled~%"))
577 #t)))))
578 (inputs
579 `(("ruby-hocon" ,ruby-hocon)
580 ("ruby-sys-filesystem" ,ruby-sys-filesystem)
581 ("ruby-thor" ,ruby-thor)
582
583 ;; For ‘embed-absolute-references’.
584 ("dmidecode" ,dmidecode)
585 ("inetutils" ,inetutils) ; for ‘hostname’
586 ("iproute" ,iproute)
587 ("pciutils" ,pciutils)
588 ("util-linux" ,util-linux)))
589 (synopsis "Collect and display system facts")
590 (description
591 "Facter is a tool that gathers basic facts about nodes (systems) such
592 as hardware details, network settings, OS type and version, and more. These
593 facts can be collected on the command line with the @command{facter} command
594 or via the @code{facter} Ruby library.")
595 (home-page "https://github.com/puppetlabs/facter-ng")
596 (license license:expat)))
597
598 (define-public ttyload
599 (let ((revision "1")
600 (commit "f9495372801ce4b4dad98ad854203e694c31c1eb"))
601 (package
602 (name "ttyload")
603 (version (git-version "0.5.3" revision commit))
604 (source
605 (origin
606 (method git-fetch)
607 (uri (git-reference
608 (url "https://github.com/lindes/ttyload")
609 (commit commit)))
610 (file-name (git-file-name name version))
611 (sha256
612 (base32 "0ldb7a13b9v876c6cbrs78pkizj64drnqx95z5shfbwgpwfhr4im"))))
613 (build-system gnu-build-system)
614 (arguments
615 `(#:tests? #f ; no tests
616 #:make-flags
617 (list (string-append "CC=" ,(cc-for-target)))
618 #:phases
619 (modify-phases %standard-phases
620 (delete 'configure)
621 (replace 'install
622 (lambda* (#:key outputs #:allow-other-keys)
623 (let* ((out (assoc-ref outputs "out"))
624 (bin (string-append out "/bin")))
625 (install-file "ttyload" bin)))))))
626 (home-page "https://www.daveltd.com/src/util/ttyload/")
627 (synopsis "Console based color-coded graphs of CPU load average")
628 (description
629 "Show graphs for 1 minute, 5 minute, 15 minute load averages on the
630 console.")
631 ;; This package uses a modified version of the "ISC License".
632 (license (license:non-copyleft "file://LICENSE")))))
633
634 (define-public htop
635 (package
636 (name "htop")
637 (version "3.1.2")
638 (source
639 (origin
640 (method git-fetch)
641 (uri (git-reference
642 (url "https://github.com/htop-dev/htop")
643 (commit version)))
644 (sha256
645 (base32 "024qhrlmqgwmn6bwb5yiff9bhhdabryiphzx8y654k8r8vqi59j4"))
646 (file-name (git-file-name name version))))
647 (build-system gnu-build-system)
648 (inputs
649 (list ncurses))
650 (native-inputs
651 (list autoconf automake python-minimal-wrapper)) ; for scripts/MakeHeader.py
652 (home-page "https://htop.dev")
653 (synopsis "Interactive process viewer")
654 (description
655 "This is htop, an interactive process viewer. It is a text-mode
656 application (for console or X terminals) and requires ncurses.")
657 (license license:gpl2)))
658
659 (define-public bashtop
660 (package
661 (name "bashtop")
662 (version "0.9.25")
663 (source (origin
664 (method git-fetch)
665 (uri (git-reference
666 (url "https://github.com/aristocratos/bashtop")
667 (commit (string-append "v" version))))
668 (file-name (git-file-name name version))
669 (sha256
670 (base32
671 "07nlr6vmyb7yihaxj1fp424lmhwkdjl6mls92v90f6gsvikpa13v"))))
672 (build-system gnu-build-system)
673 (arguments
674 '(#:make-flags (list (string-append "PREFIX=" %output))
675 #:tests? #f ; bats test fails with loading load.bash
676 #:phases (modify-phases %standard-phases (delete 'configure))))
677 (home-page "https://github.com/aristocratos/bashtop")
678 (synopsis "Linux/OSX/FreeBSD resource monitor")
679 (description "Resource monitor that shows usage and stats for processor,
680 memory, disks, network and processes.")
681 (license license:asl2.0)))
682
683 (define-public bpytop
684 (package
685 (name "bpytop")
686 (version "1.0.68")
687 (source
688 (origin
689 (method url-fetch)
690 (uri (pypi-uri "bpytop" version))
691 (sha256
692 (base32 "1clvajbv7pzlya9s1xs6dvjic8rv3kx7aqiwnjxapiypx246gdjk"))))
693 (build-system python-build-system)
694 (inputs
695 (list python-psutil))
696 (arguments
697 `(#:phases
698 (modify-phases %standard-phases
699 ;; sanity-check phase fail, but the application seems to be working
700 (delete 'sanity-check)
701 (add-after 'install 'install-themes
702 (lambda* (#:key outputs #:allow-other-keys)
703 (let ((themes (string-append (assoc-ref outputs "out")
704 "/lib/python"
705 ,(version-major+minor
706 (package-version python))
707 "/site-packages/bpytop-themes")))
708 (mkdir-p themes)
709 (copy-recursively "themes" themes)))))))
710 (home-page
711 "https://github.com/aristocratos/bpytop")
712 (synopsis "Resource monitor")
713 (description "Resource monitor that shows usage and stats for processor,
714 memory, disks, network and processes. It's a Python port and continuation of
715 @command{bashtop}.")
716 (license license:asl2.0)))
717
718 (define-public pies
719 (package
720 (name "pies")
721 (version "1.7")
722 (source
723 (origin
724 (method url-fetch)
725 (uri (string-append "mirror://gnu/pies/pies-"
726 version ".tar.bz2"))
727 (sha256
728 (base32
729 "0ajcah2y6n55qc0ckspcx0hfpm1yb2xa1apcyij7mclic4q2y330"))))
730 (build-system gnu-build-system)
731 (arguments
732 '(#:phases (modify-phases %standard-phases
733 (add-before 'build 'patch-/bin/sh
734 (lambda* (#:key inputs #:allow-other-keys)
735 ;; Use the right shell when executing user-provided
736 ;; shell commands.
737 (let ((bash (assoc-ref inputs "bash")))
738 (substitute* '("src/progman.c" "src/comp.c")
739 (("\"/bin/sh\"")
740 (string-append "\"" bash "/bin/sh\"")))))))))
741 (home-page "https://www.gnu.org.ua/software/pies/")
742 (synopsis "Program invocation and execution supervisor")
743 (description
744 "GNU pies is a program that supervises the invocation and execution of
745 other programs. It reads the list of programs to be started from its
746 configuration file, executes them, and then monitors their status,
747 re-executing them as necessary.")
748 (license license:gpl3+)))
749
750 (define-public inetutils
751 (package
752 (name "inetutils")
753 (version "2.0")
754 (source (origin
755 (method url-fetch)
756 (uri (string-append "mirror://gnu/inetutils/inetutils-"
757 version ".tar.gz"))
758 (sha256
759 (base32
760 "0j1nb69bhg29cm4xkqqjh2ln1zqcj2lnpm92v638lpwrs11dypxl"))))
761 (build-system gnu-build-system)
762 (arguments
763 `(#:configure-flags '("--localstatedir=/var"
764
765 ;; Make sure 'PATH_PROCNET_DEV' gets defined when
766 ;; cross-compiling (by default it does not.)
767 ,@(if (%current-target-system)
768 '("--with-path-procnet-dev=/proc/net/dev")
769 '())
770 ,@(if (hurd-target?)
771 '("--disable-rcp"
772 "--disable-rexec"
773 "--disable-rexecd"
774 "--disable-rlogin"
775 "--disable-rlogind"
776 "--disable-rsh"
777 "--disable-rshd"
778 "--disable-uucpd"
779 "--disable-whois")
780 '()))
781 ;; Make sure that canonical "coreutils" package is not referred.
782 #:make-flags
783 (list (string-append "CPPFLAGS=-DPATHDEF_CP=\\\""
784 (assoc-ref %build-inputs "coreutils*")
785 "/bin/cp\\\""))
786 ;; On some systems, 'libls.sh' may fail with an error such as:
787 ;; "Failed to tell switch -a apart from -A".
788 #:parallel-tests? #f))
789 (inputs `(("coreutils*" ,coreutils)
790 ("shadow" ,shadow) ;for login (used in telnetd and rlogind)
791 ("ncurses" ,ncurses)
792 ("readline" ,readline))) ;for 'ftp'
793 (native-inputs (if (member (%current-system)
794 (package-supported-systems net-tools))
795 `(("netstat" ,net-tools)) ;for tests
796 '()))
797 (home-page "https://www.gnu.org/software/inetutils/")
798 (synopsis "Basic networking utilities")
799 (description
800 "Inetutils is a collection of common network programs, such as an ftp
801 client and server, a telnet client and server, an rsh client and server, and
802 hostname.")
803 (license license:gpl3+)))
804
805 (define-public shadow
806 (package
807 (name "shadow")
808 (version "4.8.1")
809 (source (origin
810 (method url-fetch)
811 (uri (string-append
812 "https://github.com/shadow-maint/shadow/releases/"
813 "download/" version "/shadow-" version ".tar.xz"))
814 (patches (search-patches "shadow-hurd-pctrl.patch"))
815 (sha256
816 (base32
817 "0qmfq50sdhz6xilgxvinblll8j2iqfl7hwk45bq744y4plq4dbd3"))))
818 (build-system gnu-build-system)
819 (arguments
820 `(;; Assume System V `setpgrp (void)', which is the default on GNU
821 ;; variants (`AC_FUNC_SETPGRP' is not cross-compilation capable.)
822 #:configure-flags
823 '(,@(if (hurd-target?)
824 '()
825 '("--with-libpam"))
826 "shadow_cv_logdir=/var/log"
827 "ac_cv_func_setpgrp_void=yes")
828
829 #:phases
830 (modify-phases %standard-phases
831 ,@(if (%current-target-system)
832 '((add-before 'configure 'set-runtime-shell
833 (lambda* (#:key inputs #:allow-other-keys)
834 (let ((shell (string-append
835 (assoc-ref inputs "bash")
836 "/bin/bash")))
837 (setenv "RUNTIME_SHELL" shell)
838 (substitute* "configure.ac"
839 (("\\$SHELL")
840 "$RUNTIME_SHELL"))))))
841 '())
842 (add-before 'build 'set-nscd-file-name
843 (lambda* (#:key inputs #:allow-other-keys)
844 ;; Use the right file name for nscd.
845 (let ((libc (assoc-ref inputs
846 ,(if (%current-target-system)
847 "cross-libc"
848 "libc"))))
849 (substitute* "lib/nscd.c"
850 (("/usr/sbin/nscd")
851 (string-append libc "/sbin/nscd")))
852 #t)))
853 (add-after 'install 'remove-groups
854 (lambda* (#:key outputs #:allow-other-keys)
855 ;; Remove `groups', which is already provided by Coreutils.
856 (let* ((out (assoc-ref outputs "out"))
857 (bin (string-append out "/bin"))
858 (man (string-append out "/share/man")))
859 (delete-file (string-append bin "/groups"))
860 (for-each delete-file (find-files man "^groups\\."))
861 #t))))))
862
863 (inputs
864 `(,@(if (hurd-target?)
865 '()
866 `(("linux-pam" ,linux-pam)))
867 ,@(if (%current-target-system)
868 `(("bash" ,bash-minimal))
869 '())))
870 (home-page "https://github.com/shadow-maint/shadow")
871 (synopsis "Authentication-related tools such as passwd, su, and login")
872 (description
873 "Shadow provides a number of authentication-related tools, including:
874 login, passwd, su, groupadd, and useradd.")
875
876 ;; The `vipw' program is GPLv2+.
877 ;; libmisc/salt.c is public domain.
878 (license license:bsd-3)))
879
880 (define-public mingetty
881 (package
882 (name "mingetty")
883 (version "1.08")
884 (source (origin
885 (method url-fetch)
886 (uri (string-append "mirror://sourceforge/mingetty/mingetty/"
887 version "/mingetty-" version ".tar.gz"))
888 (sha256
889 (base32
890 "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"))))
891 (build-system gnu-build-system)
892 (arguments
893 `(#:phases
894 (modify-phases %standard-phases
895 (replace 'configure
896 (lambda* (#:key inputs outputs target #:allow-other-keys)
897 (let* ((out (assoc-ref outputs "out"))
898 (man8 (string-append out "/share/man/man8"))
899 (sbin (string-append out "/sbin"))
900 (shadow (assoc-ref inputs "shadow"))
901 (login (string-append shadow "/bin/login")))
902 (substitute* "Makefile"
903 ,@(if (%current-target-system)
904 '((("CC=.*$")
905 (string-append "CC=" target "-gcc\n")))
906 '())
907 (("^SBINDIR.*")
908 (string-append "SBINDIR = " out
909 "/sbin\n"))
910 (("^MANDIR.*")
911 (string-append "MANDIR = " out
912 "/share/man/man8\n")))
913
914 ;; Pick the right 'login' by default.
915 (substitute* "mingetty.c"
916 (("\"/bin/login\"")
917 (string-append "\"" login "\"")))
918
919 (mkdir-p sbin)
920 (mkdir-p man8))
921 #t)))
922 #:tests? #f)) ; no tests
923 (inputs (list shadow))
924
925 (home-page "https://sourceforge.net/projects/mingetty")
926 (synopsis "Getty for the text console")
927 (description
928 "Small console getty that is started on the Linux text console,
929 asks for a login name and then transfers over to @code{login}. It is extended
930 to allow automatic login and starting any app.")
931 (license license:gpl2+)))
932
933 (define-public net-base
934 (package
935 (name "net-base")
936 (version "5.3")
937 (source (origin
938 (method url-fetch)
939 (uri (string-append
940 "mirror://debian/pool/main/n/netbase/netbase_"
941 version ".tar.xz"))
942 (sha256
943 (base32
944 "12xqjwg3p4rzmmh2iib6sigm9l29y3dgk74mmnw64k84jnbwdxl1"))))
945 (build-system trivial-build-system)
946 (arguments
947 `(#:modules ((guix build utils))
948 ;; This package consists solely of architecture-independent
949 ;; tables. Cross-compilation is pointless! Make sure we'll
950 ;; always get the same derivation.
951 #:target #f
952 #:allowed-references ()
953 #:builder (begin
954 (use-modules (guix build utils)
955 (srfi srfi-26))
956
957 (let* ((source (assoc-ref %build-inputs "source"))
958 (tar (assoc-ref %build-inputs "tar"))
959 (xz (assoc-ref %build-inputs "xz"))
960 (output (assoc-ref %outputs "out"))
961 (etc (string-append output "/etc")))
962 (setenv "PATH" (string-append xz "/bin"))
963 (invoke (string-append tar "/bin/tar") "xvf"
964 source)
965 (chdir ,(string-append "netbase-" version))
966 (mkdir-p etc)
967 (for-each copy-file
968 '("etc-services" "etc-protocols" "etc-rpc")
969 (map (cut string-append etc "/" <>)
970 '("services" "protocols" "rpc")))
971 #t))))
972 (native-inputs (list tar xz))
973 (synopsis "IANA protocol, port, and RPC number assignments")
974 (description
975 "This package provides the /etc/services, /etc/protocols, and /etc/rpc
976 files, which contain information about the IANA-assigned port, protocol, and
977 ONC RPC numbers.")
978 (home-page "https://packages.debian.org/sid/netbase")
979 (license license:gpl2)))
980
981 (define-public netcat
982 (package
983 (name "netcat")
984 (version "0.7.1")
985 (source (origin
986 (method url-fetch)
987 (uri (string-append "mirror://sourceforge/netcat/netcat/" version
988 "/netcat-" version ".tar.bz2"))
989 (sha256
990 (base32
991 "1frjcdkhkpzk0f84hx6hmw5l0ynpmji8vcbaxg8h5k2svyxz0nmm"))))
992 (build-system gnu-build-system)
993 (arguments
994 `(#:configure-flags
995 ;; By default, man and info pages are put in PREFIX/{man,info},
996 ;; but we want them in PREFIX/share/{man,info}.
997 (let ((out (assoc-ref %outputs "out")))
998 (list (string-append "--mandir=" out "/share/man")
999 (string-append "--infodir=" out "/share/info")))))
1000 (home-page "http://netcat.sourceforge.net")
1001 (synopsis "Read and write data over TCP/IP")
1002 (description
1003 "Netcat is a featured networking utility which reads and writes data
1004 across network connections, using the TCP/IP protocol. It is designed to be a
1005 reliable \"back-end\" tool that can be used directly or easily driven by other
1006 programs and scripts. At the same time, it is a feature-rich network debugging
1007 and exploration tool, since it can create almost any kind of connection you
1008 would need and has several interesting built-in capabilities.")
1009 (license license:gpl2+)))
1010
1011 (define-public netcat-openbsd
1012 (package
1013 (name "netcat-openbsd")
1014 (version "1.218-2")
1015 (source (origin
1016 (method git-fetch)
1017 (uri (git-reference
1018 (url "https://salsa.debian.org/debian/netcat-openbsd.git")
1019 (commit (string-append "debian/" version))))
1020 (file-name (git-file-name name version))
1021 (sha256
1022 (base32
1023 "1rj4nx0jdism1idc4fghahqbafhv72cpk7zlyq9czgvbps10d1kh"))))
1024 (build-system gnu-build-system)
1025 (arguments
1026 `(#:tests? #f ; no test suite
1027 #:make-flags
1028 (list (string-append "CC=" ,(cc-for-target)))
1029 #:phases
1030 (modify-phases %standard-phases
1031 (delete 'configure)
1032 (add-before 'build 'patch
1033 (lambda _
1034 (setenv "QUILT_PATCHES" "debian/patches")
1035 (invoke "quilt" "push" "-a")))
1036 (replace 'install
1037 (lambda* (#:key outputs #:allow-other-keys)
1038 (let* ((out (assoc-ref outputs "out"))
1039 (bin (string-append out "/bin"))
1040 (man (string-append out "/share/man/man1"))
1041 (doc (string-append out "/share/doc/netcat-openbsd-" ,version))
1042 (examples (string-append doc "/examples")))
1043 (install-file "nc" bin)
1044 (install-file "nc.1" man)
1045 (install-file "debian/copyright" doc)
1046 (copy-recursively "debian/examples" examples)))))))
1047 (inputs (list libbsd))
1048 (native-inputs (list pkg-config quilt))
1049 (home-page "https://packages.debian.org/sid/netcat-openbsd")
1050 (synopsis "Read and write data over TCP/IP")
1051 (description
1052 "Netcat is a simple Unix utility which reads and writes data across
1053 network connections using TCP or UDP protocol. It is designed to be a reliable
1054 \"back-end\" tool that can be used directly or easily driven by other programs
1055 and scripts. At the same time it is a feature-rich network debugging and
1056 exploration tool, since it can create almost any kind of connection you would
1057 need and has several interesting built-in capabilities.
1058
1059 This package contains the OpenBSD rewrite of netcat, including support for
1060 IPv6, proxies, and Unix sockets.")
1061 (license (list license:bsd-3
1062 license:bsd-2)))) ; atomicio.*, socks.c
1063
1064 (define-public sipcalc
1065 (package
1066 (name "sipcalc")
1067 (version "1.1.6")
1068 (source
1069 (origin
1070 (method url-fetch)
1071 (uri (string-append "http://www.routemeister.net/projects"
1072 "/sipcalc/files/sipcalc" "-" version ".tar.gz"))
1073 (sha256
1074 (base32
1075 "0mv3wndj4z2bsshh2k8d5sy3j8wxzgf8mzmmkvj1k8gpcz37dm6g"))))
1076 (build-system gnu-build-system)
1077 (home-page "https://www.routemeister.net/projects/sipcalc/")
1078 (synopsis "Command-line IP subnet calculator")
1079 (description
1080 "Sipcalc is an advanced command-line IP subnet calculator. It can take
1081 multiple forms of input (IPv4/IPv6/interface/hostname) and output a multitude
1082 of information about a given subnet.
1083
1084 Features include:
1085
1086 @itemize @bullet
1087 @item IPv4
1088 @itemize
1089 @item Retrieving of address information from interfaces.
1090 @item Classfull and CIDR output.
1091 @item Multiple address and netmask input and output formats (dotted quad, hex,
1092 number of bits).
1093 @item Output of broadcast address, network class, Cisco wildcard,
1094 hosts/range, network range.
1095 @item The ability to split a network based on a smaller netmask, now also with
1096 recursive runs on the generated subnets. (also IPv6)
1097 @end itemize
1098 @item IPv6
1099 @itemize
1100 @item Compressed and expanded input and output addresses.
1101 @item Standard IPv6 network output.
1102 @item v4 in v6 output.
1103 @item Reverse DNS address generation.
1104 @end itemize
1105 @end itemize\n")
1106 (license license:bsd-3)))
1107
1108 (define-public prips
1109 (package
1110 (name "prips")
1111 (version "1.1.1")
1112 (source
1113 (origin
1114 (method url-fetch)
1115 (uri (string-append "https://devel.ringlet.net/files/sys/"
1116 name "/" name "-" version ".tar.xz"))
1117 (sha256
1118 (base32 "1a33vbl4w603mk6mm5r3vhk87fy3dfk5wdpch0yd3ncbkg3fmvqn"))))
1119 (build-system gnu-build-system)
1120 (arguments
1121 `(#:make-flags (list (string-append "CC=" ,(cc-for-target)))
1122 #:test-target "test"
1123 #:phases (modify-phases %standard-phases
1124 (delete 'configure)
1125 (replace 'install
1126 (lambda* (#:key outputs #:allow-other-keys)
1127 (let ((out (assoc-ref outputs "out")))
1128 (install-file "prips"
1129 (string-append out "/bin"))))))))
1130 (native-inputs (list perl-test-harness))
1131 (synopsis "Tool that prints the IP addresses in a given range")
1132 (description "Prips can be used to print all of the IP addresses in
1133 a given range. This allows the enhancement of tools only work
1134 on one host at a time (e.g. whois).")
1135 (home-page "https://devel.ringlet.net/sysutils/prips/")
1136 (license license:gpl2+)))
1137
1138 (define-public alive
1139 (package
1140 (name "alive")
1141 (version "2.0.5")
1142 (source (origin
1143 (method url-fetch)
1144 (uri (string-append "mirror://gnu/alive/alive-"
1145 version ".tar.lz"))
1146 (sha256
1147 (base32
1148 "12ahlxbbrynm6md8qc872qr795lqpfkr8kwlsig40i4nznzkvkwl"))))
1149 (build-system gnu-build-system)
1150 (arguments '(#:configure-flags '("alive_cv_nice_ping=yes")))
1151 (inputs
1152 (list guile-3.0
1153 inetutils))
1154 (native-inputs
1155 (list lzip))
1156 (home-page "https://www.gnu.org/software/alive/")
1157 (synopsis "Autologin and keep-alive daemon")
1158 (description
1159 "GNU Alive sends periodic pings to a server, generally to keep a
1160 connection alive.")
1161 (license license:gpl3+)))
1162
1163 (define-public isc-dhcp
1164 (let* ((bind-major-version "9")
1165 (bind-minor-version "11")
1166 (bind-patch-version "36")
1167 (bind-release-type "") ; for patch release, use "-P"
1168 (bind-release-version "") ; for patch release, e.g. "6"
1169 (bind-version (string-append bind-major-version
1170 "."
1171 bind-minor-version
1172 "."
1173 bind-patch-version
1174 bind-release-type
1175 bind-release-version)))
1176 (package
1177 (name "isc-dhcp")
1178 (version "4.4.2-P1")
1179 (source (origin
1180 (method url-fetch)
1181 (uri (string-append "https://ftp.isc.org/isc/dhcp/"
1182 version "/dhcp-" version ".tar.gz"))
1183 (patches (search-patches "isc-dhcp-gcc-compat.patch"))
1184 (sha256
1185 (base32
1186 "06jsr0cg5rsmyibshrpcb9za0qgwvqccashdma7mlm1rflrh8pmh"))))
1187 (build-system gnu-build-system)
1188 (arguments
1189 `(#:parallel-build? #f
1190 #:configure-flags '("--with-randomdev=/dev/random")
1191 #:phases
1192 (modify-phases %standard-phases
1193 (add-after 'unpack 'replace-bundled-bind
1194 (lambda* (#:key inputs native-inputs #:allow-other-keys)
1195 (delete-file "bind/bind.tar.gz")
1196 (copy-file (assoc-ref inputs "bind-source-tarball")
1197 "bind/bind.tar.gz")
1198 (chmod "bind/bind.tar.gz" #o644)
1199 (substitute* "bind/version.tmp"
1200 (("^MAJORVER=.*")
1201 (format #f "MAJORVER=~a\n" ,bind-major-version))
1202 (("^MINORVER=.*")
1203 (format #f "MINORVER=~a\n" ,bind-minor-version))
1204 (("^PATCHVER=.*")
1205 (format #f "PATCHVER=~a\n" ,bind-patch-version))
1206 (("^RELEASETYPE=.*")
1207 (format #f "RELEASETYPE=~a\n" ,bind-release-type))
1208 (("^RELEASEVER=.*")
1209 (format #f "RELEASEVER=~a\n" ,bind-release-version)))
1210 #t))
1211 ,@(if (%current-target-system)
1212 '((add-before 'configure 'fix-bind-cross-compilation
1213 (lambda _
1214 (substitute* "configure"
1215 (("--host=\\$host")
1216 "--host=$host_alias"))
1217 ;; BIND needs a native compiler because the DHCP
1218 ;; build system uses the built 'gen' executable.
1219 (setenv "BUILD_CC" "gcc")
1220 #t)))
1221 '())
1222 (add-after 'configure 'post-configure
1223 (lambda* (#:key outputs #:allow-other-keys)
1224 ;; Point to the right client script, which will be
1225 ;; installed in a later phase.
1226 (substitute* "includes/dhcpd.h"
1227 (("#define[[:blank:]]+_PATH_DHCLIENT_SCRIPT.*")
1228 (let ((out (assoc-ref outputs "out")))
1229 (string-append "#define _PATH_DHCLIENT_SCRIPT \""
1230 out "/libexec/dhclient-script"
1231 "\"\n"))))
1232
1233 ;; During the 'build' phase, 'bind.tar.gz' is extracted, so
1234 ;; we must patch shebangs in there and make sure the right
1235 ;; shell is used.
1236 (with-directory-excursion "bind"
1237 (substitute* "Makefile"
1238 (("\\./configure ")
1239 (let ((sh (which "sh")))
1240 (string-append "./configure CONFIG_SHELL="
1241 sh " SHELL=" sh " "))))
1242
1243 (let ((bind-directory (string-append "bind-" ,bind-version)))
1244 (invoke "tar" "xf" "bind.tar.gz")
1245 (for-each patch-shebang
1246 (find-files bind-directory ".*"))
1247 (substitute* (string-append bind-directory "/configure")
1248 (("/usr/bin/file")
1249 (which "file")))
1250 (invoke "tar" "cf" "bind.tar.gz"
1251 bind-directory
1252 ;; avoid non-determinism in the archive
1253 "--sort=name"
1254 "--mtime=@0"
1255 "--owner=root:0"
1256 "--group=root:0")))))
1257 (add-after 'install 'post-install
1258 ;; TODO(core-updates): native-inputs isn't required anymore.
1259 (lambda* (#:key ,@(if (%current-target-system)
1260 '(native-inputs)
1261 '())
1262 inputs outputs #:allow-other-keys)
1263 ;; Install the dhclient script for GNU/Linux and make sure
1264 ;; if finds all the programs it needs.
1265 (let* ((out (assoc-ref outputs "out"))
1266 (libexec (string-append out "/libexec"))
1267 (coreutils (assoc-ref inputs "coreutils*"))
1268 (inetutils (assoc-ref inputs "inetutils"))
1269 (net-tools (assoc-ref inputs "net-tools"))
1270 (sed (assoc-ref inputs "sed*")))
1271 (substitute* "client/scripts/linux"
1272 (("/sbin/ip")
1273 (search-input-file inputs "/sbin/ip")))
1274
1275 (mkdir-p libexec)
1276 (copy-file "client/scripts/linux"
1277 (string-append libexec "/dhclient-script"))
1278
1279 (wrap-program
1280 (string-append libexec "/dhclient-script")
1281 `("PATH" ":" prefix
1282 ,(map (lambda (dir)
1283 (string-append dir "/bin:"
1284 dir "/sbin"))
1285 (list inetutils net-tools coreutils sed))))
1286 ;; TODO(core-updates): should not be required anymore,
1287 ;; once <https://issues.guix.gnu.org/49290> has been merged.
1288 ,@(if (%current-target-system)
1289 '((for-each
1290 (lambda (file)
1291 (substitute* file
1292 (((assoc-ref native-inputs "bash"))
1293 (assoc-ref inputs "bash"))))
1294 (list (string-append libexec
1295 "/dhclient-script")
1296 (string-append libexec
1297 "/.dhclient-script-real"))))
1298 '())
1299 #t))))))
1300
1301 (native-inputs
1302 (list perl file))
1303
1304 (inputs `(("inetutils" ,inetutils)
1305 ;; TODO(core-updates): simply make this unconditional
1306 ,@(if (%current-target-system)
1307 ;; for wrap-program
1308 `(("bash" ,(canonical-package bash-minimal)))
1309 '())
1310 ,@(if (hurd-target?) '()
1311 `(("net-tools" ,net-tools)
1312 ("iproute" ,iproute)))
1313
1314 ;; isc-dhcp bundles a copy of BIND, which has proved vulnerable
1315 ;; in the past. Use a BIND-VERSION of our choosing instead.
1316 ("bind-source-tarball"
1317 ,(origin
1318 (method url-fetch)
1319 (uri (string-append "https://ftp.isc.org/isc/bind9/"
1320 bind-version
1321 "/bind-" bind-version ".tar.gz"))
1322 (sha256
1323 (base32
1324 "108nh7hha4r0lb5hf1fn7lqaascvhsrghpz6afm5lf9vf2vgqly9"))))
1325
1326 ("coreutils*" ,coreutils)
1327 ("sed*" ,sed)))
1328
1329 (home-page "https://www.isc.org/dhcp/")
1330 (synopsis "Dynamic Host Configuration Protocol (DHCP) tools")
1331 (description
1332 "ISC's Dynamic Host Configuration Protocol (DHCP) distribution provides a
1333 reference implementation of all aspects of DHCP, through a suite of DHCP
1334 tools: server, client, and relay agent.")
1335 (license license:mpl2.0)
1336 (properties '((cpe-name . "dhcp"))))))
1337
1338 (define-public radvd
1339 (package
1340 (name "radvd")
1341 (version "2.19")
1342 (source
1343 (origin
1344 (method git-fetch)
1345 (uri (git-reference
1346 (url "https://github.com/radvd-project/radvd")
1347 (commit (string-append "v" version))))
1348 (file-name (git-file-name name version))
1349 (sha256
1350 (base32 "1df827m3vkjq2bcs5y9wg2cygvpdwl8ppl446qqhyym584gz54nl"))))
1351 (build-system gnu-build-system)
1352 (native-inputs
1353 (list autoconf
1354 automake
1355 bison
1356 check
1357 flex
1358 pkg-config))
1359 (arguments
1360 `(#:configure-flags '("--with-check")))
1361 (home-page "https://radvd.litech.org/")
1362 (synopsis "IPv6 Router Advertisement Daemon")
1363 (description
1364 "The Router Advertisement Daemon (radvd) is run on systems acting as IPv6
1365 routers. It sends Router Advertisement messages specified by RFC 2461
1366 periodically and when requested by a node sending a Router Solicitation
1367 message. These messages are required for IPv6 stateless autoconfiguration.")
1368 (license (license:non-copyleft "file://COPYRIGHT"))))
1369
1370 (define-public libpcap
1371 (package
1372 (name "libpcap")
1373 (version "1.10.1")
1374 (source (origin
1375 (method url-fetch)
1376 (uri (string-append "https://www.tcpdump.org/release/libpcap-"
1377 version ".tar.gz"))
1378 (sha256
1379 (base32
1380 "1m5x26vlbymp90k1qh0w3nj2nxzyvfrmfmwpj17k81dgri55ya7d"))))
1381 (build-system gnu-build-system)
1382 (native-inputs
1383 (list bison flex))
1384 (arguments
1385 ;; There are some tests in testprogs/, but no automated test suite.
1386 `(#:tests? #f
1387 #:phases
1388 (modify-phases %standard-phases
1389 (add-after 'unpack 'omit-static-library
1390 ;; Neither build nor install libpcap.a.
1391 (lambda _
1392 (substitute* "Makefile.in"
1393 ((" libpcap\\.a") "")
1394 ((" install-archive ") " ")))))))
1395 (home-page "https://www.tcpdump.org")
1396 (synopsis "Network packet capture library")
1397 (description
1398 "libpcap is an interface for user-level packet capture. It provides a
1399 portable framework for low-level network monitoring. Applications include
1400 network statistics collection, security monitoring, network debugging, etc.")
1401 (license (list license:bsd-4 ; fad-*.c and several other source files
1402 license:bsd-3 ; pcap/, sockutils.* & others
1403 license:bsd-2)))) ; the rest
1404
1405 (define-public tcpdump
1406 (package
1407 (name "tcpdump")
1408 (version "4.99.1")
1409 (source (origin
1410 (method url-fetch)
1411 (uri (string-append "https://www.tcpdump.org/release/tcpdump-"
1412 version ".tar.gz"))
1413 (sha256
1414 (base32
1415 "1ghfs5gifzrk3813zf9zalfbjs70wg6llz6q31k180r7zf2nkcvr"))))
1416 (build-system gnu-build-system)
1417 (inputs (list libpcap openssl))
1418 (native-inputs (list perl)) ; for tests
1419 (home-page "https://www.tcpdump.org/")
1420 (synopsis "Network packet analyzer")
1421 (description
1422 "Tcpdump is a command-line tool to analyze network traffic passing
1423 through the network interface controller.")
1424 (license license:bsd-3)))
1425
1426 (define-public jnettop
1427 (package
1428 (name "jnettop")
1429 (version "0.13.0")
1430 (source (origin
1431 (method url-fetch)
1432 (uri
1433 (string-append "https://web.archive.org/web/20161221100811/"
1434 "http://jnettop.kubs.info/dist/jnettop-"
1435 version ".tar.gz"))
1436 (sha256
1437 (base32
1438 "1855np7c4b0bqzhf1l1dyzxb90fpnvrirdisajhci5am6als31z9"))))
1439 (build-system gnu-build-system)
1440 (native-inputs
1441 (list pkg-config))
1442 (inputs
1443 (list glib ncurses libpcap))
1444 (home-page
1445 "https://web.archive.org/web/20160703195221/http://jnettop.kubs.info/wiki/")
1446 (synopsis "Visualize network traffic by bandwidth use")
1447 (description
1448 "Jnettop is a traffic visualiser, which captures traffic going
1449 through the host it is running from and displays streams sorted
1450 by bandwidth they use.")
1451 (license license:gpl2+)))
1452
1453 (define-public clusterssh
1454 (package
1455 (name "clusterssh")
1456 (version "4.13.2")
1457 (source (origin
1458 (method url-fetch)
1459 (uri (string-append "mirror://sourceforge/clusterssh/"
1460 "2.%20ClusterSSH%20Series%204/"
1461 "App-ClusterSSH-v" version ".tar.gz"))
1462 (sha256
1463 (base32
1464 "0rmk2p3f2wz1h092anidjclh212rv3gxyk0c641qk3frlrjnw6mp"))))
1465 (build-system perl-build-system)
1466 (arguments
1467 `(#:phases
1468 (modify-phases %standard-phases
1469 (add-after 'unpack 'refer-to-inputs
1470 (lambda* (#:key inputs #:allow-other-keys)
1471 (substitute* (list "lib/App/ClusterSSH/Config.pm"
1472 "t/15config.t")
1473 (("xterm")
1474 (which "xterm")))
1475 #t))
1476 (add-before 'check 'delete-failing-tests
1477 (lambda _
1478 ;; This checks whether all code is nicely formatted. The above
1479 ;; ‘refer-to-inputs’ phase breaks this pedantry, so disable it.
1480 (delete-file "t/perltidy.t")
1481 ;; Update the manifest so t/manifest.t happily passes.
1482 (substitute* "MANIFEST"
1483 (("t/perltidy.t\n") ""))
1484 #t))
1485 (add-after 'install 'augment-library-path
1486 (lambda* (#:key inputs outputs #:allow-other-keys)
1487 (let* ((out (assoc-ref outputs "out"))
1488 (bin (string-append out "/bin")))
1489 (with-directory-excursion bin
1490 (for-each
1491 (lambda (program)
1492 (wrap-program program
1493 `("PERL5LIB" ":" prefix
1494 ,(map (lambda (file-name)
1495 (string-append file-name
1496 "/lib/perl5/site_perl"))
1497 (cons out
1498 (map (lambda (input)
1499 (assoc-ref inputs input))
1500 ;; These may be propagated and hence
1501 ;; not explicitly listed as inputs.
1502 (list "perl-class-data-inheritable"
1503 "perl-devel-stacktrace"
1504 "perl-exception-class"
1505 "perl-tk"
1506 "perl-try-tiny"
1507 "perl-x11-protocol"
1508 "perl-x11-protocol-other")))))))
1509 (find-files "." ".*")))
1510 #t))))))
1511 (native-inputs
1512 (list perl-cpan-changes
1513 perl-file-slurp
1514 perl-file-which
1515 perl-module-build
1516 perl-readonly
1517 perl-test-differences
1518 perl-test-distmanifest
1519 perl-test-perltidy
1520 perl-test-pod
1521 perl-test-pod-coverage
1522 perl-test-trap
1523 perltidy))
1524 (inputs
1525 (list perl-exception-class
1526 perl-sort-naturally
1527 perl-tk
1528 perl-try-tiny
1529 perl-x11-protocol
1530 perl-x11-protocol-other
1531 xterm))
1532 ;; The clusterssh.sourceforge.net address requires login to view
1533 (home-page "https://sourceforge.net/projects/clusterssh/")
1534 (synopsis "Secure concurrent multi-server terminal control")
1535 (description
1536 "ClusterSSH controls a number of xterm windows via a single graphical
1537 console window to allow commands to be interactively run on multiple servers
1538 over ssh connections.")
1539 (license license:gpl2+)))
1540
1541 (define-public realmd
1542 (package
1543 (name "realmd")
1544 (version "0.17.0")
1545 (source
1546 (origin
1547 (method git-fetch)
1548 (uri (git-reference
1549 (url "https://github.com/freedesktop/realmd")
1550 (commit version)))
1551 (file-name (git-file-name name version))
1552 (sha256
1553 (base32
1554 "1c6q2a86kk2f1akzc36nh52hfwsmmc0mbp6ayyjxj4zsyk9zx5bf"))))
1555 (build-system gnu-build-system)
1556 (arguments
1557 `(#:configure-flags '("--with-systemd-unit-dir=no"
1558 "--with-systemd-journal=no"
1559 "--with-distro=GNU guix"
1560 "--disable-doc")
1561 #:phases
1562 (modify-phases %standard-phases
1563 (add-before 'install 'fix-service
1564 (lambda* (#:key outputs #:allow-other-keys)
1565 ;; GNU Guix does not have service config file, therefore we remove
1566 ;; the line that copies the file.
1567 (substitute* "Makefile"
1568 ((".*/service/realmd-.*") "")))))))
1569 (native-inputs
1570 `(("autoconf" ,autoconf)
1571 ("automake" ,automake)
1572 ("glib-bin" ,glib "bin")
1573 ("intltool" ,intltool)
1574 ("pkg-config" ,pkg-config)
1575 ("python" ,python)))
1576 (inputs
1577 (list glib mit-krb5 openldap polkit))
1578 (synopsis "DBus service for network authentication")
1579 (description "This package provides an on demand system DBus service.
1580 It allows callers to configure network authentication and domain membership
1581 in a standard way. Realmd discovers information about the domain or realm
1582 automatically and does not require complicated configuration in order to join
1583 a domain or realm. Dbus system service that manages discovery and enrollment in
1584 realms/domains like Active Directory or IPA.")
1585 (home-page "https://www.freedesktop.org/software/realmd/")
1586 (license license:lgpl2.1+)))
1587
1588 (define-public rename
1589 (package
1590 (name "rename")
1591 (version "1.10")
1592 (source (origin
1593 (method url-fetch)
1594 (uri (string-append
1595 "mirror://cpan/authors/id/R/RM/RMBARKER/File-Rename-"
1596 version ".tar.gz"))
1597 (sha256
1598 (base32
1599 "137m8s06r4n038ivlr5r1d9a7q9l7shmwpvnyx053r9ndhvbnkh5"))))
1600 (build-system perl-build-system)
1601 (arguments
1602 `(#:phases
1603 (modify-phases %standard-phases
1604 (add-after 'install 'find-itself
1605 ;; Fix run-time 'Can't locate File/Rename.pm in @INC' failure.
1606 (lambda* (#:key outputs #:allow-other-keys)
1607 (let* ((out (assoc-ref outputs "out"))
1608 (bin (string-append out "/bin")))
1609 (with-directory-excursion bin
1610 (for-each
1611 (lambda (program)
1612 (wrap-program program
1613 `("PERL5LIB" ":" prefix
1614 (,(string-append out "/lib/perl5/site_perl")))))
1615 (find-files "." ".*")))
1616 #t))))))
1617 (native-inputs
1618 (list perl-module-build perl-test-pod perl-test-pod-coverage))
1619 (home-page "https://metacpan.org/pod/distribution/File-Rename/rename.PL")
1620 (synopsis "Perl extension for renaming multiple files")
1621 (description
1622 "This package provides a Perl interface (@code{Perl::Rename}) as well
1623 as a command-line utility (@command{rename}) that can rename multiple files
1624 at once based on a Perl regular expression.")
1625 (license license:perl-license)))
1626
1627 (define-public rottlog
1628 (package
1629 (name "rottlog")
1630 (version "0.72.2")
1631 (source (origin
1632 (method url-fetch)
1633 (uri (string-append "mirror://gnu/rottlog/rottlog-"
1634 version ".tar.gz"))
1635 (sha256
1636 (base32
1637 "0751mb9l2f0jrk3vj6q8ilanifd121dliwk0c34g8k0dlzsv3kd7"))
1638 (modules '((guix build utils)))
1639 (snippet
1640 '(begin
1641 (substitute* "Makefile.in"
1642 (("-o \\$\\{LOG_OWN\\} -g \\$\\{LOG_GROUP\\}")
1643 ;; Don't try to chown root.
1644 "")
1645 (("mkdir -p \\$\\(ROTT_STATDIR\\)")
1646 ;; Don't attempt to create /var/lib/rottlog.
1647 "true"))
1648 #t))))
1649 (build-system gnu-build-system)
1650 (arguments
1651 `(#:configure-flags (list "ROTT_ETCDIR=/etc/rottlog" ;rc file location
1652 "--localstatedir=/var")
1653
1654 ;; Install example config files in OUT/etc.
1655 #:make-flags (list (string-append "ROTT_ETCDIR="
1656 (assoc-ref %outputs "out")
1657 "/etc"))
1658
1659 #:phases (modify-phases %standard-phases
1660 (add-after 'unpack 'patch-paths
1661 (lambda* (#:key inputs #:allow-other-keys)
1662 (substitute* "rc/rc"
1663 (("/usr/sbin/sendmail")
1664 (search-input-file inputs "/bin/mail")))
1665 #t))
1666 (add-after 'unpack 'fix-configure
1667 (lambda* (#:key inputs native-inputs #:allow-other-keys)
1668 ;; Replace outdated config.sub and config.guess:
1669 (for-each (lambda (file)
1670 (install-file
1671 (string-append
1672 (assoc-ref
1673 (or native-inputs inputs) "automake")
1674 "/share/automake-"
1675 ,(version-major+minor
1676 (package-version automake))
1677 "/" file) "."))
1678 '("config.sub" "config.guess"))
1679 #t))
1680 (add-after 'build 'set-packdir
1681 (lambda _
1682 ;; Set a default location for archived logs.
1683 (substitute* "rc/rc"
1684 (("packdir=\"\"")
1685 "packdir=\"/var/log\""))
1686 #t))
1687 (add-before 'install 'tweak-rc-weekly
1688 (lambda* (#:key inputs #:allow-other-keys)
1689 (substitute* "rc/weekly"
1690 (("/bin/kill")
1691 (string-append (assoc-ref inputs "coreutils*")
1692 "/bin/kill"))
1693 (("syslogd\\.pid")
1694 ;; The file is called 'syslog.pid' (no 'd').
1695 "syslog.pid"))
1696 #t))
1697 (add-after 'install 'install-info
1698 (lambda _
1699 (invoke "make" "install-info"))))))
1700 (native-inputs (list texinfo automake util-linux)) ; for 'cal'
1701 (inputs `(("coreutils*" ,coreutils)
1702 ("mailutils" ,mailutils)))
1703 (home-page "https://www.gnu.org/software/rottlog/")
1704 (synopsis "Log rotation and management")
1705 (description
1706 "GNU Rot[t]log is a program for managing log files. It is used to
1707 automatically rotate out log files when they have reached a given size or
1708 according to a given schedule. It can also be used to automatically compress
1709 and archive such logs. Rot[t]log will mail reports of its activity to the
1710 system administrator.")
1711 (license license:gpl3+)))
1712
1713 (define-public sudo
1714 (package
1715 (name "sudo")
1716 (version "1.9.8p2")
1717 (source (origin
1718 (method url-fetch)
1719 (uri
1720 (list (string-append "https://www.sudo.ws/sudo/dist/sudo-"
1721 version ".tar.gz")
1722 (string-append "ftp://ftp.sudo.ws/pub/sudo/OLD/sudo-"
1723 version ".tar.gz")))
1724 (sha256
1725 (base32
1726 "0b8gd15l2g22w4fhhz0gzmq5c8370klanmy2c1p3px6yly6qnfwy"))
1727 (modules '((guix build utils)))
1728 (snippet
1729 '(begin
1730 (delete-file-recursively "lib/zlib")))))
1731 (build-system gnu-build-system)
1732 (outputs (list "out"))
1733 (arguments
1734 `(#:configure-flags
1735 (list (string-append "--docdir=" (assoc-ref %outputs "out")
1736 "/share/doc/" ,name "-" ,version)
1737
1738 "--with-logpath=/var/log/sudo.log"
1739 "--with-rundir=/var/run/sudo" ; must be cleaned up at boot time
1740 "--with-vardir=/var/db/sudo"
1741 "--with-iologdir=/var/log/sudo-io"
1742
1743 ;; 'visudo.c' expects _PATH_MV to be defined, but glibc doesn't
1744 ;; provide it.
1745 (string-append "CPPFLAGS=-D_PATH_MV='\""
1746 (assoc-ref %build-inputs "coreutils")
1747 "/bin/mv\"'"))
1748
1749 ;; Avoid non-determinism; see <http://bugs.gnu.org/21918>.
1750 #:parallel-build? #f
1751
1752 #:phases
1753 (modify-phases %standard-phases
1754 (add-before 'configure 'pre-configure
1755 (lambda _
1756 (substitute* "src/sudo_usage.h.in"
1757 ;; Do not capture 'configure' arguments since we would
1758 ;; unduly retain references, and also because the
1759 ;; CPPFLAGS above would close the string literal
1760 ;; prematurely.
1761 (("@CONFIGURE_ARGS@") "\"\""))
1762 (substitute* (find-files "." "Makefile\\.in")
1763 ;; Allow installation as non-root.
1764 (("-o [[:graph:]]+ -g [[:graph:]]+")
1765 "")
1766 ;; Don't try to create /etc/sudoers.
1767 (("^install: (.*)install-sudoers(.*)" _ before after)
1768 (string-append "install: " before after "\n"))
1769 ;; Don't try to create /run/sudo.
1770 (("\\$\\(DESTDIR\\)\\$\\(rundir\\)")
1771 "$(TMPDIR)/dummy")
1772 ;; Install example sudo{,_logsrvd}.conf to the right place.
1773 (("\\$\\(DESTDIR\\)\\$\\(sysconfdir\\)")
1774 "$(DESTDIR)/$(docdir)/examples")
1775 ;; Don't try to create /var/db/sudo.
1776 (("\\$\\(DESTDIR\\)\\$\\(vardir\\)")
1777 "$(TMPDIR)/dummy"))
1778
1779 ;; ‘Checking existing [/etc/]sudoers file for syntax errors’ is
1780 ;; not the task of the build system, and fails.
1781 (substitute* "plugins/sudoers/Makefile.in"
1782 (("^pre-install:" match)
1783 (string-append match "\ndisabled-" match))))))
1784
1785 ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
1786 ;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
1787 #:tests? #f))
1788 (native-inputs
1789 (list groff))
1790 (inputs
1791 `(("coreutils" ,coreutils)
1792 ,@(if (hurd-target?)
1793 '()
1794 `(("linux-pam" ,linux-pam)))
1795 ("zlib" ,zlib)))
1796 (home-page "https://www.sudo.ws/")
1797 (synopsis "Run commands as root")
1798 (description
1799 "Sudo (su \"do\") allows a system administrator to delegate authority to
1800 give certain users (or groups of users) the ability to run some (or all)
1801 commands as root or another user while providing an audit trail of the
1802 commands and their arguments.")
1803
1804 ;; See <http://www.sudo.ws/sudo/license.html>.
1805 (license license:x11)))
1806
1807 (define-public opendoas
1808 (package
1809 (name "opendoas")
1810 (version "6.8.1")
1811 (source (origin
1812 (method git-fetch)
1813 (uri (git-reference
1814 (url "https://github.com/Duncaen/OpenDoas")
1815 (commit (string-append "v" version))))
1816 (file-name (git-file-name name version))
1817 (sha256
1818 (base32
1819 "0gfcssm21vdfg6kcrcc7hz1h4jmhy2zv29rfqyrrj3a6r9b5ah8p"))))
1820 (build-system gnu-build-system)
1821 (arguments
1822 `(#:phases
1823 (modify-phases %standard-phases
1824 (add-before 'configure 'pre-configure
1825 (lambda* (#:key outputs #:allow-other-keys)
1826 (substitute* "GNUmakefile"
1827 (("^\tchown.*$") ""))
1828 ;; OpenDoas look for binaries in safepath when a rule specify a
1829 ;; relative command, such as “permit keepenv :wheel cmd guix”.
1830 (substitute* "doas.c"
1831 (("safepath =" match)
1832 (string-append match " \""
1833 "/run/setuid-programs:"
1834 "/run/current-system/profile/bin:"
1835 "/run/current-system/profile/sbin:"
1836 "\" ")))
1837 #t))
1838 (replace 'configure
1839 ;; The configure script doesn't accept most of the default flags.
1840 (lambda* (#:key configure-flags #:allow-other-keys)
1841 ;; The configure script can be told which compiler to use only
1842 ;; through environment variables.
1843 (setenv "CC" ,(cc-for-target))
1844 (apply invoke "./configure" configure-flags))))
1845 #:configure-flags
1846 (list (string-append "--prefix=" (assoc-ref %outputs "out"))
1847 "--with-timestamp")
1848 ;; Compiler choice is not carried over from the configure script.
1849 #:make-flags
1850 (list (string-append "CC=" ,(cc-for-target)))
1851 #:tests? #f)) ; no test suite
1852 (native-inputs
1853 (list bison))
1854 (home-page "https://github.com/Duncaen/OpenDoas")
1855 (synopsis "Portable version of OpenBSD's doas command")
1856 (description "Doas is a minimal replacement for the venerable sudo. It was
1857 initially written by Ted Unangst of the OpenBSD project to provide 95% of the
1858 features of sudo with a fraction of the codebase.")
1859 (license (list license:bsd-3 ; libbsd/*
1860 license:isc)))) ; everything else
1861
1862 (define-public wpa-supplicant-minimal
1863 (package
1864 (name "wpa-supplicant-minimal")
1865 (version "2.9")
1866 (source (origin
1867 (method url-fetch)
1868 (uri (string-append
1869 "https://w1.fi/releases/wpa_supplicant-"
1870 version ".tar.gz"))
1871 (sha256
1872 (base32
1873 "05qzak1mssnxcgdrafifxh9w86a4ha69qabkg4bsigk499xyxggw"))
1874 (modules '((guix build utils)))
1875 (snippet
1876 '(begin
1877 (substitute* "wpa_supplicant/defconfig"
1878 ;; Disable D-Bus to save ~14MiB on the closure size.
1879 (("^CONFIG_CTRL_IFACE_DBUS" line _)
1880 (string-append "#" line)))
1881 #t))
1882 (patches
1883 (search-patches "wpa-supplicant-CVE-2021-27803.patch"
1884 "wpa-supplicant-CVE-2021-30004.patch"))))
1885 (build-system gnu-build-system)
1886 (arguments
1887 `(#:phases
1888 (modify-phases %standard-phases
1889 (replace 'configure
1890 (lambda _
1891 (chdir "wpa_supplicant")
1892 (copy-file "defconfig" ".config")
1893 (let ((port (open-file ".config" "al")))
1894 (display "
1895 CONFIG_DEBUG_SYSLOG=y
1896
1897 CONFIG_TLS=openssl
1898
1899 CONFIG_DRIVER_NL80211=y
1900 CFLAGS += $(shell pkg-config libnl-3.0 --cflags)
1901 CONFIG_LIBNL32=y
1902 CONFIG_READLINE=y\n" port)
1903 (close-port port))
1904 ;; Make sure we have a pkg-config when cross compiling
1905 (substitute* '(".config"
1906 "Android.mk"
1907 "Makefile"
1908 "dbus/Makefile")
1909 (("pkg-config")
1910 (or (which "pkg-config")
1911 (which (string-append ,(%current-target-system)
1912 "-pkg-config")))))
1913 #t))
1914 (add-after 'install 'install-documentation
1915 (lambda* (#:key outputs #:allow-other-keys)
1916 (let* ((out (assoc-ref outputs "out"))
1917 (doc (string-append out "/share/doc/wpa-supplicant"))
1918 (man (string-append out "/share/man"))
1919 (man5 (string-append man "/man5"))
1920 (man8 (string-append man "/man8")))
1921 (define (copy-man-page target)
1922 (lambda (file)
1923 (install-file file target)))
1924
1925 (mkdir-p man5) (mkdir man8)
1926 (for-each (copy-man-page man5)
1927 (find-files "doc/docbook" "\\.5"))
1928 (for-each (copy-man-page man8)
1929 (find-files "doc/docbook" "\\.8"))
1930
1931 ;; wpa_supplicant.conf(5) does not explain all configuration
1932 ;; options but refers to the example config file, so install it
1933 ;; along with READMEs.
1934 (for-each (lambda (file)
1935 (install-file file doc))
1936 '("README" "README-DPP" "README-HS20"
1937 "README-P2P" "README-WPS"
1938 "wpa_supplicant.conf"))
1939 #t))))
1940
1941 #:make-flags (list (string-append "CC=" ,(cc-for-target))
1942 (string-append "BINDIR=" (assoc-ref %outputs "out")
1943 "/sbin")
1944 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1945 "/lib"))
1946 #:tests? #f))
1947 (inputs
1948 (list readline libnl openssl))
1949 (native-inputs
1950 (list pkg-config))
1951 (home-page "https://w1.fi/wpa_supplicant/")
1952 (synopsis "Connecting to WPA and WPA2-protected wireless networks")
1953 (description
1954 "wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
1955 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in
1956 the client stations. It implements key negotiation with a WPA Authenticator
1957 and it controls the roaming and IEEE 802.11 authentication/association of the
1958 WLAN driver.
1959
1960 This package provides the @code{wpa_supplicant} daemon and the @code{wpa_cli}
1961 command.")
1962
1963 ;; In practice, this is linked against Readline, which makes it GPLv3+.
1964 (license license:bsd-3)
1965
1966 (properties `((cpe-name . "wpa_supplicant")))))
1967
1968 (define-public wpa-supplicant
1969 (package (inherit wpa-supplicant-minimal)
1970 (name "wpa-supplicant")
1971 (inputs (modify-inputs (package-inputs wpa-supplicant-minimal)
1972 (prepend dbus)))
1973 (arguments
1974 (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
1975 ((#:phases phases)
1976 `(modify-phases ,phases
1977 (add-after 'configure 'configure-for-dbus
1978 (lambda _
1979 (let ((port (open-file ".config" "al")))
1980 (display "
1981 CONFIG_CTRL_IFACE_DBUS_NEW=y
1982 CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
1983 (close-port port))
1984 #t))
1985 (add-after 'install-documentation 'install-dbus-conf
1986 (lambda* (#:key outputs #:allow-other-keys)
1987 (let* ((out (assoc-ref outputs "out"))
1988 (dir (string-append out "/etc/dbus-1/system.d")))
1989 (mkdir-p dir)
1990 (copy-file "dbus/dbus-wpa_supplicant.conf"
1991 (string-append dir "/wpa_supplicant.conf")))
1992 #t))))))))
1993
1994 (define-public wpa-supplicant-gui
1995 (package
1996 (inherit wpa-supplicant)
1997 (name "wpa-supplicant-gui")
1998 (inputs (modify-inputs (package-inputs wpa-supplicant)
1999 (prepend qtbase-5 qtsvg)))
2000 (native-inputs
2001 ;; For icons.
2002 (modify-inputs (package-native-inputs wpa-supplicant)
2003 (prepend imagemagick inkscape)))
2004 (arguments
2005 `(#:phases (modify-phases %standard-phases
2006 (add-after 'unpack 'chdir
2007 (lambda _
2008 (chdir "wpa_supplicant/wpa_gui-qt4")
2009 #t))
2010 (delete 'configure)
2011 (replace 'build
2012 (lambda _
2013 (invoke "qmake" "wpa_gui.pro")
2014 (invoke "make" "-j" (number->string (parallel-job-count)))
2015 (invoke "make" "-C" "icons")))
2016 (replace 'install
2017 (lambda* (#:key inputs outputs #:allow-other-keys)
2018 (let ((out (assoc-ref outputs "out"))
2019 (qt '("qtbase" "qtsvg")))
2020 (install-file "wpa_gui" (string-append out "/bin"))
2021 (install-file "wpa_gui.desktop"
2022 (string-append out "/share/applications"))
2023 (copy-recursively "icons/hicolor"
2024 (string-append out "/share/icons/hicolor"))
2025 (wrap-program (string-append out "/bin/wpa_gui")
2026 `("QT_PLUGIN_PATH" ":" prefix
2027 ,(map (lambda (label)
2028 (string-append (assoc-ref inputs label)
2029 "/lib/qt5/plugins/"))
2030 qt)))
2031 #t))))))
2032 (synopsis "Graphical user interface for WPA supplicant")))
2033
2034 (define-public hostapd
2035 (package
2036 (name "hostapd")
2037 (version "2.9")
2038 (source (origin
2039 (method url-fetch)
2040 (uri (string-append "https://w1.fi/releases/hostapd-" version
2041 ".tar.gz"))
2042 (sha256
2043 (base32
2044 "1mrbvg4v7vm7mknf0n29mf88k3s4a4qj6r4d51wq8hmjj1m7s7c8"))
2045 (patches
2046 (search-patches "wpa-supplicant-CVE-2021-27803.patch"
2047 "wpa-supplicant-CVE-2021-30004.patch"))))
2048 (build-system gnu-build-system)
2049 (arguments
2050 `(#:phases
2051 (modify-phases %standard-phases
2052 (replace 'configure
2053 (lambda _
2054 ;; This is mostly copied from 'wpa-supplicant' above.
2055 (chdir "hostapd")
2056 (copy-file "defconfig" ".config")
2057 (let ((port (open-file ".config" "al")))
2058 (display "
2059 CONFIG_LIBNL32=y
2060 CONFIG_IEEE80211R=y
2061 CONFIG_IEEE80211N=y
2062 CONFIG_IEEE80211AC=y\n" port)
2063 (close-port port))
2064 #t))
2065 (add-after 'unpack 'patch-pkg-config
2066 (lambda _
2067 (substitute* "src/drivers/drivers.mak"
2068 (("pkg-config")
2069 (or (which "pkg-config")
2070 (string-append ,(%current-target-system)
2071 "-pkg-config"))))
2072 #t))
2073 (add-after 'install 'install-man-pages
2074 (lambda* (#:key outputs #:allow-other-keys)
2075 (let* ((out (assoc-ref outputs "out"))
2076 (man (string-append out "/share/man"))
2077 (man1 (string-append man "/man1"))
2078 (man8 (string-append man "/man8")))
2079 (define (copy-man-page target)
2080 (lambda (file)
2081 (install-file file target)))
2082
2083 (for-each (copy-man-page man1)
2084 (find-files "." "\\.1"))
2085 (for-each (copy-man-page man8)
2086 (find-files "." "\\.8"))
2087 #t))))
2088
2089 #:make-flags (list (string-append "CC=" ,(cc-for-target))
2090 (string-append "BINDIR=" (assoc-ref %outputs "out")
2091 "/sbin")
2092 (string-append "LIBDIR=" (assoc-ref %outputs "out")
2093 "/lib"))
2094 #:tests? #f))
2095 (native-inputs (list pkg-config))
2096
2097 ;; There's an optional dependency on SQLite.
2098 (inputs (list openssl libnl))
2099 (home-page "https://w1.fi/hostapd/")
2100 (synopsis "Daemon for Wi-Fi access points and authentication servers")
2101 (description
2102 "hostapd is a user-space daemon for WiFi access points and authentication
2103 servers. It implements IEEE 802.11 access point management, IEEE
2104 802.1X/WPA/WPA2/EAP Authenticators, RADIUS client, EAP server, and RADIUS
2105 authentication server.")
2106
2107 ;; Same license as wpa_supplicant.
2108 (license license:bsd-3)))
2109
2110 (define-public wakelan
2111 (package
2112 (name "wakelan")
2113 (version "1.1")
2114 (source (origin
2115 (method url-fetch)
2116 (uri (string-append
2117 "ftp://ftp.gwdg.de/pub/linux/metalab/system/network/misc/wakelan-"
2118 version ".tar.gz"))
2119 (sha256
2120 (base32
2121 "0vydqpf44146ir6k87gmqaq6xy66xhc1gkr3nsd7jj3nhy7ypx9x"))))
2122 (build-system gnu-build-system)
2123 (arguments
2124 '(#:phases
2125 (modify-phases %standard-phases
2126 (replace 'configure
2127 (lambda* (#:key outputs #:allow-other-keys)
2128 (let ((out (assoc-ref outputs "out")))
2129 (mkdir-p (string-append out "/bin"))
2130 (mkdir-p (string-append out "/share/man/man1"))
2131
2132 ;; It's an old configure script that doesn't understand
2133 ;; the extra options we pass.
2134 (setenv "CONFIG_SHELL" (which "bash"))
2135 (invoke "./configure"
2136 (string-append "--prefix=" out)
2137 (string-append "--mandir=" out
2138 "/share/man"))))))
2139 #:tests? #f))
2140 (home-page "https://www.kernel.org") ; really, no home page
2141 (synopsis "Send a wake-on-LAN packet")
2142 (description
2143 "WakeLan broadcasts a properly formatted UDP packet across the local area
2144 network, which causes enabled computers to power on.")
2145 (license license:gpl2+)))
2146
2147 (define-public dmidecode
2148 (package
2149 (name "dmidecode")
2150 (version "3.3")
2151 (source
2152 (origin
2153 (method url-fetch)
2154 (uri (string-append "mirror://savannah/dmidecode/dmidecode-"
2155 version ".tar.xz"))
2156 (sha256
2157 (base32 "0m8lzg9rf1qssasiix672bxk5qwms90561g8hfkkhk31h2kkgiw2"))))
2158 (build-system gnu-build-system)
2159 (arguments
2160 `(#:tests? #f ; no 'check' target
2161 #:make-flags
2162 (list (string-append "CC=" ,(cc-for-target))
2163 (string-append "prefix="
2164 (assoc-ref %outputs "out")))
2165 #:phases
2166 (modify-phases %standard-phases
2167 (delete 'configure)))) ; no configure script
2168 (home-page "https://www.nongnu.org/dmidecode/")
2169 (synopsis "Read hardware information from the BIOS")
2170 (description
2171 "Dmidecode reports information about your system's hardware as described
2172 in your system BIOS according to the SMBIOS/DMI standard. This typically
2173 includes system manufacturer, model name, serial number, BIOS version, asset
2174 tag as well as a lot of other details of varying level of interest and
2175 reliability depending on the manufacturer. This will often include usage
2176 status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory
2177 module slots, and the list of I/O ports (e.g. serial, parallel, USB).")
2178 (license license:gpl2+)))
2179
2180 (define-public acpica
2181 (package
2182 (name "acpica")
2183 (version "20211217")
2184 (source (origin
2185 (method url-fetch)
2186 (uri (string-append
2187 "https://acpica.org/sites/acpica/files/acpica-unix2-"
2188 version ".tar.gz"))
2189 (sha256
2190 (base32
2191 "0521hmaw2zhi0mpgnaf2i83dykfgql4bx98cg7xqy8wmj649z194"))))
2192 (build-system gnu-build-system)
2193 (native-inputs (list flex bison))
2194 (arguments
2195 `(#:make-flags (list (string-append "PREFIX=" %output)
2196 (string-append "CC=" ,(cc-for-target))
2197 "HOST=_LINUX"
2198 "OPT_CFLAGS=-Wall -fno-strict-aliasing")
2199 #:tests? #f ; no 'check' target
2200 #:phases (modify-phases %standard-phases (delete 'configure))))
2201 (home-page "https://acpica.org/")
2202 (synopsis "Tools for the development and debugging of ACPI tables")
2203 (description
2204 "The @acronym{ACPICA, ACPI Component Architecture} project provides an
2205 OS-independent reference implementation of the @acronym{ACPI, Advanced
2206 Configuration and Power Interface} specification. ACPICA code contains those
2207 portions of ACPI meant to be directly integrated into the host OS as a
2208 kernel-resident subsystem, and a small set of tools to assist in developing and
2209 debugging ACPI tables.
2210
2211 This package contains only the user-space tools needed for ACPI table
2212 development, not the kernel implementation of ACPI.")
2213 (license license:gpl2))) ; dual GPLv2/ACPICA Licence
2214
2215 (define-public s-tui
2216 (package
2217 (name "s-tui")
2218 (version "1.1.3")
2219 (source
2220 (origin
2221 (method url-fetch)
2222 (uri (pypi-uri "s-tui" version))
2223 (sha256
2224 (base32 "1l2ik5iwmb8vxa2aqdy62zfy3zfzbpq5a0pgpka2vvlw9ivpqy5p"))))
2225 (build-system python-build-system)
2226 (inputs
2227 (list python-psutil python-urwid))
2228 (home-page "https://github.com/amanusk/s-tui")
2229 (synopsis "Interactive terminal stress test and monitoring tool")
2230 (description
2231 "The Stress Terminal UI displays graphs of the CPU frequency,
2232 utilization, temperature and power.")
2233 (license license:gpl2+)))
2234
2235 (define-public stress
2236 (package
2237 (name "stress")
2238 (version "1.0.5")
2239 (source (origin
2240 (method url-fetch)
2241 (uri (string-append "mirror://debian/pool/main/s/stress/stress_"
2242 version ".orig.tar.gz"))
2243 (sha256
2244 (base32
2245 "09shpd85g8dvpiw0mnwykss676g0s7lbi8ab37xjinb5lfff960p"))))
2246 (build-system gnu-build-system)
2247 (native-inputs
2248 (list autoconf automake))
2249 (home-page "https://packages.debian.org/sid/stress")
2250 (synopsis "Impose load on and stress test a computer system")
2251 (description
2252 "Stress is a tool that imposes a configurable amount of CPU, memory, I/O,
2253 or disk stress on a POSIX-compliant operating system and reports any errors it
2254 detects.
2255
2256 Stress is not a benchmark. It is a tool used by system administrators to
2257 evaluate how well their systems will scale, by kernel programmers to evaluate
2258 perceived performance characteristics, and by systems programmers to expose
2259 the classes of bugs which only or more frequently manifest themselves when the
2260 system is under heavy load.")
2261 (license license:gpl2+)))
2262
2263 (define-public detox
2264 (package
2265 (name "detox")
2266 (version "1.4.5")
2267 (source (origin
2268 (method git-fetch)
2269 (uri (git-reference
2270 (url "https://github.com/dharple/detox")
2271 (commit (string-append "v" version))))
2272 (file-name (git-file-name name version))
2273 (sha256
2274 (base32
2275 "116bgpbkh3c96h6vq0880rmnpb5kbnnlvvkpsrcib6928bj8lfvi"))))
2276 (build-system gnu-build-system)
2277 (native-inputs
2278 (list autoconf automake flex))
2279 (arguments
2280 `(#:phases (modify-phases %standard-phases
2281 (add-after 'unpack 'delete-configure
2282 ;; The "configure" script is present, but otherwise the
2283 ;; project is not bootstrapped: missing install-sh and
2284 ;; Makefile.in, so delete it so the bootstrap phase will
2285 ;; take over.
2286 (lambda _ (delete-file "configure") #t))
2287 (replace 'check
2288 (lambda _
2289 (invoke "./tests/test.sh" "src/detox"))))))
2290 (home-page "https://github.com/dharple/detox")
2291 (synopsis "Clean up file names")
2292 (description
2293 "Detox is a program that renames files to make them easier to work with
2294 under Unix and related operating systems. Spaces and various other unsafe
2295 characters (such as \"$\") get replaced with \"_\". ISO 8859-1 (Latin-1)
2296 characters can be replaced as well, as can UTF-8 characters.")
2297 (license license:bsd-3)))
2298
2299 (define-public testdisk
2300 (package
2301 (name "testdisk")
2302 (version "7.1")
2303 (source (origin
2304 (method url-fetch)
2305 (uri (string-append "https://www.cgsecurity.org/testdisk-"
2306 version ".tar.bz2"))
2307 (sha256
2308 (base32
2309 "1zlh44w67py416hkvw6nrfmjickc2d43v51vcli5p374d5sw84ql"))))
2310 (build-system gnu-build-system)
2311 (inputs
2312 (list ntfs-3g
2313 `(,util-linux "lib")
2314 openssl
2315 ;; FIXME: add reiserfs.
2316 zlib
2317 e2fsprogs
2318 libjpeg-turbo
2319 ncurses))
2320 (home-page "https://www.cgsecurity.org/wiki/TestDisk")
2321 (synopsis "Data recovery tool")
2322 (description
2323 "TestDisk is a program for data recovery, primarily designed to help
2324 recover lost partitions and/or make non-booting disks bootable again.")
2325 (license license:gpl2+)))
2326
2327 (define-public tree
2328 (package
2329 (name "tree")
2330 (version "1.8.0")
2331 (source (origin
2332 (method url-fetch)
2333 (uri (string-append
2334 "http://mama.indstate.edu/users/ice/tree/src/tree-"
2335 version ".tgz"))
2336 (sha256
2337 (base32 "1hmpz6k0mr6salv0nprvm1g0rdjva1kx03bdf1scw8a38d5mspbi"))))
2338 (build-system gnu-build-system)
2339 (arguments
2340 '(#:phases (modify-phases %standard-phases (delete 'configure))
2341 #:tests? #f ; no check target
2342 #:make-flags (let ((out (assoc-ref %outputs "out")))
2343 (list (string-append "prefix=" out)))))
2344 (synopsis "Recursively list the contents of a directory")
2345 (description
2346 "Tree is a recursive directory listing command that produces a depth
2347 indented listing of files, which is colorized ala dircolors if the LS_COLORS
2348 environment variable is set and output is to tty.")
2349 (home-page "http://mama.indstate.edu/users/ice/tree/")
2350 (license license:gpl2+)))
2351
2352 (define-public lr
2353 (package
2354 (name "lr")
2355 (version "1.5.1")
2356 (source
2357 (origin
2358 (method git-fetch)
2359 (uri (git-reference
2360 (url "https://git.vuxu.org/lr/")
2361 (commit (string-append "v" version))))
2362 (file-name (git-file-name name version))
2363 (sha256
2364 (base32 "1wv2acm4r5y5gg6f64v2hiwpg1f3lnr4fy1a9zssw77fmdc7ys3j"))))
2365 (build-system gnu-build-system)
2366 (arguments
2367 `(#:tests? #f
2368 #:make-flags (list (string-append "CC=" ,(cc-for-target))
2369 (string-append "PREFIX=" %output))
2370 #:phases (modify-phases %standard-phases
2371 (delete 'configure))))
2372 (synopsis "Tool to generate customized file listings")
2373 (description
2374 "lr is a tool for generating file listings, which includes the best
2375 features of ls(1), find(1), stat(1) and du(1).")
2376 (home-page "https://git.vuxu.org/lr/about")
2377 (license license:expat)))
2378
2379 (define-public direvent
2380 (package
2381 (name "direvent")
2382 (version "5.2")
2383 (source (origin
2384 (method url-fetch)
2385 (uri (string-append "mirror://gnu/direvent/direvent-"
2386 version ".tar.gz"))
2387 (sha256
2388 (base32
2389 "0m9vi01b1km0cpknflyzsjnknbava0s1n6393b2bpjwyvb6j5613"))
2390 (modules '((guix build utils)))
2391 (snippet
2392 #~(begin
2393 (substitute* "tests/testsuite"
2394 (("#![[:blank:]]?/bin/sh")
2395 "#!$SHELL"))))))
2396 (build-system gnu-build-system)
2397 (arguments
2398 (list #:phases
2399 #~(modify-phases %standard-phases
2400 (add-before 'build 'patch-/bin/sh
2401 (lambda* (#:key inputs #:allow-other-keys)
2402 ;; Use the right shell when executing the watcher and
2403 ;; user-provided shell commands.
2404 (let ((bash (assoc-ref inputs "bash")))
2405 (substitute* '("src/direvent.c" "src/progman.c")
2406 (("\"/bin/sh\"")
2407 (string-append "\"" bash "/bin/sh\"")))
2408
2409 ;; Adjust the 'shell.at' test accordingly.
2410 (substitute* "tests/testsuite"
2411 (("SHELL=/bin/sh")
2412 (string-append "SHELL=" bash "/bin/sh")))))))))
2413 (home-page "https://www.gnu.org.ua/software/direvent/")
2414 (synopsis "Daemon to monitor directories for events such as file removal")
2415 (description
2416 "A daemon that monitors directories for events, such as creating,
2417 deleting or modifying files. It can monitor different sets of directories for
2418 different events. When an event is detected, direvent calls a specified
2419 external program with information about the event, such as the location
2420 within the file system where it occurred. Thus, \"direvent\" provides an
2421 easy way to react immediately if given files undergo changes, for example, to
2422 track changes in important system configuration files.")
2423 (license license:gpl3+)))
2424
2425 (define-public libcap-ng
2426 (package
2427 (name "libcap-ng")
2428 (version "0.8.2")
2429 (source (origin
2430 (method url-fetch)
2431 (uri (string-append
2432 "https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-"
2433 version ".tar.gz"))
2434 (sha256
2435 (base32
2436 "1sasp1n154aqy9fz0knlb966svm7xg1zjhg1vr4q839bgjvq7h2j"))))
2437 (build-system gnu-build-system)
2438 (arguments
2439 `(#:configure-flags
2440 (list "--without-python")))
2441 (home-page "https://people.redhat.com/sgrubb/libcap-ng/")
2442 (synopsis "Library for more easily working with POSIX capabilities")
2443 (description
2444 "The libcap-ng library is intended to make programming with POSIX
2445 capabilities easier than the traditional libcap library. It includes
2446 utilities that can analyse all currently running applications and print out
2447 any capabilities and whether or not it has an open ended bounding set. The
2448 included utilities are designed to let admins and developers spot apps from
2449 various ways that may be running with too much privilege.")
2450 ;; The library is lgpl2.1+, but also ships some utils which are gpl2+.
2451 (license (list license:lgpl2.1+ license:gpl2+))))
2452
2453 (define-public smartmontools
2454 (package
2455 (name "smartmontools")
2456 (version "7.2")
2457 (source (origin
2458 (method url-fetch)
2459 (uri (string-append
2460 "mirror://sourceforge/smartmontools/smartmontools/"
2461 version "/smartmontools-" version ".tar.gz"))
2462 (sha256
2463 (base32
2464 "1mlc25sd5rgj5xmzcllci47inmfdw7cp185fday6hc9rwqkqmnaw"))))
2465 (build-system gnu-build-system)
2466 (inputs (list libcap-ng))
2467 (home-page "https://www.smartmontools.org/")
2468 (synopsis "S.M.A.R.T. harddisk control and monitoring tools")
2469 (description
2470 "The smartmontools package contains utility programs to control and
2471 monitor storage systems using the Self-Monitoring, Analysis and Reporting
2472 Technology System (@dfn{S.M.A.R.T.}) built into most modern ATA and SCSI hard
2473 disks. In many cases, these utilities will provide advanced warning of disk
2474 degradation and failure.")
2475 (license license:gpl2+)))
2476
2477 (define-public fdupes
2478 (package
2479 (name "fdupes")
2480 (version "2.1.2")
2481 (source
2482 (origin
2483 (method url-fetch)
2484 (uri (string-append "https://github.com/adrianlopezroche/fdupes/"
2485 "releases/download/v" version "/"
2486 "fdupes-" version ".tar.gz"))
2487 (sha256
2488 (base32 "1g9p50xhi2sp0hqxml4w2k0kq9jv988q2yxm347z5349dlxvap6d"))))
2489 (build-system gnu-build-system)
2490 (inputs
2491 (list ncurses pcre2))
2492 (home-page "https://github.com/adrianlopezroche/fdupes")
2493 (synopsis "Identify duplicate files")
2494 (description
2495 "fdupes is a program for identifying duplicate files residing within
2496 specified directories.")
2497 (license license:expat)))
2498
2499 (define-public graphios
2500 (package
2501 (name "graphios")
2502 (version "2.0.3")
2503 (source
2504 (origin
2505 (method url-fetch)
2506 (uri (pypi-uri "graphios" version))
2507 (sha256
2508 (base32
2509 "1h87hvc315wg6lklbf4l7csd3n5pgljwrfli1p3nasdi0izgn66i"))))
2510 (build-system python-build-system)
2511 (arguments
2512 ;; Be warned: Building with Python 3 succeeds, but the build process
2513 ;; throws a syntax error that is ignored.
2514 `(#:python ,python-2
2515 #:phases
2516 (modify-phases %standard-phases
2517 (add-before 'build 'fix-setup.py
2518 (lambda* (#:key outputs #:allow-other-keys)
2519 ;; Fix hardcoded, unprefixed file names.
2520 (let ((out (assoc-ref outputs "out")))
2521 (substitute* '("setup.py")
2522 (("/etc") (string-append out "/etc"))
2523 (("/usr") out)
2524 (("distro_ver = .*") "distro_ver = ''"))
2525 #t))))))
2526 (home-page "https://github.com/shawn-sterling/graphios")
2527 (synopsis "Emit Nagios metrics to Graphite, Statsd, and Librato")
2528 (description
2529 "Graphios is a script to emit nagios perfdata to various upstream metrics
2530 processing and time-series systems. It's currently compatible with Graphite,
2531 Statsd, Librato and InfluxDB. Graphios can emit Nagios metrics to any number
2532 of supported upstream metrics systems simultaneously.")
2533 (license license:gpl2+)))
2534
2535 (define-public ansible-core
2536 (package
2537 (name "ansible-core")
2538 (version "2.11.6")
2539 (source
2540 (origin
2541 (method url-fetch)
2542 (uri (pypi-uri "ansible-core" version))
2543 (sha256
2544 (base32 "0fih7nxszni8imi5sywsifd976v77ydhip43pzg7dd65qy1h5mck"))))
2545 (build-system python-build-system)
2546 (arguments
2547 `(#:modules ((guix build python-build-system)
2548 (guix build utils)
2549 (ice-9 ftw))
2550 #:phases
2551 (modify-phases %standard-phases
2552 ;; Several ansible commands (ansible-config, ansible-console, etc.)
2553 ;; are just symlinks to a single ansible executable. The ansible
2554 ;; executable behaves differently based on the value of sys.argv[0].
2555 ;; This does not work well with our wrap phase, and therefore the
2556 ;; following two phases are required as a workaround.
2557 (add-after 'unpack 'hide-wrapping
2558 (lambda _
2559 ;; Overwrite sys.argv[0] to hide the wrapper script from it.
2560 (substitute* "bin/ansible"
2561 (("import traceback" all)
2562 (string-append all "
2563 import re
2564 sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
2565 ")))))
2566 (add-after 'install 'replace-symlinks
2567 (lambda* (#:key outputs #:allow-other-keys)
2568 ;; Replace symlinks with duplicate copies of the ansible
2569 ;; executable so that sys.argv[0] has the correct value.
2570 (define bin (string-append (assoc-ref outputs "out") "/bin"))
2571 (with-directory-excursion bin
2572 (for-each
2573 (lambda (ansible-symlink)
2574 (delete-file ansible-symlink)
2575 (copy-file "ansible" ansible-symlink))
2576 (scandir "." (lambda (x)
2577 (and (eq? 'symlink (stat:type (lstat x)))
2578 (string-prefix? "ansible-" x)
2579 (string=? "ansible" (readlink x)))))))))
2580 (add-after 'unpack 'preserve-pythonpath
2581 (lambda _
2582 (substitute* "test/lib/ansible_test/_internal/ansible_util.py"
2583 (("PYTHONPATH=get_ansible_python_path\\(args\\)" all)
2584 (string-append all "+ ':' + os.environ['GUIX_PYTHONPATH']")))))
2585 (add-after 'unpack 'patch-paths
2586 (lambda* (#:key inputs outputs #:allow-other-keys)
2587 (substitute* "lib/ansible/module_utils/compat/selinux.py"
2588 (("libselinux.so.1" name)
2589 (string-append (assoc-ref inputs "libselinux")
2590 "/lib/" name)))
2591 (substitute* "test/units/modules/test_async_wrapper.py"
2592 (("/usr/bin/python")
2593 (which "python")))))
2594 (replace 'check
2595 ;; The environment for the test suite can be tricky to get right.
2596 ;; The environment used for Ansible's CI defined in the following
2597 ;; Dockerfile can be used as a reference:
2598 ;; https://raw.githubusercontent.com/ansible/
2599 ;; default-test-container/master/Dockerfile.
2600 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
2601 (when tests?
2602 ;; Otherwise Ansible fails to create its config directory.
2603 (setenv "HOME" "/tmp")
2604 (setenv "PATH" (string-append (getenv "PATH") ":"
2605 (assoc-ref outputs "out") "/bin"))
2606 (add-installed-pythonpath inputs outputs)
2607 ;; This test module messes up with sys.path and causes many
2608 ;; test failures.
2609 (delete-file "test/units/_vendor/test_vendor.py")
2610 ;; The test fails when run in the container, for reasons
2611 ;; unknown.
2612 (delete-file "test/units/utils/test_display.py")
2613 ;; This test fail for reasons unknown.
2614 (delete-file "test/units/cli/test_adhoc.py")
2615 ;; The test suite needs to be run with 'ansible-test', which
2616 ;; does some extra environment setup. Taken from
2617 ;; https://raw.githubusercontent.com/ansible/ansible/\
2618 ;; devel/test/utils/shippable/shippable.sh.
2619 (invoke "ansible-test" "units" "-v")))))))
2620 (native-inputs
2621 (list openssh
2622 openssl
2623 python-mock
2624 python-pycrypto
2625 python-pytest
2626 python-pytest-forked
2627 python-pytest-mock
2628 python-pytest-xdist
2629 python-pytz))
2630 (inputs ;optional dependencies captured in wrap scripts
2631 (list libselinux python-paramiko python-passlib python-pexpect
2632 sshpass))
2633 (propagated-inputs ;core dependencies listed in egg-info/requires.txt
2634 (list python-cryptography
2635 python-jinja2
2636 python-pyyaml
2637 python-packaging ;for version number parsing
2638 python-resolvelib-0.5))
2639 (home-page "https://www.ansible.com/")
2640 (synopsis "Radically simple IT automation")
2641 (description "Ansible aims to be a radically simple IT automation system.
2642 It handles configuration management, application deployment, cloud
2643 provisioning, ad-hoc task execution, network automation, and multi-node
2644 orchestration. Ansible facilitates complex changes like zero-downtime rolling
2645 updates with load balancers. This package is the core of Ansible, which
2646 provides the following commands:
2647 @itemize
2648 @item ansible
2649 @item ansible-config
2650 @item ansible-connection
2651 @item ansible-console
2652 @item ansible-doc
2653 @item ansible-galaxy
2654 @item ansible-inventory
2655 @item ansible-playbook
2656 @item ansible-pull
2657 @item ansible-test
2658 @item ansible-vault
2659 @end itemize")
2660 (license license:gpl3+)))
2661
2662 (define-public ansible
2663 (package
2664 (name "ansible")
2665 (version "4.7.0")
2666 (source
2667 (origin
2668 (method url-fetch)
2669 (uri (pypi-uri "ansible" version))
2670 (sha256
2671 (base32 "0aab9id6dqfw2111r731c7y1p77dpzczynmgl4d989p3a7n54z0b"))))
2672 (build-system python-build-system)
2673 (propagated-inputs
2674 (list ansible-core))
2675 ;; The Ansible collections are found by ansible-core via PYTHONPATH; the
2676 ;; following search path ensures that they are found even when Python is
2677 ;; not present in the profile.
2678 (native-search-paths
2679 ;; XXX: Attempting to use (package-native-search-paths python)
2680 ;; here would cause an error about python being an unbound
2681 ;; variable in the tests/cpan.scm test.
2682 (list (search-path-specification
2683 (variable "PYTHONPATH")
2684 (files (list "lib/python3.9/site-packages")))))
2685 (home-page "https://www.ansible.com/")
2686 (synopsis "Radically simple IT automation")
2687 (description "Ansible aims to be a radically simple IT automation system.
2688 It handles configuration management, application deployment, cloud
2689 provisioning, ad-hoc task execution, network automation, and multi-node
2690 orchestration. Ansible facilitates complex changes like zero-downtime rolling
2691 updates with load balancers. This package provides a curated set of
2692 community-maintained Ansible collections, which contain playbooks, roles,
2693 modules and plugins that extend Ansible.")
2694 (license license:gpl3+)))
2695
2696 (define-public debops
2697 (package
2698 (name "debops")
2699 (version "1.1.0")
2700 (source
2701 (origin
2702 (method git-fetch)
2703 (uri (git-reference
2704 (url "https://github.com/debops/debops")
2705 (commit (string-append "v" version))))
2706 (file-name (git-file-name name version))
2707 (sha256
2708 (base32 "052b2dykdn35pdpn9s4prawl6nl6yzih8nyf54hpvhpisvjrm1v5"))
2709 (patches
2710 (search-patches "debops-constants-for-external-program-names.patch"
2711 "debops-debops-defaults-fall-back-to-less.patch"))))
2712 (build-system python-build-system)
2713 (native-inputs
2714 (list git))
2715 (inputs
2716 (list ansible
2717 encfs
2718 fuse
2719 util-linux ;; for umount
2720 findutils
2721 gnupg
2722 which))
2723 (propagated-inputs
2724 (list python-future python-distro))
2725 (arguments
2726 `(#:tests? #f
2727 #:phases
2728 (modify-phases %standard-phases
2729 (add-after 'unpack 'nuke-debops-update
2730 (lambda _
2731 (chmod "bin/debops-update" #o755) ; FIXME work-around git-fetch issue
2732 (with-output-to-file "bin/debops-update"
2733 (lambda ()
2734 (format #t "#!/bin/sh
2735 echo 'debops is installed via guix. guix-update is useless in this case.
2736 Please use `guix package -u debops` instead.'")))
2737 #t))
2738 ;; patch shebangs only in actuall scripts, not in files included in
2739 ;; roles (which are to be delivered to the targte systems)
2740 (delete `patch-generated-file-shebangs)
2741 (replace 'patch-source-shebangs
2742 (lambda _
2743 (for-each patch-shebang
2744 (find-files "bin"
2745 (lambda (file stat)
2746 ;; Filter out symlinks.
2747 (eq? 'regular (stat:type stat)))
2748 #:stat lstat))))
2749 (add-after 'unpack 'fix-paths
2750 (lambda _
2751 (define (substitute-program-names file)
2752 ;; e.g. ANSIBLE_PLAYBOOK = '/gnu/store/…/bin/ansible-playbook'
2753 (for-each
2754 (lambda (name)
2755 (let ((varname (string-upcase
2756 (string-map
2757 (lambda (c) (if (char=? c #\-) #\_ c))
2758 name))))
2759 (substitute* file
2760 (((string-append "^(" varname " = )'.*'") line prefix)
2761 (string-append prefix "'" (which name) "'")))))
2762 '("ansible-playbook" "encfs" "find" "fusermount"
2763 "umount" "gpg" "ansible" "which")))
2764 (for-each substitute-program-names
2765 '("bin/debops"
2766 "bin/debops-padlock"
2767 "bin/debops-task"
2768 "debops/__init__.py"
2769 "debops/cmds/__init__.py"))
2770 #t)))))
2771 (home-page "https://www.debops.org/")
2772 (synopsis "Collection of general-purpose Ansible roles")
2773 (description "The Ansible roles provided by that can be used to manage
2774 Debian or Ubuntu hosts. In addition, a default set of Ansible playbooks can
2775 be used to apply the provided roles in a controlled way, using Ansible
2776 inventory groups.
2777
2778 The roles are written with a high customization in mind, which can be done
2779 using Ansible inventory. This way the role and playbook code can be shared
2780 between multiple environments, with different configuration in to each one.
2781
2782 Services can be managed on a single host, or spread between multiple hosts.
2783 DebOps provides support for different SQL and NoSQL databases, web servers,
2784 programming languages and specialized applications useful in a data center
2785 environment or in a cluster. The project can also be used to deploy
2786 virtualization environments using KVM/libvirt, Docker or LXC technologies to
2787 manage virtual machines and/or containers.")
2788 (license license:gpl3+)))
2789
2790 (define-public emacs-ansible-doc
2791 (let ((commit "86083a7bb2ed0468ca64e52076b06441a2f8e9e0"))
2792 (package
2793 (name "emacs-ansible-doc")
2794 (version (git-version "0.4" "1" commit))
2795 (source
2796 (origin
2797 (method git-fetch)
2798 (uri (git-reference
2799 (url "https://github.com/lunaryorn/ansible-doc.el")
2800 (commit commit)))
2801 (file-name (git-file-name name version))
2802 (sha256
2803 (base32
2804 "0lap404ch74w99n3xip176jr42b38xhyzkfnkyqg0g3wk2cd3aq8"))))
2805 (build-system emacs-build-system)
2806 ;; Unmaintained by upstream.
2807 (home-page "https://github.com/lunaryorn/ansible-doc.el")
2808 (synopsis "Ansible documentation for Emacs")
2809 (description
2810 "This package provides an Ansible documentation for GNU Emacs.
2811
2812 @code{ansible-doc} allows you to view the documentation of an Ansible
2813 module and @code{ansible-doc-mode} minor mode adds documentation
2814 lookup to YAML Mode. You could enable the mode with @code{(add-hook
2815 'yaml-mode-hook #'ansible-doc-mode)}.")
2816 (license license:gpl3+))))
2817
2818 (define-public cpulimit
2819 (package
2820 (name "cpulimit")
2821 (version "0.2")
2822 (source
2823 (origin
2824 (method git-fetch)
2825 (uri (git-reference
2826 (url "https://github.com/opsengine/cpulimit")
2827 (commit (string-append "v" version))))
2828 (file-name (git-file-name name version))
2829 (sha256
2830 (base32 "1dz045yhcsw1rdamzpz4bk8mw888in7fyqk1q1b3m1yk4pd1ahkh"))))
2831 (build-system gnu-build-system)
2832 (arguments
2833 `(#:phases (modify-phases %standard-phases
2834 (delete 'configure)
2835 (replace 'build
2836 (lambda* (#:key make-flags #:allow-other-keys)
2837 (apply invoke "make" "-Csrc" make-flags)))
2838 (replace 'check
2839 (lambda* (#:key tests? make-flags #:allow-other-keys)
2840 (when tests?
2841 (apply invoke "make" "-Ctests" make-flags))
2842 #t))
2843 (replace 'install
2844 (lambda* (#:key outputs #:allow-other-keys)
2845 (let* ((out (assoc-ref outputs "out"))
2846 (bin (string-append out "/bin")))
2847 (install-file "src/cpulimit" bin))
2848 #t)))
2849 #:make-flags (list (string-append "CC=" ,(cc-for-target)))))
2850 (home-page "https://github.com/opsengine/cpulimit")
2851 (synopsis "Limit CPU usage")
2852 (description
2853 "Cpulimit limits the CPU usage of a process. It does not change the nice
2854 value or other scheduling priority settings, but the real CPU usage, and is
2855 able to adapt itself dynamically to the overall system load. Children
2856 processes and threads of the specified process may optionally share the same
2857 limits.")
2858 (license license:gpl2+)))
2859
2860 (define-public autojump
2861 (package
2862 (name "autojump")
2863 (version "22.5.3")
2864 (source
2865 (origin
2866 (method git-fetch)
2867 (uri (git-reference
2868 (url "https://github.com/wting/autojump")
2869 (commit (string-append "release-v" version))))
2870 (file-name (git-file-name name version))
2871 (sha256
2872 (base32 "1rgpsh70manr2dydna9da4x7p8ahii7dgdgwir5fka340n1wrcws"))))
2873 (build-system gnu-build-system)
2874 (native-inputs ; for tests
2875 (list python-mock python-pytest))
2876 (inputs
2877 `(("python" ,python-wrapper)))
2878 (arguments
2879 `(#:phases
2880 (modify-phases %standard-phases
2881 (add-after 'unpack 'make-git-checkout-writable
2882 ;; ‘install.py’ modifies files before installing them.
2883 (lambda _
2884 (for-each make-file-writable (find-files "."))
2885 #t))
2886 (delete 'configure)
2887 (delete 'build)
2888 (replace 'check
2889 (lambda _
2890 (invoke "python" "tests/unit/autojump_utils_test.py")))
2891 (replace 'install
2892 (lambda* (#:key outputs #:allow-other-keys)
2893 (setenv "SHELL" (which "bash"))
2894 (invoke "python" "install.py"
2895 (string-append "--destdir="
2896 (assoc-ref outputs "out"))))))))
2897 (home-page "https://github.com/wting/autojump")
2898 (synopsis "Shell extension for file system navigation")
2899 (description
2900 "Autojump provides a faster way to navigate your file system, with a \"cd
2901 command that learns\". It works by maintaining a database of the directories
2902 you use the most from the command line and allows you to \"jump\" to
2903 frequently used directories by typing only a small pattern.")
2904 (license license:gpl3+)))
2905
2906 (define-public fasd
2907 (package
2908 (name "fasd")
2909 (version "1.0.1")
2910 (source (origin
2911 (method git-fetch)
2912 (uri (git-reference
2913 (url "https://github.com/clvv/fasd")
2914 (commit version)))
2915 (file-name (git-file-name name version))
2916 (sha256
2917 (base32
2918 "1awi71jdv3mhjrmar2d4z1i90kn7apd7aq1w31sh6w4yibz9kiyj"))))
2919 (build-system gnu-build-system)
2920 (arguments
2921 `(#:phases (modify-phases %standard-phases
2922 (delete 'configure)) ;no configuration
2923 #:tests? #f ;no tests
2924 #:make-flags (list (string-append "PREFIX=" %output))))
2925 (home-page "https://github.com/clvv/fasd")
2926 (synopsis "Quick access to files and directories for shells")
2927 (description
2928 "Fasd (pronounced similar to \"fast\") is a command-line productivity
2929 booster. Fasd offers quick access to files and directories for POSIX shells.
2930 It is inspired by tools like autojump, z, and v. Fasd keeps track of files
2931 and directories you have accessed so that you can quickly reference them in
2932 the command line.")
2933 (license license:x11)))
2934
2935 (define-public iftop
2936 (package
2937 (name "iftop")
2938 (version "1.0pre4")
2939 (source (origin
2940 (method url-fetch)
2941 (uri (string-append "http://www.ex-parrot.com/~pdw/iftop/download"
2942 "/iftop-" version ".tar.gz"))
2943 (sha256
2944 (base32
2945 "15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp"))))
2946 (build-system gnu-build-system)
2947 (inputs
2948 (list libpcap ncurses))
2949 (arguments
2950 ;; Fix build failure with GCC 10
2951 '(#:configure-flags '("CFLAGS=-O2 -g -fcommon")))
2952 (synopsis "Monitor network usage")
2953 (description "Iftop does for network usage what @command{top} does
2954 for CPU usage. It listens to network traffic on a named interface and
2955 displays a table of current bandwidth usage by pairs of hosts.")
2956 (home-page "http://www.ex-parrot.com/~pdw/iftop/")
2957 (license license:gpl2+)))
2958
2959 (define-public munge
2960 (package
2961 (name "munge")
2962 (version "0.5.14")
2963 (source (origin
2964 (method url-fetch)
2965 (uri (string-append "https://github.com/dun/munge/releases/"
2966 "download/munge-" version "/munge-"
2967 version ".tar.xz"))
2968 (sha256
2969 (base32
2970 "0h06sghb4rqvv1ywyd6mzsmbcgh712v6ygrff0gzm440y4ca41k6"))
2971 (modules '((guix build utils)))
2972 (snippet
2973 '(begin
2974 ;; Don't insist on write access to /var.
2975 (substitute* "src/etc/Makefile.in"
2976 (("\\$\\(INSTALL\\)(.*)localstatedir" _ middle)
2977 (string-append "-$(INSTALL)" middle "localstatedir"))
2978 (("\\$\\(MKDIR_P\\) .*(local|run)statedir.*")
2979 ""))
2980 #t))))
2981 (inputs
2982 (list openssl libgcrypt))
2983 (build-system gnu-build-system)
2984 (arguments
2985 '(#:configure-flags
2986 (list "--localstatedir=/var"
2987 (string-append "--with-pkgconfigdir="
2988 (assoc-ref %outputs "out") "/lib/pkgconfig"))
2989 #:phases
2990 (modify-phases %standard-phases
2991 ;; XXX Many test series fail. Some might be fixable, others do no-no
2992 ;; things like invoking ‘sudo’.
2993 (add-after 'unpack 'skip-failing-tests
2994 (lambda _
2995 (for-each (lambda (test)
2996 (substitute* "t/Makefile.in"
2997 (((string-append test "\\.t ")) "")))
2998 (list "0100-munged-lock"
2999 "0010-basic"
3000 "0011-munged-cmdline"
3001 "0012-munge-cmdline"
3002 "0013-unmunge-cmdline"
3003 "0101-munged-security-socket"
3004 "0102-munged-security-keyfile"
3005 "0103-munged-security-logfile"
3006 "0110-munged-origin-addr"))
3007 #t)))))
3008 (home-page "https://dun.github.io/munge/")
3009 (synopsis "Cluster computing authentication service")
3010 (description
3011 "Munge is an authentication service for creating and validating
3012 credentials. It allows a process to authenticate the UID and GID of another
3013 local or remote process within a group of hosts having common users and
3014 groups. These hosts form a security realm that is defined by a shared
3015 cryptographic key. Clients within this security realm can create and validate
3016 credentials without the use of root privileges, reserved ports, or
3017 platform-specific methods.")
3018 (license license:gpl3+)))
3019
3020 (define-public audit
3021 (package
3022 (name "audit")
3023 (home-page "https://people.redhat.com/sgrubb/audit/")
3024 (version "3.0.6")
3025 (source (origin
3026 (method url-fetch)
3027 (uri (string-append home-page "audit-" version ".tar.gz"))
3028 (sha256
3029 (base32
3030 "0pnc9wzslks9p6kxw0llp1n8h8yg0frcxl3x84fl0hisa5vlvr63"))))
3031 (build-system gnu-build-system)
3032 (arguments
3033 `(#:configure-flags (list "--with-python=no"
3034 "--disable-static")))
3035 (inputs
3036 (list openldap gnutls cyrus-sasl))
3037 (synopsis "User-space component to the Linux auditing system")
3038 (description
3039 "This is the user-space component to the Linux auditing system, which
3040 allows logging of system calls made by user-land processes. @command{auditd} is
3041 responsible for writing audit records to the disk. Viewing the logs is done
3042 with the @code{ausearch} or @code{aureport} utilities. Configuring the audit
3043 rules is done with the @code{auditctl} utility.")
3044 (license license:gpl2+)))
3045
3046 (define-public nmap
3047 (package
3048 (name "nmap")
3049 (version "7.92")
3050 (source (origin
3051 (method url-fetch)
3052 (uri (string-append "https://nmap.org/dist/nmap-" version
3053 ".tar.bz2"))
3054 (sha256
3055 (base32
3056 "18bifn67kz2wxkbnfwcrin2xrhc6qf4p2bvxfqb2a2vbi8pryix5"))
3057 (modules '((guix build utils)))
3058 (snippet
3059 '(begin
3060 (for-each delete-file-recursively
3061 ;; Remove bundled lua, pcap, and pcre libraries.
3062 ;; FIXME: Remove bundled liblinear once packaged.
3063 '("liblua"
3064 "libpcap"
3065 "libpcre"
3066 ;; Remove pre-compiled binares.
3067 "mswin32"))))))
3068 (build-system gnu-build-system)
3069 (inputs
3070 `(("openssl" ,openssl)
3071 ("libpcap" ,libpcap)
3072 ("pcre" ,pcre)
3073 ("lua" ,lua)
3074 ("zlib" ,zlib) ;for NSE compression support
3075
3076 ;; For 'ndiff'.
3077 ("python" ,python-2)))
3078
3079 ;; TODO Add zenmap output.
3080 (outputs '("out" "ndiff"))
3081 (arguments
3082 `(#:configure-flags '("--without-zenmap")
3083 #:phases
3084 (modify-phases %standard-phases
3085 (add-after 'configure 'patch-Makefile
3086 (lambda _
3087 (substitute* "Makefile"
3088 ;; Do not attempt to build lua.
3089 (("build-dnet build-lua") "build-dnet"))))
3090 (replace 'install
3091 (lambda* (#:key outputs #:allow-other-keys)
3092 (define (make out . args)
3093 (apply invoke "make"
3094 (string-append "prefix=" out)
3095 args))
3096 (define (python-path dir)
3097 (string-append dir "/lib/python"
3098 ,(version-major+minor
3099 (package-version python))
3100 "/site-packages"))
3101 (let ((out (assoc-ref outputs "out"))
3102 (ndiff (assoc-ref outputs "ndiff")))
3103 (for-each mkdir-p (list out ndiff))
3104 (make out
3105 "install-nmap"
3106 "install-nse"
3107 "install-ncat"
3108 "install-nping")
3109 (make ndiff "install-ndiff")
3110 (wrap-program (string-append ndiff "/bin/ndiff")
3111 `("GUIX_PYTHONPATH" prefix
3112 (,(python-path ndiff)))))))
3113 ;; These are the tests that do not require network access.
3114 (replace 'check
3115 (lambda _ (invoke "make"
3116 "check-nse"
3117 "check-ndiff"
3118 "check-dns"))))
3119 ;; Nmap can't cope with out-of-source building.
3120 #:out-of-source? #f))
3121 (home-page "https://nmap.org/")
3122 (synopsis "Network discovery and security auditing tool")
3123 (description
3124 "Nmap (\"Network Mapper\") is a network discovery and security auditing
3125 tool. It is also useful for tasks such as network inventory, managing service
3126 upgrade schedules, and monitoring host or service uptime. It also provides an
3127 advanced netcat implementation (ncat), a utility for comparing scan
3128 results (ndiff), and a packet generation and response analysis tool (nping).")
3129 ;; See <https://github.com/nmap/nmap/issues/2199#issuecomment-894812634>.
3130 ;; This package uses nmap's bundled versions of libdnet and liblinear, which
3131 ;; both use a 3-clause BSD license.
3132 (license (list license:nmap license:bsd-3))))
3133
3134 (define-public dstat
3135 (package
3136 (name "dstat")
3137 (version "0.7.4")
3138 (source
3139 (origin
3140 (method git-fetch)
3141 (uri (git-reference
3142 (url "https://github.com/dstat-real/dstat")
3143 (commit (string-append "v" version))))
3144 (file-name (git-file-name "dstat" version))
3145 (sha256
3146 (base32 "1qnmkhqmjd1m3if05jj29dvr5hn6kayq9bkkkh881w472c0zhp8v"))
3147 (patches (search-patches "dstat-fix-crash-when-specifying-delay.patch"
3148 "dstat-skip-devices-without-io.patch"))))
3149 (build-system gnu-build-system)
3150 (arguments
3151 `(#:tests? #f ; no make check
3152 #:make-flags
3153 (list (string-append "prefix=" (assoc-ref %outputs "out")))
3154 #:phases
3155 (modify-phases %standard-phases
3156 (add-after 'unpack 'fix-python3-DeprecationWarning
3157 (lambda _
3158 (substitute* "dstat"
3159 (("collections") "collections.abc"))
3160 #t))
3161 (delete 'configure) ; no configure script
3162 (add-after 'install 'wrap
3163 (lambda* (#:key outputs #:allow-other-keys)
3164 (let ((out (assoc-ref outputs "out")))
3165 (wrap-program (string-append out "/bin/dstat")
3166 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))
3167 #t))))))
3168 (inputs
3169 `(("python" ,python-wrapper)
3170 ("python-six" ,python-six)))
3171 (synopsis "Versatile resource statistics tool")
3172 (description "Dstat is a versatile replacement for @command{vmstat},
3173 @command{iostat}, @command{netstat}, and @command{ifstat}. Dstat overcomes
3174 some of their limitations and adds some extra features, more counters and
3175 flexibility. Dstat is handy for monitoring systems during performance tuning
3176 tests, benchmarks or troubleshooting.
3177
3178 Dstat allows you to view all of your system resources in real-time, you can,
3179 e.g., compare disk utilization in combination with interrupts from your IDE
3180 controller, or compare the network bandwidth numbers directly with the disk
3181 throughput (in the same interval).")
3182 (home-page "http://dag.wiee.rs/home-made/dstat/")
3183 (license license:gpl2+)))
3184
3185 (define-public thefuck
3186 (package
3187 (name "thefuck")
3188 (version "3.31")
3189 (source
3190 (origin
3191 (method git-fetch)
3192 (uri (git-reference
3193 (url "https://github.com/nvbn/thefuck")
3194 (commit version)))
3195 (file-name (git-file-name name version))
3196 (sha256
3197 (base32 "05h60gxky57nalc2hdkpg8wqyg16432x9gcb9wnwblplk98998kq"))
3198 (patches (search-patches "thefuck-test-environ.patch"))))
3199 (build-system python-build-system)
3200 (arguments
3201 '(#:phases
3202 (modify-phases %standard-phases
3203 (delete 'check)
3204 (add-after 'install 'check
3205 (lambda* (#:key inputs outputs #:allow-other-keys)
3206 ;; Tests look for installed package
3207 (add-installed-pythonpath inputs outputs)
3208 ;; Some tests need write access to $HOME.
3209 (setenv "HOME" "/tmp")
3210 ;; Even with that, this function tries to mkdir /.config.
3211 (substitute* "tests/test_utils.py"
3212 (("settings\\.init\\(\\)") ""))
3213 (invoke "py.test" "-v"))))))
3214 (propagated-inputs
3215 (list python-colorama python-decorator python-psutil python-pyte
3216 python-six))
3217 (native-inputs
3218 (list go python-mock python-pytest python-pytest-mock))
3219 (home-page "https://github.com/nvbn/thefuck")
3220 (synopsis "Correct mistyped console command")
3221 (description
3222 "The Fuck tries to match a rule for a previous, mistyped command, creates
3223 a new command using the matched rule, and runs it.")
3224 (license license:x11)))
3225
3226 (define-public di
3227 (package
3228 (name "di")
3229 (version "4.51")
3230 (source
3231 (origin
3232 (method url-fetch)
3233 (uri (string-append "mirror://sourceforge/diskinfo-di/di-" version ".tar.gz"))
3234 (sha256
3235 (base32 "1fv12j9b9sw6p38lcbzcw87zl5qp1aa7a4a4jn3449zz9af15ckr"))))
3236 (build-system gnu-build-system)
3237 (arguments
3238 `(#:tests? #f ; obscure test failures
3239 #:phases
3240 (modify-phases %standard-phases
3241 (delete 'configure) ; no configure script
3242 (add-before 'build 'setup-environment
3243 (lambda* (#:key outputs #:allow-other-keys)
3244 (setenv "CC" ,(cc-for-target))
3245 (setenv "prefix" (assoc-ref outputs "out")))))
3246 #:make-flags (list "--environment-overrides")))
3247 (home-page "https://gentoo.com/di/")
3248 (synopsis "Advanced df like disk information utility")
3249 (description
3250 "@code{di} is a disk information utility, displaying everything that your
3251 @code{df} command does and more. It features the ability to display your disk
3252 usage in whatever format you prefer. It is designed to be highly portable and
3253 produce uniform output across heterogeneous networks.")
3254 (license license:zlib)))
3255
3256 (define-public cbatticon
3257 (package
3258 (name "cbatticon")
3259 (version "1.6.10")
3260 (source
3261 (origin
3262 (method git-fetch)
3263 (uri (git-reference
3264 (url "https://github.com/valr/cbatticon")
3265 (commit version)))
3266 (sha256
3267 (base32 "0ivm2dzhsa9ir25ry418r2qg2llby9j7a6m3arbvq5c3kaj8m9jr"))
3268 (file-name (git-file-name name version))))
3269 (build-system gnu-build-system)
3270 (arguments
3271 `(#:tests? #f ; no tests
3272 #:make-flags
3273 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
3274 ,(string-append "CC=" (cc-for-target)))
3275 #:phases
3276 (modify-phases %standard-phases
3277 (delete 'configure)))) ; no configure script
3278 (inputs
3279 `(("gtk+" ,gtk+)
3280 ("gettext" ,gettext-minimal)
3281 ("libnotify" ,libnotify)))
3282 (native-inputs
3283 (list pkg-config))
3284 (synopsis "Lightweight battery icon for the system tray")
3285 (description "cbatticon is a lightweight battery icon that displays
3286 the status of your battery in the system tray.")
3287 (home-page "https://github.com/valr/cbatticon")
3288 (license license:gpl2+)))
3289
3290 (define-public interrobang
3291 (let ((revision "1")
3292 (commit "896543735e1c99144765fdbd7b6e6b5afbd8b881"))
3293 (package
3294 (name "interrobang")
3295 (version (git-version "0.0.0" revision commit))
3296 (source
3297 (origin
3298 (method git-fetch)
3299 (uri (git-reference
3300 (url "https://github.com/TrilbyWhite/interrobang")
3301 (commit commit)))
3302 (file-name (git-file-name name version))
3303 (sha256
3304 (base32 "1n13m70p1hfba5dy3i8hfclbr6k9q3d9dai3dg4jvhdhmxcpjzdf"))))
3305 (build-system gnu-build-system)
3306 (arguments
3307 `(#:tests? #f ; no tests
3308 #:phases
3309 (modify-phases %standard-phases
3310 (delete 'configure)) ; no configure script
3311 #:make-flags (list (string-append "PREFIX="
3312 (assoc-ref %outputs "out")))))
3313 (inputs
3314 (list libx11))
3315 (native-inputs
3316 (list pkg-config))
3317 (synopsis "Scriptable launcher menu")
3318 (description "Interrobang is a scriptable launcher menu with a customizable
3319 shortcut syntax and completion options.")
3320 (home-page "https://github.com/TrilbyWhite/interrobang")
3321 (license license:gpl3+))))
3322
3323 (define-public pam-krb5
3324 (package
3325 (name "pam-krb5")
3326 (version "4.8")
3327 (source (origin
3328 (method url-fetch)
3329 (uri
3330 (list (string-append
3331 "https://archives.eyrie.org/software/kerberos/"
3332 "pam-krb5-" version ".tar.xz")
3333 (string-append
3334 "https://archives.eyrie.org/software/ARCHIVE/"
3335 "pam-krb5/pam-krb5-" version ".tar.xz")))
3336 (patches (search-patches "pam-krb5-CVE-2020-10595.patch"))
3337 (sha256
3338 (base32
3339 "1qjp8i1s9bz7g6kiqrkzzkxn5pfspa4sy53b6z40fqmdf9przdfb"))))
3340 (build-system gnu-build-system)
3341 (arguments
3342 `(#:phases
3343 (modify-phases %standard-phases
3344 (add-before 'configure 'disable-tests
3345 (lambda _
3346 ;; The build container seems to interfere with some tests.
3347 (substitute* "tests/TESTS"
3348 (("module/basic\n") ""))
3349 (substitute* "tests/TESTS"
3350 (("pam-util/vector\n") ""))
3351 #t)))))
3352 (inputs
3353 (list linux-pam mit-krb5))
3354 (native-inputs
3355 (list perl perl-test-pod)) ; required for tests
3356 (synopsis "Kerberos PAM module")
3357 (description
3358 "Pam-krb5 is a Kerberos PAM module for either MIT Kerberos or Heimdal.
3359 It supports ticket refreshing by screen savers, configurable
3360 authorization handling, authentication of non-local accounts for network
3361 services, password changing, and password expiration, as well as all the
3362 standard expected PAM features. It works correctly with OpenSSH, even
3363 with @code{ChallengeResponseAuthentication} and @code{PrivilegeSeparation}
3364 enabled, and supports extensive configuration either by PAM options or in
3365 krb5.conf or both. PKINIT is supported with recent versions of both MIT
3366 Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.")
3367 (home-page "https://www.eyrie.org/~eagle/software/pam-krb5/")
3368 ;; Dual licenced under a homebrew non-copyleft OR GPL (any version)
3369 ;; However, the tarball does not contain a copy of the GPL, so unless
3370 ;; we put one in, we cannot distribute it under GPL without violating
3371 ;; clause requiring us to give all recipients a copy.
3372 (license license:gpl1+)))
3373
3374 (define (sunxi-tools-source version)
3375 (origin
3376 (method git-fetch)
3377 (uri (git-reference
3378 (url "https://github.com/linux-sunxi/sunxi-tools")
3379 (commit (string-append "v" version))))
3380 (sha256
3381 (base32 "04f3jqg8ww4jxsf9c6ddcdgy2xbhkyp0b3l5f1hvvbv94p81rjxd"))
3382 (patches
3383 (search-patches "sunxi-tools-remove-sys-io.patch"))
3384 (modules '((guix build utils)))
3385 (snippet
3386 ;; Remove binaries contained in the tarball which are only for the
3387 ;; target and can be regenerated anyway.
3388 '(begin
3389 (delete-file-recursively "bin")
3390 #t))
3391 (file-name (git-file-name "sunxi-tools" version))))
3392
3393 (define sunxi-target-tools
3394 (package
3395 (name "sunxi-target-tools")
3396 (version "1.4.2")
3397 (build-system gnu-build-system)
3398 (source
3399 (sunxi-tools-source version))
3400 (arguments
3401 `(#:system "armhf-linux"
3402 #:tests? #f
3403 #:make-flags (list (string-append "PREFIX="
3404 (assoc-ref %outputs "out"))
3405 (string-append "CROSS_COMPILE=")
3406 "CC=gcc")
3407 #:phases
3408 (modify-phases %standard-phases
3409 (delete 'configure)
3410 (replace 'build
3411 (lambda* (#:key make-flags #:allow-other-keys)
3412 (apply invoke "make" "target-tools" make-flags)))
3413 (replace 'install
3414 (lambda* (#:key make-flags #:allow-other-keys)
3415 (apply invoke "make" "install-target-tools"
3416 make-flags))))))
3417 (home-page "https://github.com/linux-sunxi/sunxi-tools")
3418 (synopsis "Hardware management tools for Allwinner computers")
3419 (description "This package contains tools for Allwinner devices:
3420 @enumerate
3421 @item @command{sunxi-meminfo}: Prints memory bus settings.
3422 @end enumerate")
3423 (license license:gpl2+)))
3424
3425 (define-public sunxi-tools
3426 (package
3427 (name "sunxi-tools")
3428 (version "1.4.2")
3429 (source
3430 (sunxi-tools-source version))
3431 (native-inputs
3432 (list sunxi-target-tools pkg-config))
3433 (inputs
3434 (list libusb))
3435 (build-system gnu-build-system)
3436 (arguments
3437 `(#:tests? #f ; no tests exist
3438 #:make-flags (list (string-append "PREFIX="
3439 (assoc-ref %outputs "out"))
3440 (string-append "CROSS_COMPILE=disabled")
3441 "CC=gcc")
3442 #:phases
3443 (modify-phases %standard-phases
3444 (delete 'configure)
3445 (replace 'build
3446 (lambda* (#:key make-flags #:allow-other-keys)
3447 (apply invoke "make" "tools" "misc" make-flags)))
3448 (replace 'install
3449 (lambda* (#:key inputs outputs make-flags #:allow-other-keys)
3450 ;; Those tools have been built for armhf but are part of the
3451 ;; installation in the upstream package. So do the same
3452 ;; here.
3453 (copy-recursively (assoc-ref inputs "sunxi-target-tools")
3454 (assoc-ref outputs "out"))
3455 (apply invoke "make" "install-tools" "install-misc"
3456 make-flags))))))
3457 (home-page "https://github.com/linux-sunxi/sunxi-tools")
3458 (synopsis "Hardware management tools for Allwinner computers")
3459 (description "This package contains tools for Allwinner devices:
3460 @enumerate
3461 @item @command{sunxi-fexc}, @command{bin2fex}, @command{fex2bin}: Compile
3462 a textual description of a board (.fex) to a binary representation (.bin).
3463 @item @command{sunxi-fel}: Puts an Allwinner device into FEL mode which
3464 makes it register as a special USB device (rather than USB host).
3465 You can then connect it to another computer and flash it from there.
3466 @item @command{sunxi-nand-part}: Partitions NAND flash.
3467 @item @command{sunxi-bootinfo}: Reads out boot0 and boot1 (Allwinner
3468 bootloader) parameters.
3469 @item @command{sunxi-pio}: Sets GPIO parameters and oscillates a GPIO
3470 in order to be able to find it.
3471 @item @command{sunxi-meminfo}: Prints memory bus settings.
3472 @item @command{sunxi-nand-image-builder}: Prepares raw NAND images.
3473 @end enumerate")
3474 (license license:gpl2+)))
3475
3476 (define-public sedsed
3477 (package
3478 (name "sedsed")
3479 (version "1.1")
3480 (source
3481 (origin
3482 (method git-fetch)
3483 (uri (git-reference
3484 (url "https://github.com/aureliojargas/sedsed")
3485 (commit (string-append "v" version))))
3486 (file-name (git-file-name name version))
3487 (sha256
3488 (base32 "05cl35mwljdb9ynbbsfa8zx6ig8r0xncbg2cir9vwn5manndjj18"))))
3489 (build-system python-build-system)
3490 (arguments
3491 `(#:tests? #f ; no tests
3492 #:phases
3493 (modify-phases %standard-phases
3494 (add-after 'unpack 'patch-sed-in
3495 (lambda _
3496 (substitute* "sedsed.py"
3497 (("sedbin = 'sed'")
3498 (string-append "sedbin = '" (which "sed") "'")))
3499 #t))
3500 (delete 'build)
3501 (replace 'install
3502 (lambda* (#:key outputs #:allow-other-keys)
3503 (let* ((out (assoc-ref outputs "out"))
3504 (bin (string-append out "/bin")))
3505 ;; Just one file to copy around
3506 (install-file "sedsed.py" bin)
3507 #t)))
3508 (add-after 'wrap 'symlink
3509 ;; Create 'sedsed' symlink to "sedsed.py".
3510 (lambda* (#:key outputs #:allow-other-keys)
3511 (let* ((out (assoc-ref outputs "out"))
3512 (bin (string-append out "/bin"))
3513 (sed (string-append bin "/sedsed"))
3514 (sedpy (string-append bin "/sedsed.py")))
3515 (symlink sedpy sed)
3516 #t))))))
3517 (home-page "https://aurelio.net/projects/sedsed")
3518 (synopsis "Sed sed scripts")
3519 (description
3520 "@code{sedsed} can debug, indent, tokenize and HTMLize your @command{sed}
3521 script.
3522
3523 In debug mode, it reads your script and adds extra commands to it. When
3524 executed you can see the data flow between the commands, revealing all the
3525 magic sed performs on its internal buffers.
3526
3527 In indent mode, your script is reformatted with standard spacing.
3528
3529 In tokenize mode, you can see the elements of every command you use.
3530
3531 In HTMLize mode, your script is converted to a beautiful colored HTML file,
3532 with all the commands and parameters identified for your viewing pleasure.
3533
3534 With sedsed you can master any sed script. No more secrets, no more hidden
3535 buffers.")
3536 (license license:expat)))
3537
3538 (define-public igt-gpu-tools
3539 (package
3540 (name "igt-gpu-tools")
3541 ;; You should very likely remove the 'fix-meson.build phase when upgrading.
3542 (version "1.26")
3543 (source
3544 (origin
3545 (method git-fetch)
3546 (uri (git-reference
3547 (url "https://gitlab.freedesktop.org/drm/igt-gpu-tools.git")
3548 (commit (string-append "igt-gpu-tools-" version))))
3549 (file-name (git-file-name name version))
3550 (sha256
3551 (base32 "0m124pqv7zna25jnvk566c4kk628jr0w8mgnp8mr5xqz9cprgczm"))))
3552 (build-system meson-build-system)
3553 (arguments
3554 `(#:tests? #f ; many of the tests try to load kernel modules
3555 #:phases
3556 (modify-phases %standard-phases
3557 (add-after 'unpack 'find-rst2man.py
3558 (lambda _
3559 (substitute* "man/meson.build"
3560 (("'rst2man'") "'rst2man.py'"))))
3561 (add-after 'unpack 'fix-meson.build
3562 ;; Fix ‘ERROR: Function does not take positional arguments.’
3563 (lambda _
3564 (substitute* "lib/meson.build"
3565 (("f\\.underscorify\\(f\\)")
3566 "f.underscorify()")))))))
3567 (inputs
3568 (list cairo
3569 elfutils ; libdw
3570 eudev
3571 kmod
3572 libdrm
3573 libpciaccess
3574 libunwind
3575 procps))
3576 (native-inputs
3577 (list bison flex pkg-config python-docutils))
3578 (home-page "https://gitlab.freedesktop.org/drm/igt-gpu-tools")
3579 (synopsis "Tools for development and testing of the Intel DRM driver")
3580 (description "IGT GPU Tools is a collection of tools for development and
3581 testing of the Intel DRM driver. There are many macro-level test suites that
3582 get used against the driver, including xtest, rendercheck, piglit, and
3583 oglconform, but failures from those can be difficult to track down to kernel
3584 changes, and many require complicated build procedures or specific testing
3585 environments to get useful results. Therefore, IGT GPU Tools includes
3586 low-level tools and tests specifically for development and testing of the
3587 Intel DRM Driver.")
3588 (supported-systems '("i686-linux" "x86_64-linux"))
3589 (license license:expat)))
3590
3591 (define-public neofetch
3592 (package
3593 (name "neofetch")
3594 (version "7.1.0")
3595 (source (origin
3596 (method git-fetch)
3597 (uri (git-reference
3598 (url "https://github.com/dylanaraps/neofetch")
3599 (commit version)))
3600 (file-name (git-file-name name version))
3601 (sha256
3602 (base32
3603 "0i7wpisipwzk0j62pzaigbiq42y1mn4sbraz4my2jlz6ahwf00kv"))))
3604 (build-system gnu-build-system)
3605 (arguments
3606 `(#:tests? #f ; there are no tests
3607 #:make-flags
3608 (list (string-append "PREFIX=" %output))
3609 #:phases
3610 (modify-phases %standard-phases
3611 (delete 'configure)))) ; no configure script
3612 (home-page "https://github.com/dylanaraps/neofetch")
3613 (synopsis "System information script")
3614 (description "Neofetch is a command-line system information tool written in
3615 Bash. Neofetch displays information about your system next to an image, your OS
3616 logo, or any ASCII file of your choice. The main purpose of Neofetch is to be
3617 used in screenshots to show other users what operating system or distribution
3618 you are running, what theme or icon set you are using, etc.")
3619 (license license:expat)))
3620
3621 (define-public screenfetch
3622 (package
3623 (name "screenfetch")
3624 (version "3.9.1")
3625 (source (origin
3626 (method git-fetch)
3627 (uri (git-reference
3628 (url "https://github.com/KittyKatt/screenFetch")
3629 (commit (string-append "v" version))))
3630 (file-name (git-file-name name version))
3631 (sha256
3632 (base32
3633 "04l8aqr474pb115nagn9f6y48jw92n1qfszgw7dbhgl4mpn95lcr"))))
3634 (build-system trivial-build-system)
3635 (arguments
3636 `(#:modules ((guix build utils))
3637 #:builder
3638 (begin
3639 (use-modules (guix build utils))
3640 (let ((source (assoc-ref %build-inputs "source"))
3641 (out (assoc-ref %outputs "out")))
3642 (mkdir-p (string-append out "/bin/"))
3643 (copy-file (string-append source "/screenfetch-dev")
3644 (string-append out "/bin/screenfetch"))
3645 (install-file (string-append source "/screenfetch.1")
3646 (string-append out "/man/man1/"))
3647 (install-file (string-append source "/COPYING")
3648 (string-append out "/share/doc/" ,name "-" ,version))
3649 (substitute* (string-append out "/bin/screenfetch")
3650 (("/usr/bin/env bash")
3651 (search-input-file %build-inputs "/bin/bash")))
3652 (wrap-program
3653 (string-append out "/bin/screenfetch")
3654 `("PATH" ":" prefix
3655 (,(string-append (assoc-ref %build-inputs "bc") "/bin:"
3656 (assoc-ref %build-inputs "scrot") "/bin:"
3657 (assoc-ref %build-inputs "xdpyinfo") "/bin"
3658 (assoc-ref %build-inputs "xprop") "/bin"))))
3659 (substitute* (string-append out "/bin/screenfetch")
3660 (("#!#f")
3661 (string-append "#!"
3662 (search-input-file %build-inputs
3663 "/bin/bash"))))))))
3664 (inputs
3665 (list bash bc scrot xdpyinfo xprop))
3666 (home-page "https://github.com/KittyKatt/screenFetch")
3667 (synopsis "System information script")
3668 (description "Bash screenshot information tool which can be used to
3669 generate those nifty terminal theme information and ASCII distribution logos in
3670 everyone's screenshots nowadays.")
3671 (license license:gpl3)))
3672
3673 (define-public ufetch
3674 (let ((commit "98b622023e03fe24dbc137e9a68104dfe1fbd04a")
3675 (revision "1"))
3676 (package
3677 (name "ufetch")
3678 (version (git-version "0.2" revision commit))
3679 (source (origin
3680 (method git-fetch)
3681 (uri (git-reference
3682 (url "https://gitlab.com/jschx/ufetch.git")
3683 (commit commit)))
3684 (file-name (git-file-name name version))
3685 (sha256
3686 (base32
3687 "09c4zmikza16xpydinnqbi3hmcibfrrn10wij7j0j1wv1pj2sl2l"))))
3688 (build-system trivial-build-system)
3689 (inputs
3690 `(("bash" ,bash)
3691 ("tput" ,ncurses)))
3692 (arguments
3693 `(#:modules ((guix build utils))
3694 #:builder
3695 (begin
3696 (use-modules (guix build utils))
3697 (let* ((source (assoc-ref %build-inputs "source"))
3698 (output (assoc-ref %outputs "out"))
3699 (bindir (string-append output "/bin"))
3700 (docdir (string-append output "/share/doc/ufetch-" ,version))
3701 (tput (search-input-file %build-inputs "/bin/tput")))
3702 (install-file (string-append source "/LICENSE") docdir)
3703 (setenv "PATH" (string-append (assoc-ref %build-inputs "bash") "/bin"))
3704 (mkdir-p bindir)
3705 (for-each (lambda (src)
3706 (let ((dst (string-append bindir "/" (basename src))))
3707 (copy-file src dst)
3708 (patch-shebang dst)
3709 (substitute* dst (("tput") tput))))
3710 (find-files source "ufetch-[[:alpha:]]*$"))
3711 ;; Note: the `ufetch` we create below will only work if run under
3712 ;; the Guix System. I.e. a user trying to run `ufetch` on a
3713 ;; foreign distro will not get great results. The `screenfetch`
3714 ;; program does actual runtime detection of the operating system,
3715 ;; and would be a better choice in such a situation.
3716 (symlink "ufetch-guix" (string-append bindir "/ufetch"))))))
3717 (home-page "https://gitlab.com/jschx/ufetch")
3718 (synopsis "Tiny system info")
3719 (description "This package provides a tiny system info utility.")
3720 (license license:isc))))
3721
3722 (define-public pfetch
3723 (let ((commit "e18a0959ab98b963744755ec4687e59dc11db3c5")
3724 (revision "0"))
3725 (package
3726 (name "pfetch")
3727 (version (git-version "0.7.0" revision commit))
3728 (source (origin
3729 (method git-fetch)
3730 (uri (git-reference
3731 (url "https://github.com/dylanaraps/pfetch")
3732 (commit commit)))
3733 (file-name (git-file-name name version))
3734 (sha256
3735 (base32
3736 "1md40av6i3xvvwig5jzhy4kf3s5sgxxk35r0vcyrjd8qyndk927l"))))
3737 (build-system trivial-build-system)
3738 (inputs (list bash))
3739 (arguments
3740 `(#:modules ((guix build utils))
3741 #:builder
3742 (begin
3743 (use-modules (guix build utils))
3744 (let* ((source (lambda (f)
3745 (string-append (assoc-ref %build-inputs "source") "/" f)))
3746 (output (assoc-ref %outputs "out"))
3747 (docdir (string-append output "/share/doc/pfetch-" ,version)))
3748 (install-file (source "LICENSE.md") docdir)
3749 (install-file (source "README.md") docdir)
3750 (install-file (source "pfetch") (string-append output "/bin"))
3751 (patch-shebang
3752 (string-append output "/bin/pfetch")
3753 (list (string-append (assoc-ref %build-inputs "bash") "/bin")))
3754 #t))))
3755 (home-page "https://github.com/dylanaraps/pfetch")
3756 (synopsis "System information tool")
3757 (description "This package provides a simple, configurable system
3758 information tool.")
3759 (license license:expat))))
3760
3761 (define-public nnn
3762 (package
3763 (name "nnn")
3764 (version "4.4")
3765 (source
3766 (origin
3767 (method url-fetch)
3768 (uri (string-append "https://github.com/jarun/nnn/releases/download/v"
3769 version "/nnn-v" version ".tar.gz"))
3770 (sha256
3771 (base32 "0lqn7pyy8c1vy29vn8ad4x23cw67cy1d21ghns6f3w9a1h7kyjp0"))))
3772 (build-system gnu-build-system)
3773 (inputs
3774 (list ncurses readline))
3775 (native-inputs
3776 (list pkg-config))
3777 (arguments
3778 `(#:tests? #f ; no tests
3779 #:phases
3780 (modify-phases %standard-phases
3781 (delete 'configure)) ; no configure script
3782 #:make-flags
3783 (list
3784 (string-append "PREFIX="
3785 (assoc-ref %outputs "out"))
3786 (string-append "CC=" ,(cc-for-target))
3787 (string-append "PKG_CONFIG=" ,(pkg-config-for-target)))))
3788 (home-page "https://github.com/jarun/nnn")
3789 (synopsis "Terminal file browser")
3790 (description
3791 "@command{nnn} is a fork of @command{noice}, a fast and minimal text
3792 terminal file browser with keyboard shortcuts for navigation, opening files and
3793 running tasks. There is no configuration file and MIME associations are
3794 hard-coded.")
3795 (license license:bsd-2)))
3796
3797 (define-public thermald
3798 (package
3799 (name "thermald")
3800 (version "2.4.6")
3801 (source
3802 (origin
3803 (method git-fetch)
3804 (uri (git-reference
3805 (url "https://github.com/intel/thermal_daemon")
3806 (commit (string-append "v" version))))
3807 (file-name (git-file-name name version))
3808 (sha256
3809 (base32 "1lgaky8cmxbi17zpymy2v9wgknx1g92bq50j6kfpsm8qgb7djjb6"))))
3810 (build-system gnu-build-system)
3811 (arguments
3812 `(#:configure-flags
3813 (let ((out (assoc-ref %outputs "out")))
3814 (list (string-append "--with-dbus-sys-dir="
3815 out "/etc/dbus-1/system.d")
3816 "--localstatedir=/var"))
3817 #:make-flags
3818 (list "V=1") ; log build commands
3819 #:phases
3820 (modify-phases %standard-phases
3821 (add-before 'bootstrap 'no-early-./configure
3822 (lambda _
3823 (setenv "NO_CONFIGURE" "yet"))))))
3824 (native-inputs
3825 (list autoconf
3826 autoconf-archive
3827 automake
3828 `(,glib "bin") ; for glib-genmarshal, etc.
3829 gtk-doc
3830 pkg-config))
3831 (inputs
3832 (list dbus-glib libevdev libxml2 upower xz))
3833 (home-page "https://01.org/linux-thermal-daemon/")
3834 (synopsis "CPU scaling for thermal management")
3835 (description "The Linux Thermal Daemon helps monitor and control temperature
3836 on systems running the Linux kernel.")
3837 ;; arm and aarch64 don't have cpuid.h.
3838 (supported-systems '("i686-linux" "x86_64-linux"))
3839 (license license:gpl2)))
3840
3841 (define-public masscan
3842 (package
3843 (name "masscan")
3844 (version "1.0.5")
3845 (source
3846 (origin
3847 (method git-fetch)
3848 (uri (git-reference
3849 (url "https://github.com/robertdavidgraham/masscan")
3850 (commit version)))
3851 (file-name (git-file-name name version))
3852 (sha256
3853 (base32 "0q0c7bsf0pbl8napry1qyg0gl4pd8wn872h4mz9b56dx4rx90vqg"))))
3854 (build-system gnu-build-system)
3855 (inputs
3856 (list libpcap))
3857 (arguments
3858 `(#:test-target "regress"
3859 #:make-flags
3860 (list (string-append "CC=" ,(cc-for-target))
3861 (string-append "PREFIX=" (assoc-ref %outputs "out")))
3862 #:phases
3863 (modify-phases %standard-phases
3864 (delete 'configure) ; no ./configure script
3865 (add-after 'unpack 'patch-path
3866 (lambda* (#:key outputs inputs #:allow-other-keys)
3867 (let* ((out (assoc-ref outputs "out"))
3868 (pcap (assoc-ref inputs "libpcap")))
3869 (substitute* "src/rawsock-pcap.c"
3870 (("libpcap.so") (string-append pcap "/lib/libpcap.so")))
3871 #t))))))
3872 (synopsis "TCP port scanner")
3873 (description "MASSCAN is an asynchronous TCP port scanner. It can detect
3874 open ports, and also complete the TCP connection and interact with the remote
3875 application, collecting the information received.")
3876 (home-page "https://github.com/robertdavidgraham/masscan")
3877 ;; 'src/siphash24.c' is the SipHash reference implementation, which
3878 ;; bears a CC0 Public Domain Dedication.
3879 (license license:agpl3+)))
3880
3881 (define-public hungrycat
3882 (package
3883 (name "hungrycat")
3884 (version "0.4.1")
3885 (source (origin
3886 (method url-fetch)
3887 (uri (string-append "https://github.com/jwilk/hungrycat/"
3888 "releases/download/" version "/"
3889 "hungrycat-" version ".tar.gz"))
3890 (sha256
3891 (base32
3892 "03fc1zsrf99lvxa7b4ps6pbi43304wbxh1f6ci4q0vkal370yfwh"))))
3893 (build-system gnu-build-system)
3894 (native-inputs
3895 ;; For tests.
3896 `(("python" ,python-wrapper)
3897 ("python-nose" ,python-nose)))
3898 (arguments
3899 `(#:test-target "test"))
3900 (synopsis "Single tool that combines @command{cat} & @command{rm}")
3901 (description
3902 "hungrycat prints the contents of a file to standard output, while
3903 simultaneously freeing the disk space it occupied. It is useful if you need
3904 to process a large file, don't have enough space to store both the input and
3905 output files, and don't need the input file afterwards.
3906 While similar in principle to running @command{cat} immediately followed by
3907 @command{rm}, @command{hungrycat} actually frees blocks as soon as they are
3908 printed instead of after the entire file has been read, which is often too
3909 late.")
3910 (home-page "https://jwilk.net/software/hungrycat")
3911 (license license:expat)))
3912
3913 (define-public launchmon
3914 (package
3915 (name "launchmon")
3916 (version "1.0.2")
3917 (source (origin
3918 (method url-fetch)
3919 (uri (string-append
3920 "https://github.com/LLNL/LaunchMON/releases/download/v"
3921 version "/launchmon-v" version ".tar.gz"))
3922 (sha256
3923 (base32
3924 "0fm3nd9mydm9v2bf7bh01dbgrfnpwkapxa3dsvy3x1z0rz61qc0x"))
3925 (modules '((guix build utils)))
3926 (snippet
3927 '(begin
3928 ;; Fix build failure with GCC 7 due to a conversion error.
3929 ;; Remove for versions > 1.0.2.
3930 (substitute* "launchmon/src/linux/lmon_api/lmon_coloc_spawner.cxx"
3931 ((" lmonpl = '\\\\0'")
3932 " *lmonpl = '\\0'"))
3933 #t))))
3934 (build-system gnu-build-system)
3935 (inputs
3936 (list openmpi
3937 munge
3938 boost
3939 libelf
3940 libgcrypt
3941 libgpg-error))
3942 (synopsis "Infrastructue for large scale tool daemon launching")
3943 (description
3944 "LaunchMON is a software infrastructure that enables HPC run-time
3945 tools to co-locate tool daemons with a parallel job. Its API allows a
3946 tool to identify all the remote processes of a job and to scalably
3947 launch daemons into the relevant nodes.")
3948 (home-page "https://github.com/LLNL/LaunchMON")
3949 (supported-systems '("i686-linux" "x86_64-linux"))
3950 (license license:lgpl2.1)))
3951
3952 (define-public spindle
3953 (package
3954 (name "spindle")
3955 (version "0.10")
3956 (source (origin
3957 ;; We use git checkout to avoid github auto-generated tarballs
3958 (method git-fetch)
3959 (uri (git-reference
3960 (url "https://github.com/hpc/Spindle")
3961 (commit (string-append "v" version))))
3962 (file-name (git-file-name name version))
3963 (sha256
3964 (base32
3965 "15n3ay0qq81r5v7fif61q1vdjcq44pp2nynkh3fvbzc9fj3c39wd"))))
3966 (build-system gnu-build-system)
3967 (arguments '(#:configure-flags '("--enable-sec-launchmon"
3968 "--enable-sec-munge"
3969 "--enable-sec-none")))
3970 (inputs
3971 `(("mpi" ,openmpi)
3972 ("munge" ,munge)
3973 ("launchmon" ,launchmon)
3974 ("libgcrypt" ,libgcrypt)))
3975 (synopsis "Scalable library loading in HPC environments")
3976 (description
3977 "Spindle is a tool for improving the performance of dynamic library and
3978 Python loading in HPC environments.")
3979 (home-page "https://github.com/hpc/Spindle")
3980 ;; This package supports x86_64 and PowerPC64
3981 (supported-systems '("x86_64-linux"))
3982 (license license:lgpl2.1)))
3983
3984 (define-public inxi-minimal
3985 (let ((real-name "inxi"))
3986 (package
3987 (name "inxi-minimal")
3988 (version "3.3.11-1")
3989 (source
3990 (origin
3991 (method git-fetch)
3992 (uri (git-reference
3993 (url "https://github.com/smxi/inxi")
3994 (commit version)))
3995 (file-name (git-file-name real-name version))
3996 (sha256
3997 (base32 "1nk3q2xg0myykq1myasxhvhhr0vk8qv3m7pb3icw81r3ydasnls0"))))
3998 (build-system trivial-build-system)
3999 (inputs
4000 `(("bash" ,bash-minimal)
4001 ("perl" ,perl)
4002 ("procps" ,procps)))
4003 (native-inputs
4004 (list gzip))
4005 (arguments
4006 `(#:modules ((guix build utils))
4007 #:builder
4008 (begin
4009 (use-modules (guix build utils)
4010 (ice-9 match)
4011 (srfi srfi-26))
4012 (setenv "PATH" (string-append
4013 (assoc-ref %build-inputs "bash") "/bin" ":"
4014 (assoc-ref %build-inputs "gzip") "/bin" ":"
4015 (assoc-ref %build-inputs "perl") "/bin" ":"))
4016 (copy-recursively (assoc-ref %build-inputs "source")
4017 ,(string-append real-name "-" version))
4018 (with-directory-excursion ,(string-append real-name "-" version)
4019 (with-fluids ((%default-port-encoding #f))
4020 (substitute* "inxi" (("/usr/bin/env perl") (which "perl"))))
4021 (let ((bin (string-append %output "/bin")))
4022 (install-file "inxi" bin)
4023 (wrap-program (string-append bin "/inxi")
4024 `("PATH" ":" =
4025 ("$PATH"
4026 ,@(map (lambda (input)
4027 (match input
4028 ((name . store)
4029 (let ((store-append
4030 (cut string-append store <>)))
4031 (cond
4032 ((member name '("util-linux"))
4033 (string-append (store-append "/bin") ":"
4034 (store-append "/sbin")))
4035 ((member name '("dmidecode" "iproute2"))
4036 (store-append "/sbin"))
4037 (else (store-append "/bin")))))))
4038 %build-inputs)))
4039 `("PERL5LIB" ":" =
4040 ,(delete
4041 ""
4042 (map (match-lambda
4043 (((? (cut string-prefix? "perl-" <>) name) . dir)
4044 (string-append dir "/lib/perl5/site_perl"))
4045 (_ ""))
4046 %build-inputs)))))
4047 (invoke "gzip" "inxi.1")
4048 (install-file "inxi.1.gz"
4049 (string-append %output "/share/man/man1"))))))
4050 (home-page "https://smxi.org/docs/inxi.htm")
4051 (synopsis "Full-featured system information script")
4052 (description "Inxi is a system information script that can display
4053 various things about your hardware and software to users in an IRC chatroom or
4054 support forum. It runs with the @code{/exec} command in most IRC clients.")
4055 (license license:gpl3+))))
4056
4057 (define-public inxi
4058 (package
4059 (inherit inxi-minimal)
4060 (name "inxi")
4061 (inputs
4062 `(("dmidecode" ,dmidecode)
4063 ("file" ,file)
4064 ("bind:utils" ,isc-bind "utils") ; dig
4065 ("gzip" ,gzip)
4066 ("iproute2" ,iproute) ; ip
4067 ("kmod" ,kmod) ; modinfo
4068 ("lm-sensors" ,lm-sensors)
4069 ("mesa-utils" ,mesa-utils)
4070 ("pciutils" ,pciutils)
4071 ("tar" ,tar)
4072 ("tree" ,tree)
4073 ("util-linux" ,util-linux) ; lsblk
4074 ("usbutils" ,usbutils) ; lsusb
4075 ("wmctrl" ,wmctrl)
4076 ("xdpyinfo" ,xdpyinfo)
4077 ("xprop" ,xprop)
4078 ("xrandr" ,xrandr)
4079 ("coreutils" ,coreutils) ; uptime
4080 ("inetutils" ,inetutils) ; ifconfig
4081 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
4082 ("perl-http-tiny" ,perl-http-tiny)
4083 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
4084 ("perl-json-xs" ,perl-json-xs)
4085 ("perl-time-hires" ,perl-time-hires)
4086 ("lvm2" ,lvm2) ; lvs
4087 ("mdadm" ,mdadm)
4088 ;; TODO: Add more inputs:
4089 ;; ipmi-sensors
4090 ;; hddtemp
4091 ;; perl-xml-dumper
4092 ;; ipmitool
4093 ,@(package-inputs inxi-minimal)))))
4094
4095 (define-public pscircle
4096 (package
4097 (name "pscircle")
4098 (version "1.3.1")
4099 (source
4100 (origin
4101 (method git-fetch)
4102 (uri (git-reference
4103 (url "https://gitlab.com/mildlyparallel/pscircle.git")
4104 (commit (string-append "v" version))))
4105 (file-name (git-file-name name version))
4106 (sha256
4107 (base32 "1sm99423hh90kr4wdjqi9sdrrpk65j2vz2hzj65zcxfxyr6khjci"))))
4108 (build-system meson-build-system)
4109 (native-inputs
4110 (list pkg-config))
4111 (inputs
4112 (list cairo libpng libx11))
4113 (home-page "https://gitlab.com/mildlyparallel/pscircle")
4114 (synopsis "Visualize Linux processes in a form of radial tree")
4115 (description
4116 "@code{pscircle} visualizes Linux processes in the form of a radial tree.")
4117 (license license:gpl2+)))
4118
4119 (define-public python-pyudev
4120 (package
4121 (name "python-pyudev")
4122 (version "0.22.0")
4123 (source
4124 (origin
4125 (method url-fetch)
4126 (uri (pypi-uri "pyudev" version))
4127 (sha256
4128 (base32
4129 "0xmj6l08iih2js9skjqpv4w7y0dhxyg91zmrs6v5aa65gbmipfv9"))))
4130 (build-system python-build-system)
4131 (arguments
4132 `(#:tests? #f ; Tests require /sys
4133 #:phases
4134 (modify-phases %standard-phases
4135 (add-after 'unpack 'patch-ctypes-udev
4136 (lambda* (#:key inputs outputs #:allow-other-keys)
4137 (let ((eudev (assoc-ref inputs "eudev")))
4138 (substitute* "src/pyudev/core.py"
4139 (("'udev'")
4140 (string-append "'" eudev "/lib/libudev.so'")))
4141 (substitute* "src/pyudev/_ctypeslib/utils.py"
4142 ;; Use absolute paths instead of keys.
4143 (("= find_library") "= "))
4144 #t))))))
4145 (inputs
4146 (list eudev))
4147 (propagated-inputs
4148 (list python-six))
4149 (native-inputs
4150 (list python-docutils python-hypothesis python-mock python-pytest
4151 python-sphinx))
4152 (home-page "https://pyudev.readthedocs.io/")
4153 (synopsis "Python udev binding")
4154 (description "This package provides @code{udev} bindings for Python.")
4155 (license license:lgpl2.1)))
4156
4157 (define-public vmtouch
4158 (package
4159 (name "vmtouch")
4160 (version "1.3.1")
4161 (source
4162 (origin
4163 (method git-fetch)
4164 (uri (git-reference
4165 (url "https://github.com/hoytech/vmtouch/")
4166 (commit (string-append "v" version))))
4167 (file-name (git-file-name name version))
4168 (sha256
4169 (base32 "08da6apzfkfjwasn4dxrlfxqfx7arl28apdzac5nvm0fhvws0dxk"))))
4170 (build-system gnu-build-system)
4171 (native-inputs
4172 (list perl))
4173 (arguments
4174 `(#:tests? #f ; no tests
4175 #:make-flags
4176 (list
4177 (string-append "CC=" ,(cc-for-target))
4178 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4179 #:phases
4180 (modify-phases %standard-phases
4181 (delete 'configure))))
4182 (home-page "https://github.com/hoytech/vmtouch/")
4183 (synopsis "Portable file system cache diagnostics and control")
4184 (description
4185 "vmtouch is a tool for learning about and controlling the file system
4186 cache of unix and unix-like systems.")
4187 (license license:bsd-3)))
4188
4189 (define-public solaar
4190 (package
4191 (name "solaar")
4192 (version "1.0.7")
4193 (source (origin
4194 (method git-fetch)
4195 (uri (git-reference
4196 (url "https://github.com/pwr-Solaar/Solaar")
4197 (commit version)))
4198 (file-name (git-file-name name version))
4199 (sha256
4200 (base32
4201 "0k7mjdfvf28fay50b2hs2z4qk6s23h71wvl8777idlrz5i5f43j5"))))
4202 (build-system python-build-system)
4203 (arguments
4204 `(#:phases
4205 (modify-phases %standard-phases
4206 (add-before 'build 'setenv-PATH
4207 (lambda _
4208 (setenv "PYTHONPATH" "lib"))))))
4209 (propagated-inputs
4210 (list python-pygobject
4211 python-pyudev
4212 ;; For GUI.
4213 python-pyyaml
4214 python-psutil
4215 python-xlib
4216 gtk+
4217 python-pygobject))
4218 (home-page "https://pwr-solaar.github.io/Solaar/")
4219 (synopsis "Linux devices manager for the Logitech Unifying Receiver")
4220 (description "This package provides tools to manage clients of the
4221 Logitech Unifying Receiver.")
4222 (license license:gpl2)))
4223
4224 (define-public lynis
4225 (package
4226 (name "lynis")
4227 ;; Also update the ‘lynis-sdk’ input to the commit matching this release.
4228 (version "3.0.6")
4229 (source
4230 (origin
4231 (method git-fetch)
4232 (uri (git-reference
4233 (url "https://github.com/CISOfy/lynis")
4234 (commit version)))
4235 (file-name (git-file-name name version))
4236 (sha256
4237 (base32 "1a1n8alcq6zil1rwk9940cg3x2nz3igcxfad99505pdh7ccz9324"))
4238 (modules '((guix build utils)))
4239 (snippet
4240 '(begin
4241 ;; Remove proprietary plugins. As of now, all plugins supplied with
4242 ;; lynis are proprietary. In the future, if free plugins are
4243 ;; provided, whitelist them from deletion.
4244 (for-each delete-file (find-files "plugins"))))))
4245 (build-system gnu-build-system)
4246 (native-inputs
4247 `(;; For tests
4248 ("lynis-sdk"
4249 ,(origin
4250 (method git-fetch)
4251 (uri (git-reference
4252 (url "https://github.com/CISOfy/lynis-sdk")
4253 (commit "1c4e5f60a03e29a1525ca9ec17c793461058253d")))
4254 (file-name (git-file-name "lynis-sdk" version))
4255 (sha256
4256 (base32 "060k8k1q4c7nvrv3cwscxq8md2v75q3nrwwim1hgfw20divw3npy"))))))
4257 (arguments
4258 `(#:phases
4259 (modify-phases %standard-phases
4260 (replace 'configure
4261 (lambda* (#:key inputs outputs #:allow-other-keys)
4262 (substitute* "lynis"
4263 (("/usr/share/lynis")
4264 (string-append (assoc-ref outputs "out") "/share/lynis")))
4265 (substitute* "include/functions"
4266 (("/usr/local/etc/lynis")
4267 (string-append (assoc-ref outputs "out") "/etc/lynis")))))
4268 (delete 'build)
4269 (replace 'install
4270 (lambda* (#:key outputs #:allow-other-keys)
4271 (let ((out (assoc-ref outputs "out")))
4272 (install-file "lynis" (string-append out "/bin/"))
4273 (install-file "default.prf" (string-append out "/etc/lynis"))
4274 (for-each
4275 (lambda (dir)
4276 (copy-recursively dir (string-append out "/share/lynis/" dir)))
4277 (list "db" "include" "plugins"))
4278 (install-file "lynis.8" (string-append out "/share/man/man8")))))
4279 (replace 'check
4280 (lambda* (#:key inputs #:allow-other-keys)
4281 (copy-recursively (assoc-ref inputs "lynis-sdk") "../lynis-sdk")
4282 (setenv "LANG" "en_US.UTF-8")
4283 (let ((lynis-dir (getcwd)))
4284 (with-directory-excursion "../lynis-sdk"
4285 (substitute* "config"
4286 (("\\.\\./lynis") lynis-dir))
4287 (substitute* "unit-tests/tests-language-translations.sh"
4288 (("\\.\\./lynis") lynis-dir))
4289 (invoke "sh" "lynis-devkit" "run" "unit-tests"))))))))
4290 (home-page "https://cisofy.com/lynis/")
4291 (synopsis "Security auditing tool")
4292 (description "Lynis is a security auditing tool. It performs an in-depth
4293 security scan and runs on the system itself. The primary goal is to test
4294 security defenses and provide tips for further system hardening. It will also
4295 scan for general system information, vulnerable software packages, and
4296 possible configuration issues.")
4297 (license license:gpl3+)))
4298
4299 (define-public ngrep
4300 (package
4301 (name "ngrep")
4302 (version "1.47")
4303 (source
4304 (origin
4305 (method git-fetch)
4306 (uri (git-reference
4307 (url "https://github.com/jpr5/ngrep/")
4308 (commit (string-append "V" (string-replace-substring version "." "_")))))
4309 (file-name (git-file-name name version))
4310 (sha256
4311 (base32
4312 "1x2fyd7wdqlj1r76ilal06cl2wmbz0ws6i3ys204sbjh1cj6dcl7"))))
4313 (build-system gnu-build-system)
4314 (inputs
4315 (list libpcap))
4316 (arguments
4317 `(#:tests? #f ;; No tests.
4318 #:configure-flags (list (string-append "--with-pcap-includes="
4319 (assoc-ref %build-inputs "libpcap")
4320 "/include/pcap"))))
4321 (home-page "https://github.com/jpr5/ngrep/")
4322 (synopsis "Grep-like utility to search for network packets on an interface")
4323 (description "@command{ngrep} is like GNU grep applied to the network
4324 layer. It's a PCAP-based tool that allows you to specify an extended regular
4325 or hexadecimal expression to match against data payloads of packets. It
4326 understands many kinds of protocols, including IPv4/6, TCP, UDP, ICMPv4/6,
4327 IGMP and Raw, across a wide variety of interface types, and understands BPF
4328 filter logic in the same fashion as more common packet sniffing tools, such as
4329 tcpdump and snoop.")
4330 (license license:bsd-3)))
4331
4332 (define-public pam-mount
4333 (package
4334 (name "pam-mount")
4335 (version "2.18")
4336 (source
4337 (origin
4338 (method url-fetch)
4339 (uri (string-append "mirror://sourceforge/pam-mount/pam_mount/"
4340 "pam_mount-" version ".tar.xz"))
4341 (sha256
4342 (base32 "0832nh2qf9pisgwnbgx6hkylx5d7i416l19y3ly4ifv7k1p7mxqa"))))
4343 (build-system gnu-build-system)
4344 (native-inputs
4345 (list perl pkg-config))
4346 (inputs
4347 `(("cryptsetup" ,cryptsetup)
4348 ("libhx" ,libhx)
4349 ("libxml2" ,libxml2)
4350 ("linux-pam" ,linux-pam)
4351 ("lvm2" ,lvm2)
4352 ("openssl" ,openssl)
4353 ("pcre2" ,pcre2)
4354 ("libmount" ,util-linux "lib")
4355 ("util-linux" ,util-linux)))
4356 (arguments
4357 `(#:configure-flags
4358 (list (string-append "--with-slibdir=" %output "/lib")
4359 (string-append "--with-ssbindir=" %output "/sbin"))
4360 #:phases
4361 (modify-phases %standard-phases
4362 (add-after 'unpack 'fix-program-paths
4363 (lambda* (#:key inputs outputs #:allow-other-keys)
4364 (let ((util-linux (assoc-ref inputs "util-linux"))
4365 (out (assoc-ref outputs "out")))
4366 (substitute* "src/mtcrypt.c"
4367 (("\"mount\";")
4368 (string-append "\"" util-linux "/bin/mount\";"))
4369 (("\"umount\";")
4370 (string-append "\"" util-linux "/bin/umount\";"))
4371 (("\"fsck\",")
4372 (string-append "\"" util-linux "/sbin/fsck\",")))
4373 (substitute* "src/rdconf1.c"
4374 (("\"mount\", \"")
4375 (string-append "\"" util-linux "/bin/mount\", \""))
4376 (("\"umount\", \"")
4377 (string-append "\"" util-linux "/bin/umount\", \""))
4378 (("\"fsck\", \"")
4379 (string-append "\"" util-linux "/sbin/fsck\", \""))
4380 (("\"pmvarrun\", \"")
4381 (string-append "\"" out "/sbin/pmvarrun\", \""))))
4382 #t)))))
4383 (home-page "http://pam-mount.sourceforge.net")
4384 (synopsis "PAM module to mount volumes for a user session")
4385 (description
4386 "Pam-mount is a PAM module that can mount volumes when a user logs in.
4387 It supports mounting local filesystems of any kind the normal mount utility
4388 supports. It can also mount encrypted LUKS volumes using the password
4389 supplied by the user when logging in.")
4390 (license (list license:gpl2+ license:lgpl2.1+))))
4391
4392 (define-public jc
4393 (package
4394 (name "jc")
4395 (version "1.13.4")
4396 (source
4397 (origin
4398 ;; The PyPI tarball lacks the test suite.
4399 (method git-fetch)
4400 (uri (git-reference
4401 (url "https://github.com/kellyjonbrazil/jc")
4402 (commit (string-append "v" version))))
4403 (file-name (git-file-name name version))
4404 (sha256
4405 (base32 "0rwvyyrdnw43pixp8h51rncq2inc9pbbj1j2191y5si00pjw34zr"))))
4406 (build-system python-build-system)
4407 (propagated-inputs
4408 (list python-pygments python-ruamel.yaml python-xmltodict))
4409 (home-page "https://github.com/kellyjonbrazil/jc")
4410 (synopsis "Convert the output of command-line tools to JSON")
4411 (description "@code{jc} JSONifies the output of many CLI tools and
4412 file-types for easier parsing in scripts.")
4413 (license license:expat)))
4414
4415 (define-public jtbl
4416 (package
4417 (name "jtbl")
4418 (version "1.1.7")
4419 (source (origin
4420 (method git-fetch)
4421 (uri (git-reference
4422 (url "https://github.com/kellyjonbrazil/jtbl")
4423 (commit (string-append "v" version))))
4424 (file-name (git-file-name name version))
4425 (sha256
4426 (base32
4427 "19i21fqz2m40cds9pb17brjxkczqagmx2f7mfb0xdvbygaply5wz"))))
4428 (build-system python-build-system)
4429 (inputs
4430 (list python-tabulate))
4431 (home-page "https://github.com/kellyjonbrazil/jtbl")
4432 (synopsis "Command-line tool to print JSON data as a table in the terminal")
4433 (description "@code{jtbl} accepts piped JSON data from stdin and outputs a
4434 text table representation to stdout.")
4435 (license license:expat)))
4436
4437 (define-public hosts
4438 (package
4439 (name "hosts")
4440 (version "3.6.3")
4441 (source (origin
4442 (method git-fetch)
4443 (uri (git-reference
4444 (url "https://github.com/xwmx/hosts")
4445 (commit version)))
4446 (file-name (git-file-name name version))
4447 (sha256
4448 (base32
4449 "1ni4z89kxzgwm26hhx908g04f2h0fypy7lgfa0rvsz8d0wslgcsn"))))
4450 (build-system trivial-build-system)
4451 (inputs
4452 `(("bats" ,bats) ;for test
4453 ("awk" ,gawk)
4454 ("bash" ,bash)
4455 ("coreutils" ,coreutils)
4456 ("diffutils" ,diffutils)
4457 ("grep" ,grep)
4458 ("ncurses" ,ncurses) ;tput
4459 ("sed" ,sed)))
4460 (arguments
4461 `(#:modules ((guix build utils))
4462 #:builder
4463 (begin
4464 (use-modules (guix build utils))
4465 ;; copy source
4466 (copy-recursively (assoc-ref %build-inputs "source") ".")
4467 ;; patch-shebang phase
4468 (setenv "PATH"
4469 (string-append (assoc-ref %build-inputs "bash") "/bin"
4470 ":" (assoc-ref %build-inputs "awk") "/bin"
4471 ":" (assoc-ref %build-inputs "coreutils") "/bin"
4472 ":" (assoc-ref %build-inputs "diffutils") "/bin"
4473 ":" (assoc-ref %build-inputs "grep") "/bin"
4474 ":" (assoc-ref %build-inputs "ncurses") "/bin"
4475 ":" (assoc-ref %build-inputs "sed") "/bin"
4476 ":" "/run/setuid-programs"
4477 ":" (getenv "PATH")))
4478 (substitute* "hosts"
4479 (("#!/usr/bin/env bash")
4480 (string-append "#!" (which "bash")
4481 "\nPATH=" (getenv "PATH"))))
4482 ;; check phase
4483 (setenv "TERM" "linux") ;set to tty for test
4484 (invoke (search-input-file %build-inputs "/bin/bats")
4485 "test")
4486 ;; install phase
4487 (install-file "hosts" (string-append %output "/bin"))
4488 (let ((bash-completion
4489 (string-append %output "/etc/bash_completion.d")))
4490 (mkdir-p bash-completion)
4491 (copy-file "etc/hosts-completion.bash"
4492 (string-append bash-completion "/hosts")))
4493 (let ((zsh-completion
4494 (string-append %output "/share/zsh/site-functions")))
4495 (mkdir-p zsh-completion)
4496 (copy-file "etc/hosts-completion.zsh"
4497 (string-append zsh-completion "/_hosts")))
4498 (let ((doc (string-append %output "/share/doc/" ,name "-" ,version)))
4499 (mkdir-p doc)
4500 (install-file "LICENSE" doc)
4501 (install-file "README.md" doc))
4502 #t)))
4503 (home-page "https://github.com/xwmx/hosts/")
4504 (synopsis "Script for editing a foreign distro's @file{/etc/hosts} file")
4505 (description "Hosts is a command line program for managing
4506 @file{/etc/hosts} entries. On Guix System, @file{/etc/hosts} is managed from
4507 the system configuration; hosts only works when using the Guix package manager
4508 on a foreign distro. @command{hosts} works with existing hosts files and
4509 entries, providing commands to add, remove, comment, and search.")
4510 (license license:expat)))
4511
4512 (define-public nmrpflash
4513 (package
4514 (name "nmrpflash")
4515 (version "0.9.15")
4516 (source
4517 (origin
4518 (method git-fetch)
4519 (uri
4520 (git-reference
4521 (url "https://github.com/jclehner/nmrpflash")
4522 (commit (string-append "v" version))))
4523 (sha256
4524 (base32 "0ssfls1sfh8w748qsnkfgndlpw395100x2yynzbk5jd56scxvp20"))
4525 (file-name (git-file-name name version))))
4526 (build-system gnu-build-system)
4527 (native-inputs
4528 (list pkg-config))
4529 (inputs
4530 (list libnl libpcap))
4531 (arguments
4532 `(#:tests? #f ; None exist
4533 #:make-flags
4534 (list (string-append "CC=" ,(cc-for-target))
4535 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4536 #:phases
4537 (modify-phases %standard-phases
4538 (delete 'configure)
4539 (add-before 'install 'prepare-install
4540 (lambda* (#:key outputs #:allow-other-keys)
4541 (mkdir-p (string-append (assoc-ref outputs "out") "/bin"))
4542 #t)))))
4543 (home-page "https://github.com/jclehner/nmrpflash")
4544 (synopsis "Netgear unbrick utility")
4545 (description "This package provides a utility to flash a new firmware
4546 image to a Netgear device. It has been tested on Netgear EX2700, EX6120,
4547 EX6150v2, DNG3700v2, R6100, R6220, R7000, D7000, WNR3500, R6400, R6800,
4548 R8000, R8500, WNDR3800, but is likely to be compatible with many other
4549 Netgear devices.")
4550 (license license:gpl3+)))
4551
4552 (define-public atop
4553 (package
4554 (name "atop")
4555 (version "2.6.0")
4556 (source (origin
4557 (method url-fetch)
4558 (uri (string-append "https://www.atoptool.nl/download/atop-"
4559 version ".tar.gz"))
4560 (sha256
4561 (base32
4562 "0wlg0n0h9vwpjp2dcb623jvvqck422jrjpq9mbpzg4hnawxcmhly"))))
4563 (build-system gnu-build-system)
4564 (arguments
4565 `(#:tests? #f ; no test suite
4566 #:make-flags
4567 (list (string-append "CC=" ,(cc-for-target))
4568 ;; The installer requires a choice between systemd or SysV.
4569 "systemdinstall"
4570 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
4571 (string-append "BINPATH=/bin")
4572 (string-append "SBINPATH=/sbin")
4573 (string-append "SYSDPATH=/etc/systemd/system")
4574 (string-append "PMPATHD=/etc/systemd/system-sleep")
4575 (string-append "MAN1PATH=/share/man/man1")
4576 (string-append "MAN5PATH=/share/man/man5")
4577 (string-append "MAN8PATH=/share/man/man8")
4578 ;; Or else it tries to create /var/log/atop...
4579 (string-append "LOGPATH="))
4580 #:phases
4581 (modify-phases %standard-phases
4582 (delete 'configure) ; No ./configure script
4583 (add-before 'build 'patch-build
4584 (lambda* (#:key outputs #:allow-other-keys)
4585 (substitute* "Makefile"
4586 ;; We don't need to chown things in the build environment.
4587 (("chown.*$") "")
4588 ;; We can't toggle the setuid bit in the build environment.
4589 (("chmod 04711") "chmod 0711")
4590 ;; Otherwise, it creates a blank configuration file as a "default".
4591 (("touch.*DEFPATH)/atop") "")
4592 (("chmod.*DEFPATH)/atop") ""))
4593 #t)))))
4594 (inputs
4595 `(("ncurses" ,ncurses)
4596 ("python" ,python-wrapper) ; for `atopgpud`
4597 ("zlib" ,zlib)))
4598 (home-page "https://www.atoptool.nl/")
4599 (synopsis "Linux performance monitoring console")
4600 (description "Atop is an ASCII full-screen performance monitor for Linux
4601 that is capable of reporting the activity of all processes (even processes have
4602 finished during the monitoring interval), daily logging of system and process
4603 activity for long-term analysis, highlighting overloaded system resources by
4604 using colors, etc. At regular intervals, it shows system-level activity related
4605 to the CPU, memory, swap, disks (including LVM) and network layers, and for
4606 every process (and thread) it shows e.g. the CPU utilization, memory growth,
4607 disk utilization, priority, username, state, and exit code.")
4608 (license license:gpl2+)))
4609
4610 ;; TODO: Unvendor u-root (pkg: forth, golang, testutil).
4611 (define fiano
4612 (package
4613 (name "fiano")
4614 (version "5.0.0")
4615 (source (origin
4616 (method git-fetch)
4617 (uri (git-reference
4618 (url "https://github.com/linuxboot/fiano.git")
4619 (commit (string-append "v" version))))
4620 (file-name (string-append name "-" version "-checkout"))
4621 (sha256
4622 (base32
4623 "03ihdwwhb7g6bihx141cn0924sjs5ps6q3ps58pk1cg0g0srrr9h"))
4624 (modules '((guix build utils)))
4625 (snippet
4626 '(begin
4627 (delete-file-recursively "vendor/golang.org")
4628 (delete-file-recursively "vendor/github.com")
4629 #t))))
4630 (build-system go-build-system)
4631 (arguments
4632 `(#:import-path "github.com/linuxboot/fiano"
4633 #:unpack-path "github.com/linuxboot/fiano"))
4634 (native-inputs
4635 `())
4636 (inputs
4637 `(("go-golang-org-x-text" ,go-golang-org-x-text)
4638 ("go-github.com-ulikunitz-xz" ,go-github.com-ulikunitz-xz)))
4639 (synopsis "UEFI image editor")
4640 (description "This package provides a command-line UEFI image editor.")
4641 (home-page "https://github.com/linuxboot/fiano")
4642 (license license:bsd-3)))
4643
4644 (define-public fiano-utk
4645 (package
4646 (inherit fiano)
4647 (name "fiano-utk")
4648 (arguments
4649 `(#:import-path "github.com/linuxboot/fiano/cmds/utk"
4650 #:unpack-path "github.com/linuxboot/fiano"))))
4651
4652 (define-public fiano-fmap
4653 (package
4654 (inherit fiano)
4655 (name "fiano-fmap")
4656 (arguments
4657 `(#:import-path "github.com/linuxboot/fiano/cmds/fmap"
4658 #:unpack-path "github.com/linuxboot/fiano"))))
4659
4660 (define-public novena-eeprom
4661 (package
4662 (name "novena-eeprom")
4663 (version "2.3")
4664 (source (origin
4665 (method git-fetch)
4666 (uri (git-reference
4667 (url "https://github.com/xobs/novena-eeprom.git")
4668 (commit (string-append "v" version))))
4669 (file-name (string-append name "-" version "-checkout"))
4670 (sha256
4671 (base32
4672 "00pd71mg0g20v0820ggp3ghf9nyj5s4wavaz9mkmrmsr91hcnf7i"))))
4673 (build-system gnu-build-system)
4674 (arguments
4675 `(#:tests? #f ; No tests exist
4676 #:make-flags
4677 (list (string-append "CC=" ,(cc-for-target)))
4678 #:phases
4679 (modify-phases %standard-phases
4680 (delete 'configure)
4681 (replace 'install
4682 (lambda* (#:key outputs #:allow-other-keys)
4683 (let* ((out (assoc-ref outputs "out"))
4684 (out-bin (string-append out "/bin"))
4685 (out-share-man (string-append out "/share/man/man8")))
4686 (install-file "novena-eeprom" out-bin)
4687 (install-file "novena-eeprom.8" out-share-man)))))))
4688 (inputs
4689 (list i2c-tools))
4690 (synopsis "Novena EEPROM editor")
4691 (description "This package provides an editor for the Novena EEPROM.
4692 Novena boards contain a device-dependent descriptive EEPROM that defines
4693 various parameters such as serial number, MAC address, and featureset.
4694 This program allows you to view and manipulate this EEPROM list.")
4695 (home-page "https://github.com/xobs/novena-eeprom/")
4696 (supported-systems '("armhf-linux"))
4697 (license license:bsd-3)))
4698
4699 (define-public lrzsz
4700 (package
4701 (name "lrzsz")
4702 (version "0.12.20")
4703 (source (origin
4704 (method url-fetch)
4705 (uri (string-append "https://www.ohse.de/uwe/releases/lrzsz-"
4706 version ".tar.gz"))
4707 (sha256
4708 (base32
4709 "1wcgfa9fsigf1gri74gq0pa7pyajk12m4z69x7ci9c6x9fqkd2y2"))))
4710 (build-system gnu-build-system)
4711 (arguments
4712 `(#:phases
4713 (modify-phases %standard-phases
4714 (replace 'configure
4715 (lambda* (#:key outputs #:allow-other-keys)
4716 (setenv "CONFIG_SHELL" (which "bash"))
4717 (invoke "./configure"
4718 (string-append "--prefix="
4719 (assoc-ref outputs "out"))))))))
4720 (synopsis "Implementation of XMODEM/YMODEM/ZMODEM transfer protocols")
4721 (description "This package provides programs that transfer files using
4722 the XMODEM/YMODEM/ZMODEM file transfer protocols.")
4723 (home-page "https://ohse.de/uwe/software/lrzsz.html")
4724 (license license:gpl2+)))
4725
4726 (define-public nq
4727 (package
4728 (name "nq")
4729 (version "0.4")
4730 (source
4731 (origin
4732 (method git-fetch)
4733 (uri (git-reference
4734 (url "https://github.com/leahneukirchen/nq")
4735 (commit (string-append "v" version))))
4736 (file-name (git-file-name name version))
4737 (sha256
4738 (base32 "0sdamjzvmf6cxhjmd1rjvn7zm6k10fp5n6vabyxd3yl30cgrxw2i"))))
4739 (build-system gnu-build-system)
4740 (native-inputs
4741 (list perl))
4742 (arguments
4743 `(#:make-flags (list (string-append "CC=" ,(cc-for-target))
4744 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4745 #:phases
4746 (modify-phases %standard-phases
4747 (delete 'configure))))
4748 (synopsis "Unix command line queue utility")
4749 (description
4750 "@code{nq} can create very lightweight job queue systems which require no
4751 setup, maintenance, supervision, or any long-running processes.")
4752 (home-page "https://github.com/leahneukirchen/nq")
4753 (license license:public-domain)))
4754
4755 (define-public lsofgraph
4756 (let ((commit "1d414bdc727c00a8c6cbfffc3c43128c60d6f0de")
4757 (revision "1"))
4758 (package
4759 (name "lsofgraph")
4760 (version (git-version "0.0.1" revision commit)) ;no upstream release
4761 (source (origin
4762 (method git-fetch)
4763 (uri (git-reference
4764 (url "https://github.com/zevv/lsofgraph")
4765 (commit commit)))
4766 (file-name (git-file-name name version))
4767 (sha256
4768 (base32
4769 "058x04yp6bc77hbl3qchqm7pa8f9vqfl9jryr88m8pzl7kvpif54"))))
4770 (build-system trivial-build-system)
4771 (inputs
4772 (list lua))
4773 (arguments
4774 `(#:modules ((guix build utils))
4775 #:builder
4776 (begin
4777 (use-modules (guix build utils))
4778 ;; copy source
4779 (copy-recursively (assoc-ref %build-inputs "source") ".")
4780 ;; patch-shebang phase
4781 (setenv "PATH"
4782 (string-append (assoc-ref %build-inputs "lua") "/bin"
4783 ":" (getenv "PATH")))
4784 (substitute* "lsofgraph"
4785 (("#!/usr/bin/env lua")
4786 (string-append "#!" (which "lua"))))
4787 ;; install phase
4788 (install-file "lsofgraph" (string-append %output "/bin"))
4789 (let ((doc (string-append
4790 %output "/share/doc/" ,name "-" ,version)))
4791 (mkdir-p doc)
4792 (install-file "LICENSE" doc)
4793 (install-file "README.md" doc))
4794 #t)))
4795 (home-page "https://github.com/zevv/lsofgraph")
4796 (synopsis "Convert @code{lsof} output to @code{graphviz}")
4797 (description "Utility to convert @code{lsof} output to a graph showing
4798 FIFO and UNIX interprocess communication.")
4799 (license license:bsd-2))))
4800
4801 (define-public runitor
4802 (package
4803 (name "runitor")
4804 (version "0.8.0")
4805 (source
4806 (origin
4807 (method git-fetch)
4808 (uri (git-reference
4809 (url "https://github.com/bdd/runitor")
4810 (commit (string-append "v" version))))
4811 (file-name (git-file-name name version))
4812 (sha256
4813 (base32 "0vjfbyrbp5ywgzdz9j3x0qgjvnq7nw7193x8v9yy6k2cih1zsacn"))))
4814 (build-system go-build-system)
4815 (arguments
4816 `(#:unpack-path "bdd.fi/x/runitor"
4817 #:build-flags '(,(string-append "-ldflags=-X main.Version=" version))
4818 #:import-path "bdd.fi/x/runitor/cmd/runitor"
4819 #:install-source? #f))
4820 (home-page "https://github.com/bdd/runitor")
4821 (synopsis "Command runner with healthchecks.io integration")
4822 (description
4823 "Runitor runs the supplied command, captures its output, and based on its
4824 exit code reports successful or failed execution to
4825 @url{https://healthchecks.io,https://healthchecks.io} or your private instance.")
4826 (license license:bsd-0)))
4827
4828 (define-public udpcast
4829 (package
4830 (name "udpcast")
4831 (version "20200328")
4832 (source
4833 (origin
4834 (method url-fetch)
4835 ;; XXX: Original server is at https://www.udpcast.linux.lu is not
4836 ;; reliable.
4837 (uri (list (string-append
4838 "http://sources.buildroot.net/udpcast/udpcast-"
4839 version ".tar.gz")
4840 (string-append
4841 "https://fossies.org/linux/privat/udpcast-"
4842 version ".tar.gz")
4843 (string-append
4844 "https://www.udpcast.linux.lu/download/udpcast-"
4845 version ".tar.gz")))
4846 (sha256
4847 (base32 "06pj86nbi9hx7abbb0z2c5ynhfq0rv89b7nmy0kq3xz2lsxfw6cw"))))
4848 (build-system gnu-build-system)
4849 (native-inputs
4850 (list autoconf automake m4 perl))
4851 (arguments `(#:tests? #f)) ;no test suite
4852 (synopsis "Multicast file transfer tool")
4853 (description
4854 "UDPcast is a file transfer tool that can send data simultaneously to
4855 many destinations on a LAN. This can for instance be used to install entire
4856 classrooms of PC's at once. The advantage of UDPcast over using other
4857 methods (nfs, ftp, whatever) is that UDPcast uses UDP's multicast abilities:
4858 it won't take longer to install 15 machines than it would to install just 2.")
4859 (home-page "https://www.udpcast.linux.lu")
4860 (license license:gpl2+)))
4861
4862