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