Merge branch 'master' into core-updates-frozen
[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.0.5")
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 "10lp6cbfvigzp6pq5nwj3s3l4vs7cv92krz2r08nwrz8vl6rqdzp"))
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.8")
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 "1rlln9nb3lvg4qlkp0c9qxjflx36rf16mflg0sps2kl0k7lmswzi"))
1701 (modules '((guix build utils)))
1702 (snippet
1703 '(begin
1704 (delete-file-recursively "lib/zlib")
1705 #t))))
1706 (build-system gnu-build-system)
1707 (outputs (list "out"))
1708 (arguments
1709 `(#:configure-flags
1710 (list (string-append "--docdir=" (assoc-ref %outputs "out")
1711 "/share/doc/" ,name "-" ,version)
1712
1713 "--with-logpath=/var/log/sudo.log"
1714 "--with-rundir=/var/run/sudo" ; must be cleaned up at boot time
1715 "--with-vardir=/var/db/sudo"
1716 "--with-iologdir=/var/log/sudo-io"
1717
1718 ;; 'visudo.c' expects _PATH_MV to be defined, but glibc doesn't
1719 ;; provide it.
1720 (string-append "CPPFLAGS=-D_PATH_MV='\""
1721 (assoc-ref %build-inputs "coreutils")
1722 "/bin/mv\"'"))
1723
1724 ;; Avoid non-determinism; see <http://bugs.gnu.org/21918>.
1725 #:parallel-build? #f
1726
1727 #:phases
1728 (modify-phases %standard-phases
1729 (add-before 'configure 'pre-configure
1730 (lambda _
1731 (substitute* "src/sudo_usage.h.in"
1732 ;; Do not capture 'configure' arguments since we would
1733 ;; unduly retain references, and also because the
1734 ;; CPPFLAGS above would close the string literal
1735 ;; prematurely.
1736 (("@CONFIGURE_ARGS@") "\"\""))
1737 (substitute* (find-files "." "Makefile\\.in")
1738 ;; Allow installation as non-root.
1739 (("-o [[:graph:]]+ -g [[:graph:]]+")
1740 "")
1741 ;; Don't try to create /etc/sudoers.
1742 (("^install: (.*)install-sudoers(.*)" _ before after)
1743 (string-append "install: " before after "\n"))
1744 ;; Don't try to create /run/sudo.
1745 (("\\$\\(DESTDIR\\)\\$\\(rundir\\)")
1746 "$(TMPDIR)/dummy")
1747 ;; Install example sudo{,_logsrvd}.conf to the right place.
1748 (("\\$\\(DESTDIR\\)\\$\\(sysconfdir\\)")
1749 "$(DESTDIR)/$(docdir)/examples")
1750 ;; Don't try to create /var/db/sudo.
1751 (("\\$\\(DESTDIR\\)\\$\\(vardir\\)")
1752 "$(TMPDIR)/dummy"))
1753
1754 ;; ‘Checking existing [/etc/]sudoers file for syntax errors’ is
1755 ;; not the task of the build system, and fails.
1756 (substitute* "plugins/sudoers/Makefile.in"
1757 (("^pre-install:" match)
1758 (string-append match "\ndisabled-" match)))
1759 #t)))
1760
1761 ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
1762 ;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
1763 #:tests? #f))
1764 (native-inputs
1765 `(("groff" ,groff)))
1766 (inputs
1767 `(("coreutils" ,coreutils)
1768 ,@(if (hurd-target?)
1769 '()
1770 `(("linux-pam" ,linux-pam)))
1771 ("zlib" ,zlib)))
1772 (home-page "https://www.sudo.ws/")
1773 (synopsis "Run commands as root")
1774 (description
1775 "Sudo (su \"do\") allows a system administrator to delegate authority to
1776 give certain users (or groups of users) the ability to run some (or all)
1777 commands as root or another user while providing an audit trail of the
1778 commands and their arguments.")
1779
1780 ;; See <http://www.sudo.ws/sudo/license.html>.
1781 (license license:x11)))
1782
1783 (define-public opendoas
1784 (package
1785 (name "opendoas")
1786 (version "6.8.1")
1787 (source (origin
1788 (method git-fetch)
1789 (uri (git-reference
1790 (url "https://github.com/Duncaen/OpenDoas")
1791 (commit (string-append "v" version))))
1792 (file-name (git-file-name name version))
1793 (sha256
1794 (base32
1795 "0gfcssm21vdfg6kcrcc7hz1h4jmhy2zv29rfqyrrj3a6r9b5ah8p"))))
1796 (build-system gnu-build-system)
1797 (arguments
1798 `(#:phases
1799 (modify-phases %standard-phases
1800 (add-before 'configure 'pre-configure
1801 (lambda* (#:key outputs #:allow-other-keys)
1802 (substitute* "GNUmakefile"
1803 (("^\tchown.*$") ""))
1804 ;; OpenDoas look for binaries in safepath when a rule specify a
1805 ;; relative command, such as “permit keepenv :wheel cmd guix”.
1806 (substitute* "doas.c"
1807 (("safepath =" match)
1808 (string-append match " \""
1809 "/run/setuid-programs:"
1810 "/run/current-system/profile/bin:"
1811 "/run/current-system/profile/sbin:"
1812 "\" ")))
1813 #t))
1814 (replace 'configure
1815 ;; The configure script doesn't accept most of the default flags.
1816 (lambda* (#:key configure-flags #:allow-other-keys)
1817 ;; The configure script can be told which compiler to use only
1818 ;; through environment variables.
1819 (setenv "CC" ,(cc-for-target))
1820 (apply invoke "./configure" configure-flags))))
1821 #:configure-flags
1822 (list (string-append "--prefix=" (assoc-ref %outputs "out"))
1823 "--with-timestamp")
1824 ;; Compiler choice is not carried over from the configure script.
1825 #:make-flags
1826 (list (string-append "CC=" ,(cc-for-target)))
1827 #:tests? #f)) ; no test suite
1828 (native-inputs
1829 `(("bison" ,bison)))
1830 (home-page "https://github.com/Duncaen/OpenDoas")
1831 (synopsis "Portable version of OpenBSD's doas command")
1832 (description "Doas is a minimal replacement for the venerable sudo. It was
1833 initially written by Ted Unangst of the OpenBSD project to provide 95% of the
1834 features of sudo with a fraction of the codebase.")
1835 (license (list license:bsd-3 ; libbsd/*
1836 license:isc)))) ; everything else
1837
1838 (define-public wpa-supplicant-minimal
1839 (package
1840 (name "wpa-supplicant-minimal")
1841 (version "2.9")
1842 (source (origin
1843 (method url-fetch)
1844 (uri (string-append
1845 "https://w1.fi/releases/wpa_supplicant-"
1846 version ".tar.gz"))
1847 (sha256
1848 (base32
1849 "05qzak1mssnxcgdrafifxh9w86a4ha69qabkg4bsigk499xyxggw"))
1850 (modules '((guix build utils)))
1851 (snippet
1852 '(begin
1853 (substitute* "wpa_supplicant/defconfig"
1854 ;; Disable D-Bus to save ~14MiB on the closure size.
1855 (("^CONFIG_CTRL_IFACE_DBUS" line _)
1856 (string-append "#" line)))
1857 #t))
1858 (patches
1859 (search-patches "wpa-supplicant-CVE-2021-27803.patch"
1860 "wpa-supplicant-CVE-2021-30004.patch"))))
1861 (build-system gnu-build-system)
1862 (arguments
1863 `(#:phases
1864 (modify-phases %standard-phases
1865 (replace 'configure
1866 (lambda _
1867 (chdir "wpa_supplicant")
1868 (copy-file "defconfig" ".config")
1869 (let ((port (open-file ".config" "al")))
1870 (display "
1871 CONFIG_DEBUG_SYSLOG=y
1872
1873 CONFIG_TLS=openssl
1874
1875 CONFIG_DRIVER_NL80211=y
1876 CFLAGS += $(shell pkg-config libnl-3.0 --cflags)
1877 CONFIG_LIBNL32=y
1878 CONFIG_READLINE=y\n" port)
1879 (close-port port))
1880 ;; Make sure we have a pkg-config when cross compiling
1881 (substitute* '(".config"
1882 "Android.mk"
1883 "Makefile"
1884 "dbus/Makefile")
1885 (("pkg-config")
1886 (or (which "pkg-config")
1887 (which (string-append ,(%current-target-system)
1888 "-pkg-config")))))
1889 #t))
1890 (add-after 'install 'install-documentation
1891 (lambda* (#:key outputs #:allow-other-keys)
1892 (let* ((out (assoc-ref outputs "out"))
1893 (doc (string-append out "/share/doc/wpa-supplicant"))
1894 (man (string-append out "/share/man"))
1895 (man5 (string-append man "/man5"))
1896 (man8 (string-append man "/man8")))
1897 (define (copy-man-page target)
1898 (lambda (file)
1899 (install-file file target)))
1900
1901 (mkdir-p man5) (mkdir man8)
1902 (for-each (copy-man-page man5)
1903 (find-files "doc/docbook" "\\.5"))
1904 (for-each (copy-man-page man8)
1905 (find-files "doc/docbook" "\\.8"))
1906
1907 ;; wpa_supplicant.conf(5) does not explain all configuration
1908 ;; options but refers to the example config file, so install it
1909 ;; along with READMEs.
1910 (for-each (lambda (file)
1911 (install-file file doc))
1912 '("README" "README-DPP" "README-HS20"
1913 "README-P2P" "README-WPS"
1914 "wpa_supplicant.conf"))
1915 #t))))
1916
1917 #:make-flags (list (string-append "CC=" ,(cc-for-target))
1918 (string-append "BINDIR=" (assoc-ref %outputs "out")
1919 "/sbin")
1920 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1921 "/lib"))
1922 #:tests? #f))
1923 (inputs
1924 `(("readline" ,readline)
1925 ("libnl" ,libnl)
1926 ("openssl" ,openssl)))
1927 (native-inputs
1928 `(("pkg-config" ,pkg-config)))
1929 (home-page "https://w1.fi/wpa_supplicant/")
1930 (synopsis "Connecting to WPA and WPA2-protected wireless networks")
1931 (description
1932 "wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
1933 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in
1934 the client stations. It implements key negotiation with a WPA Authenticator
1935 and it controls the roaming and IEEE 802.11 authentication/association of the
1936 WLAN driver.
1937
1938 This package provides the @code{wpa_supplicant} daemon and the @code{wpa_cli}
1939 command.")
1940
1941 ;; In practice, this is linked against Readline, which makes it GPLv3+.
1942 (license license:bsd-3)
1943
1944 (properties `((cpe-name . "wpa_supplicant")))))
1945
1946 (define-public wpa-supplicant
1947 (package (inherit wpa-supplicant-minimal)
1948 (name "wpa-supplicant")
1949 (inputs `(("dbus" ,dbus)
1950 ,@(package-inputs wpa-supplicant-minimal)))
1951 (arguments
1952 (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
1953 ((#:phases phases)
1954 `(modify-phases ,phases
1955 (add-after 'configure 'configure-for-dbus
1956 (lambda _
1957 (let ((port (open-file ".config" "al")))
1958 (display "
1959 CONFIG_CTRL_IFACE_DBUS_NEW=y
1960 CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
1961 (close-port port))
1962 #t))
1963 (add-after 'install-documentation 'install-dbus-conf
1964 (lambda* (#:key outputs #:allow-other-keys)
1965 (let* ((out (assoc-ref outputs "out"))
1966 (dir (string-append out "/etc/dbus-1/system.d")))
1967 (mkdir-p dir)
1968 (copy-file "dbus/dbus-wpa_supplicant.conf"
1969 (string-append dir "/wpa_supplicant.conf")))
1970 #t))))))))
1971
1972 (define-public wpa-supplicant-gui
1973 (package
1974 (inherit wpa-supplicant)
1975 (name "wpa-supplicant-gui")
1976 (inputs `(("qtbase" ,qtbase-5)
1977 ("qtsvg" ,qtsvg)
1978 ,@(package-inputs wpa-supplicant)))
1979 (native-inputs
1980 ;; For icons.
1981 `(("imagemagick" ,imagemagick)
1982 ("inkscape" ,inkscape)
1983 ,@(package-native-inputs wpa-supplicant)))
1984 (arguments
1985 `(#:phases (modify-phases %standard-phases
1986 (add-after 'unpack 'chdir
1987 (lambda _
1988 (chdir "wpa_supplicant/wpa_gui-qt4")
1989 #t))
1990 (delete 'configure)
1991 (replace 'build
1992 (lambda _
1993 (invoke "qmake" "wpa_gui.pro")
1994 (invoke "make" "-j" (number->string (parallel-job-count)))
1995 (invoke "make" "-C" "icons")))
1996 (replace 'install
1997 (lambda* (#:key inputs outputs #:allow-other-keys)
1998 (let ((out (assoc-ref outputs "out"))
1999 (qt '("qtbase" "qtsvg")))
2000 (install-file "wpa_gui" (string-append out "/bin"))
2001 (install-file "wpa_gui.desktop"
2002 (string-append out "/share/applications"))
2003 (copy-recursively "icons/hicolor"
2004 (string-append out "/share/icons/hicolor"))
2005 (wrap-program (string-append out "/bin/wpa_gui")
2006 `("QT_PLUGIN_PATH" ":" prefix
2007 ,(map (lambda (label)
2008 (string-append (assoc-ref inputs label)
2009 "/lib/qt5/plugins/"))
2010 qt)))
2011 #t))))))
2012 (synopsis "Graphical user interface for WPA supplicant")))
2013
2014 (define-public hostapd
2015 (package
2016 (name "hostapd")
2017 (version "2.9")
2018 (source (origin
2019 (method url-fetch)
2020 (uri (string-append "https://w1.fi/releases/hostapd-" version
2021 ".tar.gz"))
2022 (sha256
2023 (base32
2024 "1mrbvg4v7vm7mknf0n29mf88k3s4a4qj6r4d51wq8hmjj1m7s7c8"))
2025 (patches
2026 (search-patches "wpa-supplicant-CVE-2021-27803.patch"
2027 "wpa-supplicant-CVE-2021-30004.patch"))))
2028 (build-system gnu-build-system)
2029 (arguments
2030 `(#:phases
2031 (modify-phases %standard-phases
2032 (replace 'configure
2033 (lambda _
2034 ;; This is mostly copied from 'wpa-supplicant' above.
2035 (chdir "hostapd")
2036 (copy-file "defconfig" ".config")
2037 (let ((port (open-file ".config" "al")))
2038 (display "
2039 CONFIG_LIBNL32=y
2040 CONFIG_IEEE80211R=y
2041 CONFIG_IEEE80211N=y
2042 CONFIG_IEEE80211AC=y\n" port)
2043 (close-port port))
2044 #t))
2045 (add-after 'unpack 'patch-pkg-config
2046 (lambda _
2047 (substitute* "src/drivers/drivers.mak"
2048 (("pkg-config")
2049 (or (which "pkg-config")
2050 (string-append ,(%current-target-system)
2051 "-pkg-config"))))
2052 #t))
2053 (add-after 'install 'install-man-pages
2054 (lambda* (#:key outputs #:allow-other-keys)
2055 (let* ((out (assoc-ref outputs "out"))
2056 (man (string-append out "/share/man"))
2057 (man1 (string-append man "/man1"))
2058 (man8 (string-append man "/man8")))
2059 (define (copy-man-page target)
2060 (lambda (file)
2061 (install-file file target)))
2062
2063 (for-each (copy-man-page man1)
2064 (find-files "." "\\.1"))
2065 (for-each (copy-man-page man8)
2066 (find-files "." "\\.8"))
2067 #t))))
2068
2069 #:make-flags (list (string-append "CC=" ,(cc-for-target))
2070 (string-append "BINDIR=" (assoc-ref %outputs "out")
2071 "/sbin")
2072 (string-append "LIBDIR=" (assoc-ref %outputs "out")
2073 "/lib"))
2074 #:tests? #f))
2075 (native-inputs `(("pkg-config" ,pkg-config)))
2076
2077 ;; There's an optional dependency on SQLite.
2078 (inputs `(("openssl" ,openssl)
2079 ("libnl" ,libnl)))
2080 (home-page "https://w1.fi/hostapd/")
2081 (synopsis "Daemon for Wi-Fi access points and authentication servers")
2082 (description
2083 "hostapd is a user-space daemon for WiFi access points and authentication
2084 servers. It implements IEEE 802.11 access point management, IEEE
2085 802.1X/WPA/WPA2/EAP Authenticators, RADIUS client, EAP server, and RADIUS
2086 authentication server.")
2087
2088 ;; Same license as wpa_supplicant.
2089 (license license:bsd-3)))
2090
2091 (define-public wakelan
2092 (package
2093 (name "wakelan")
2094 (version "1.1")
2095 (source (origin
2096 (method url-fetch)
2097 (uri (string-append
2098 "ftp://ftp.gwdg.de/pub/linux/metalab/system/network/misc/wakelan-"
2099 version ".tar.gz"))
2100 (sha256
2101 (base32
2102 "0vydqpf44146ir6k87gmqaq6xy66xhc1gkr3nsd7jj3nhy7ypx9x"))))
2103 (build-system gnu-build-system)
2104 (arguments
2105 '(#:phases
2106 (modify-phases %standard-phases
2107 (replace 'configure
2108 (lambda* (#:key outputs #:allow-other-keys)
2109 (let ((out (assoc-ref outputs "out")))
2110 (mkdir-p (string-append out "/bin"))
2111 (mkdir-p (string-append out "/share/man/man1"))
2112
2113 ;; It's an old configure script that doesn't understand
2114 ;; the extra options we pass.
2115 (setenv "CONFIG_SHELL" (which "bash"))
2116 (invoke "./configure"
2117 (string-append "--prefix=" out)
2118 (string-append "--mandir=" out
2119 "/share/man"))))))
2120 #:tests? #f))
2121 (home-page "https://www.kernel.org") ; really, no home page
2122 (synopsis "Send a wake-on-LAN packet")
2123 (description
2124 "WakeLan broadcasts a properly formatted UDP packet across the local area
2125 network, which causes enabled computers to power on.")
2126 (license license:gpl2+)))
2127
2128 (define-public dmidecode
2129 (package
2130 (name "dmidecode")
2131 (version "3.3")
2132 (source
2133 (origin
2134 (method url-fetch)
2135 (uri (string-append "mirror://savannah/dmidecode/dmidecode-"
2136 version ".tar.xz"))
2137 (sha256
2138 (base32 "0m8lzg9rf1qssasiix672bxk5qwms90561g8hfkkhk31h2kkgiw2"))))
2139 (build-system gnu-build-system)
2140 (arguments
2141 `(#:tests? #f ; no 'check' target
2142 #:make-flags
2143 (list (string-append "CC=" ,(cc-for-target))
2144 (string-append "prefix="
2145 (assoc-ref %outputs "out")))
2146 #:phases
2147 (modify-phases %standard-phases
2148 (delete 'configure)))) ; no configure script
2149 (home-page "https://www.nongnu.org/dmidecode/")
2150 (synopsis "Read hardware information from the BIOS")
2151 (description
2152 "Dmidecode reports information about your system's hardware as described
2153 in your system BIOS according to the SMBIOS/DMI standard. This typically
2154 includes system manufacturer, model name, serial number, BIOS version, asset
2155 tag as well as a lot of other details of varying level of interest and
2156 reliability depending on the manufacturer. This will often include usage
2157 status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory
2158 module slots, and the list of I/O ports (e.g. serial, parallel, USB).")
2159 (license license:gpl2+)))
2160
2161 (define-public acpica
2162 (package
2163 (name "acpica")
2164 (version "20210604")
2165 (source (origin
2166 (method url-fetch)
2167 (uri (string-append
2168 "https://acpica.org/sites/acpica/files/acpica-unix2-"
2169 version ".tar_0.gz"))
2170 (sha256
2171 (base32
2172 "1wsgg6fx7bhbpfzhbpbq2r7jpmv4c4n7v0zidbh25swrz7kfgpwz"))))
2173 (build-system gnu-build-system)
2174 (native-inputs `(("flex" ,flex)
2175 ("bison" ,bison)))
2176 (arguments
2177 `(#:make-flags (list (string-append "PREFIX=" %output)
2178 (string-append "CC=" ,(cc-for-target))
2179 "HOST=_LINUX"
2180 "OPT_CFLAGS=-Wall -fno-strict-aliasing")
2181 #:tests? #f ; no 'check' target
2182 #:phases (modify-phases %standard-phases (delete 'configure))))
2183 (home-page "https://acpica.org/")
2184 (synopsis "Tools for the development and debugging of ACPI tables")
2185 (description
2186 "The @acronym{ACPICA, ACPI Component Architecture} project provides an
2187 OS-independent reference implementation of the @acronym{ACPI, Advanced
2188 Configuration and Power Interface} specification. ACPICA code contains those
2189 portions of ACPI meant to be directly integrated into the host OS as a
2190 kernel-resident subsystem, and a small set of tools to assist in developing and
2191 debugging ACPI tables.
2192
2193 This package contains only the user-space tools needed for ACPI table
2194 development, not the kernel implementation of ACPI.")
2195 (license license:gpl2))) ; dual GPLv2/ACPICA Licence
2196
2197 (define-public s-tui
2198 (package
2199 (name "s-tui")
2200 (version "1.1.1")
2201 (source
2202 (origin
2203 (method url-fetch)
2204 (uri (pypi-uri "s-tui" version))
2205 (sha256
2206 (base32 "1clk59wf6v1lq33h4x5qwxvz5ng9mfkp1s6ynxa58w2raq8dbmy5"))))
2207 (build-system python-build-system)
2208 (inputs
2209 `(("python-psutil" ,python-psutil)
2210 ("python-urwid" ,python-urwid)))
2211 (home-page "https://github.com/amanusk/s-tui")
2212 (synopsis "Interactive terminal stress test and monitoring tool")
2213 (description
2214 "The Stress Terminal UI displays graphs of the CPU frequency,
2215 utilization, temperature and power.")
2216 (license license:gpl2+)))
2217
2218 (define-public stress
2219 (package
2220 (name "stress")
2221 (version "1.0.4")
2222 (source (origin
2223 (method url-fetch)
2224 (uri (string-append "mirror://debian/pool/main/s/stress/stress_"
2225 version ".orig.tar.gz"))
2226 (sha256
2227 (base32
2228 "0nw210jajk38m3y7h8s130ps2qsbz7j75wab07hi2r3hlz14yzh5"))))
2229 (build-system gnu-build-system)
2230 (home-page "https://packages.debian.org/sid/stress")
2231 (synopsis "Impose load on and stress test a computer system")
2232 (description
2233 "Stress is a tool that imposes a configurable amount of CPU, memory, I/O,
2234 or disk stress on a POSIX-compliant operating system and reports any errors it
2235 detects.
2236
2237 Stress is not a benchmark. It is a tool used by system administrators to
2238 evaluate how well their systems will scale, by kernel programmers to evaluate
2239 perceived performance characteristics, and by systems programmers to expose
2240 the classes of bugs which only or more frequently manifest themselves when the
2241 system is under heavy load.")
2242 (license license:gpl2+)))
2243
2244 (define-public detox
2245 (package
2246 (name "detox")
2247 (version "1.4.2")
2248 (source (origin
2249 (method git-fetch)
2250 (uri (git-reference
2251 (url "https://github.com/dharple/detox")
2252 (commit (string-append "v" version))))
2253 (file-name (git-file-name name version))
2254 (sha256
2255 (base32
2256 "0q16dvjbry573j4ayh9dwskdh1dxx8dk4rj94w6f2dcv4ww37is1"))))
2257 (build-system gnu-build-system)
2258 (native-inputs
2259 `(("autoconf" ,autoconf)
2260 ("automake" ,automake)
2261 ("flex" ,flex)))
2262 (arguments
2263 `(#:phases (modify-phases %standard-phases
2264 (add-after 'unpack 'delete-configure
2265 ;; The "configure" script is present, but otherwise the
2266 ;; project is not bootstrapped: missing install-sh and
2267 ;; Makefile.in, so delete it so the bootstrap phase will
2268 ;; take over.
2269 (lambda _ (delete-file "configure") #t))
2270 (replace 'check
2271 (lambda _
2272 (invoke "./tests/test.sh" "src/detox"))))))
2273 (home-page "https://github.com/dharple/detox")
2274 (synopsis "Clean up file names")
2275 (description
2276 "Detox is a program that renames files to make them easier to work with
2277 under Unix and related operating systems. Spaces and various other unsafe
2278 characters (such as \"$\") get replaced with \"_\". ISO 8859-1 (Latin-1)
2279 characters can be replaced as well, as can UTF-8 characters.")
2280 (license license:bsd-3)))
2281
2282 (define-public testdisk
2283 (package
2284 (name "testdisk")
2285 (version "7.1")
2286 (source (origin
2287 (method url-fetch)
2288 (uri (string-append "https://www.cgsecurity.org/testdisk-"
2289 version ".tar.bz2"))
2290 (sha256
2291 (base32
2292 "1zlh44w67py416hkvw6nrfmjickc2d43v51vcli5p374d5sw84ql"))))
2293 (build-system gnu-build-system)
2294 (inputs
2295 `(("ntfs-3g" ,ntfs-3g)
2296 ("util-linux" ,util-linux "lib")
2297 ("openssl" ,openssl)
2298 ;; FIXME: add reiserfs.
2299 ("zlib" ,zlib)
2300 ("e2fsprogs" ,e2fsprogs)
2301 ("libjpeg" ,libjpeg-turbo)
2302 ("ncurses" ,ncurses)))
2303 (home-page "https://www.cgsecurity.org/wiki/TestDisk")
2304 (synopsis "Data recovery tool")
2305 (description
2306 "TestDisk is a program for data recovery, primarily designed to help
2307 recover lost partitions and/or make non-booting disks bootable again.")
2308 (license license:gpl2+)))
2309
2310 (define-public tree
2311 (package
2312 (name "tree")
2313 (version "1.8.0")
2314 (source (origin
2315 (method url-fetch)
2316 (uri (string-append
2317 "http://mama.indstate.edu/users/ice/tree/src/tree-"
2318 version ".tgz"))
2319 (sha256
2320 (base32 "1hmpz6k0mr6salv0nprvm1g0rdjva1kx03bdf1scw8a38d5mspbi"))))
2321 (build-system gnu-build-system)
2322 (arguments
2323 '(#:phases (modify-phases %standard-phases (delete 'configure))
2324 #:tests? #f ; no check target
2325 #:make-flags (let ((out (assoc-ref %outputs "out")))
2326 (list (string-append "prefix=" out)))))
2327 (synopsis "Recursively list the contents of a directory")
2328 (description
2329 "Tree is a recursive directory listing command that produces a depth
2330 indented listing of files, which is colorized ala dircolors if the LS_COLORS
2331 environment variable is set and output is to tty.")
2332 (home-page "http://mama.indstate.edu/users/ice/tree/")
2333 (license license:gpl2+)))
2334
2335 (define-public lr
2336 (package
2337 (name "lr")
2338 (version "1.5.1")
2339 (source
2340 (origin
2341 (method git-fetch)
2342 (uri (git-reference
2343 (url "https://git.vuxu.org/lr/")
2344 (commit (string-append "v" version))))
2345 (file-name (git-file-name name version))
2346 (sha256
2347 (base32 "1wv2acm4r5y5gg6f64v2hiwpg1f3lnr4fy1a9zssw77fmdc7ys3j"))))
2348 (build-system gnu-build-system)
2349 (arguments
2350 `(#:tests? #f
2351 #:make-flags (list (string-append "CC=" ,(cc-for-target))
2352 (string-append "PREFIX=" %output))
2353 #:phases (modify-phases %standard-phases
2354 (delete 'configure))))
2355 (synopsis "Tool to generate customized file listings")
2356 (description
2357 "lr is a tool for generating file listings, which includes the best
2358 features of ls(1), find(1), stat(1) and du(1).")
2359 (home-page "https://git.vuxu.org/lr/about")
2360 (license license:expat)))
2361
2362 (define-public direvent
2363 (package
2364 (name "direvent")
2365 (version "5.2")
2366 (source (origin
2367 (method url-fetch)
2368 (uri (string-append "mirror://gnu/direvent/direvent-"
2369 version ".tar.gz"))
2370 (sha256
2371 (base32
2372 "0m9vi01b1km0cpknflyzsjnknbava0s1n6393b2bpjwyvb6j5613"))
2373 (modules '((guix build utils)))
2374 (snippet '(begin
2375 (substitute* "tests/testsuite"
2376 (("#![[:blank:]]?/bin/sh")
2377 "#!$SHELL"))
2378 #t))))
2379 (build-system gnu-build-system)
2380 (arguments
2381 '(#:phases
2382 (modify-phases %standard-phases
2383 (add-before 'build 'patch-/bin/sh
2384 (lambda* (#:key inputs #:allow-other-keys)
2385 ;; Use the right shell when executing the watcher and
2386 ;; user-provided shell commands.
2387 (let ((bash (assoc-ref inputs "bash")))
2388 (substitute* '("src/direvent.c" "src/progman.c")
2389 (("\"/bin/sh\"")
2390 (string-append "\"" bash "/bin/sh\"")))
2391
2392 ;; Adjust the 'shell.at' test accordingly.
2393 (substitute* "tests/testsuite"
2394 (("SHELL=/bin/sh")
2395 (string-append "SHELL=" bash "/bin/sh")))
2396
2397 #t))))))
2398 (home-page "https://www.gnu.org.ua/software/direvent/")
2399 (synopsis "Daemon to monitor directories for events such as file removal")
2400 (description
2401 "A daemon that monitors directories for events, such as creating,
2402 deleting or modifying files. It can monitor different sets of directories for
2403 different events. When an event is detected, direvent calls a specified
2404 external program with information about the event, such as the location
2405 within the file system where it occurred. Thus, \"direvent\" provides an
2406 easy way to react immediately if given files undergo changes, for example, to
2407 track changes in important system configuration files.")
2408 (license license:gpl3+)))
2409
2410 (define-public libcap-ng
2411 (package
2412 (name "libcap-ng")
2413 (version "0.8.2")
2414 (source (origin
2415 (method url-fetch)
2416 (uri (string-append
2417 "https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-"
2418 version ".tar.gz"))
2419 (sha256
2420 (base32
2421 "1sasp1n154aqy9fz0knlb966svm7xg1zjhg1vr4q839bgjvq7h2j"))))
2422 (build-system gnu-build-system)
2423 (arguments
2424 `(#:configure-flags
2425 (list "--without-python")))
2426 (home-page "https://people.redhat.com/sgrubb/libcap-ng/")
2427 (synopsis "Library for more easily working with POSIX capabilities")
2428 (description
2429 "The libcap-ng library is intended to make programming with POSIX
2430 capabilities easier than the traditional libcap library. It includes
2431 utilities that can analyse all currently running applications and print out
2432 any capabilities and whether or not it has an open ended bounding set. The
2433 included utilities are designed to let admins and developers spot apps from
2434 various ways that may be running with too much privilege.")
2435 ;; The library is lgpl2.1+, but also ships some utils which are gpl2+.
2436 (license (list license:lgpl2.1+ license:gpl2+))))
2437
2438 (define-public smartmontools
2439 (package
2440 (name "smartmontools")
2441 (version "7.2")
2442 (source (origin
2443 (method url-fetch)
2444 (uri (string-append
2445 "mirror://sourceforge/smartmontools/smartmontools/"
2446 version "/smartmontools-" version ".tar.gz"))
2447 (sha256
2448 (base32
2449 "1mlc25sd5rgj5xmzcllci47inmfdw7cp185fday6hc9rwqkqmnaw"))))
2450 (build-system gnu-build-system)
2451 (inputs `(("libcap-ng" ,libcap-ng)))
2452 (home-page "https://www.smartmontools.org/")
2453 (synopsis "S.M.A.R.T. harddisk control and monitoring tools")
2454 (description
2455 "The smartmontools package contains utility programs to control and
2456 monitor storage systems using the Self-Monitoring, Analysis and Reporting
2457 Technology System (@dfn{S.M.A.R.T.}) built into most modern ATA and SCSI hard
2458 disks. In many cases, these utilities will provide advanced warning of disk
2459 degradation and failure.")
2460 (license license:gpl2+)))
2461
2462 (define-public fdupes
2463 (package
2464 (name "fdupes")
2465 (version "2.1.2")
2466 (source
2467 (origin
2468 (method url-fetch)
2469 (uri (string-append "https://github.com/adrianlopezroche/fdupes/"
2470 "releases/download/v" version "/"
2471 "fdupes-" version ".tar.gz"))
2472 (sha256
2473 (base32 "1g9p50xhi2sp0hqxml4w2k0kq9jv988q2yxm347z5349dlxvap6d"))))
2474 (build-system gnu-build-system)
2475 (inputs
2476 `(("ncurses" ,ncurses)
2477 ("pcre2" ,pcre2)))
2478 (home-page "https://github.com/adrianlopezroche/fdupes")
2479 (synopsis "Identify duplicate files")
2480 (description
2481 "fdupes is a program for identifying duplicate files residing within
2482 specified directories.")
2483 (license license:expat)))
2484
2485 (define-public graphios
2486 (package
2487 (name "graphios")
2488 (version "2.0.3")
2489 (source
2490 (origin
2491 (method url-fetch)
2492 (uri (pypi-uri "graphios" version))
2493 (sha256
2494 (base32
2495 "1h87hvc315wg6lklbf4l7csd3n5pgljwrfli1p3nasdi0izgn66i"))))
2496 (build-system python-build-system)
2497 (arguments
2498 ;; Be warned: Building with Python 3 succeeds, but the build process
2499 ;; throws a syntax error that is ignored.
2500 `(#:python ,python-2
2501 #:phases
2502 (modify-phases %standard-phases
2503 (add-before 'build 'fix-setup.py
2504 (lambda* (#:key outputs #:allow-other-keys)
2505 ;; Fix hardcoded, unprefixed file names.
2506 (let ((out (assoc-ref outputs "out")))
2507 (substitute* '("setup.py")
2508 (("/etc") (string-append out "/etc"))
2509 (("/usr") out)
2510 (("distro_ver = .*") "distro_ver = ''"))
2511 #t))))))
2512 (home-page "https://github.com/shawn-sterling/graphios")
2513 (synopsis "Emit Nagios metrics to Graphite, Statsd, and Librato")
2514 (description
2515 "Graphios is a script to emit nagios perfdata to various upstream metrics
2516 processing and time-series systems. It's currently compatible with Graphite,
2517 Statsd, Librato and InfluxDB. Graphios can emit Nagios metrics to any number
2518 of supported upstream metrics systems simultaneously.")
2519 (license license:gpl2+)))
2520
2521 (define-public ansible-core
2522 (package
2523 (name "ansible-core")
2524 (version "2.11.4")
2525 (source
2526 (origin
2527 (method url-fetch)
2528 (uri (pypi-uri "ansible-core" version))
2529 (sha256
2530 (base32
2531 "0jgahcv2pyc5ky0wir55a1h9q9d6rgqj60rqmvlpbj76vz1agsi2"))))
2532 (build-system python-build-system)
2533 (arguments
2534 `(#:modules ((guix build python-build-system)
2535 (guix build utils)
2536 (ice-9 ftw))
2537 #:phases
2538 (modify-phases %standard-phases
2539 ;; Several ansible commands (ansible-config, ansible-console, etc.)
2540 ;; are just symlinks to a single ansible executable. The ansible
2541 ;; executable behaves differently based on the value of sys.argv[0].
2542 ;; This does not work well with our wrap phase, and therefore the
2543 ;; following two phases are required as a workaround.
2544 (add-after 'unpack 'hide-wrapping
2545 (lambda _
2546 ;; Overwrite sys.argv[0] to hide the wrapper script from it.
2547 (substitute* "bin/ansible"
2548 (("import traceback" all)
2549 (string-append all "
2550 import re
2551 sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
2552 ")))))
2553 (add-after 'install 'replace-symlinks
2554 (lambda* (#:key outputs #:allow-other-keys)
2555 ;; Replace symlinks with duplicate copies of the ansible
2556 ;; executable so that sys.argv[0] has the correct value.
2557 (define bin (string-append (assoc-ref outputs "out") "/bin"))
2558 (with-directory-excursion bin
2559 (for-each
2560 (lambda (ansible-symlink)
2561 (delete-file ansible-symlink)
2562 (copy-file "ansible" ansible-symlink))
2563 (scandir "." (lambda (x)
2564 (and (eq? 'symlink (stat:type (lstat x)))
2565 (string-prefix? "ansible-" x)
2566 (string=? "ansible" (readlink x)))))))))
2567 (add-after 'unpack 'preserve-pythonpath
2568 (lambda _
2569 (substitute* "test/lib/ansible_test/_internal/ansible_util.py"
2570 (("PYTHONPATH=get_ansible_python_path\\(args\\)" all)
2571 (string-append all "+ ':' + os.environ['PYTHONPATH']")))))
2572 (add-after 'unpack 'patch-paths
2573 (lambda* (#:key inputs outputs #:allow-other-keys)
2574 (substitute* "lib/ansible/module_utils/compat/selinux.py"
2575 (("libselinux.so.1" name)
2576 (string-append (assoc-ref inputs "libselinux")
2577 "/lib/" name)))
2578 (substitute* "test/units/modules/test_async_wrapper.py"
2579 (("/usr/bin/python")
2580 (which "python")))))
2581 (replace 'check
2582 ;; The environment for the test suite can be tricky to get right.
2583 ;; The environment used for Ansible's CI defined in the following
2584 ;; Dockerfile can be used as a reference:
2585 ;; https://raw.githubusercontent.com/ansible/
2586 ;; default-test-container/master/Dockerfile.
2587 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
2588 (when tests?
2589 ;; Otherwise Ansible fails to create its config directory.
2590 (setenv "HOME" "/tmp")
2591 (setenv "PATH" (string-append (getenv "PATH") ":"
2592 (assoc-ref outputs "out") "/bin"))
2593 (add-installed-pythonpath inputs outputs)
2594 ;; This test module messes up with sys.path and causes many
2595 ;; test failures.
2596 (delete-file "test/units/_vendor/test_vendor.py")
2597 ;; The test fails when run in the container, for reasons
2598 ;; unknown.
2599 (delete-file "test/units/utils/test_display.py")
2600 ;; This test fail for reasons unknown.
2601 (delete-file "test/units/cli/test_adhoc.py")
2602 ;; The test suite needs to be run with 'ansible-test', which
2603 ;; does some extra environment setup. Taken from
2604 ;; https://raw.githubusercontent.com/ansible/ansible/\
2605 ;; devel/test/utils/shippable/shippable.sh.
2606 (invoke "ansible-test" "units" "-v")))))))
2607 (native-inputs
2608 `(("openssh" ,openssh)
2609 ("openssl" ,openssl)
2610 ("python-mock" ,python-mock)
2611 ("python-pycrypto" ,python-pycrypto)
2612 ("python-pytest" ,python-pytest)
2613 ("python-pytest-forked" ,python-pytest-forked)
2614 ("python-pytest-mock" ,python-pytest-mock)
2615 ("python-pytest-xdist" ,python-pytest-xdist)
2616 ("python-pytz" ,python-pytz)))
2617 (inputs ;optional dependencies captured in wrap scripts
2618 `(("libselinux" ,libselinux)
2619 ("python-paramiko" ,python-paramiko)
2620 ("python-passlib" ,python-passlib)
2621 ("python-pexpect" ,python-pexpect)
2622 ("sshpass" ,sshpass)))
2623 (propagated-inputs ;core dependencies listed in egg-info/requires.txt
2624 `(("python-cryptography" ,python-cryptography)
2625 ("python-jinja2" ,python-jinja2)
2626 ("python-pyyaml" ,python-pyyaml)
2627 ("python-packaging" ,python-packaging) ;for version number parsing
2628 ("python-resolvelib" ,python-resolvelib-0.5)))
2629 (home-page "https://www.ansible.com/")
2630 (synopsis "Radically simple IT automation")
2631 (description "Ansible aims to be a radically simple IT automation system.
2632 It handles configuration management, application deployment, cloud
2633 provisioning, ad-hoc task execution, network automation, and multi-node
2634 orchestration. Ansible facilitates complex changes like zero-downtime rolling
2635 updates with load balancers. This package is the core of Ansible, which
2636 provides the following commands:
2637 @itemize
2638 @item ansible
2639 @item ansible-config
2640 @item ansible-connection
2641 @item ansible-console
2642 @item ansible-doc
2643 @item ansible-galaxy
2644 @item ansible-inventory
2645 @item ansible-playbook
2646 @item ansible-pull
2647 @item ansible-test
2648 @item ansible-vault
2649 @end itemize")
2650 (license license:gpl3+)))
2651
2652 (define-public ansible
2653 (package
2654 (name "ansible")
2655 (version "4.4.0")
2656 (source
2657 (origin
2658 (method url-fetch)
2659 (uri (pypi-uri "ansible" version))
2660 (sha256
2661 (base32 "031n22j0lsmh69x6i6gkva81j68b4yzh1pbg3q2h4bknl85q46ag"))))
2662 (build-system python-build-system)
2663 (propagated-inputs
2664 `(("ansible-core" ,ansible-core)))
2665 ;; The Ansible collections are found by ansible-core via PYTHONPATH; the
2666 ;; following search path ensures that they are found even when Python is
2667 ;; not present in the profile.
2668 (native-search-paths
2669 ;; XXX: Attempting to use (package-native-search-paths python)
2670 ;; here would cause an error about python being an unbound
2671 ;; variable in the tests/cpan.scm test.
2672 (list (search-path-specification
2673 (variable "PYTHONPATH")
2674 (files (list "lib/python3.8/site-packages")))))
2675 (home-page "https://www.ansible.com/")
2676 (synopsis "Radically simple IT automation")
2677 (description "Ansible aims to be a radically simple IT automation system.
2678 It handles configuration management, application deployment, cloud
2679 provisioning, ad-hoc task execution, network automation, and multi-node
2680 orchestration. Ansible facilitates complex changes like zero-downtime rolling
2681 updates with load balancers. This package provides a curated set of
2682 community-maintained Ansible collections, which contain playbooks, roles,
2683 modules and plugins that extend Ansible.")
2684 (license license:gpl3+)))
2685
2686 (define-public debops
2687 (package
2688 (name "debops")
2689 (version "1.1.0")
2690 (source
2691 (origin
2692 (method git-fetch)
2693 (uri (git-reference
2694 (url "https://github.com/debops/debops")
2695 (commit (string-append "v" version))))
2696 (file-name (git-file-name name version))
2697 (sha256
2698 (base32 "052b2dykdn35pdpn9s4prawl6nl6yzih8nyf54hpvhpisvjrm1v5"))
2699 (patches
2700 (search-patches "debops-constants-for-external-program-names.patch"
2701 "debops-debops-defaults-fall-back-to-less.patch"))))
2702 (build-system python-build-system)
2703 (native-inputs
2704 `(("git" ,git)))
2705 (inputs
2706 `(("ansible" ,ansible)
2707 ("encfs" ,encfs)
2708 ("fuse" ,fuse)
2709 ("util-linux" ,util-linux) ;; for umount
2710 ("findutils" ,findutils)
2711 ("gnupg" ,gnupg)
2712 ("which" ,which)))
2713 (propagated-inputs
2714 `(("python-future" ,python-future)
2715 ("python-distro" ,python-distro)))
2716 (arguments
2717 `(#:tests? #f
2718 #:phases
2719 (modify-phases %standard-phases
2720 (add-after 'unpack 'nuke-debops-update
2721 (lambda _
2722 (chmod "bin/debops-update" #o755) ; FIXME work-around git-fetch issue
2723 (with-output-to-file "bin/debops-update"
2724 (lambda ()
2725 (format #t "#!/bin/sh
2726 echo 'debops is installed via guix. guix-update is useless in this case.
2727 Please use `guix package -u debops` instead.'")))
2728 #t))
2729 ;; patch shebangs only in actuall scripts, not in files included in
2730 ;; roles (which are to be delivered to the targte systems)
2731 (delete `patch-generated-file-shebangs)
2732 (replace 'patch-source-shebangs
2733 (lambda _
2734 (for-each patch-shebang
2735 (find-files "bin"
2736 (lambda (file stat)
2737 ;; Filter out symlinks.
2738 (eq? 'regular (stat:type stat)))
2739 #:stat lstat))))
2740 (add-after 'unpack 'fix-paths
2741 (lambda _
2742 (define (substitute-program-names file)
2743 ;; e.g. ANSIBLE_PLAYBOOK = '/gnu/store/…/bin/ansible-playbook'
2744 (for-each
2745 (lambda (name)
2746 (let ((varname (string-upcase
2747 (string-map
2748 (lambda (c) (if (char=? c #\-) #\_ c))
2749 name))))
2750 (substitute* file
2751 (((string-append "^(" varname " = )'.*'") line prefix)
2752 (string-append prefix "'" (which name) "'")))))
2753 '("ansible-playbook" "encfs" "find" "fusermount"
2754 "umount" "gpg" "ansible" "which")))
2755 (for-each substitute-program-names
2756 '("bin/debops"
2757 "bin/debops-padlock"
2758 "bin/debops-task"
2759 "debops/__init__.py"
2760 "debops/cmds/__init__.py"))
2761 #t)))))
2762 (home-page "https://www.debops.org/")
2763 (synopsis "Collection of general-purpose Ansible roles")
2764 (description "The Ansible roles provided by that can be used to manage
2765 Debian or Ubuntu hosts. In addition, a default set of Ansible playbooks can
2766 be used to apply the provided roles in a controlled way, using Ansible
2767 inventory groups.
2768
2769 The roles are written with a high customization in mind, which can be done
2770 using Ansible inventory. This way the role and playbook code can be shared
2771 between multiple environments, with different configuration in to each one.
2772
2773 Services can be managed on a single host, or spread between multiple hosts.
2774 DebOps provides support for different SQL and NoSQL databases, web servers,
2775 programming languages and specialized applications useful in a data center
2776 environment or in a cluster. The project can also be used to deploy
2777 virtualization environments using KVM/libvirt, Docker or LXC technologies to
2778 manage virtual machines and/or containers.")
2779 (license license:gpl3+)))
2780
2781 (define-public emacs-ansible-doc
2782 (let ((commit "86083a7bb2ed0468ca64e52076b06441a2f8e9e0"))
2783 (package
2784 (name "emacs-ansible-doc")
2785 (version (git-version "0.4" "1" commit))
2786 (source
2787 (origin
2788 (method git-fetch)
2789 (uri (git-reference
2790 (url "https://github.com/lunaryorn/ansible-doc.el")
2791 (commit commit)))
2792 (file-name (git-file-name name version))
2793 (sha256
2794 (base32
2795 "0lap404ch74w99n3xip176jr42b38xhyzkfnkyqg0g3wk2cd3aq8"))))
2796 (build-system emacs-build-system)
2797 ;; Unmaintained by upstream.
2798 (home-page "https://github.com/lunaryorn/ansible-doc.el")
2799 (synopsis "Ansible documentation for Emacs")
2800 (description
2801 "This package provides an Ansible documentation for GNU Emacs.
2802
2803 @code{ansible-doc} allows you to view the documentation of an Ansible
2804 module and @code{ansible-doc-mode} minor mode adds documentation
2805 lookup to YAML Mode. You could enable the mode with @code{(add-hook
2806 'yaml-mode-hook #'ansible-doc-mode)}.")
2807 (license license:gpl3+))))
2808
2809 (define-public cpulimit
2810 (package
2811 (name "cpulimit")
2812 (version "0.2")
2813 (source
2814 (origin
2815 (method git-fetch)
2816 (uri (git-reference
2817 (url "https://github.com/opsengine/cpulimit")
2818 (commit (string-append "v" version))))
2819 (file-name (git-file-name name version))
2820 (sha256
2821 (base32 "1dz045yhcsw1rdamzpz4bk8mw888in7fyqk1q1b3m1yk4pd1ahkh"))))
2822 (build-system gnu-build-system)
2823 (arguments
2824 `(#:phases (modify-phases %standard-phases
2825 (delete 'configure)
2826 (replace 'build
2827 (lambda* (#:key make-flags #:allow-other-keys)
2828 (apply invoke "make" "-Csrc" make-flags)))
2829 (replace 'check
2830 (lambda* (#:key tests? make-flags #:allow-other-keys)
2831 (when tests?
2832 (apply invoke "make" "-Ctests" make-flags))
2833 #t))
2834 (replace 'install
2835 (lambda* (#:key outputs #:allow-other-keys)
2836 (let* ((out (assoc-ref outputs "out"))
2837 (bin (string-append out "/bin")))
2838 (install-file "src/cpulimit" bin))
2839 #t)))
2840 #:make-flags (list (string-append "CC=" ,(cc-for-target)))))
2841 (home-page "https://github.com/opsengine/cpulimit")
2842 (synopsis "Limit CPU usage")
2843 (description
2844 "Cpulimit limits the CPU usage of a process. It does not change the nice
2845 value or other scheduling priority settings, but the real CPU usage, and is
2846 able to adapt itself dynamically to the overall system load. Children
2847 processes and threads of the specified process may optionally share the same
2848 limits.")
2849 (license license:gpl2+)))
2850
2851 (define-public autojump
2852 (package
2853 (name "autojump")
2854 (version "22.5.3")
2855 (source
2856 (origin
2857 (method git-fetch)
2858 (uri (git-reference
2859 (url "https://github.com/wting/autojump")
2860 (commit (string-append "release-v" version))))
2861 (file-name (git-file-name name version))
2862 (sha256
2863 (base32 "1rgpsh70manr2dydna9da4x7p8ahii7dgdgwir5fka340n1wrcws"))))
2864 (build-system gnu-build-system)
2865 (native-inputs ; for tests
2866 `(("python-mock" ,python-mock)
2867 ("python-pytest" ,python-pytest)))
2868 (inputs
2869 `(("python" ,python-wrapper)))
2870 (arguments
2871 `(#:phases
2872 (modify-phases %standard-phases
2873 (add-after 'unpack 'make-git-checkout-writable
2874 ;; ‘install.py’ modifies files before installing them.
2875 (lambda _
2876 (for-each make-file-writable (find-files "."))
2877 #t))
2878 (delete 'configure)
2879 (delete 'build)
2880 (replace 'check
2881 (lambda _
2882 (invoke "python" "tests/unit/autojump_utils_test.py")))
2883 (replace 'install
2884 (lambda* (#:key outputs #:allow-other-keys)
2885 (setenv "SHELL" (which "bash"))
2886 (invoke "python" "install.py"
2887 (string-append "--destdir="
2888 (assoc-ref outputs "out"))))))))
2889 (home-page "https://github.com/wting/autojump")
2890 (synopsis "Shell extension for file system navigation")
2891 (description
2892 "Autojump provides a faster way to navigate your file system, with a \"cd
2893 command that learns\". It works by maintaining a database of the directories
2894 you use the most from the command line and allows you to \"jump\" to
2895 frequently used directories by typing only a small pattern.")
2896 (license license:gpl3+)))
2897
2898 (define-public fasd
2899 (package
2900 (name "fasd")
2901 (version "1.0.1")
2902 (source (origin
2903 (method git-fetch)
2904 (uri (git-reference
2905 (url "https://github.com/clvv/fasd")
2906 (commit version)))
2907 (file-name (git-file-name name version))
2908 (sha256
2909 (base32
2910 "1awi71jdv3mhjrmar2d4z1i90kn7apd7aq1w31sh6w4yibz9kiyj"))))
2911 (build-system gnu-build-system)
2912 (arguments
2913 `(#:phases (modify-phases %standard-phases
2914 (delete 'configure)) ;no configuration
2915 #:tests? #f ;no tests
2916 #:make-flags (list (string-append "PREFIX=" %output))))
2917 (home-page "https://github.com/clvv/fasd")
2918 (synopsis "Quick access to files and directories for shells")
2919 (description
2920 "Fasd (pronounced similar to \"fast\") is a command-line productivity
2921 booster. Fasd offers quick access to files and directories for POSIX shells.
2922 It is inspired by tools like autojump, z, and v. Fasd keeps track of files
2923 and directories you have accessed so that you can quickly reference them in
2924 the command line.")
2925 (license license:x11)))
2926
2927 (define-public iftop
2928 (package
2929 (name "iftop")
2930 (version "1.0pre4")
2931 (source (origin
2932 (method url-fetch)
2933 (uri (string-append "http://www.ex-parrot.com/~pdw/iftop/download"
2934 "/iftop-" version ".tar.gz"))
2935 (sha256
2936 (base32
2937 "15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp"))))
2938 (build-system gnu-build-system)
2939 (inputs
2940 `(("libpcap" ,libpcap)
2941 ("ncurses" ,ncurses)))
2942 (synopsis "Monitor network usage")
2943 (description "Iftop does for network usage what @command{top} does
2944 for CPU usage. It listens to network traffic on a named interface and
2945 displays a table of current bandwidth usage by pairs of hosts.")
2946 (home-page "http://www.ex-parrot.com/~pdw/iftop/")
2947 (license license:gpl2+)))
2948
2949 (define-public munge
2950 (package
2951 (name "munge")
2952 (version "0.5.14")
2953 (source (origin
2954 (method url-fetch)
2955 (uri (string-append "https://github.com/dun/munge/releases/"
2956 "download/munge-" version "/munge-"
2957 version ".tar.xz"))
2958 (sha256
2959 (base32
2960 "0h06sghb4rqvv1ywyd6mzsmbcgh712v6ygrff0gzm440y4ca41k6"))
2961 (modules '((guix build utils)))
2962 (snippet
2963 '(begin
2964 ;; Don't insist on write access to /var.
2965 (substitute* "src/etc/Makefile.in"
2966 (("\\$\\(INSTALL\\)(.*)localstatedir" _ middle)
2967 (string-append "-$(INSTALL)" middle "localstatedir"))
2968 (("\\$\\(MKDIR_P\\) .*(local|run)statedir.*")
2969 ""))
2970 #t))))
2971 (inputs
2972 `(("openssl" ,openssl)
2973 ("libgcrypt" ,libgcrypt)))
2974 (build-system gnu-build-system)
2975 (arguments
2976 '(#:configure-flags
2977 (list "--localstatedir=/var"
2978 (string-append "--with-pkgconfigdir="
2979 (assoc-ref %outputs "out") "/lib/pkgconfig"))
2980 #:phases
2981 (modify-phases %standard-phases
2982 ;; XXX Many test series fail. Some might be fixable, others do no-no
2983 ;; things like invoking ‘sudo’.
2984 (add-after 'unpack 'skip-failing-tests
2985 (lambda _
2986 (for-each (lambda (test)
2987 (substitute* "t/Makefile.in"
2988 (((string-append test "\\.t ")) "")))
2989 (list "0100-munged-lock"
2990 "0010-basic"
2991 "0011-munged-cmdline"
2992 "0012-munge-cmdline"
2993 "0013-unmunge-cmdline"
2994 "0101-munged-security-socket"
2995 "0102-munged-security-keyfile"
2996 "0103-munged-security-logfile"
2997 "0110-munged-origin-addr"))
2998 #t)))))
2999 (home-page "https://dun.github.io/munge/")
3000 (synopsis "Cluster computing authentication service")
3001 (description
3002 "Munge is an authentication service for creating and validating
3003 credentials. It allows a process to authenticate the UID and GID of another
3004 local or remote process within a group of hosts having common users and
3005 groups. These hosts form a security realm that is defined by a shared
3006 cryptographic key. Clients within this security realm can create and validate
3007 credentials without the use of root privileges, reserved ports, or
3008 platform-specific methods.")
3009 (license license:gpl3+)))
3010
3011 (define-public audit
3012 (package
3013 (name "audit")
3014 (home-page "https://people.redhat.com/sgrubb/audit/")
3015 (version "3.0.4")
3016 (source (origin
3017 (method url-fetch)
3018 (uri (string-append home-page "audit-" version ".tar.gz"))
3019 (sha256
3020 (base32
3021 "1xlcvc2g7qrbnin5pw0bacalva5ldjw97yi6nr17g0yjp4jyhnlc"))))
3022 (build-system gnu-build-system)
3023 (arguments
3024 `(#:configure-flags (list "--with-python=no"
3025 "--disable-static")))
3026 (inputs
3027 `(("openldap" ,openldap)
3028 ("gnutls" ,gnutls)
3029 ("sasl" ,cyrus-sasl)))
3030 (synopsis "User-space component to the Linux auditing system")
3031 (description
3032 "auditd is the user-space component to the Linux auditing system, which
3033 allows logging of system calls made by user-land processes. It's responsible
3034 for writing audit records to the disk. Viewing the logs is done with the
3035 @code{ausearch} or @code{aureport} utilities. Configuring the audit rules is
3036 done with the @code{auditctl} utility.")
3037 (license license:gpl2+)))
3038
3039 (define-public nmap
3040 (package
3041 (name "nmap")
3042 (version "7.91")
3043 (source (origin
3044 (method url-fetch)
3045 (uri (string-append "https://nmap.org/dist/nmap-" version
3046 ".tar.bz2"))
3047 (sha256
3048 (base32
3049 "001kb5xadqswyw966k2lqi6jr6zz605jpp9w4kmm272if184pk0q"))
3050 (modules '((guix build utils)))
3051 (snippet
3052 '(begin
3053 (for-each delete-file-recursively
3054 ;; Remove bundled lua, pcap, and pcre libraries.
3055 ;; FIXME: Remove bundled liblinear once packaged.
3056 '("liblua"
3057 "libpcap"
3058 "libpcre"
3059 ;; Remove pre-compiled binares.
3060 "mswin32"))
3061 #t))))
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 #t))
3085 (replace 'install
3086 (lambda* (#:key outputs #:allow-other-keys)
3087 (define (make out . args)
3088 (apply invoke "make"
3089 (string-append "prefix=" out)
3090 args))
3091 (define (python-path dir)
3092 (string-append dir "/lib/python"
3093 ,(version-major+minor
3094 (package-version python))
3095 "/site-packages"))
3096 (let ((out (assoc-ref outputs "out"))
3097 (ndiff (assoc-ref outputs "ndiff")))
3098 (for-each mkdir-p (list out ndiff))
3099 (make out
3100 "install-nmap"
3101 "install-nse"
3102 "install-ncat"
3103 "install-nping")
3104 (make ndiff "install-ndiff")
3105 (wrap-program (string-append ndiff "/bin/ndiff")
3106 `("GUIX_PYTHONPATH" prefix
3107 (,(python-path ndiff)))))
3108 #t))
3109 ;; These are the tests that do not require network access.
3110 (replace 'check
3111 (lambda _ (invoke "make"
3112 "check-nse"
3113 "check-ndiff"
3114 "check-dns"))))
3115 ;; Nmap can't cope with out-of-source building.
3116 #:out-of-source? #f))
3117 (home-page "https://nmap.org/")
3118 (synopsis "Network discovery and security auditing tool")
3119 (description
3120 "Nmap (\"Network Mapper\") is a network discovery and security auditing
3121 tool. It is also useful for tasks such as network inventory, managing service
3122 upgrade schedules, and monitoring host or service uptime. It also provides an
3123 advanced netcat implementation (ncat), a utility for comparing scan
3124 results (ndiff), and a packet generation and response analysis tool (nping).")
3125 ;; See <https://github.com/nmap/nmap/issues/2199#issuecomment-792048244>.
3126 ;; This package uses nmap's bundled versions of libdnet and liblinear, which
3127 ;; both use a 3-clause BSD license.
3128 (license (list license:nmap license:bsd-3))))
3129
3130 (define-public dstat
3131 (package
3132 (name "dstat")
3133 (version "0.7.4")
3134 (source
3135 (origin
3136 (method git-fetch)
3137 (uri (git-reference
3138 (url "https://github.com/dstat-real/dstat")
3139 (commit (string-append "v" version))))
3140 (file-name (git-file-name "dstat" version))
3141 (sha256
3142 (base32 "1qnmkhqmjd1m3if05jj29dvr5hn6kayq9bkkkh881w472c0zhp8v"))
3143 (patches (search-patches "dstat-fix-crash-when-specifying-delay.patch"
3144 "dstat-skip-devices-without-io.patch"))))
3145 (build-system gnu-build-system)
3146 (arguments
3147 `(#:tests? #f ; no make check
3148 #:make-flags
3149 (list (string-append "prefix=" (assoc-ref %outputs "out")))
3150 #:phases
3151 (modify-phases %standard-phases
3152 (add-after 'unpack 'fix-python3-DeprecationWarning
3153 (lambda _
3154 (substitute* "dstat"
3155 (("collections") "collections.abc"))
3156 #t))
3157 (delete 'configure) ; no configure script
3158 (add-after 'install 'wrap
3159 (lambda* (#:key outputs #:allow-other-keys)
3160 (let ((out (assoc-ref outputs "out")))
3161 (wrap-program (string-append out "/bin/dstat")
3162 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))
3163 #t))))))
3164 (inputs
3165 `(("python" ,python-wrapper)
3166 ("python-six" ,python-six)))
3167 (synopsis "Versatile resource statistics tool")
3168 (description "Dstat is a versatile replacement for @command{vmstat},
3169 @command{iostat}, @command{netstat}, and @command{ifstat}. Dstat overcomes
3170 some of their limitations and adds some extra features, more counters and
3171 flexibility. Dstat is handy for monitoring systems during performance tuning
3172 tests, benchmarks or troubleshooting.
3173
3174 Dstat allows you to view all of your system resources in real-time, you can,
3175 e.g., compare disk utilization in combination with interrupts from your IDE
3176 controller, or compare the network bandwidth numbers directly with the disk
3177 throughput (in the same interval).")
3178 (home-page "http://dag.wiee.rs/home-made/dstat/")
3179 (license license:gpl2+)))
3180
3181 (define-public thefuck
3182 (package
3183 (name "thefuck")
3184 (version "3.30")
3185 (source
3186 (origin
3187 (method git-fetch)
3188 (uri (git-reference
3189 (url "https://github.com/nvbn/thefuck")
3190 (commit version)))
3191 (file-name (git-file-name name version))
3192 (sha256
3193 (base32 "0fnf78956pwhb9cgv1jmgypnkma5xzflkivfrkfiadbgin848yfg"))
3194 (patches (search-patches "thefuck-test-environ.patch"))))
3195 (build-system python-build-system)
3196 (arguments
3197 '(#:phases
3198 (modify-phases %standard-phases
3199 (delete 'check)
3200 (add-after 'install 'check
3201 (lambda* (#:key inputs outputs #:allow-other-keys)
3202 ;; Tests look for installed package
3203 (add-installed-pythonpath inputs outputs)
3204 ;; Some tests need write access to $HOME.
3205 (setenv "HOME" "/tmp")
3206 (invoke "py.test" "-v")
3207 #t)))))
3208 (propagated-inputs
3209 `(("python-colorama" ,python-colorama)
3210 ("python-decorator" ,python-decorator)
3211 ("python-psutil" ,python-psutil)
3212 ("python-pyte" ,python-pyte)
3213 ("python-six" ,python-six)))
3214 (native-inputs
3215 `(("go" ,go)
3216 ("python-mock" ,python-mock)
3217 ("python-pytest" ,python-pytest)
3218 ("python-pytest-mock" ,python-pytest-mock)))
3219 (home-page "https://github.com/nvbn/thefuck")
3220 (synopsis "Correct mistyped console command")
3221 (description
3222 "The Fuck tries to match a rule for a previous, mistyped command, creates
3223 a new command using the matched rule, and runs it.")
3224 (license license:x11)))
3225
3226 (define-public di
3227 (package
3228 (name "di")
3229 (version "4.50")
3230 (source
3231 (origin
3232 (method url-fetch)
3233 (uri (string-append "mirror://sourceforge/diskinfo-di/di-" version ".tar.gz"))
3234 (sha256
3235 (base32 "0aj9ldkvmj8fmrk685vd2gagz0q8lwsn2nfbx6r6mza94mn8pw42"))))
3236 (build-system gnu-build-system)
3237 (arguments
3238 `(#:tests? #f ; obscure test failures
3239 #:phases
3240 (modify-phases %standard-phases
3241 (delete 'configure) ; no configure script
3242 (add-before 'build 'setup-environment
3243 (lambda* (#:key outputs #:allow-other-keys)
3244 (setenv "CC" ,(cc-for-target))
3245 (setenv "prefix" (assoc-ref outputs "out"))
3246 #t)))
3247 #:make-flags (list "--environment-overrides")))
3248 (home-page "https://gentoo.com/di/")
3249 (synopsis "Advanced df like disk information utility")
3250 (description
3251 "@code{di} is a disk information utility, displaying everything that your
3252 @code{df} command does and more. It features the ability to display your disk
3253 usage in whatever format you prefer. It is designed to be highly portable and
3254 produce uniform output across heterogeneous networks.")
3255 (license license:zlib)))
3256
3257 (define-public cbatticon
3258 (package
3259 (name "cbatticon")
3260 (version "1.6.10")
3261 (source
3262 (origin
3263 (method git-fetch)
3264 (uri (git-reference
3265 (url "https://github.com/valr/cbatticon")
3266 (commit version)))
3267 (sha256
3268 (base32 "0ivm2dzhsa9ir25ry418r2qg2llby9j7a6m3arbvq5c3kaj8m9jr"))
3269 (file-name (git-file-name name version))))
3270 (build-system gnu-build-system)
3271 (arguments
3272 `(#:tests? #f ; no tests
3273 #:make-flags
3274 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
3275 ,(string-append "CC=" (cc-for-target)))
3276 #:phases
3277 (modify-phases %standard-phases
3278 (delete 'configure)))) ; no configure script
3279 (inputs
3280 `(("gtk+" ,gtk+)
3281 ("gettext" ,gettext-minimal)
3282 ("libnotify" ,libnotify)))
3283 (native-inputs
3284 `(("pkg-config" ,pkg-config)))
3285 (synopsis "Lightweight battery icon for the system tray")
3286 (description "cbatticon is a lightweight battery icon that displays
3287 the status of your battery in the system tray.")
3288 (home-page "https://github.com/valr/cbatticon")
3289 (license license:gpl2+)))
3290
3291 (define-public interrobang
3292 (let ((revision "1")
3293 (commit "896543735e1c99144765fdbd7b6e6b5afbd8b881"))
3294 (package
3295 (name "interrobang")
3296 (version (git-version "0.0.0" revision commit))
3297 (source
3298 (origin
3299 (method git-fetch)
3300 (uri (git-reference
3301 (url "https://github.com/TrilbyWhite/interrobang")
3302 (commit commit)))
3303 (file-name (git-file-name name version))
3304 (sha256
3305 (base32 "1n13m70p1hfba5dy3i8hfclbr6k9q3d9dai3dg4jvhdhmxcpjzdf"))))
3306 (build-system gnu-build-system)
3307 (arguments
3308 `(#:tests? #f ; no tests
3309 #:phases
3310 (modify-phases %standard-phases
3311 (delete 'configure)) ; no configure script
3312 #:make-flags (list (string-append "PREFIX="
3313 (assoc-ref %outputs "out")))))
3314 (inputs
3315 `(("libx11" ,libx11)))
3316 (native-inputs
3317 `(("pkg-config" ,pkg-config)))
3318 (synopsis "Scriptable launcher menu")
3319 (description "Interrobang is a scriptable launcher menu with a customizable
3320 shortcut syntax and completion options.")
3321 (home-page "https://github.com/TrilbyWhite/interrobang")
3322 (license license:gpl3+))))
3323
3324 (define-public pam-krb5
3325 (package
3326 (name "pam-krb5")
3327 (version "4.8")
3328 (source (origin
3329 (method url-fetch)
3330 (uri
3331 (list (string-append
3332 "https://archives.eyrie.org/software/kerberos/"
3333 "pam-krb5-" version ".tar.xz")
3334 (string-append
3335 "https://archives.eyrie.org/software/ARCHIVE/"
3336 "pam-krb5/pam-krb5-" version ".tar.xz")))
3337 (patches (search-patches "pam-krb5-CVE-2020-10595.patch"))
3338 (sha256
3339 (base32
3340 "1qjp8i1s9bz7g6kiqrkzzkxn5pfspa4sy53b6z40fqmdf9przdfb"))))
3341 (build-system gnu-build-system)
3342 (arguments
3343 `(#:phases
3344 (modify-phases %standard-phases
3345 (add-before 'configure 'disable-tests
3346 (lambda _
3347 ;; The build container seems to interfere with some tests.
3348 (substitute* "tests/TESTS"
3349 (("module/basic\n") ""))
3350 (substitute* "tests/TESTS"
3351 (("pam-util/vector\n") ""))
3352 #t)))))
3353 (inputs
3354 `(("linux-pam" ,linux-pam)
3355 ("mit-krb5" ,mit-krb5)))
3356 (native-inputs
3357 `(("perl" ,perl)
3358 ("perl-test-pod" ,perl-test-pod))) ; required for tests
3359 (synopsis "Kerberos PAM module")
3360 (description
3361 "Pam-krb5 is a Kerberos PAM module for either MIT Kerberos or Heimdal.
3362 It supports ticket refreshing by screen savers, configurable
3363 authorization handling, authentication of non-local accounts for network
3364 services, password changing, and password expiration, as well as all the
3365 standard expected PAM features. It works correctly with OpenSSH, even
3366 with @code{ChallengeResponseAuthentication} and @code{PrivilegeSeparation}
3367 enabled, and supports extensive configuration either by PAM options or in
3368 krb5.conf or both. PKINIT is supported with recent versions of both MIT
3369 Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.")
3370 (home-page "https://www.eyrie.org/~eagle/software/pam-krb5/")
3371 ;; Dual licenced under a homebrew non-copyleft OR GPL (any version)
3372 ;; However, the tarball does not contain a copy of the GPL, so unless
3373 ;; we put one in, we cannot distribute it under GPL without violating
3374 ;; clause requiring us to give all recipients a copy.
3375 (license license:gpl1+)))
3376
3377 (define (sunxi-tools-source version)
3378 (origin
3379 (method git-fetch)
3380 (uri (git-reference
3381 (url "https://github.com/linux-sunxi/sunxi-tools")
3382 (commit (string-append "v" version))))
3383 (sha256
3384 (base32 "04f3jqg8ww4jxsf9c6ddcdgy2xbhkyp0b3l5f1hvvbv94p81rjxd"))
3385 (patches
3386 (search-patches "sunxi-tools-remove-sys-io.patch"))
3387 (modules '((guix build utils)))
3388 (snippet
3389 ;; Remove binaries contained in the tarball which are only for the
3390 ;; target and can be regenerated anyway.
3391 '(begin
3392 (delete-file-recursively "bin")
3393 #t))
3394 (file-name (git-file-name "sunxi-tools" version))))
3395
3396 (define sunxi-target-tools
3397 (package
3398 (name "sunxi-target-tools")
3399 (version "1.4.2")
3400 (build-system gnu-build-system)
3401 (source
3402 (sunxi-tools-source version))
3403 (arguments
3404 `(#:system "armhf-linux"
3405 #:tests? #f
3406 #:make-flags (list (string-append "PREFIX="
3407 (assoc-ref %outputs "out"))
3408 (string-append "CROSS_COMPILE=")
3409 "CC=gcc")
3410 #:phases
3411 (modify-phases %standard-phases
3412 (delete 'configure)
3413 (replace 'build
3414 (lambda* (#:key make-flags #:allow-other-keys)
3415 (apply invoke "make" "target-tools" make-flags)))
3416 (replace 'install
3417 (lambda* (#:key make-flags #:allow-other-keys)
3418 (apply invoke "make" "install-target-tools"
3419 make-flags))))))
3420 (home-page "https://github.com/linux-sunxi/sunxi-tools")
3421 (synopsis "Hardware management tools for Allwinner computers")
3422 (description "This package contains tools for Allwinner devices:
3423 @enumerate
3424 @item @command{sunxi-meminfo}: Prints memory bus settings.
3425 @end enumerate")
3426 (license license:gpl2+)))
3427
3428 (define-public sunxi-tools
3429 (package
3430 (name "sunxi-tools")
3431 (version "1.4.2")
3432 (source
3433 (sunxi-tools-source version))
3434 (native-inputs
3435 `(("sunxi-target-tools" ,sunxi-target-tools)
3436 ("pkg-config" ,pkg-config)))
3437 (inputs
3438 `(("libusb" ,libusb)))
3439 (build-system gnu-build-system)
3440 (arguments
3441 `(#:tests? #f ; no tests exist
3442 #:make-flags (list (string-append "PREFIX="
3443 (assoc-ref %outputs "out"))
3444 (string-append "CROSS_COMPILE=disabled")
3445 "CC=gcc")
3446 #:phases
3447 (modify-phases %standard-phases
3448 (delete 'configure)
3449 (replace 'build
3450 (lambda* (#:key make-flags #:allow-other-keys)
3451 (apply invoke "make" "tools" "misc" make-flags)))
3452 (replace 'install
3453 (lambda* (#:key inputs outputs make-flags #:allow-other-keys)
3454 ;; Those tools have been built for armhf but are part of the
3455 ;; installation in the upstream package. So do the same
3456 ;; here.
3457 (copy-recursively (assoc-ref inputs "sunxi-target-tools")
3458 (assoc-ref outputs "out"))
3459 (apply invoke "make" "install-tools" "install-misc"
3460 make-flags))))))
3461 (home-page "https://github.com/linux-sunxi/sunxi-tools")
3462 (synopsis "Hardware management tools for Allwinner computers")
3463 (description "This package contains tools for Allwinner devices:
3464 @enumerate
3465 @item @command{sunxi-fexc}, @command{bin2fex}, @command{fex2bin}: Compile
3466 a textual description of a board (.fex) to a binary representation (.bin).
3467 @item @command{sunxi-fel}: Puts an Allwinner device into FEL mode which
3468 makes it register as a special USB device (rather than USB host).
3469 You can then connect it to another computer and flash it from there.
3470 @item @command{sunxi-nand-part}: Partitions NAND flash.
3471 @item @command{sunxi-bootinfo}: Reads out boot0 and boot1 (Allwinner
3472 bootloader) parameters.
3473 @item @command{sunxi-pio}: Sets GPIO parameters and oscillates a GPIO
3474 in order to be able to find it.
3475 @item @command{sunxi-meminfo}: Prints memory bus settings.
3476 @item @command{sunxi-nand-image-builder}: Prepares raw NAND images.
3477 @end enumerate")
3478 (license license:gpl2+)))
3479
3480 (define-public sedsed
3481 (package
3482 (name "sedsed")
3483 (version "1.1")
3484 (source
3485 (origin
3486 (method git-fetch)
3487 (uri (git-reference
3488 (url "https://github.com/aureliojargas/sedsed")
3489 (commit (string-append "v" version))))
3490 (file-name (git-file-name name version))
3491 (sha256
3492 (base32 "05cl35mwljdb9ynbbsfa8zx6ig8r0xncbg2cir9vwn5manndjj18"))))
3493 (build-system python-build-system)
3494 (arguments
3495 `(#:tests? #f ; no tests
3496 #:phases
3497 (modify-phases %standard-phases
3498 (add-after 'unpack 'patch-sed-in
3499 (lambda _
3500 (substitute* "sedsed.py"
3501 (("sedbin = 'sed'")
3502 (string-append "sedbin = '" (which "sed") "'")))
3503 #t))
3504 (delete 'build)
3505 (replace 'install
3506 (lambda* (#:key outputs #:allow-other-keys)
3507 (let* ((out (assoc-ref outputs "out"))
3508 (bin (string-append out "/bin")))
3509 ;; Just one file to copy around
3510 (install-file "sedsed.py" bin)
3511 #t)))
3512 (add-after 'wrap 'symlink
3513 ;; Create 'sedsed' symlink to "sedsed.py".
3514 (lambda* (#:key outputs #:allow-other-keys)
3515 (let* ((out (assoc-ref outputs "out"))
3516 (bin (string-append out "/bin"))
3517 (sed (string-append bin "/sedsed"))
3518 (sedpy (string-append bin "/sedsed.py")))
3519 (symlink sedpy sed)
3520 #t))))))
3521 (home-page "https://aurelio.net/projects/sedsed")
3522 (synopsis "Sed sed scripts")
3523 (description
3524 "@code{sedsed} can debug, indent, tokenize and HTMLize your @command{sed}
3525 script.
3526
3527 In debug mode, it reads your script and adds extra commands to it. When
3528 executed you can see the data flow between the commands, revealing all the
3529 magic sed performs on its internal buffers.
3530
3531 In indent mode, your script is reformatted with standard spacing.
3532
3533 In tokenize mode, you can see the elements of every command you use.
3534
3535 In HTMLize mode, your script is converted to a beautiful colored HTML file,
3536 with all the commands and parameters identified for your viewing pleasure.
3537
3538 With sedsed you can master any sed script. No more secrets, no more hidden
3539 buffers.")
3540 (license license:expat)))
3541
3542 (define-public igt-gpu-tools
3543 (package
3544 (name "igt-gpu-tools")
3545 (version "1.26")
3546 (source
3547 (origin
3548 (method git-fetch)
3549 (uri (git-reference
3550 (url "https://gitlab.freedesktop.org/drm/igt-gpu-tools.git")
3551 (commit (string-append "igt-gpu-tools-" version))))
3552 (file-name (git-file-name name version))
3553 (sha256
3554 (base32 "0m124pqv7zna25jnvk566c4kk628jr0w8mgnp8mr5xqz9cprgczm"))))
3555 (build-system meson-build-system)
3556 (arguments
3557 `(#:tests? #f)) ; many of the tests try to load kernel modules
3558 (inputs
3559 `(("cairo" ,cairo)
3560 ("elfutils" ,elfutils) ; libdw
3561 ("eudev" ,eudev)
3562 ("kmod" ,kmod)
3563 ("libdrm" ,libdrm)
3564 ("libpciaccess" ,libpciaccess)
3565 ("libunwind" ,libunwind)
3566 ("procps" ,procps)))
3567 (native-inputs
3568 `(("bison" ,bison)
3569 ("flex" ,flex)
3570 ("pkg-config" ,pkg-config)))
3571 (home-page "https://gitlab.freedesktop.org/drm/igt-gpu-tools")
3572 (synopsis "Tools for development and testing of the Intel DRM driver")
3573 (description "IGT GPU Tools is a collection of tools for development and
3574 testing of the Intel DRM driver. There are many macro-level test suites that
3575 get used against the driver, including xtest, rendercheck, piglit, and
3576 oglconform, but failures from those can be difficult to track down to kernel
3577 changes, and many require complicated build procedures or specific testing
3578 environments to get useful results. Therefore, IGT GPU Tools includes
3579 low-level tools and tests specifically for development and testing of the
3580 Intel DRM Driver.")
3581 (supported-systems '("i686-linux" "x86_64-linux"))
3582 (license license:expat)))
3583
3584 (define-public neofetch
3585 (package
3586 (name "neofetch")
3587 (version "7.1.0")
3588 (source (origin
3589 (method git-fetch)
3590 (uri (git-reference
3591 (url "https://github.com/dylanaraps/neofetch")
3592 (commit version)))
3593 (file-name (git-file-name name version))
3594 (sha256
3595 (base32
3596 "0i7wpisipwzk0j62pzaigbiq42y1mn4sbraz4my2jlz6ahwf00kv"))))
3597 (build-system gnu-build-system)
3598 (arguments
3599 `(#:tests? #f ; there are no tests
3600 #:make-flags
3601 (list (string-append "PREFIX=" %output))
3602 #:phases
3603 (modify-phases %standard-phases
3604 (delete 'configure)))) ; no configure script
3605 (home-page "https://github.com/dylanaraps/neofetch")
3606 (synopsis "System information script")
3607 (description "Neofetch is a command-line system information tool written in
3608 Bash. Neofetch displays information about your system next to an image, your OS
3609 logo, or any ASCII file of your choice. The main purpose of Neofetch is to be
3610 used in screenshots to show other users what operating system or distribution
3611 you are running, what theme or icon set you are using, etc.")
3612 (license license:expat)))
3613
3614 (define-public screenfetch
3615 (package
3616 (name "screenfetch")
3617 (version "3.9.1")
3618 (source (origin
3619 (method git-fetch)
3620 (uri (git-reference
3621 (url "https://github.com/KittyKatt/screenFetch")
3622 (commit (string-append "v" version))))
3623 (file-name (git-file-name name version))
3624 (sha256
3625 (base32
3626 "04l8aqr474pb115nagn9f6y48jw92n1qfszgw7dbhgl4mpn95lcr"))))
3627 (build-system trivial-build-system)
3628 (arguments
3629 `(#:modules ((guix build utils))
3630 #:builder
3631 (begin
3632 (use-modules (guix build utils))
3633 (let ((source (assoc-ref %build-inputs "source"))
3634 (out (assoc-ref %outputs "out")))
3635 (mkdir-p (string-append out "/bin/"))
3636 (copy-file (string-append source "/screenfetch-dev")
3637 (string-append out "/bin/screenfetch"))
3638 (install-file (string-append source "/screenfetch.1")
3639 (string-append out "/man/man1/"))
3640 (install-file (string-append source "/COPYING")
3641 (string-append out "/share/doc/" ,name "-" ,version))
3642 (substitute* (string-append out "/bin/screenfetch")
3643 (("/usr/bin/env bash")
3644 (string-append (assoc-ref %build-inputs "bash")
3645 "/bin/bash")))
3646 (wrap-program
3647 (string-append out "/bin/screenfetch")
3648 `("PATH" ":" prefix
3649 (,(string-append (assoc-ref %build-inputs "bc") "/bin:"
3650 (assoc-ref %build-inputs "scrot") "/bin:"
3651 (assoc-ref %build-inputs "xdpyinfo") "/bin"
3652 (assoc-ref %build-inputs "xprop") "/bin"))))
3653 (substitute* (string-append out "/bin/screenfetch")
3654 (("#!#f")
3655 (string-append "#!" (assoc-ref %build-inputs "bash")
3656 "/bin/bash")))))))
3657 (inputs
3658 `(("bash" ,bash)
3659 ("bc" ,bc)
3660 ("scrot" ,scrot)
3661 ("xdpyinfo" ,xdpyinfo)
3662 ("xprop" ,xprop)))
3663 (home-page "https://github.com/KittyKatt/screenFetch")
3664 (synopsis "System information script")
3665 (description "Bash screenshot information tool which can be used to
3666 generate those nifty terminal theme information and ASCII distribution logos in
3667 everyone's screenshots nowadays.")
3668 (license license:gpl3)))
3669
3670 (define-public ufetch
3671 (let ((commit "98b622023e03fe24dbc137e9a68104dfe1fbd04a")
3672 (revision "1"))
3673 (package
3674 (name "ufetch")
3675 (version (git-version "0.2" revision commit))
3676 (source (origin
3677 (method git-fetch)
3678 (uri (git-reference
3679 (url "https://gitlab.com/jschx/ufetch.git")
3680 (commit commit)))
3681 (file-name (git-file-name name version))
3682 (sha256
3683 (base32
3684 "09c4zmikza16xpydinnqbi3hmcibfrrn10wij7j0j1wv1pj2sl2l"))))
3685 (build-system trivial-build-system)
3686 (inputs
3687 `(("bash" ,bash)
3688 ("tput" ,ncurses)))
3689 (arguments
3690 `(#:modules ((guix build utils))
3691 #:builder
3692 (begin
3693 (use-modules (guix build utils))
3694 (let* ((source (assoc-ref %build-inputs "source"))
3695 (output (assoc-ref %outputs "out"))
3696 (bindir (string-append output "/bin"))
3697 (docdir (string-append output "/share/doc/ufetch-" ,version))
3698 (tput (string-append (assoc-ref %build-inputs "tput") "/bin/tput")))
3699 (install-file (string-append source "/LICENSE") docdir)
3700 (setenv "PATH" (string-append (assoc-ref %build-inputs "bash") "/bin"))
3701 (mkdir-p bindir)
3702 (for-each (lambda (src)
3703 (let ((dst (string-append bindir "/" (basename src))))
3704 (copy-file src dst)
3705 (patch-shebang dst)
3706 (substitute* dst (("tput") tput))))
3707 (find-files source "ufetch-[[:alpha:]]*$"))
3708 ;; Note: the `ufetch` we create below will only work if run under
3709 ;; the Guix System. I.e. a user trying to run `ufetch` on a
3710 ;; foreign distro will not get great results. The `screenfetch`
3711 ;; program does actual runtime detection of the operating system,
3712 ;; and would be a better choice in such a situation.
3713 (symlink "ufetch-guix" (string-append bindir "/ufetch"))))))
3714 (home-page "https://gitlab.com/jschx/ufetch")
3715 (synopsis "Tiny system info")
3716 (description "This package provides a tiny system info utility.")
3717 (license license:isc))))
3718
3719 (define-public pfetch
3720 (let ((commit "e18a0959ab98b963744755ec4687e59dc11db3c5")
3721 (revision "0"))
3722 (package
3723 (name "pfetch")
3724 (version (git-version "0.7.0" revision commit))
3725 (source (origin
3726 (method git-fetch)
3727 (uri (git-reference
3728 (url "https://github.com/dylanaraps/pfetch")
3729 (commit commit)))
3730 (file-name (git-file-name name version))
3731 (sha256
3732 (base32
3733 "1md40av6i3xvvwig5jzhy4kf3s5sgxxk35r0vcyrjd8qyndk927l"))))
3734 (build-system trivial-build-system)
3735 (inputs `(("bash" ,bash)))
3736 (arguments
3737 `(#:modules ((guix build utils))
3738 #:builder
3739 (begin
3740 (use-modules (guix build utils))
3741 (let* ((source (lambda (f)
3742 (string-append (assoc-ref %build-inputs "source") "/" f)))
3743 (output (assoc-ref %outputs "out"))
3744 (docdir (string-append output "/share/doc/pfetch-" ,version)))
3745 (install-file (source "LICENSE.md") docdir)
3746 (install-file (source "README.md") docdir)
3747 (install-file (source "pfetch") (string-append output "/bin"))
3748 (patch-shebang
3749 (string-append output "/bin/pfetch")
3750 (list (string-append (assoc-ref %build-inputs "bash") "/bin")))
3751 #t))))
3752 (home-page "https://github.com/dylanaraps/pfetch")
3753 (synopsis "System information tool")
3754 (description "This package provides a simple, configurable system
3755 information tool.")
3756 (license license:expat))))
3757
3758 (define-public nnn
3759 (package
3760 (name "nnn")
3761 (version "4.1.1")
3762 (source
3763 (origin
3764 (method url-fetch)
3765 (uri (string-append "https://github.com/jarun/nnn/releases/download/v"
3766 version "/nnn-v" version ".tar.gz"))
3767 (sha256
3768 (base32 "1fnf35s3b2nfp18s712n5vhg6idx4rfgwdfv74nc2933v9l2dq7h"))))
3769 (build-system gnu-build-system)
3770 (inputs
3771 `(("ncurses" ,ncurses)
3772 ("readline" ,readline)))
3773 (native-inputs
3774 `(("pkg-config" ,pkg-config)))
3775 (arguments
3776 `(#:tests? #f ; no tests
3777 #:phases
3778 (modify-phases %standard-phases
3779 (delete 'configure)) ; no configure script
3780 #:make-flags
3781 (list
3782 (string-append "PREFIX="
3783 (assoc-ref %outputs "out"))
3784 (string-append "CC=" ,(cc-for-target))
3785 (string-append "PKG_CONFIG=" ,(pkg-config-for-target)))))
3786 (home-page "https://github.com/jarun/nnn")
3787 (synopsis "Terminal file browser")
3788 (description
3789 "@command{nnn} is a fork of @command{noice}, a fast and minimal text
3790 terminal file browser with keyboard shortcuts for navigation, opening files and
3791 running tasks. There is no configuration file and MIME associations are
3792 hard-coded.")
3793 (license license:bsd-2)))
3794
3795 (define-public thermald
3796 (package
3797 (name "thermald")
3798 (version "2.4.6")
3799 (source
3800 (origin
3801 (method git-fetch)
3802 (uri (git-reference
3803 (url "https://github.com/intel/thermal_daemon")
3804 (commit (string-append "v" version))))
3805 (file-name (git-file-name name version))
3806 (sha256
3807 (base32 "1lgaky8cmxbi17zpymy2v9wgknx1g92bq50j6kfpsm8qgb7djjb6"))))
3808 (build-system gnu-build-system)
3809 (arguments
3810 `(#:configure-flags
3811 (let ((out (assoc-ref %outputs "out")))
3812 (list (string-append "--with-dbus-sys-dir="
3813 out "/etc/dbus-1/system.d")
3814 "--localstatedir=/var"))
3815 #:make-flags
3816 (list "V=1") ; log build commands
3817 #:phases
3818 (modify-phases %standard-phases
3819 (add-before 'bootstrap 'no-early-./configure
3820 (lambda _
3821 (setenv "NO_CONFIGURE" "yet"))))))
3822 (native-inputs
3823 `(("autoconf" ,autoconf)
3824 ("autoconf-archive" ,autoconf-archive)
3825 ("automake" ,automake)
3826 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
3827 ("gtk-doc" ,gtk-doc)
3828 ("pkg-config" ,pkg-config)))
3829 (inputs
3830 `(("dbus-glib" ,dbus-glib)
3831 ("libevdev" ,libevdev)
3832 ("libxml2" ,libxml2)
3833 ("upower" ,upower)
3834 ("xz" ,xz)))
3835 (home-page "https://01.org/linux-thermal-daemon/")
3836 (synopsis "CPU scaling for thermal management")
3837 (description "The Linux Thermal Daemon helps monitor and control temperature
3838 on systems running the Linux kernel.")
3839 ;; arm and aarch64 don't have cpuid.h.
3840 (supported-systems '("i686-linux" "x86_64-linux"))
3841 (license license:gpl2)))
3842
3843 (define-public masscan
3844 (package
3845 (name "masscan")
3846 (version "1.0.5")
3847 (source
3848 (origin
3849 (method git-fetch)
3850 (uri (git-reference
3851 (url "https://github.com/robertdavidgraham/masscan")
3852 (commit version)))
3853 (file-name (git-file-name name version))
3854 (sha256
3855 (base32 "0q0c7bsf0pbl8napry1qyg0gl4pd8wn872h4mz9b56dx4rx90vqg"))))
3856 (build-system gnu-build-system)
3857 (inputs
3858 `(("libpcap" ,libpcap)))
3859 (arguments
3860 `(#:test-target "regress"
3861 #:make-flags
3862 (list (string-append "CC=" ,(cc-for-target))
3863 (string-append "PREFIX=" (assoc-ref %outputs "out")))
3864 #:phases
3865 (modify-phases %standard-phases
3866 (delete 'configure) ; no ./configure script
3867 (add-after 'unpack 'patch-path
3868 (lambda* (#:key outputs inputs #:allow-other-keys)
3869 (let* ((out (assoc-ref outputs "out"))
3870 (pcap (assoc-ref inputs "libpcap")))
3871 (substitute* "src/rawsock-pcap.c"
3872 (("libpcap.so") (string-append pcap "/lib/libpcap.so")))
3873 #t))))))
3874 (synopsis "TCP port scanner")
3875 (description "MASSCAN is an asynchronous TCP port scanner. It can detect
3876 open ports, and also complete the TCP connection and interact with the remote
3877 application, collecting the information received.")
3878 (home-page "https://github.com/robertdavidgraham/masscan")
3879 ;; 'src/siphash24.c' is the SipHash reference implementation, which
3880 ;; bears a CC0 Public Domain Dedication.
3881 (license license:agpl3+)))
3882
3883 (define-public hungrycat
3884 (package
3885 (name "hungrycat")
3886 (version "0.4.1")
3887 (source (origin
3888 (method url-fetch)
3889 (uri (string-append "https://github.com/jwilk/hungrycat/"
3890 "releases/download/" version "/"
3891 "hungrycat-" version ".tar.gz"))
3892 (sha256
3893 (base32
3894 "03fc1zsrf99lvxa7b4ps6pbi43304wbxh1f6ci4q0vkal370yfwh"))))
3895 (build-system gnu-build-system)
3896 (native-inputs
3897 ;; For tests.
3898 `(("python" ,python-wrapper)
3899 ("python-nose" ,python-nose)))
3900 (arguments
3901 `(#:test-target "test"))
3902 (synopsis "A single tool that combines @command{cat} & @command{rm}")
3903 (description
3904 "hungrycat prints the contents of a file to standard output, while
3905 simultaneously freeing the disk space it occupied. It is useful if you need
3906 to process a large file, don't have enough space to store both the input and
3907 output files, and don't need the input file afterwards.
3908 While similar in principle to running @command{cat} immediately followed by
3909 @command{rm}, @command{hungrycat} actually frees blocks as soon as they are
3910 printed instead of after the entire file has been read, which is often too
3911 late.")
3912 (home-page "https://jwilk.net/software/hungrycat")
3913 (license license:expat)))
3914
3915 (define-public launchmon
3916 (package
3917 (name "launchmon")
3918 (version "1.0.2")
3919 (source (origin
3920 (method url-fetch)
3921 (uri (string-append
3922 "https://github.com/LLNL/LaunchMON/releases/download/v"
3923 version "/launchmon-v" version ".tar.gz"))
3924 (sha256
3925 (base32
3926 "0fm3nd9mydm9v2bf7bh01dbgrfnpwkapxa3dsvy3x1z0rz61qc0x"))
3927 (modules '((guix build utils)))
3928 (snippet
3929 '(begin
3930 ;; Fix build failure with GCC 7 due to a conversion error.
3931 ;; Remove for versions > 1.0.2.
3932 (substitute* "launchmon/src/linux/lmon_api/lmon_coloc_spawner.cxx"
3933 ((" lmonpl = '\\\\0'")
3934 " *lmonpl = '\\0'"))
3935 #t))))
3936 (build-system gnu-build-system)
3937 (inputs
3938 `(("mpi" ,openmpi)
3939 ("munge" ,munge)
3940 ("boost" ,boost)
3941 ("libelf" ,libelf)
3942 ("libgcrypt" ,libgcrypt)
3943 ("libgpg-error" ,libgpg-error)))
3944 (synopsis "Infrastructue for large scale tool daemon launching")
3945 (description
3946 "LaunchMON is a software infrastructure that enables HPC run-time
3947 tools to co-locate tool daemons with a parallel job. Its API allows a
3948 tool to identify all the remote processes of a job and to scalably
3949 launch daemons into the relevant nodes.")
3950 (home-page "https://github.com/LLNL/LaunchMON")
3951 (supported-systems '("i686-linux" "x86_64-linux"))
3952 (license license:lgpl2.1)))
3953
3954 (define-public spindle
3955 (package
3956 (name "spindle")
3957 (version "0.10")
3958 (source (origin
3959 ;; We use git checkout to avoid github auto-generated tarballs
3960 (method git-fetch)
3961 (uri (git-reference
3962 (url "https://github.com/hpc/Spindle")
3963 (commit (string-append "v" version))))
3964 (file-name (git-file-name name version))
3965 (sha256
3966 (base32
3967 "15n3ay0qq81r5v7fif61q1vdjcq44pp2nynkh3fvbzc9fj3c39wd"))))
3968 (build-system gnu-build-system)
3969 (arguments '(#:configure-flags '("--enable-sec-launchmon"
3970 "--enable-sec-munge"
3971 "--enable-sec-none")))
3972 (inputs
3973 `(("mpi" ,openmpi)
3974 ("munge" ,munge)
3975 ("launchmon" ,launchmon)
3976 ("libgcrypt" ,libgcrypt)))
3977 (synopsis "Scalable library loading in HPC environments")
3978 (description
3979 "Spindle is a tool for improving the performance of dynamic library and
3980 Python loading in HPC environments.")
3981 (home-page "https://github.com/hpc/Spindle")
3982 ;; This package supports x86_64 and PowerPC64
3983 (supported-systems '("x86_64-linux"))
3984 (license license:lgpl2.1)))
3985
3986 (define-public inxi-minimal
3987 (let ((real-name "inxi"))
3988 (package
3989 (name "inxi-minimal")
3990 (version "3.3.06-1")
3991 (source
3992 (origin
3993 (method git-fetch)
3994 (uri (git-reference
3995 (url "https://github.com/smxi/inxi")
3996 (commit version)))
3997 (file-name (git-file-name real-name version))
3998 (sha256
3999 (base32 "1qk40iyrdp52vmbiqwxicvlcycm2v2bf1gg4lzq0b4619sd6d1m7"))))
4000 (build-system trivial-build-system)
4001 (inputs
4002 `(("bash" ,bash-minimal)
4003 ("perl" ,perl)
4004 ("procps" ,procps)))
4005 (native-inputs
4006 `(("gzip" ,gzip)))
4007 (arguments
4008 `(#:modules ((guix build utils))
4009 #:builder
4010 (begin
4011 (use-modules (guix build utils)
4012 (ice-9 match)
4013 (srfi srfi-26))
4014 (setenv "PATH" (string-append
4015 (assoc-ref %build-inputs "bash") "/bin" ":"
4016 (assoc-ref %build-inputs "gzip") "/bin" ":"
4017 (assoc-ref %build-inputs "perl") "/bin" ":"))
4018 (copy-recursively (assoc-ref %build-inputs "source")
4019 ,(string-append real-name "-" version))
4020 (with-directory-excursion ,(string-append real-name "-" version)
4021 (with-fluids ((%default-port-encoding #f))
4022 (substitute* "inxi" (("/usr/bin/env perl") (which "perl"))))
4023 (let ((bin (string-append %output "/bin")))
4024 (install-file "inxi" bin)
4025 (wrap-program (string-append bin "/inxi")
4026 `("PATH" ":" =
4027 ("$PATH"
4028 ,@(map (lambda (input)
4029 (match input
4030 ((name . store)
4031 (let ((store-append
4032 (cut string-append store <>)))
4033 (cond
4034 ((member name '("util-linux"))
4035 (string-append (store-append "/bin") ":"
4036 (store-append "/sbin")))
4037 ((member name '("dmidecode" "iproute2"))
4038 (store-append "/sbin"))
4039 (else (store-append "/bin")))))))
4040 %build-inputs)))
4041 `("PERL5LIB" ":" =
4042 ,(delete
4043 ""
4044 (map (match-lambda
4045 (((? (cut string-prefix? "perl-" <>) name) . dir)
4046 (string-append dir "/lib/perl5/site_perl"))
4047 (_ ""))
4048 %build-inputs)))))
4049 (invoke "gzip" "inxi.1")
4050 (install-file "inxi.1.gz"
4051 (string-append %output "/share/man/man1")))
4052 #t)))
4053 (home-page "https://smxi.org/docs/inxi.htm")
4054 (synopsis "Full-featured system information script")
4055 (description "Inxi is a system information script that can display
4056 various things about your hardware and software to users in an IRC chatroom or
4057 support forum. It runs with the @code{/exec} command in most IRC clients.")
4058 (license license:gpl3+))))
4059
4060 (define-public inxi
4061 (package
4062 (inherit inxi-minimal)
4063 (name "inxi")
4064 (inputs
4065 `(("dmidecode" ,dmidecode)
4066 ("file" ,file)
4067 ("bind:utils" ,isc-bind "utils") ; dig
4068 ("gzip" ,gzip)
4069 ("iproute2" ,iproute) ; ip
4070 ("kmod" ,kmod) ; modinfo
4071 ("lm-sensors" ,lm-sensors)
4072 ("mesa-utils" ,mesa-utils)
4073 ("pciutils" ,pciutils)
4074 ("tar" ,tar)
4075 ("tree" ,tree)
4076 ("util-linux" ,util-linux) ; lsblk
4077 ("usbutils" ,usbutils) ; lsusb
4078 ("wmctrl" ,wmctrl)
4079 ("xdpyinfo" ,xdpyinfo)
4080 ("xprop" ,xprop)
4081 ("xrandr" ,xrandr)
4082 ("coreutils" ,coreutils) ; uptime
4083 ("inetutils" ,inetutils) ; ifconfig
4084 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
4085 ("perl-http-tiny" ,perl-http-tiny)
4086 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
4087 ("perl-json-xs" ,perl-json-xs)
4088 ("perl-time-hires" ,perl-time-hires)
4089 ("lvm2" ,lvm2) ; lvs
4090 ("mdadm" ,mdadm)
4091 ;; TODO: Add more inputs:
4092 ;; ipmi-sensors
4093 ;; hddtemp
4094 ;; perl-xml-dumper
4095 ;; ipmitool
4096 ,@(package-inputs inxi-minimal)))))
4097
4098 (define-public pscircle
4099 (package
4100 (name "pscircle")
4101 (version "1.3.1")
4102 (source
4103 (origin
4104 (method git-fetch)
4105 (uri (git-reference
4106 (url "https://gitlab.com/mildlyparallel/pscircle.git")
4107 (commit (string-append "v" version))))
4108 (file-name (git-file-name name version))
4109 (sha256
4110 (base32 "1sm99423hh90kr4wdjqi9sdrrpk65j2vz2hzj65zcxfxyr6khjci"))))
4111 (build-system meson-build-system)
4112 (native-inputs
4113 `(("pkg-config" ,pkg-config)))
4114 (inputs
4115 `(("cairo" ,cairo)
4116 ("libpng" ,libpng)
4117 ("libx11" ,libx11)))
4118 (home-page "https://gitlab.com/mildlyparallel/pscircle")
4119 (synopsis "Visualize Linux processes in a form of radial tree")
4120 (description
4121 "@code{pscircle} visualizes Linux processes in the form of a radial tree.")
4122 (license license:gpl2+)))
4123
4124 (define-public python-pyudev
4125 (package
4126 (name "python-pyudev")
4127 (version "0.22.0")
4128 (source
4129 (origin
4130 (method url-fetch)
4131 (uri (pypi-uri "pyudev" version))
4132 (sha256
4133 (base32
4134 "0xmj6l08iih2js9skjqpv4w7y0dhxyg91zmrs6v5aa65gbmipfv9"))))
4135 (build-system python-build-system)
4136 (arguments
4137 `(#:tests? #f ; Tests require /sys
4138 #:phases
4139 (modify-phases %standard-phases
4140 (add-after 'unpack 'patch-ctypes-udev
4141 (lambda* (#:key inputs outputs #:allow-other-keys)
4142 (let ((eudev (assoc-ref inputs "eudev")))
4143 (substitute* "src/pyudev/core.py"
4144 (("'udev'")
4145 (string-append "'" eudev "/lib/libudev.so'")))
4146 (substitute* "src/pyudev/_ctypeslib/utils.py"
4147 ;; Use absolute paths instead of keys.
4148 (("= find_library") "= "))
4149 #t))))))
4150 (inputs
4151 `(("eudev" ,eudev)))
4152 (propagated-inputs
4153 `(("python-six" ,python-six)))
4154 (native-inputs
4155 `(("python-docutils" ,python-docutils)
4156 ("python-hypothesis" ,python-hypothesis)
4157 ("python-mock" ,python-mock)
4158 ("python-pytest" ,python-pytest)
4159 ("python-sphinx" ,python-sphinx)))
4160 (home-page "https://pyudev.readthedocs.io/")
4161 (synopsis "Python udev binding")
4162 (description "This package provides @code{udev} bindings for Python.")
4163 (license license:lgpl2.1)))
4164
4165 (define-public vmtouch
4166 (package
4167 (name "vmtouch")
4168 (version "1.3.1")
4169 (source
4170 (origin
4171 (method git-fetch)
4172 (uri (git-reference
4173 (url "https://github.com/hoytech/vmtouch/")
4174 (commit (string-append "v" version))))
4175 (file-name (git-file-name name version))
4176 (sha256
4177 (base32 "08da6apzfkfjwasn4dxrlfxqfx7arl28apdzac5nvm0fhvws0dxk"))))
4178 (build-system gnu-build-system)
4179 (native-inputs
4180 `(("perl" ,perl)))
4181 (arguments
4182 `(#:tests? #f ; no tests
4183 #:make-flags
4184 (list
4185 (string-append "CC=" ,(cc-for-target))
4186 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4187 #:phases
4188 (modify-phases %standard-phases
4189 (delete 'configure))))
4190 (home-page "https://github.com/hoytech/vmtouch/")
4191 (synopsis "Portable file system cache diagnostics and control")
4192 (description
4193 "vmtouch is a tool for learning about and controlling the file system
4194 cache of unix and unix-like systems.")
4195 (license license:bsd-3)))
4196
4197 (define-public solaar
4198 (package
4199 (name "solaar")
4200 (version "1.0.6")
4201 (source (origin
4202 (method git-fetch)
4203 (uri (git-reference
4204 (url "https://github.com/pwr-Solaar/Solaar")
4205 (commit version)))
4206 (file-name (git-file-name name version))
4207 (sha256
4208 (base32
4209 "04zclzfc31l2fj5shcsngnmcvcmmhnc567l3wb9yfhs8k39k9kb2"))))
4210 (build-system python-build-system)
4211 (arguments
4212 `(#:phases
4213 (modify-phases %standard-phases
4214 (add-before 'build 'setenv-PATH
4215 (lambda _
4216 (setenv "PYTHONPATH" "lib"))))))
4217 (propagated-inputs
4218 `(("python-pygobject" ,python-pygobject)
4219 ("python-pyudev" ,python-pyudev)
4220
4221 ;; For GUI.
4222 ("python-pyyaml" ,python-pyyaml)
4223 ("python-psutil" ,python-psutil)
4224 ("python-xlib" ,python-xlib)
4225 ("gtk+" ,gtk+)
4226 ("python-pygobject" ,python-pygobject)))
4227 (home-page "https://pwr-solaar.github.io/Solaar/")
4228 (synopsis "Linux devices manager for the Logitech Unifying Receiver")
4229 (description "This package provides tools to manage clients of the
4230 Logitech Unifying Receiver.")
4231 (license license:gpl2)))
4232
4233 (define-public lynis
4234 (package
4235 (name "lynis")
4236 ;; Also update the ‘lynis-sdk’ input to the commit matching this release.
4237 (version "3.0.5")
4238 (source
4239 (origin
4240 (method git-fetch)
4241 (uri (git-reference
4242 (url "https://github.com/CISOfy/lynis")
4243 (commit version)))
4244 (file-name (git-file-name name version))
4245 (sha256
4246 (base32 "11kl54hbvjl7q2i1jz8a726vlkdmknvbp4zac3j4fgljg27qp410"))
4247 (modules '((guix build utils)))
4248 (snippet
4249 '(begin
4250 ;; Remove proprietary plugins. As of now, all plugins supplied with
4251 ;; lynis are proprietary. In the future, if free plugins are
4252 ;; provided, whitelist them from deletion.
4253 (for-each delete-file (find-files "plugins"))
4254 #t))))
4255 (build-system gnu-build-system)
4256 (native-inputs
4257 `(;; For tests
4258 ("lynis-sdk"
4259 ,(origin
4260 (method git-fetch)
4261 (uri (git-reference
4262 (url "https://github.com/CISOfy/lynis-sdk")
4263 (commit "99f79c4deb4cb2221d7fccfe82baf58c0a55b9e7")))
4264 (file-name (git-file-name "lynis-sdk" version))
4265 (sha256
4266 (base32 "1nc2rhzj6l08d2mnjrzkm4mxla1mjkddcxl8n05c1kdz9ycn6cpl"))))))
4267 (arguments
4268 `(#:phases
4269 (modify-phases %standard-phases
4270 (replace 'configure
4271 (lambda* (#:key inputs outputs #:allow-other-keys)
4272 (substitute* "lynis"
4273 (("/usr/share/lynis")
4274 (string-append (assoc-ref outputs "out") "/share/lynis")))
4275 (substitute* "include/functions"
4276 (("/usr/local/etc/lynis")
4277 (string-append (assoc-ref outputs "out") "/etc/lynis")))
4278 #t))
4279 (delete 'build)
4280 (replace 'install
4281 (lambda* (#:key outputs #:allow-other-keys)
4282 (let ((out (assoc-ref outputs "out")))
4283 (install-file "lynis" (string-append out "/bin/"))
4284 (install-file "default.prf" (string-append out "/etc/lynis"))
4285 (for-each
4286 (lambda (dir)
4287 (copy-recursively dir (string-append out "/share/lynis/" dir)))
4288 (list "db" "include" "plugins"))
4289 (install-file "lynis.8" (string-append out "/share/man/man8"))
4290 #t)))
4291 (replace 'check
4292 (lambda* (#:key inputs #:allow-other-keys)
4293 (copy-recursively (assoc-ref inputs "lynis-sdk") "../lynis-sdk")
4294 (setenv "LANG" "en_US.UTF-8")
4295 (let ((lynis-dir (getcwd)))
4296 (with-directory-excursion "../lynis-sdk"
4297 (substitute* "config"
4298 (("\\.\\./lynis") lynis-dir))
4299 (substitute* "unit-tests/tests-language-translations.sh"
4300 (("\\.\\./lynis") lynis-dir))
4301 (invoke "sh" "lynis-devkit" "run" "unit-tests"))))))))
4302 (home-page "https://cisofy.com/lynis/")
4303 (synopsis "Security auditing tool")
4304 (description "Lynis is a security auditing tool. It performs an in-depth
4305 security scan and runs on the system itself. The primary goal is to test
4306 security defenses and provide tips for further system hardening. It will also
4307 scan for general system information, vulnerable software packages, and
4308 possible configuration issues.")
4309 (license license:gpl3+)))
4310
4311 (define-public ngrep
4312 (package
4313 (name "ngrep")
4314 (version "1.47")
4315 (source
4316 (origin
4317 (method git-fetch)
4318 (uri (git-reference
4319 (url "https://github.com/jpr5/ngrep/")
4320 (commit (string-append "V" (string-replace-substring version "." "_")))))
4321 (file-name (git-file-name name version))
4322 (sha256
4323 (base32
4324 "1x2fyd7wdqlj1r76ilal06cl2wmbz0ws6i3ys204sbjh1cj6dcl7"))))
4325 (build-system gnu-build-system)
4326 (inputs
4327 `(("libpcap" ,libpcap)))
4328 (arguments
4329 `(#:tests? #f ;; No tests.
4330 #:configure-flags (list (string-append "--with-pcap-includes="
4331 (assoc-ref %build-inputs "libpcap")
4332 "/include/pcap"))))
4333 (home-page "https://github.com/jpr5/ngrep/")
4334 (synopsis "Grep-like utility to search for network packets on an interface")
4335 (description "@command{ngrep} is like GNU grep applied to the network
4336 layer. It's a PCAP-based tool that allows you to specify an extended regular
4337 or hexadecimal expression to match against data payloads of packets. It
4338 understands many kinds of protocols, including IPv4/6, TCP, UDP, ICMPv4/6,
4339 IGMP and Raw, across a wide variety of interface types, and understands BPF
4340 filter logic in the same fashion as more common packet sniffing tools, such as
4341 tcpdump and snoop.")
4342 (license license:bsd-3)))
4343
4344 (define-public pam-mount
4345 (package
4346 (name "pam-mount")
4347 (version "2.18")
4348 (source
4349 (origin
4350 (method url-fetch)
4351 (uri (string-append "mirror://sourceforge/pam-mount/pam_mount/"
4352 "pam_mount-" version ".tar.xz"))
4353 (sha256
4354 (base32 "0832nh2qf9pisgwnbgx6hkylx5d7i416l19y3ly4ifv7k1p7mxqa"))))
4355 (build-system gnu-build-system)
4356 (native-inputs
4357 `(("perl" ,perl)
4358 ("pkg-config" ,pkg-config)))
4359 (inputs
4360 `(("cryptsetup" ,cryptsetup)
4361 ("libhx" ,libhx)
4362 ("libxml2" ,libxml2)
4363 ("linux-pam" ,linux-pam)
4364 ("lvm2" ,lvm2)
4365 ("openssl" ,openssl)
4366 ("pcre2" ,pcre2)
4367 ("libmount" ,util-linux "lib")
4368 ("util-linux" ,util-linux)))
4369 (arguments
4370 `(#:configure-flags
4371 (list (string-append "--with-slibdir=" %output "/lib")
4372 (string-append "--with-ssbindir=" %output "/sbin"))
4373 #:phases
4374 (modify-phases %standard-phases
4375 (add-after 'unpack 'fix-program-paths
4376 (lambda* (#:key inputs outputs #:allow-other-keys)
4377 (let ((util-linux (assoc-ref inputs "util-linux"))
4378 (out (assoc-ref outputs "out")))
4379 (substitute* "src/mtcrypt.c"
4380 (("\"mount\";")
4381 (string-append "\"" util-linux "/bin/mount\";"))
4382 (("\"umount\";")
4383 (string-append "\"" util-linux "/bin/umount\";"))
4384 (("\"fsck\",")
4385 (string-append "\"" util-linux "/sbin/fsck\",")))
4386 (substitute* "src/rdconf1.c"
4387 (("\"mount\", \"")
4388 (string-append "\"" util-linux "/bin/mount\", \""))
4389 (("\"umount\", \"")
4390 (string-append "\"" util-linux "/bin/umount\", \""))
4391 (("\"fsck\", \"")
4392 (string-append "\"" util-linux "/sbin/fsck\", \""))
4393 (("\"pmvarrun\", \"")
4394 (string-append "\"" out "/sbin/pmvarrun\", \""))))
4395 #t)))))
4396 (home-page "http://pam-mount.sourceforge.net")
4397 (synopsis "PAM module to mount volumes for a user session")
4398 (description
4399 "Pam-mount is a PAM module that can mount volumes when a user logs in.
4400 It supports mounting local filesystems of any kind the normal mount utility
4401 supports. It can also mount encrypted LUKS volumes using the password
4402 supplied by the user when logging in.")
4403 (license (list license:gpl2+ license:lgpl2.1+))))
4404
4405 (define-public jc
4406 (package
4407 (name "jc")
4408 (version "1.13.4")
4409 (source
4410 (origin
4411 ;; The PyPI tarball lacks the test suite.
4412 (method git-fetch)
4413 (uri (git-reference
4414 (url "https://github.com/kellyjonbrazil/jc")
4415 (commit (string-append "v" version))))
4416 (file-name (git-file-name name version))
4417 (sha256
4418 (base32 "0rwvyyrdnw43pixp8h51rncq2inc9pbbj1j2191y5si00pjw34zr"))))
4419 (build-system python-build-system)
4420 (propagated-inputs
4421 `(("python-pygments" ,python-pygments)
4422 ("python-ruamel.yaml" ,python-ruamel.yaml)
4423 ("python-xmltodict" ,python-xmltodict)))
4424 (home-page "https://github.com/kellyjonbrazil/jc")
4425 (synopsis "Convert the output of command-line tools to JSON")
4426 (description "@code{jc} JSONifies the output of many CLI tools and
4427 file-types for easier parsing in scripts.")
4428 (license license:expat)))
4429
4430 (define-public jtbl
4431 (package
4432 (name "jtbl")
4433 (version "1.1.6")
4434 (source (origin
4435 (method git-fetch)
4436 (uri (git-reference
4437 (url "https://github.com/kellyjonbrazil/jtbl")
4438 (commit (string-append "v" version))))
4439 (file-name (git-file-name name version))
4440 (sha256
4441 (base32
4442 "1zzd7rd63xva50f22d1rfja4r302aizrafarhwm67vv181swvdya"))))
4443 (build-system python-build-system)
4444 (inputs
4445 `(("python-tabulate" ,python-tabulate)))
4446 (home-page "https://github.com/kellyjonbrazil/jtbl")
4447 (synopsis "Command-line tool to print JSON data as a table in the terminal")
4448 (description "@code{jtbl} accepts piped JSON data from stdin and outputs a
4449 text table representation to stdout.")
4450 (license license:expat)))
4451
4452 (define-public hosts
4453 (package
4454 (name "hosts")
4455 (version "3.6.3")
4456 (source (origin
4457 (method git-fetch)
4458 (uri (git-reference
4459 (url "https://github.com/xwmx/hosts")
4460 (commit version)))
4461 (file-name (git-file-name name version))
4462 (sha256
4463 (base32
4464 "1ni4z89kxzgwm26hhx908g04f2h0fypy7lgfa0rvsz8d0wslgcsn"))))
4465 (build-system trivial-build-system)
4466 (inputs
4467 `(("bats" ,bats) ;for test
4468 ("awk" ,gawk)
4469 ("bash" ,bash)
4470 ("coreutils" ,coreutils)
4471 ("diffutils" ,diffutils)
4472 ("grep" ,grep)
4473 ("ncurses" ,ncurses) ;tput
4474 ("sed" ,sed)))
4475 (arguments
4476 `(#:modules ((guix build utils))
4477 #:builder
4478 (begin
4479 (use-modules (guix build utils))
4480 ;; copy source
4481 (copy-recursively (assoc-ref %build-inputs "source") ".")
4482 ;; patch-shebang phase
4483 (setenv "PATH"
4484 (string-append (assoc-ref %build-inputs "bash") "/bin"
4485 ":" (assoc-ref %build-inputs "awk") "/bin"
4486 ":" (assoc-ref %build-inputs "coreutils") "/bin"
4487 ":" (assoc-ref %build-inputs "diffutils") "/bin"
4488 ":" (assoc-ref %build-inputs "grep") "/bin"
4489 ":" (assoc-ref %build-inputs "ncurses") "/bin"
4490 ":" (assoc-ref %build-inputs "sed") "/bin"
4491 ":" "/run/setuid-programs"
4492 ":" (getenv "PATH")))
4493 (substitute* "hosts"
4494 (("#!/usr/bin/env bash")
4495 (string-append "#!" (which "bash")
4496 "\nPATH=" (getenv "PATH"))))
4497 ;; check phase
4498 (setenv "TERM" "linux") ;set to tty for test
4499 (invoke (string-append (assoc-ref %build-inputs "bats") "/bin/bats")
4500 "test")
4501 ;; install phase
4502 (install-file "hosts" (string-append %output "/bin"))
4503 (let ((bash-completion
4504 (string-append %output "/etc/bash_completion.d")))
4505 (mkdir-p bash-completion)
4506 (copy-file "etc/hosts-completion.bash"
4507 (string-append bash-completion "/hosts")))
4508 (let ((zsh-completion
4509 (string-append %output "/share/zsh/site-functions")))
4510 (mkdir-p zsh-completion)
4511 (copy-file "etc/hosts-completion.zsh"
4512 (string-append zsh-completion "/_hosts")))
4513 (let ((doc (string-append %output "/share/doc/" ,name "-" ,version)))
4514 (mkdir-p doc)
4515 (install-file "LICENSE" doc)
4516 (install-file "README.md" doc))
4517 #t)))
4518 (home-page "https://github.com/xwmx/hosts/")
4519 (synopsis "Script for editing a foreign distro's @file{/etc/hosts} file")
4520 (description "Hosts is a command line program for managing
4521 @file{/etc/hosts} entries. On Guix System, @file{/etc/hosts} is managed from
4522 the system configuration; hosts only works when using the Guix package manager
4523 on a foreign distro. @command{hosts} works with existing hosts files and
4524 entries, providing commands to add, remove, comment, and search.")
4525 (license license:expat)))
4526
4527 (define-public nmrpflash
4528 (package
4529 (name "nmrpflash")
4530 (version "0.9.15")
4531 (source
4532 (origin
4533 (method git-fetch)
4534 (uri
4535 (git-reference
4536 (url "https://github.com/jclehner/nmrpflash")
4537 (commit (string-append "v" version))))
4538 (sha256
4539 (base32 "0ssfls1sfh8w748qsnkfgndlpw395100x2yynzbk5jd56scxvp20"))
4540 (file-name (git-file-name name version))))
4541 (build-system gnu-build-system)
4542 (native-inputs
4543 `(("pkg-config" ,pkg-config)))
4544 (inputs
4545 `(("libnl" ,libnl)
4546 ("libpcap" ,libpcap)))
4547 (arguments
4548 `(#:tests? #f ; None exist
4549 #:make-flags
4550 (list (string-append "CC=" ,(cc-for-target))
4551 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4552 #:phases
4553 (modify-phases %standard-phases
4554 (delete 'configure)
4555 (add-before 'install 'prepare-install
4556 (lambda* (#:key outputs #:allow-other-keys)
4557 (mkdir-p (string-append (assoc-ref outputs "out") "/bin"))
4558 #t)))))
4559 (home-page "https://github.com/jclehner/nmrpflash")
4560 (synopsis "Netgear unbrick utility")
4561 (description "This package provides a utility to flash a new firmware
4562 image to a Netgear device. It has been tested on Netgear EX2700, EX6120,
4563 EX6150v2, DNG3700v2, R6100, R6220, R7000, D7000, WNR3500, R6400, R6800,
4564 R8000, R8500, WNDR3800, but is likely to be compatible with many other
4565 Netgear devices.")
4566 (license license:gpl3+)))
4567
4568 (define-public atop
4569 (package
4570 (name "atop")
4571 (version "2.6.0")
4572 (source (origin
4573 (method url-fetch)
4574 (uri (string-append "https://www.atoptool.nl/download/atop-"
4575 version ".tar.gz"))
4576 (sha256
4577 (base32
4578 "0wlg0n0h9vwpjp2dcb623jvvqck422jrjpq9mbpzg4hnawxcmhly"))))
4579 (build-system gnu-build-system)
4580 (arguments
4581 `(#:tests? #f ; no test suite
4582 #:make-flags
4583 (list (string-append "CC=" ,(cc-for-target))
4584 ;; The installer requires a choice between systemd or SysV.
4585 "systemdinstall"
4586 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
4587 (string-append "BINPATH=/bin")
4588 (string-append "SBINPATH=/sbin")
4589 (string-append "SYSDPATH=/etc/systemd/system")
4590 (string-append "PMPATHD=/etc/systemd/system-sleep")
4591 (string-append "MAN1PATH=/share/man/man1")
4592 (string-append "MAN5PATH=/share/man/man5")
4593 (string-append "MAN8PATH=/share/man/man8")
4594 ;; Or else it tries to create /var/log/atop...
4595 (string-append "LOGPATH="))
4596 #:phases
4597 (modify-phases %standard-phases
4598 (delete 'configure) ; No ./configure script
4599 (add-before 'build 'patch-build
4600 (lambda* (#:key outputs #:allow-other-keys)
4601 (substitute* "Makefile"
4602 ;; We don't need to chown things in the build environment.
4603 (("chown.*$") "")
4604 ;; We can't toggle the setuid bit in the build environment.
4605 (("chmod 04711") "chmod 0711")
4606 ;; Otherwise, it creates a blank configuration file as a "default".
4607 (("touch.*DEFPATH)/atop") "")
4608 (("chmod.*DEFPATH)/atop") ""))
4609 #t)))))
4610 (inputs
4611 `(("ncurses" ,ncurses)
4612 ("python" ,python-wrapper) ; for `atopgpud`
4613 ("zlib" ,zlib)))
4614 (home-page "https://www.atoptool.nl/")
4615 (synopsis "Linux performance monitoring console")
4616 (description "Atop is an ASCII full-screen performance monitor for Linux
4617 that is capable of reporting the activity of all processes (even processes have
4618 finished during the monitoring interval), daily logging of system and process
4619 activity for long-term analysis, highlighting overloaded system resources by
4620 using colors, etc. At regular intervals, it shows system-level activity related
4621 to the CPU, memory, swap, disks (including LVM) and network layers, and for
4622 every process (and thread) it shows e.g. the CPU utilization, memory growth,
4623 disk utilization, priority, username, state, and exit code.")
4624 (license license:gpl2+)))
4625
4626 ;; TODO: Unvendor u-root (pkg: forth, golang, testutil).
4627 (define fiano
4628 (package
4629 (name "fiano")
4630 (version "5.0.0")
4631 (source (origin
4632 (method git-fetch)
4633 (uri (git-reference
4634 (url "https://github.com/linuxboot/fiano.git")
4635 (commit (string-append "v" version))))
4636 (file-name (string-append name "-" version "-checkout"))
4637 (sha256
4638 (base32
4639 "03ihdwwhb7g6bihx141cn0924sjs5ps6q3ps58pk1cg0g0srrr9h"))
4640 (modules '((guix build utils)))
4641 (snippet
4642 '(begin
4643 (delete-file-recursively "vendor/golang.org")
4644 (delete-file-recursively "vendor/github.com")
4645 #t))))
4646 (build-system go-build-system)
4647 (arguments
4648 `(#:import-path "github.com/linuxboot/fiano"
4649 #:unpack-path "github.com/linuxboot/fiano"))
4650 (native-inputs
4651 `())
4652 (inputs
4653 `(("go-golang-org-x-text" ,go-golang-org-x-text)
4654 ("go-github.com-ulikunitz-xz" ,go-github.com-ulikunitz-xz)))
4655 (synopsis "UEFI image editor")
4656 (description "This package provides a command-line UEFI image editor.")
4657 (home-page "https://github.com/linuxboot/fiano")
4658 (license license:bsd-3)))
4659
4660 (define-public fiano-utk
4661 (package
4662 (inherit fiano)
4663 (name "fiano-utk")
4664 (arguments
4665 `(#:import-path "github.com/linuxboot/fiano/cmds/utk"
4666 #:unpack-path "github.com/linuxboot/fiano"))))
4667
4668 (define-public fiano-fmap
4669 (package
4670 (inherit fiano)
4671 (name "fiano-fmap")
4672 (arguments
4673 `(#:import-path "github.com/linuxboot/fiano/cmds/fmap"
4674 #:unpack-path "github.com/linuxboot/fiano"))))
4675
4676 (define-public novena-eeprom
4677 (package
4678 (name "novena-eeprom")
4679 (version "2.3")
4680 (source (origin
4681 (method git-fetch)
4682 (uri (git-reference
4683 (url "https://github.com/xobs/novena-eeprom.git")
4684 (commit (string-append "v" version))))
4685 (file-name (string-append name "-" version "-checkout"))
4686 (sha256
4687 (base32
4688 "00pd71mg0g20v0820ggp3ghf9nyj5s4wavaz9mkmrmsr91hcnf7i"))))
4689 (build-system gnu-build-system)
4690 (arguments
4691 `(#:tests? #f ; No tests exist
4692 #:make-flags
4693 (list (string-append "CC=" ,(cc-for-target)))
4694 #:phases
4695 (modify-phases %standard-phases
4696 (delete 'configure)
4697 (replace 'install
4698 (lambda* (#:key outputs #:allow-other-keys)
4699 (let* ((out (assoc-ref outputs "out"))
4700 (out-bin (string-append out "/bin"))
4701 (out-share-man (string-append out "/share/man/man8")))
4702 (install-file "novena-eeprom" out-bin)
4703 (install-file "novena-eeprom.8" out-share-man)))))))
4704 (inputs
4705 `(("i2c-tools" ,i2c-tools)))
4706 (synopsis "Novena EEPROM editor")
4707 (description "This package provides an editor for the Novena EEPROM.
4708 Novena boards contain a device-dependent descriptive EEPROM that defines
4709 various parameters such as serial number, MAC address, and featureset.
4710 This program allows you to view and manipulate this EEPROM list.")
4711 (home-page "https://github.com/xobs/novena-eeprom/")
4712 (supported-systems '("armhf-linux"))
4713 (license license:bsd-3)))
4714
4715 (define-public lrzsz
4716 (package
4717 (name "lrzsz")
4718 (version "0.12.20")
4719 (source (origin
4720 (method url-fetch)
4721 (uri (string-append "https://www.ohse.de/uwe/releases/lrzsz-"
4722 version ".tar.gz"))
4723 (sha256
4724 (base32
4725 "1wcgfa9fsigf1gri74gq0pa7pyajk12m4z69x7ci9c6x9fqkd2y2"))))
4726 (build-system gnu-build-system)
4727 (arguments
4728 `(#:phases
4729 (modify-phases %standard-phases
4730 (replace 'configure
4731 (lambda* (#:key outputs #:allow-other-keys)
4732 (setenv "CONFIG_SHELL" (which "bash"))
4733 (invoke "./configure"
4734 (string-append "--prefix="
4735 (assoc-ref outputs "out"))))))))
4736 (synopsis "Implementation of XMODEM/YMODEM/ZMODEM transfer protocols")
4737 (description "This package provides programs that transfer files using
4738 the XMODEM/YMODEM/ZMODEM file transfer protocols.")
4739 (home-page "https://ohse.de/uwe/software/lrzsz.html")
4740 (license license:gpl2+)))
4741
4742 (define-public nq
4743 (package
4744 (name "nq")
4745 (version "0.4")
4746 (source
4747 (origin
4748 (method git-fetch)
4749 (uri (git-reference
4750 (url "https://github.com/leahneukirchen/nq")
4751 (commit (string-append "v" version))))
4752 (file-name (git-file-name name version))
4753 (sha256
4754 (base32 "0sdamjzvmf6cxhjmd1rjvn7zm6k10fp5n6vabyxd3yl30cgrxw2i"))))
4755 (build-system gnu-build-system)
4756 (native-inputs
4757 `(("perl" ,perl)))
4758 (arguments
4759 `(#:make-flags (list (string-append "CC=" ,(cc-for-target))
4760 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4761 #:phases
4762 (modify-phases %standard-phases
4763 (delete 'configure))))
4764 (synopsis "Unix command line queue utility")
4765 (description
4766 "@code{nq} can create very lightweight job queue systems which require no
4767 setup, maintenance, supervision, or any long-running processes.")
4768 (home-page "https://github.com/leahneukirchen/nq")
4769 (license license:public-domain)))
4770
4771 (define-public lsofgraph
4772 (let ((commit "1d414bdc727c00a8c6cbfffc3c43128c60d6f0de")
4773 (revision "1"))
4774 (package
4775 (name "lsofgraph")
4776 (version (git-version "0.0.1" revision commit)) ;no upstream release
4777 (source (origin
4778 (method git-fetch)
4779 (uri (git-reference
4780 (url "https://github.com/zevv/lsofgraph")
4781 (commit commit)))
4782 (file-name (git-file-name name version))
4783 (sha256
4784 (base32
4785 "058x04yp6bc77hbl3qchqm7pa8f9vqfl9jryr88m8pzl7kvpif54"))))
4786 (build-system trivial-build-system)
4787 (inputs
4788 `(("lua" ,lua)))
4789 (arguments
4790 `(#:modules ((guix build utils))
4791 #:builder
4792 (begin
4793 (use-modules (guix build utils))
4794 ;; copy source
4795 (copy-recursively (assoc-ref %build-inputs "source") ".")
4796 ;; patch-shebang phase
4797 (setenv "PATH"
4798 (string-append (assoc-ref %build-inputs "lua") "/bin"
4799 ":" (getenv "PATH")))
4800 (substitute* "lsofgraph"
4801 (("#!/usr/bin/env lua")
4802 (string-append "#!" (which "lua"))))
4803 ;; install phase
4804 (install-file "lsofgraph" (string-append %output "/bin"))
4805 (let ((doc (string-append
4806 %output "/share/doc/" ,name "-" ,version)))
4807 (mkdir-p doc)
4808 (install-file "LICENSE" doc)
4809 (install-file "README.md" doc))
4810 #t)))
4811 (home-page "https://github.com/zevv/lsofgraph")
4812 (synopsis "Convert @code{lsof} output to @code{graphviz}")
4813 (description "Utility to convert @code{lsof} output to a graph showing
4814 FIFO and UNIX interprocess communication.")
4815 (license license:bsd-2))))