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