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