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