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