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