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