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