projects/guix·blob bootstrap-team · refs

7109 lines · 286.1 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012-2025 Ludovic Courtès <[email protected]>
3;;; Copyright © 2013 Cyril Roelandt <[email protected]>
4;;; Copyright © 2014, 2015, 2016, 2018, 2019, 2020 Mark H Weaver <[email protected]>
5;;; Copyright © 2014, 2015-2018, 2020-2023 Eric Bavier <[email protected]>
6;;; Copyright © 2015, 2016 Taylan Ulrich Bayırlı/Kammer <[email protected]>
7;;; Copyright © 2015 Alex Sassmannshausen <[email protected]>
8;;; Copyright © 2015 Eric Dvorsak <[email protected]>
9;;; Copyright © 2016, 2017, 2020 Leo Famulari <[email protected]>
10;;; Copyright © 2016 Pjotr Prins <[email protected]>
11;;; Copyright © 2016, 2017, 2023 Ricardo Wurmus <[email protected]>
12;;; Copyright © 2016-2025 Efraim Flashner <[email protected]>
13;;; Copyright © 2016 Peter Feigl <[email protected]>
14;;; Copyright © 2016 John J. Foerch <[email protected]>
15;;; Copyright © 2016, 2017 Nikita <[email protected]>
16;;; Copyright © 2016–2022 Tobias Geerinckx-Rice <[email protected]>
17;;; Copyright © 2016 John Darrington <[email protected]>
18;;; Copyright © 2017 Ben Sturmfels <[email protected]>
19;;; Copyright © 2017 Ethan R. Jones <[email protected]>
20;;; Copyright © 2017 Christine Lemmer-Webber <[email protected]>
21;;; Copyright © 2017, 2018, 2020 Marius Bakke <[email protected]>
22;;; Copyright © 2018, 2019 Arun Isaac <[email protected]>
23;;; Copyright © 2018 Pierre-Antoine Rouby <[email protected]>
24;;; Copyright © 2018 Rutger Helling <[email protected]>
25;;; Copyright © 2018 Pierre Neidhardt <[email protected]>
26;;; Copyright © 2019 Brett Gilio <[email protected]>
27;;; Copyright © 2019,2020 Björn Höfling <[email protected]>
28;;; Copyright © 2019 Jakob L. Kreuze <[email protected]>
29;;; Copyright © 2019 Hartmut Goebel <[email protected]>
30;;; Copyright © 2019 Alex Griffin <[email protected]>
31;;; Copyright © 2019, 2021, 2022 Guillaume Le Vaillant <[email protected]>
32;;; Copyright © 2019, 2020, 2021 Mathieu Othacehe <[email protected]>
33;;; Copyright © 2020 Oleg Pykhalov <[email protected]>
34;;; Copyright © 2020, 2023, 2024, 2025 Janneke Nieuwenhuizen <[email protected]>
35;;; Copyright © 2020, 2021, 2022 Michael Rohleder <[email protected]>
36;;; Copyright © 2020 Vincent Legoll <[email protected]>
37;;; Copyright © 2020 Morgan Smith <[email protected]>
38;;; Copyright © 2021-2025 Maxim Cournoyer <[email protected]>
39;;; Copyright © 2021, 2023, 2024 Zheng Junjie <[email protected]>
40;;; Copyright © 2021 Stefan Reichör <[email protected]>
41;;; Copyright © 2021 qblade <[email protected]>
42;;; Copyright © 2021 Hyunseok Kim <[email protected]>
43;;; Copyright © 2021 David Larsson <[email protected]>
44;;; Copyright © 2021 WinterHound <[email protected]>
45;;; Copyright © 2021 Brice Waegeneire <[email protected]>
46;;; Copyright © 2021 Maxime Devos <[email protected]>
47;;; Copyright © 2021 Roel Janssen <[email protected]>
48;;; Copyright © 2021, 2025 muradm <[email protected]>
49;;; Copyright © 2021 pineapples <[email protected]>
50;;; Copyright © 2021 Petr Hodina <[email protected]>
51;;; Copyright © 2021-2026 Artyom V. Poptsov <[email protected]>
52;;; Copyright © 2022 Wamm K. D. <[email protected]>
53;;; Copyright © 2022 Roman Riabenko <[email protected]>
54;;; Copyright © 2022 Petr Hodina <[email protected]>
55;;; Copyright © 2022 Andreas Rammhold <[email protected]>
56;;; Copyright © 2022 ( <[email protected]>
57;;; Copyright © 2022, 2023 Matthew James Kraai <[email protected]>
58;;; Copyright © 2022 jgart <[email protected]>
59;;; Copyright © 2023 Juliana Sims <[email protected]>
60;;; Copyright © 2023 Lu Hui <[email protected]>
61;;; Copyright © 2023 Yovan Naumovski <[email protected]>
62;;; Copyright © 2023 Alexey Abramov <[email protected]>
63;;; Copyright © 2023 Bruno Victal <[email protected]>
64;;; Copyright © 2023 Tobias Kortkamp <[email protected]>
65;;; Copyright © 2023 Jaeme Sifat <[email protected]>
66;;; Copyright © 2023 Nicolas Graves <[email protected]>
67;;; Copyright © 2023 Tomás Ortín Fernández <[email protected]>
68;;; Copyright © 2024 dan <[email protected]>
69;;; Copyright © 2024 gemmaro <[email protected]>
70;;; Copyright © 2024 Richard Sent <[email protected]>
71;;; Copyright © 2024 Vinicius Monego <[email protected]>
72;;; Copyright © 2024 nathan <[email protected]>
73;;; Copyright © 2024 Nikita Domnitskii <[email protected]>
74;;; Copyright © 2024 Roman Scherer <[email protected]>
75;;; Copyright © 2024-2026 Ashish SHUKLA <[email protected]>
76;;; Copyright © 2024 Ashvith Shetty <[email protected]>
77;;; Copyright © 2025 Dariqq <[email protected]>
78;;; Copyright © 2024 nik gaffney <[email protected]>
79;;; Copyright © 2025 Simon Streit <[email protected]>
80;;; Copyright © 2025 Luca Kredel <[email protected]>
81;;; Copyright © 2025 ROCKTAKEY <[email protected]>
82;;; Copyright © 2026 Andreas Enge <[email protected]>
83;;;
84;;; This file is part of GNU Guix.
85;;;
86;;; GNU Guix is free software; you can redistribute it and/or modify it
87;;; under the terms of the GNU General Public License as published by
88;;; the Free Software Foundation; either version 3 of the License, or (at
89;;; your option) any later version.
90;;;
91;;; GNU Guix is distributed in the hope that it will be useful, but
92;;; WITHOUT ANY WARRANTY; without even the implied warranty of
93;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
94;;; GNU General Public License for more details.
95;;;
96;;; You should have received a copy of the GNU General Public License
97;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
98
99(define-module (gnu packages admin)
100 #:use-module (guix build-system cargo)
101 #:use-module (guix build-system cmake)
102 #:use-module (guix build-system emacs)
103 #:use-module (guix build-system glib-or-gtk)
104 #:use-module (guix build-system gnu)
105 #:use-module (guix build-system go)
106 #:use-module (guix build-system meson)
107 #:use-module (guix build-system perl)
108 #:use-module (guix build-system python)
109 #:use-module (guix build-system pyproject)
110 #:use-module (guix build-system qt)
111 #:use-module (guix build-system ruby)
112 #:use-module (guix build-system trivial)
113 #:use-module (guix download)
114 #:use-module (guix git-download)
115 #:use-module (guix gexp)
116 #:use-module ((guix licenses) #:prefix license:)
117 #:use-module (guix packages)
118 #:use-module (guix platform)
119 #:use-module (guix utils)
120 #:use-module (gnu packages)
121 #:use-module (gnu packages acl)
122 #:use-module (gnu packages algebra)
123 #:use-module (gnu packages attr)
124 #:use-module (gnu packages autotools)
125 #:use-module (gnu packages base)
126 #:use-module (gnu packages bash)
127 #:use-module (gnu packages bison)
128 #:use-module (gnu packages boost)
129 #:use-module (gnu packages c)
130 #:use-module (gnu packages check)
131 #:use-module (gnu packages compression)
132 #:use-module (gnu packages cpp)
133 #:use-module (gnu packages crypto)
134 #:use-module (gnu packages cryptsetup)
135 #:use-module (gnu packages curl)
136 #:use-module (gnu packages cyrus-sasl)
137 #:use-module (gnu packages datastructures)
138 #:use-module (gnu packages debian)
139 #:use-module (gnu packages dns)
140 #:use-module (gnu packages elf)
141 #:use-module (gnu packages file)
142 #:use-module (gnu packages file-systems)
143 #:use-module (gnu packages flex)
144 #:use-module (gnu packages fonts)
145 #:use-module (gnu packages freedesktop)
146 #:use-module (gnu packages gawk)
147 #:use-module (gnu packages gettext)
148 #:use-module (gnu packages gcc)
149 #:use-module (gnu packages gl)
150 #:use-module (gnu packages glib)
151 #:use-module (gnu packages gnome)
152 #:use-module (gnu packages gnupg)
153 #:use-module (gnu packages golang)
154 #:use-module (gnu packages golang-build)
155 #:use-module (gnu packages golang-check)
156 #:use-module (gnu packages golang-compression)
157 #:use-module (gnu packages golang-crypto)
158 #:use-module (gnu packages golang-web)
159 #:use-module (gnu packages golang-xyz)
160 #:use-module (gnu packages groff)
161 #:use-module (gnu packages gtk)
162 #:use-module (gnu packages guile)
163 #:use-module (gnu packages guile-xyz)
164 #:use-module (gnu packages image)
165 #:use-module (gnu packages imagemagick)
166 #:use-module (gnu packages inkscape)
167 #:use-module (gnu packages kerberos)
168 #:use-module (gnu packages libbsd)
169 #:use-module (gnu packages libunwind)
170 #:use-module (gnu packages libusb)
171 #:use-module (gnu packages linux)
172 #:use-module (gnu packages logging)
173 #:use-module (gnu packages lsof)
174 #:use-module (gnu packages lua)
175 #:use-module (gnu packages m4)
176 #:use-module (gnu packages mail)
177 #:use-module (gnu packages man)
178 #:use-module (gnu packages maths)
179 #:use-module (gnu packages markup)
180 #:use-module (gnu packages mcrypt)
181 #:use-module (gnu packages mpi)
182 #:use-module (gnu packages ncurses)
183 #:use-module (gnu packages nettle)
184 #:use-module (gnu packages networking)
185 #:use-module (gnu packages openldap)
186 #:use-module (gnu packages package-management)
187 #:use-module (gnu packages patchutils)
188 #:use-module (gnu packages pciutils)
189 #:use-module (gnu packages pcre)
190 #:use-module (gnu packages perl)
191 #:use-module (gnu packages perl-check)
192 #:use-module (gnu packages pkg-config)
193 #:use-module (gnu packages polkit)
194 #:use-module (gnu packages python)
195 #:use-module (gnu packages python-build)
196 #:use-module (gnu packages python-check)
197 #:use-module (gnu packages python-crypto)
198 #:use-module (gnu packages python-xyz)
199 #:use-module (gnu packages qt)
200 #:use-module (gnu packages readline)
201 #:use-module (gnu packages ruby)
202 #:use-module (gnu packages ruby-check)
203 #:use-module (gnu packages ruby-xyz)
204 #:use-module (gnu packages selinux)
205 #:use-module (gnu packages serialization)
206 #:use-module (gnu packages sqlite)
207 #:use-module (gnu packages ssh)
208 #:use-module (gnu packages sphinx)
209 #:use-module (gnu packages tcl)
210 #:use-module (gnu packages terminals)
211 #:use-module (gnu packages texinfo)
212 #:use-module (gnu packages textutils)
213 #:use-module (gnu packages time)
214 #:use-module (gnu packages tls)
215 #:use-module (gnu packages version-control)
216 #:use-module (gnu packages vulkan)
217 #:use-module (gnu packages web)
218 #:use-module (gnu packages xdisorg)
219 #:use-module (gnu packages xml)
220 #:use-module (gnu packages xorg))
221
222(define-public aide
223 (package
224 (name "aide")
225 (version "0.19.2")
226 (source
227 (origin
228 (method url-fetch)
229 (uri (string-append "https://github.com/aide/aide/releases/download/v"
230 version "/aide-" version ".tar.gz"))
231 (sha256
232 (base32 "1i3lbsw1mhsnq54bx48zikdiph1ihxn021ca7kmys4b1yh2jnxi3"))))
233 (build-system gnu-build-system)
234 (arguments
235 (list #:configure-flags #~(list "--with-posix-acl"
236 "--with-selinux"
237 "--with-xattr"
238 "--with-config-file=/etc/aide.conf"
239 "--without-fstype")))
240 (native-inputs
241 (list bison flex pkg-config))
242 (inputs
243 (list acl
244 attr
245 libgcrypt
246 libgpg-error
247 libselinux
248 nettle
249 pcre2
250 `(,zlib "static")
251 zlib))
252 (synopsis "File and directory integrity checker")
253 (description
254 "AIDE (Advanced Intrusion Detection Environment) is a file and directory
255integrity checker. It creates a database from the regular expression rules
256that it finds from its configuration files. Once this database is initialized
257it can be used to verify the integrity of the files. It has several message
258digest algorithms that are used to check the integrity of files. All of the
259usual file attributes can be checked for inconsistencies.")
260 (home-page "https://aide.github.io/")
261 (license license:gpl2+)))
262
263(define-public daemontools
264 (package
265 (name "daemontools")
266 (version "0.76")
267 (source (origin
268 (method url-fetch)
269 (uri (string-append
270 "https://cr.yp.to/daemontools/"
271 "daemontools-" version ".tar.gz"))
272 (sha256
273 (base32
274 "07scvw88faxkscxi91031pjkpccql6wspk4yrlnsbrrb5c0kamd5"))
275 (patches (search-patches "daemontools-gcc14.patch"))))
276 (build-system gnu-build-system)
277 (arguments
278 (list #:tests? #f ;; No tests as far as I can tell.
279 #:phases
280 #~(modify-phases %standard-phases
281 (add-after 'unpack 'chdir
282 (lambda _
283 (chdir #$(string-append "daemontools-" version))))
284 (delete 'configure)
285 (add-before 'build 'patch
286 (lambda _
287 (substitute* "src/error.h"
288 (("extern int errno;")
289 "#include <errno.h>"))))
290 (replace 'build
291 (lambda _
292 (invoke "package/compile")))
293 (replace 'install
294 (lambda _
295 (let ((bin (string-append #$output "/bin")))
296 (for-each (lambda (file)
297 (install-file file bin))
298 (find-files "command"))))))))
299 (synopsis "Tools for managing UNIX style services")
300 (description
301 "@code{daemontools} is a collection of tools for managing UNIX
302services.")
303 (license license:public-domain)
304 (home-page "https://cr.yp.to/daemontools.html")))
305
306(define-public detox
307 (package
308 (name "detox")
309 (version "3.0.1")
310 (source (origin
311 (method git-fetch)
312 (uri (git-reference
313 (url "https://github.com/dharple/detox")
314 (commit (string-append "v" version))))
315 (file-name (git-file-name name version))
316 (sha256
317 (base32
318 "0328w1hh279kgb4fn2vwbvwhmr32i7ayp665vs78pgjy84vhgxzy"))))
319 (build-system gnu-build-system)
320 (native-inputs
321 (list autoconf automake bison flex pkg-config))
322 (home-page "https://github.com/dharple/detox")
323 (synopsis "Clean up file names")
324 (description
325 "Detox is a program that renames files to make them easier to work with
326under Unix and related operating systems. Spaces and various other unsafe
327characters (such as \"$\") get replaced with \"_\". ISO 8859-1 (Latin-1)
328characters can be replaced as well, as can UTF-8 characters.")
329 (license license:bsd-3)))
330
331(define-public hetznercloud-cli
332 (package
333 (name "hetznercloud-cli")
334 (version "1.50.0")
335 (source
336 (origin
337 (method git-fetch)
338 (uri (git-reference
339 (url "https://github.com/hetznercloud/cli")
340 (commit (string-append "v" version))))
341 (file-name (git-file-name name version))
342 (sha256
343 (base32 "1d0k2g1s5x77kd8wrx8py2g3bqhaxqnm5kgm0dlmzypmfyavssg4"))))
344 (build-system go-build-system)
345 (arguments
346 (list
347 #:tests? #f ; XXX: figure out hot to enable them
348 #:install-source? #f
349 #:import-path "github.com/hetznercloud/cli/cmd/hcloud"
350 #:unpack-path "github.com/hetznercloud/cli"))
351 (native-inputs
352 (list go-github-com-burntsushi-toml
353 go-github-com-cheggaaa-pb-v3
354 go-github-com-dustin-go-humanize
355 go-github-com-fatih-color
356 go-github-com-fatih-structs
357 go-github-com-goccy-go-yaml
358 go-github-com-guptarohit-asciigraph
359 go-github-com-hetznercloud-hcloud-go-v2
360 go-github-com-jedib0t-go-pretty-v6
361 go-github-com-spf13-cast
362 go-github-com-spf13-cobra
363 go-github-com-spf13-pflag
364 go-github-com-spf13-viper
365 go-github-com-stretchr-testify
366 go-github-com-swaggest-assertjson
367 go-go-uber-org-mock
368 go-golang-org-x-crypto
369 go-golang-org-x-term))
370 (home-page "https://github.com/hetznercloud/cli")
371 (synopsis "Command-line interface for the Hetzner Cloud service")
372 (description
373 "This package provides the @code{hcloud} binary, a command-line interface
374for interacting with the @url{https://www.hetzner.com/,Hetzner Cloud}
375service.")
376 (license license:expat)))
377
378(define-public hungrycat
379 (package
380 (name "hungrycat")
381 (version "0.4.2")
382 (source
383 (origin
384 (method git-fetch)
385 (uri (git-reference
386 (url "https://github.com/jwilk/hungrycat/")
387 (commit version)))
388 (file-name (git-file-name name version))
389 (sha256
390 (base32 "0llfb7kh2k53aqwc1fagw77fmwhvwdxd5qlg0fyrhqq298gj8wif"))))
391 (build-system gnu-build-system)
392 (arguments
393 (list
394 ;; tests: Files=2, Tests=2334, 1 wallclock secs
395 #:test-target "test"
396 #:make-flags
397 #~(list (string-append "CC=" #$(cc-for-target)))
398 #:phases
399 #~(modify-phases %standard-phases
400 (add-after 'build 'build-doc
401 (lambda _
402 (invoke "make" "-C" "doc"))))))
403 (native-inputs
404 (list automake
405 autoconf
406 cppcheck
407 perl
408 perl-ipc-run
409 python-docutils))
410 (synopsis "Single tool that combines @command{cat} & @command{rm}")
411 (description
412 "hungrycat prints the contents of a file to standard output, while
413simultaneously freeing the disk space it occupied. It is useful if you need
414to process a large file, don't have enough space to store both the input and
415output files, and don't need the input file afterwards.
416While similar in principle to running @command{cat} immediately followed by
417@command{rm}, @command{hungrycat} actually frees blocks as soon as they are
418printed instead of after the entire file has been read, which is often too
419late.")
420 (home-page "https://jwilk.net/software/hungrycat")
421 (license license:expat)))
422
423;; This package uses su instead of sudo (because of SpaceFM).
424(define-public ktsuss
425 (package
426 (name "ktsuss")
427 (version "2.1")
428 (source
429 (origin
430 (method git-fetch)
431 (uri
432 (git-reference
433 (url "https://github.com/nomius/ktsuss")
434 (commit version)))
435 (sha256
436 (base32 "0q9931f9hp47v1n8scli4bdg2rkjpf5jf8v7jj2gdn83aia1r2hz"))
437 (file-name (git-file-name name version))))
438 (build-system glib-or-gtk-build-system)
439 (arguments
440 (list
441 #:configure-flags
442 #~(list "CFLAGS=-g -O2 -Wno-error=implicit-function-declaration")
443 #:phases
444 #~(modify-phases %standard-phases
445 (add-after 'unpack 'patch-file-names
446 (lambda _
447 (substitute* "configure.ac"
448 (("supath=`which su 2>/dev/null`")
449 "supath=/run/privileged/bin/su")))))))
450 (native-inputs
451 (list autoconf automake libtool pkg-config))
452 (inputs
453 (list glib gtk+-2))
454 (synopsis "Graphical front end for @command{su}")
455 (description
456 "Ktsuss stands for ``Keep the @command{su} simple, stupid''.
457It is a graphical version of @command{su} written in C and GTK+ 2, with
458simplicity in mind.")
459 (home-page "https://github.com/nomius/ktsuss")
460 (license license:bsd-3)))
461
462(define-public progress
463 (package
464 (name "progress")
465 (version "0.17")
466 (source
467 (origin
468 (method git-fetch)
469 (uri (git-reference
470 (url "https://github.com/Xfennec/progress")
471 (commit (string-append "v" version))))
472 (sha256
473 (base32 "1cg1vdk2891sdcbn7yc9a6mzdxplm63qsk1kq0jr4j8ym28v09xf"))
474 (file-name (git-file-name name version))))
475 (build-system gnu-build-system)
476 (native-inputs
477 (list pkg-config which))
478 (inputs
479 (list ncurses))
480 (arguments
481 (list #:tests? #f ; no test suite
482 #:make-flags
483 #~(list (string-append "CC=" #$(cc-for-target))
484 (string-append "PKG_CONFIG=" #$(pkg-config-for-target))
485 (string-append "PREFIX=" #$output))
486 #:phases
487 #~(modify-phases %standard-phases
488 (delete 'configure)))) ; no configure script
489 (home-page "https://github.com/Xfennec/progress")
490 (synopsis "Program to view the progress of the coreutils commands")
491 (description "A program that looks for coreutils basic commands (cp, mv,
492dd, tar, gzip/gunzip, cat, etc.) currently running on your system and displays
493the percentage of copied data. It can also show estimated time and throughput,
494and provides a \"top-like\" mode (monitoring).")
495 (license license:gpl3+)))
496
497(define-public shepherd-0.8
498 (package
499 (name "shepherd")
500 (version "0.8.1")
501 (source (origin
502 (method url-fetch)
503 (uri (string-append "mirror://gnu/shepherd/shepherd-"
504 version ".tar.gz"))
505 (sha256
506 (base32
507 "0x9zr0x3xvk4qkb6jnda451d5iyrl06cz1bjzjsm0lxvjj3fabyk"))
508 (modules '((guix build utils)))
509 (snippet
510 '(begin
511 ;; Build with -O1 to work around <https://bugs.gnu.org/48368>.
512 (substitute* "Makefile.in"
513 (("compile --target")
514 "compile -O1 --target"))))))
515 (build-system gnu-build-system)
516 (arguments
517 '(#:configure-flags '("--localstatedir=/var")
518 #:make-flags '("GUILE_AUTO_COMPILE=0")))
519 (native-inputs
520 (list pkg-config
521 ;; This is the Guile we use as a cross-compiler...
522 guile-3.0))
523 (inputs
524 ;; ... and this is the one that appears in shebangs when cross-compiling.
525 (list guile-3.0
526 ;; The 'shepherd' command uses Readline when used interactively. It's
527 ;; an unusual use case though, so we don't propagate it.
528 guile-readline))
529 (synopsis "System service manager")
530 (description
531 "The GNU Shepherd is a daemon-managing daemon, meaning that it supervises
532the execution of system services, replacing similar functionality found in
533typical init systems. It provides dependency-handling through a convenient
534interface and is based on GNU Guile.")
535 (license license:gpl3+)
536 (home-page "https://www.gnu.org/software/shepherd/")))
537
538(define-public shepherd-0.9
539 (package
540 (inherit shepherd-0.8)
541 (version "0.9.3")
542 (source (origin
543 (method url-fetch)
544 (uri (string-append "mirror://gnu/shepherd/shepherd-"
545 version ".tar.gz"))
546 (sha256
547 (base32
548 "0qy2yq13xhf05an5ilz7grighdxicx56211yaarqq5qigiiybc32"))))
549 (arguments
550 (list #:configure-flags #~'("--localstatedir=/var")
551 #:make-flags #~'("GUILE_AUTO_COMPILE=0")
552 #:phases (if (%current-target-system)
553 #~(modify-phases %standard-phases
554 (add-before 'configure 'set-fibers-directory
555 (lambda _
556 ;; When cross-compiling, refer to the target
557 ;; Fibers, not the native one.
558 (substitute* '("herd.in" "shepherd.in")
559 (("%FIBERS_SOURCE_DIRECTORY%")
560 #$(file-append
561 (this-package-input "guile-fibers")
562 "/share/guile/site/3.0"))
563 (("%FIBERS_OBJECT_DIRECTORY%")
564 #$(file-append
565 (this-package-input "guile-fibers")
566 "/lib/guile/3.0/site-ccache"))))))
567 #~%standard-phases)))
568
569 (native-inputs (list pkg-config guile-3.0
570 guile-fibers-1.1)) ;for cross-compilation
571 (inputs (list guile-3.0 guile-fibers-1.1))))
572
573(define-public shepherd-0.10
574 (package
575 (inherit shepherd-0.9)
576 (version "0.10.5")
577 (source (origin
578 (method url-fetch)
579 (uri (string-append "mirror://gnu/shepherd/shepherd-"
580 version ".tar.gz"))
581 (sha256
582 (base32
583 "0k40n9qm5r5rqf94isa1857ghd4329zc5rjf3ll2572gpiw3ij4x"))))
584 (native-inputs (modify-inputs (package-native-inputs shepherd-0.9)
585 (replace "guile-fibers"
586 ;; Work around
587 ;; <https://github.com/wingo/fibers/issues/89>. This
588 ;; affects any system without a functional real-time
589 ;; clock (RTC), but in practice these are typically Arm
590 ;; single-board computers.
591 (if (or (target-arm?)
592 (target-riscv64?))
593 guile-fibers-1.1
594 guile-fibers-1.3)))) ;pinned version to avoid rebuilds
595 (inputs (modify-inputs (package-inputs shepherd-0.9)
596 (replace "guile-fibers"
597 (this-package-native-input "guile-fibers"))))))
598
599(define-public shepherd-1.0
600 (package
601 (inherit shepherd-0.10)
602 (version "1.0.9")
603 (source (origin
604 (method url-fetch)
605 (uri (string-append "mirror://gnu/shepherd/shepherd-"
606 version ".tar.gz"))
607 (sha256
608 (base32
609 "1mh080060lnycys8yq6kkiy363wif8dsip3nyklgd3a1r22wb274"))))
610 (arguments
611 (list
612 #:configure-flags
613 #~(list "--localstatedir=/var"
614 ;; Gzip and zstd are used by the log rotation service.
615 (string-append "--with-gzip=" #$(this-package-input "gzip")
616 "/bin/gzip")
617 (string-append "--with-zstd=" #$(this-package-input "zstd")
618 "/bin/zstd"))
619 #:make-flags #~'("GUILE_AUTO_COMPILE=0")
620 #:phases (if (%current-target-system)
621 #~(modify-phases %standard-phases
622 (add-before 'configure 'set-fibers-directory
623 (lambda* (#:key inputs #:allow-other-keys)
624 ;; When cross-compiling, refer to the target
625 ;; Fibers, not the native one.
626 (let ((fibers
627 (search-input-file
628 inputs
629 "share/guile/site/3.0/fibers.scm"))
630 (fibers-go
631 (search-input-file
632 inputs
633 "lib/guile/3.0/site-ccache/fibers.go")))
634 (substitute* '("herd.in" "shepherd.in")
635 (("%FIBERS_SOURCE_DIRECTORY%")
636 (dirname fibers))
637 (("%FIBERS_OBJECT_DIRECTORY%")
638 (dirname fibers-go)))))))
639 #~%standard-phases)))
640 (native-inputs
641 (modify-inputs (package-native-inputs shepherd-0.10)
642 (replace "guile-fibers"
643 ;; Work around <https://codeberg.org/guile/fibers/issues/89>.
644 ;; This affects any system without a functional real-time
645 ;; clock (RTC), but in practice these are typically
646 ;; single-board computers.
647 (if (or (target-arm?)
648 (target-riscv64?))
649 guile-fibers-1.1
650 guile-fibers)))) ;use latest guile-fibers available
651 (inputs
652 (modify-inputs (package-inputs shepherd-0.10)
653 (replace "guile-fibers"
654 (this-package-native-input "guile-fibers"))
655 (append gzip zstd)))))
656
657(define-public shepherd shepherd-0.10)
658
659(define-public shepherd-for-home
660 ;; Variant of shepherd without 'sbin' to not shadow 'halt' and 'reboot' on
661 ;; foreign distributions.
662 (let ((base shepherd-1.0))
663 (hidden-package
664 (package/inherit base
665 (name "shepherd-for-home")
666 (source #f)
667 (build-system trivial-build-system)
668 (arguments
669 (list
670 #:modules '((guix build union)
671 (guix build utils))
672 #:builder
673 #~(begin
674 (use-modules (guix build union)
675 (guix build utils))
676 (union-build #$output
677 (list #$(this-package-input "shepherd"))
678 #:create-all-directories? #t)
679 (delete-file-recursively
680 (string-append #$output "/sbin"))
681 (delete-file-recursively
682 (string-append #$output "/share/man/man8")))))
683 (synopsis
684 "The Shepherd for Guix Home, without @command{halt} and @command{reboot}")
685 (native-inputs '())
686 (inputs (list base))))))
687
688(define-public guile2.2-shepherd
689 (package
690 (inherit shepherd-0.10)
691 (name "guile2.2-shepherd")
692 (native-inputs (list pkg-config guile-2.2))
693 (inputs (list guile-2.2 guile2.2-fibers))))
694
695(define-public shepherd-run
696 (package
697 (name "shepherd-run")
698 (version "0.2.0")
699 (source (origin
700 (method git-fetch)
701 (uri (git-reference
702 (url "https://git.sr.ht/~efraim/shepherd-run")
703 (commit version)))
704 (file-name (git-file-name name version))
705 (sha256
706 (base32
707 "0mvn5qi4bq9nsb1462pbzssb1z5w2s160lqd2ps3rjjc4z3f3gjj"))))
708 (build-system gnu-build-system)
709 (arguments
710 (list
711 #:make-flags #~(list (string-append "PREFIX=" #$output))
712 #:phases
713 #~(modify-phases %standard-phases
714 (delete 'configure) ; No configure script.
715 ;; First 'check checks the shell script which loads the gawk code.
716 ;; This 'check checks the installed gawk script.
717 (add-after 'patch-shebangs 'check-again
718 (lambda args
719 (apply (assoc-ref %standard-phases 'check)
720 (append args
721 (list #:make-flags
722 (list (string-append "BINARY=" %output
723 "/bin/shepherd-run"))))))))))
724 (native-inputs (list diffutils help2man))
725 (inputs (list gawk))
726 (synopsis "Create GNU Shepherd services from the command line")
727 (description
728 "Shepherd-run is a script which assists in creating one-off shepherd
729services from the command line. It is meant to partially fill the void left
730by @command{systemd-run}, since GNU Guix uses GNU Shepherd as its system service
731manager.")
732 (home-page "https://git.sr.ht/~efraim/shepherd-run")
733 (license license:gpl3+)))
734
735(define-public swineherd
736 (package
737 (name "swineherd")
738 (version "0.0.4")
739 (source (origin
740 (method git-fetch)
741 (uri (git-reference
742 (url "https://github.com/BIMSBbioinfo/swineherd")
743 (commit (string-append "v" version))))
744 (file-name (git-file-name name version))
745 (sha256
746 (base32
747 "0iij1pl0y410k1dk1ifa56dxmjb1blv0y3k5rxy794gwg6w6c480"))))
748 (build-system gnu-build-system)
749 (arguments
750 '(#:configure-flags '("--localstatedir=/var")
751 #:make-flags '("GUILE_AUTO_COMPILE=0")))
752 (native-inputs
753 (list autoconf automake guile-3.0 pkg-config texinfo))
754 (propagated-inputs
755 (list btrfs-progs
756 guile-config
757 guile-fibers-1.3
758 guile-netlink
759 guile-3.0
760 guix
761 shepherd-0.10))
762 (home-page "https://github.com/BIMSBbioinfo/swineherd")
763 (synopsis "System container manager")
764 (description
765 "This project aims to provide an extension to the Shepherd, retraining it
766as a swineherd, a manager of crude system containers. It does this by
767providing a Shepherd service @code{swineherd} that talks to the Shepherd
768process to create Guix System containers as Shepherd services. It also comes
769with an optional HTTP API server.")
770 (license license:gpl3+)))
771
772(define-public cfm
773 (package
774 (name "cfm")
775 (version "0.6.6")
776 (source
777 (origin
778 (method git-fetch)
779 (uri (git-reference
780 (url "https://github.com/WillEccles/cfm")
781 (commit (string-append "v" version))))
782 (file-name (git-file-name name version))
783 (sha256
784 (base32 "14gapia902f29wa4dlrrj8jcwcff9bfvyhjccw9ddy2gxx2g8wmr"))))
785 (build-system gnu-build-system)
786 (arguments
787 `(#:tests? #f ; no test suite
788 #:make-flags
789 (list (string-append "CC=" ,(cc-for-target))
790 (string-append "PREFIX=" (assoc-ref %outputs "out")))
791 #:phases
792 (modify-phases %standard-phases
793 ;; Keeping xdg-open optional avoids a size increase of 293%.
794 (delete 'configure)))) ; no configure script
795 (home-page "https://eccles.dev/cfm/")
796 (synopsis
797 "Simple terminal file manager with @command{vi}-inspired key bindings")
798 (description
799 "The Cactus File Manager (@command{cfm}) helps you manage your files
800visually from a text terminal. It aims to be simple and fast, with key bindings
801inspired by @command{vi}.")
802 (license license:mpl2.0)))
803
804(define-public cloud-utils
805 (package
806 (name "cloud-utils")
807 (version "0.33")
808 (source
809 (origin
810 (method url-fetch)
811 (uri (string-append
812 "https://launchpad.net/cloud-utils/trunk/"
813 version "/+download/cloud-utils-" version ".tar.gz"))
814 (sha256
815 (base32
816 "0xxdi55lzw7j91zfajw7jhd2ilsqj2dy04i9brlk8j3pvb5ma8hk"))))
817 (build-system gnu-build-system)
818 (arguments
819 '(#:modules
820 ((guix build gnu-build-system)
821 (guix build utils)
822 (srfi srfi-26))
823 #:make-flags
824 (let ((out (assoc-ref %outputs "out")))
825 (list (string-append "BINDIR=" out "/bin")
826 (string-append "MANDIR=" out "/share/man/man1")
827 (string-append "DOCDIR=" out "/share/doc")))
828 #:phases
829 (modify-phases %standard-phases
830 (delete 'configure)
831 (delete 'check)
832 (add-after 'install 'wrap
833 (lambda* (#:key outputs inputs #:allow-other-keys)
834 (let ((growpart (string-append (assoc-ref outputs "out")
835 "/bin/growpart")))
836 (wrap-program growpart
837 `("PATH" ":" prefix
838 ,(map dirname
839 (map (cut search-input-file inputs <>)
840 (list "bin/readlink"
841 "sbin/sfdisk"
842 "bin/sed"
843 "bin/grep"
844 "bin/awk"
845 "bin/udevadm"
846 "bin/flock")))))))))))
847 (inputs
848 (list bash-minimal ;for wrap-program
849 coreutils ;for readlink and cat
850 sed ;growpart
851 grep ;growpart
852 gawk ;awk for growpart
853 eudev ;udevadm for growpart
854 python
855 util-linux)) ;sfdisk, flock, partx, blkid for growpart
856 (home-page "https://launchpad.net/cloud-utils")
857 (synopsis "Set of utilities for cloud computing environments")
858 (description
859 "This package contains a set of utilities for cloud computing
860environments:
861
862@itemize @bullet
863@item @command{cloud-localds} Create a disk for cloud-init to utilize nocloud
864@item @command{cloud-publish-image} Wrapper for cloud image publishing
865@item @command{cloud-publish-tarball} Wrapper for publishing cloud tarballs
866@item @command{cloud-publish-ubuntu} Import a Ubuntu cloud image
867@item @command{ec2metadata} Query and display @acronym{EC2,Amazon Elastic
868 Compute Cloud} metadata
869@item @command{growpart} Grow a partition to fill the device
870@item @command{mount-image-callback} Mount a file and run a command
871@item @command{resize-part-image} Resize a partition image to a new size
872@item @command{ubuntu-cloudimg-query} Get the latest Ubuntu
873 @acronym{AMI,Amazon Machine Image}
874@item @command{ubuntu-ec2-run} Run a @acronym{EC2,Amazon Elastic Compute
875 Cloud} instance using Ubuntu
876@item @command{vcs-run} Obtain a repository, and run a command
877@item @command{write-mime-multipart} Handle multipart
878 @acronym{MIME,Multipurpose Internet Mail Extensions} messages
879@end itemize")
880 (license license:gpl3)))
881
882(define-public collectl
883 (package
884 (name "collectl")
885 (version "4.3.1")
886 (source
887 (origin
888 (method url-fetch)
889 (uri (string-append
890 "mirror://sourceforge/collectl/collectl/collectl-" version
891 "/collectl-" version ".src.tar.gz"))
892 (sha256
893 (base32 "1wc9k3rmhqzh6cx5dcpqhlc3xcpadsn2ic54r19scdjbjx6jd1r1"))))
894 (build-system gnu-build-system)
895 (arguments
896 (list
897 #:tests? #f ; There are no tests.
898 #:phases
899 #~(modify-phases %standard-phases
900 (delete 'build) ; There's nothing to build.
901 (replace 'configure
902 (lambda _
903 (substitute* "INSTALL"
904 (("DESTDIR:=\"/\"") (format #f "DESTDIR:=~s" #$output))
905 (("DESTDIR/usr") "DESTDIR"))))
906 (replace 'install
907 (lambda _
908 (substitute* "collectl"
909 (("\\$configFile='';")
910 (string-append "$configFile='" #$output "/etc';")))
911 (invoke "./INSTALL"))))))
912 (inputs
913 (list perl))
914 (home-page "http://collectl.sourceforge.net")
915 (synopsis "Performance data collector")
916 (description
917 "This package provides a program that collects various performance
918measurement data like CPU, memory, disk and network performance numbers.")
919 (license license:artistic2.0)))
920
921(define-public daemonize
922 (package
923 (name "daemonize")
924 (version "1.7.8")
925 (source
926 (origin
927 (method git-fetch)
928 (uri (git-reference
929 (url "https://github.com/bmc/daemonize")
930 (commit (string-append "release-" version))))
931 (file-name (git-file-name name version))
932 (sha256
933 (base32 "0w4g0iyssyw7dd0061881z8s5czcl01mz6v00znax57zfxjqpvnm"))))
934 (build-system gnu-build-system)
935 (arguments '(#:tests? #f)) ; No tests available.
936 (home-page "https://software.clapper.org/daemonize/")
937 (synopsis "Command line utility to run a program as a daemon")
938 (description
939 "daemonize runs a command as a Unix daemon. It will close all open file
940descriptors, change working directory of the process to the root filesystem,
941reset its umask, run in the background, ignore I/O signals, handle
942@code{SIGCHLD}, etc. Most programs that are designed to be run as daemons do
943that work for themselves. However, you’ll occasionally run across one that
944does not. When you must run a daemon program that does not properly make
945itself into a true Unix daemon, you can use daemonize to force it to run as a
946true daemon.")
947 (license license:bsd-3)))
948
949(define-public dfc
950 (package
951 (name "dfc")
952 (version "3.1.1")
953 (source
954 (origin
955 (method url-fetch)
956 (uri (string-append
957 "https://projects.gw-computing.net/attachments/download/615/dfc-"
958 version ".tar.gz"))
959 (sha256
960 (base32
961 "0m1fd7l85ckb7bq4c5c3g257bkjglm8gq7x42pkmpp87fkknc94n"))))
962 (build-system cmake-build-system)
963 (arguments '(#:tests? #f)) ; There are no tests.
964 (native-inputs (list gettext-minimal))
965 (home-page "https://projects.gw-computing.net/projects/dfc")
966 (synopsis "Display file system space usage using graphs and colors")
967 (description
968 "dfc (df color) is a modern version of df. It uses colors, draws pretty
969graphs and can export its output to different formats.")
970 (license license:bsd-3)))
971
972(define-public facter
973 (package
974 (name "facter")
975 (version "4.4.1")
976 (source (origin
977 (method git-fetch)
978 (uri (git-reference
979 (url "https://github.com/puppetlabs/facter")
980 (commit version)))
981 (file-name (git-file-name name version))
982 (sha256
983 (base32
984 "080v0ml2svw2vbzfa659v8718pmhh2kav0l0q1jjvc6mm8sgnmmn"))))
985 (build-system ruby-build-system)
986 (arguments
987 (list
988 #:phases
989 #~(modify-phases %standard-phases
990 (add-after 'unpack 'delete-facter-ng-gemspec
991 (lambda _
992 ;; XXX: ruby-build-system incorrectly finds
993 ;; facter-ng.gemspec from this directory and tries to
994 ;; build that instead of the proper facter.gemspec.
995 ;; Just delete it as a workaround, as it appears to
996 ;; only exist for backwards-compatibility after the
997 ;; facter-ng->facter rename.
998 (delete-file "agent/facter-ng.gemspec")))
999 (add-after 'unpack 'embed-absolute-references
1000 ;; Refer to absolute executable file names to avoid propagation.
1001 (lambda* (#:key inputs #:allow-other-keys)
1002 (substitute* (find-files "lib/facter/resolvers" "\\.rb$")
1003 (("execute\\('(which |)([^ ']+)" _ _ name)
1004 (string-append "execute('" (or (which name)
1005 name))))))
1006 (delete 'check)
1007 (add-after 'wrap 'check
1008 (lambda* (#:key tests? outputs #:allow-other-keys)
1009 ;; XXX: The test suite wants to run Bundler and
1010 ;; complains that the gemspec is invalid. For now
1011 ;; just make sure that we can run the wrapped
1012 ;; executable directly.
1013 (if tests?
1014 (invoke (string-append (assoc-ref outputs "out")
1015 "/bin/facter")
1016 ;; Many facts depend on /sys, /etc/os-release,
1017 ;; etc, so we only run a small sample.
1018 "facterversion" "architecture"
1019 "kernel" "kernelversion")
1020 (format #t "tests disabled~%")))))))
1021 (inputs
1022 (list ruby-hocon
1023 ruby-sys-filesystem
1024 ruby-thor
1025
1026 ;; For ‘embed-absolute-references’.
1027 dmidecode
1028 inetutils ; for ‘hostname’
1029 iproute
1030 pciutils
1031 util-linux))
1032 (synopsis "Collect and display system facts")
1033 (description
1034 "Facter is a tool that gathers basic facts about nodes (systems) such
1035as hardware details, network settings, OS type and version, and more. These
1036facts can be collected on the command line with the @command{facter} command
1037or via the @code{facter} Ruby library.")
1038 (home-page "https://github.com/puppetlabs/facter")
1039 (license license:expat)))
1040
1041(define-public ttyload
1042 (let ((revision "1")
1043 (commit "f9495372801ce4b4dad98ad854203e694c31c1eb"))
1044 (package
1045 (name "ttyload")
1046 (version (git-version "0.5.3" revision commit))
1047 (source
1048 (origin
1049 (method git-fetch)
1050 (uri (git-reference
1051 (url "https://github.com/lindes/ttyload")
1052 (commit commit)))
1053 (file-name (git-file-name name version))
1054 (sha256
1055 (base32 "0ldb7a13b9v876c6cbrs78pkizj64drnqx95z5shfbwgpwfhr4im"))))
1056 (build-system gnu-build-system)
1057 (arguments
1058 (list #:tests? #f ; no tests
1059 #:make-flags
1060 #~(list (string-append "CC=" #$(cc-for-target)))
1061 #:phases
1062 #~(modify-phases %standard-phases
1063 (delete 'configure)
1064 (replace 'install
1065 (lambda _
1066 (let ((bin (string-append #$output "/bin")))
1067 (install-file "ttyload" bin)))))))
1068 (home-page "https://www.daveltd.com/src/util/ttyload/")
1069 (synopsis "Console based color-coded graphs of CPU load average")
1070 (description
1071 "Show graphs for 1 minute, 5 minute, 15 minute load averages on the
1072console.")
1073 ;; This package uses a modified version of the "ISC License".
1074 (license (license:non-copyleft "file://LICENSE")))))
1075
1076(define-public btop
1077 (package
1078 (name "btop")
1079 (version "1.4.6")
1080 (source (origin
1081 (method git-fetch)
1082 (uri (git-reference
1083 (url "https://github.com/aristocratos/btop")
1084 (commit (string-append "v" version))))
1085 (file-name (git-file-name name version))
1086 (sha256
1087 (base32
1088 "1nj58dbv3c0rj8fngldkyrmdmacmjnbg8ch1c07ik97kqnnzd3l7"))))
1089 (build-system gnu-build-system)
1090 (native-inputs (list lowdown))
1091 (arguments
1092 (list #:tests? #f ;no test suite
1093 #:make-flags #~(list (string-append "PREFIX=" #$output)
1094 (string-append "CC=" #$(cc-for-target))
1095 (string-append "CXX=" #$(cxx-for-target)))
1096 #:phases #~(modify-phases %standard-phases
1097 (delete 'configure))))
1098 (home-page "https://github.com/aristocratos/btop")
1099 (synopsis "Resource monitor")
1100 (description "Btop++ provides unified monitoring of CPU, memory, network
1101and processes.")
1102 (license license:asl2.0)))
1103
1104(define-public smem
1105 (package
1106 (name "smem")
1107 (version "1.5")
1108 (source (origin
1109 (method url-fetch)
1110 (uri (string-append "https://selenic.com/repo/smem/archive/"
1111 version ".tar.bz2"))
1112 (file-name
1113 (string-append name "-" version ".tar.bz2"))
1114 (sha256
1115 (base32
1116 "19ibv1byxf2b68186ysrgrhy5shkc5mc69abark1h18yigp3j34m"))))
1117 (build-system gnu-build-system)
1118 (arguments
1119 (list #:tests? #f ; There is no test suite.
1120 #:make-flags #~(list "smemcap")
1121 #:phases
1122 #~(modify-phases %standard-phases
1123 (delete 'configure)
1124 (replace 'build
1125 (lambda _
1126 (let* ((system #$(cond ((target-x86?) "X86")
1127 ((target-arm?) "ARM")
1128 ((target-powerpc?) "POWER")
1129 (else "CROSS_FINGERS"))))
1130 (format #t "Building for ~a~%" system)
1131 (invoke #$(cc-for-target) "-o" "smemcap" "smemcap.c"
1132 "-g" "-Wall" "-D" system))))
1133 (replace 'install
1134 (lambda _
1135 (let ((bin (string-append #$output "/bin"))
1136 (man1 (string-append #$output "/share/man/man8")))
1137 (install-file "smemcap" bin)
1138 (install-file "smem" bin)
1139 (mkdir-p man1)
1140 (copy-file "smem.8" (string-append man1 "/smem.8"))))))))
1141 (native-inputs (list python-minimal-wrapper))
1142 (home-page "https://www.selenic.com/smem/")
1143 (synopsis "Memory reporting tool")
1144 (description
1145 "This package provides a command line tool that can give numerous reports
1146on memory usage on GNU/Linux systems.")
1147 (license license:gpl2+)))
1148
1149(define-public htop
1150 (package
1151 (name "htop")
1152 (version "3.4.1")
1153 (source
1154 (origin
1155 (method git-fetch)
1156 (uri (git-reference
1157 (url "https://github.com/htop-dev/htop")
1158 (commit version)))
1159 (sha256
1160 (base32 "058y4a4mvx9m179dyr4wi8mlm6i4ybywshadaj4cvfn9fv0r0nkx"))
1161 (file-name (git-file-name name version))))
1162 (build-system gnu-build-system)
1163 (arguments
1164 (list
1165 #:configure-flags
1166 #~(list "--enable-sensors")
1167 #:phases
1168 #~(modify-phases %standard-phases
1169 (add-after 'unpack 'patch-dlopen
1170 (lambda* (#:key inputs #:allow-other-keys)
1171 (substitute* "linux/LibSensors.c"
1172 (("dlopen\\(\"libsensors\\.so")
1173 (string-append "dlopen(\""
1174 (search-input-file
1175 inputs "/lib/libsensors.so")))))))))
1176 (inputs
1177 (list ncurses (list lm-sensors "lib")))
1178 (native-inputs
1179 (list autoconf automake python-minimal-wrapper)) ; for scripts/MakeHeader.py
1180 (home-page "https://htop.dev")
1181 (synopsis "Interactive process viewer")
1182 (description
1183 "This is htop, an interactive process viewer. It is a text-mode
1184application (for console or X terminals) and requires ncurses.")
1185 (license license:gpl2)))
1186
1187(define-public bashtop
1188 (package
1189 (name "bashtop")
1190 (version "0.9.25")
1191 (source (origin
1192 (method git-fetch)
1193 (uri (git-reference
1194 (url "https://github.com/aristocratos/bashtop")
1195 (commit (string-append "v" version))))
1196 (file-name (git-file-name name version))
1197 (sha256
1198 (base32
1199 "07nlr6vmyb7yihaxj1fp424lmhwkdjl6mls92v90f6gsvikpa13v"))))
1200 (build-system gnu-build-system)
1201 (arguments
1202 '(#:make-flags (list (string-append "PREFIX=" %output))
1203 #:tests? #f ; bats test fails with loading load.bash
1204 #:phases (modify-phases %standard-phases (delete 'configure))))
1205 (home-page "https://github.com/aristocratos/bashtop")
1206 (synopsis "Linux/OSX/FreeBSD resource monitor")
1207 (description "Resource monitor that shows usage and stats for processor,
1208memory, disks, network and processes.")
1209 (license license:asl2.0)))
1210
1211(define-public bpytop
1212 (package
1213 (name "bpytop")
1214 (version "1.0.68")
1215 (source
1216 (origin
1217 (method url-fetch)
1218 (uri (pypi-uri "bpytop" version))
1219 (sha256
1220 (base32 "1clvajbv7pzlya9s1xs6dvjic8rv3kx7aqiwnjxapiypx246gdjk"))))
1221 (build-system pyproject-build-system)
1222 (arguments
1223 (list
1224 #:tests? #f ; No tests in Pypi archive.
1225 #:phases
1226 #~(modify-phases %standard-phases
1227 (add-after 'unpack 'use-poetry-core
1228 (lambda _
1229 ;; Patch to use the core poetry API.
1230 (substitute* "pyproject.toml"
1231 (("poetry.masonry.api")
1232 "poetry.core.masonry.api"))))
1233 (add-after 'install 'install-themes
1234 (lambda* (#:key inputs outputs #:allow-other-keys)
1235 (let ((themes (string-append (site-packages inputs outputs)
1236 "/bpytop-themes")))
1237 (mkdir-p themes)
1238 (copy-recursively "themes" themes)))))))
1239 (inputs
1240 (list python-psutil))
1241 (native-inputs
1242 (list python-poetry-core))
1243 (home-page "https://github.com/aristocratos/bpytop")
1244 (synopsis "Resource monitor")
1245 (description "Resource monitor that shows usage and stats for processor,
1246memory, disks, network and processes. It's a Python port and continuation of
1247@command{bashtop}.")
1248 (license license:asl2.0)))
1249
1250(define-public pies
1251 (package
1252 (name "pies")
1253 (version "1.8")
1254 (source
1255 (origin
1256 (method url-fetch)
1257 (uri (string-append "mirror://gnu/pies/pies-"
1258 version ".tar.bz2"))
1259 (sha256
1260 (base32
1261 "0v0xcq0mfil440xq2pa5mjkyva5c9ahqda54z5w2ksl2d78v8a35"))
1262 (snippet
1263 #~(begin
1264 (use-modules (guix build utils))
1265 (for-each delete-file
1266 (append
1267 ;; Generated by flex.
1268 (find-files "gres/src" "lex\\.c$")
1269 ;; Generated by bison.
1270 (find-files "gres/src" "-gram\\.[ch]$")))))))
1271 (build-system gnu-build-system)
1272 (arguments
1273 '(#:phases (modify-phases %standard-phases
1274 (add-before 'build 'patch-/bin/sh
1275 (lambda* (#:key inputs #:allow-other-keys)
1276 ;; Use the right shell when executing user-provided
1277 ;; shell commands.
1278 (let ((bash (assoc-ref inputs "bash")))
1279 (substitute* '("src/progman.c" "src/comp.c")
1280 (("\"/bin/sh\"")
1281 (string-append "\"" bash "/bin/sh\"")))))))))
1282 (native-inputs (list bison flex))
1283 (inputs (list libxcrypt))
1284 (home-page "https://www.gnu.org.ua/software/pies/")
1285 (synopsis "Program invocation and execution supervisor")
1286 (description
1287 "GNU pies is a program that supervises the invocation and execution of
1288other programs. It reads the list of programs to be started from its
1289configuration file, executes them, and then monitors their status,
1290re-executing them as necessary.")
1291 (license license:gpl3+)))
1292
1293(define-public inetutils
1294 (package
1295 (name "inetutils")
1296 (version "2.5")
1297 (source (origin
1298 (method url-fetch)
1299 (uri (string-append "mirror://gnu/inetutils/inetutils-"
1300 version ".tar.gz"))
1301 (sha256
1302 (base32
1303 "0q1257ci22g2jbdiqs00mharc1lqkbibdlkhj23f3si6qjxkn17s"))))
1304 (build-system gnu-build-system)
1305 (arguments
1306 (list
1307 #:configure-flags
1308 #~(list "--localstatedir=/var"
1309
1310 ;; Make sure 'PATH_PROCNET_DEV' gets defined when
1311 ;; cross-compiling (by default it does not.)
1312 #$@(if (%current-target-system)
1313 '("--with-path-procnet-dev=/proc/net/dev")
1314 '())
1315 #$@(if (target-hurd?)
1316 '("--with-path-klog=/dev/klog"
1317 "--disable-rcp"
1318 "--disable-rexec"
1319 "--disable-rexecd"
1320 "--disable-rlogin"
1321 "--disable-rlogind"
1322 "--disable-rsh"
1323 "--disable-rshd"
1324 "--disable-uucpd"
1325 "--disable-whois")
1326 '()))
1327 ;; Make sure that canonical "coreutils" package is not referred.
1328 #:make-flags
1329 #~(list (string-append "CPPFLAGS=-DPATHDEF_CP=\\\""
1330 (search-input-file %build-inputs "bin/cp")
1331 "\\\""))
1332 ;; On some systems, 'libls.sh' may fail with an error such as:
1333 ;; "Failed to tell switch -a apart from -A".
1334 #:parallel-tests? #f
1335 #:phases (if (target-hurd64?)
1336 #~(modify-phases %standard-phases
1337 (add-after 'unpack 'apply-hurd64-patch
1338 (lambda _
1339 (let ((patch
1340 #$(local-file
1341 (search-patch
1342 "inetutils-hurd64.patch"))))
1343 (invoke "patch" "--force" "-p1" "-i" patch)))))
1344 #~%standard-phases)))
1345 (inputs
1346 (list coreutils
1347 shadow ;for login (used in telnetd and rlogind)
1348 libxcrypt
1349 ncurses
1350 readline)) ;for 'ftp'
1351 (native-inputs
1352 (if (member (%current-system)
1353 (package-supported-systems net-tools))
1354 (list net-tools) ;for tests
1355 '()))
1356 (home-page "https://www.gnu.org/software/inetutils/")
1357 (synopsis "Basic networking utilities")
1358 (description
1359 "Inetutils is a collection of common network programs, such as an ftp
1360client and server, a telnet client and server, an rsh client and server, and
1361hostname.")
1362 (license license:gpl3+)))
1363
1364(define-public shadow
1365 (package
1366 (name "shadow")
1367 (version "4.13")
1368 (source (origin
1369 (method url-fetch)
1370 (uri (string-append
1371 "https://github.com/shadow-maint/shadow/releases/"
1372 "download/" version "/shadow-" version ".tar.xz"))
1373 (sha256
1374 (base32
1375 "0b6xz415b4y3y5nk3pw9xibv05kln4cjbmhybyncmrx2g5fj9zls"))))
1376 (build-system gnu-build-system)
1377 (arguments
1378 `(;; Assume System V `setpgrp (void)', which is the default on GNU
1379 ;; variants (`AC_FUNC_SETPGRP' is not cross-compilation capable.)
1380 #:configure-flags
1381 '(,@(if (target-hurd?)
1382 '()
1383 '("--with-libpam"))
1384 "shadow_cv_logdir=/var/log"
1385 "ac_cv_func_setpgrp_void=yes")
1386 #:phases
1387 (modify-phases %standard-phases
1388 (add-after 'unpack 'fix-linking-to-pam
1389 (lambda _
1390 ;; There's a build system problem in 4.9 that causes link
1391 ;; failures with the pam libraries (see:
1392 ;; https://github.com/shadow-maint/shadow/issues/407).
1393 (substitute* "libsubid/Makefile.in"
1394 (("\\$\\(LIBTCB\\)" all)
1395 (string-append all " $(LIBPAM)")))))
1396 ,@(if (%current-target-system)
1397 '((add-before 'configure 'set-runtime-shell
1398 (lambda* (#:key inputs #:allow-other-keys)
1399 (let ((shell (search-input-file inputs "/bin/bash")))
1400 (setenv "RUNTIME_SHELL" shell)
1401 (substitute* "configure.ac"
1402 (("\\$SHELL")
1403 "$RUNTIME_SHELL"))))))
1404 '())
1405 (add-before 'build 'set-nscd-file-name
1406 (lambda* (#:key inputs #:allow-other-keys)
1407 ;; Use the right file name for nscd.
1408 (let ((libc (assoc-ref inputs
1409 ,(if (%current-target-system)
1410 "cross-libc"
1411 "libc"))))
1412 (substitute* "lib/nscd.c"
1413 (("/usr/sbin/nscd")
1414 (string-append libc "/sbin/nscd"))))))
1415 (add-after 'install 'install-man-pages
1416 (lambda _
1417 ;; The top-level Makefile.am wrongfully has "SUBDIRS += man"
1418 ;; under "if ENABLE_REGENERATE_MAN", even though prebuilt man
1419 ;; pages are available. Thus, install them manually.
1420 (invoke "make" "-C" "man" "install")))
1421 (add-after 'install-man-pages 'remove-groups
1422 (lambda* (#:key outputs #:allow-other-keys)
1423 ;; Remove `groups', which is already provided by Coreutils.
1424 (let* ((out (assoc-ref outputs "out"))
1425 (bin (string-append out "/bin"))
1426 (man (string-append out "/share/man")))
1427 (delete-file (string-append bin "/groups"))
1428 (for-each delete-file (find-files man "^groups\\."))))))))
1429 (inputs
1430 (append (if (target-hurd?)
1431 '()
1432 (list linux-pam))
1433 (if (%current-target-system)
1434 (list bash-minimal)
1435 '())
1436 (list libxcrypt)))
1437 (home-page "https://github.com/shadow-maint/shadow")
1438 (synopsis "Authentication-related tools such as passwd, su, and login")
1439 (description
1440 "Shadow provides a number of authentication-related tools, including:
1441login, passwd, su, groupadd, and useradd.")
1442
1443 ;; The `vipw' program is GPLv2+.
1444 ;; libmisc/salt.c is public domain.
1445 (license license:bsd-3)))
1446
1447(define-public mingetty
1448 (package
1449 (name "mingetty")
1450 (version "1.08")
1451 (source (origin
1452 (method url-fetch)
1453 (uri (string-append "mirror://sourceforge/mingetty/mingetty/"
1454 version "/mingetty-" version ".tar.gz"))
1455 (sha256
1456 (base32
1457 "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"))))
1458 (build-system gnu-build-system)
1459 (arguments
1460 (list
1461 #:tests? #f ; no tests
1462 #:phases
1463 #~(modify-phases %standard-phases
1464 (replace 'configure
1465 (lambda* (#:key inputs #:allow-other-keys)
1466 (let* ((man8 (string-append #$output "/share/man/man8"))
1467 (sbin (string-append #$output "/sbin"))
1468 (login (search-input-file inputs "/bin/login")))
1469 (substitute* "Makefile"
1470 (("CC=.*$")
1471 (string-append "CC=" #$(cc-for-target) "\n"))
1472 (("^SBINDIR.*")
1473 (string-append "SBINDIR = " #$output "/sbin\n"))
1474 (("^MANDIR.*")
1475 (string-append "MANDIR = " #$output "/share/man/man8\n")))
1476
1477 ;; Pick the right 'login' by default.
1478 (substitute* "mingetty.c"
1479 (("\"/bin/login\"")
1480 (string-append "\"" login "\"")))
1481
1482 (mkdir-p sbin)
1483 (mkdir-p man8)))))))
1484 (inputs (list shadow))
1485 (home-page "https://sourceforge.net/projects/mingetty")
1486 (synopsis "Getty for the text console")
1487 (description
1488 "Small console getty that is started on the Linux text console,
1489asks for a login name and then transfers over to @code{login}. It is extended
1490to allow automatic login and starting any app.")
1491 (license license:gpl2+)))
1492
1493(define-public net-base
1494 (package
1495 (name "net-base")
1496 (version "5.3")
1497 (source (origin
1498 (method url-fetch)
1499 (uri (string-append
1500 "mirror://debian/pool/main/n/netbase/netbase_"
1501 version ".tar.xz"))
1502 (sha256
1503 (base32
1504 "12xqjwg3p4rzmmh2iib6sigm9l29y3dgk74mmnw64k84jnbwdxl1"))))
1505 (build-system trivial-build-system)
1506 (arguments
1507 `(#:modules ((guix build utils))
1508 ;; This package consists solely of architecture-independent
1509 ;; tables. Cross-compilation is pointless! Make sure we'll
1510 ;; always get the same derivation.
1511 #:target #f
1512 #:allowed-references ()
1513 #:builder (begin
1514 (use-modules (guix build utils)
1515 (srfi srfi-26))
1516
1517 (let* ((source (assoc-ref %build-inputs "source"))
1518 (tar (assoc-ref %build-inputs "tar"))
1519 (xz (assoc-ref %build-inputs "xz"))
1520 (output (assoc-ref %outputs "out"))
1521 (etc (string-append output "/etc")))
1522 (setenv "PATH" (string-append xz "/bin"))
1523 (invoke (string-append tar "/bin/tar") "xvf"
1524 source)
1525 (chdir ,(string-append "netbase-" version))
1526 (mkdir-p etc)
1527 (for-each copy-file
1528 '("etc-services" "etc-protocols" "etc-rpc")
1529 (map (cut string-append etc "/" <>)
1530 '("services" "protocols" "rpc")))
1531 #t))))
1532 (native-inputs (list tar xz))
1533 (synopsis "IANA protocol, port, and RPC number assignments")
1534 (description
1535 "This package provides the /etc/services, /etc/protocols, and /etc/rpc
1536files, which contain information about the IANA-assigned port, protocol, and
1537ONC RPC numbers.")
1538 (home-page "https://packages.debian.org/sid/netbase")
1539 (license license:gpl2)))
1540
1541(define-public netcat
1542 (package
1543 (name "netcat")
1544 (version "0.7.1")
1545 (source (origin
1546 (method url-fetch)
1547 (uri (string-append "mirror://sourceforge/netcat/netcat/" version
1548 "/netcat-" version ".tar.bz2"))
1549 (sha256
1550 (base32
1551 "1frjcdkhkpzk0f84hx6hmw5l0ynpmji8vcbaxg8h5k2svyxz0nmm"))))
1552 (build-system gnu-build-system)
1553 (arguments
1554 `(#:configure-flags
1555 ;; By default, man and info pages are put in PREFIX/{man,info},
1556 ;; but we want them in PREFIX/share/{man,info}.
1557 (let ((out (assoc-ref %outputs "out")))
1558 (list (string-append "--mandir=" out "/share/man")
1559 (string-append "--infodir=" out "/share/info")))))
1560 (home-page "https://netcat.sourceforge.net")
1561 (synopsis "Read and write data over TCP/IP")
1562 (description
1563 "Netcat is a featured networking utility which reads and writes data
1564across network connections, using the TCP/IP protocol. It is designed to be a
1565reliable \"back-end\" tool that can be used directly or easily driven by other
1566programs and scripts. At the same time, it is a feature-rich network debugging
1567and exploration tool, since it can create almost any kind of connection you
1568would need and has several interesting built-in capabilities.")
1569 (license license:gpl2+)))
1570
1571(define-public netcat-openbsd
1572 (package
1573 (name "netcat-openbsd")
1574 (version "1.219-1")
1575 (source (origin
1576 (method git-fetch)
1577 (uri (git-reference
1578 (url "https://salsa.debian.org/debian/netcat-openbsd.git")
1579 (commit (string-append "debian/" version))))
1580 (file-name (git-file-name name version))
1581 (sha256
1582 (base32
1583 "1fhrmnbdl6bgsjk02vi78zy9i486mmniymbbbhdkzl8zfjbjkpxc"))))
1584 (build-system gnu-build-system)
1585 (arguments
1586 `(#:tests? #f ; no test suite
1587 #:make-flags
1588 (list (string-append "CC=" ,(cc-for-target)))
1589 #:phases
1590 (modify-phases %standard-phases
1591 (delete 'configure)
1592 (add-before 'build 'patch
1593 (lambda _
1594 (setenv "QUILT_PATCHES" "debian/patches")
1595 (invoke "quilt" "push" "-a")))
1596 (replace 'install
1597 (lambda* (#:key outputs #:allow-other-keys)
1598 (let* ((out (assoc-ref outputs "out"))
1599 (bin (string-append out "/bin"))
1600 (man (string-append out "/share/man/man1"))
1601 (doc (string-append out "/share/doc/netcat-openbsd-" ,version))
1602 (examples (string-append doc "/examples")))
1603 (install-file "nc" bin)
1604 (install-file "nc.1" man)
1605 (install-file "debian/copyright" doc)
1606 (copy-recursively "debian/examples" examples)))))))
1607 (inputs (list libbsd))
1608 (native-inputs (list pkg-config quilt))
1609 (home-page "https://packages.debian.org/sid/netcat-openbsd")
1610 (synopsis "Read and write data over TCP/IP")
1611 (description
1612 "Netcat is a simple Unix utility which reads and writes data across
1613network connections using TCP or UDP protocol. It is designed to be a reliable
1614\"back-end\" tool that can be used directly or easily driven by other programs
1615and scripts. At the same time it is a feature-rich network debugging and
1616exploration tool, since it can create almost any kind of connection you would
1617need and has several interesting built-in capabilities.
1618
1619This package contains the OpenBSD rewrite of netcat, including support for
1620IPv6, proxies, and Unix sockets.")
1621 (license (list license:bsd-3
1622 license:bsd-2)))) ; atomicio.*, socks.c
1623
1624(define-public nmon
1625 (package
1626 (name "nmon")
1627 (version "16p")
1628 (source
1629 (origin
1630 (method url-fetch)
1631 (uri (string-append "mirror://sourceforge/nmon/lmon" version ".c"))
1632 (sha256
1633 (base32 "0akbkv70zffdmc5p51r02rlxd8b3jvkgl64rjsd29qr5cxgh9ijx"))))
1634 (build-system gnu-build-system)
1635 (arguments
1636 (list #:tests? #f ; no test suite
1637 #:phases
1638 #~(modify-phases %standard-phases
1639 (replace 'unpack
1640 (lambda _
1641 (copy-file #$(package-source this-package) "lmon.c")))
1642 (delete 'configure) ; no build system
1643 (replace 'build
1644 ;; There is an example ‘Makefile’ in the .c file.
1645 (lambda _
1646 ;; These #defines aren't well-documented and, e.g., POWER was
1647 ;; not actually tested on every possible TARGET-POWERPC?.
1648 (let* ((system #$(cond ((target-x86?) "X86")
1649 ((target-arm?) "ARM")
1650 ((target-powerpc?) "POWER")
1651 (else "CROSS_FINGERS"))))
1652 (format #t "Building for ~a~%" system)
1653 (invoke #$(cc-for-target) "-o" "nmon" "lmon.c"
1654 "-g" "-Wall" "-D" system
1655 "-lncurses" "-lm"))))
1656 (replace 'install
1657 (lambda _
1658 (let ((bin (string-append #$output "/bin"))
1659 (man1 (string-append #$output "/share/man/man1")))
1660 (install-file "nmon" bin)
1661 (mkdir-p man1)
1662 (copy-file #$(this-package-native-input "man-page")
1663 (string-append man1 "/nmon.1"))))))))
1664 (native-inputs
1665 (list `("man-page"
1666 ,(origin
1667 ;; There is no man page upstream, so install Debian's.
1668 (method url-fetch)
1669 (uri (string-append "https://salsa.debian.org/carnil/nmon/"
1670 "-/raw/debian/" version "+debian-1/"
1671 "debian/nmon.1"))
1672 (sha256
1673 (base32
1674 "1gpvd2kjyhs18sh6sga5bk9wj8s78blfd4c0m38r0wl92jx2yv1b"))))))
1675 (inputs
1676 (list ncurses))
1677 (home-page "https://nmon.sourceforge.net/")
1678 (synopsis
1679 "Monitor system performance in a terminal or to a @file{.csv} log file")
1680 (description
1681 "@acronym{Nmon, Nigel's performance monitor} is yet another system monitor
1682useful in systems administration, debugging, tuning, and benchmarking.
1683
1684The configurable ncurses interface displays all the classic resource usage
1685statistics (CPU, memory, network, disk, ...) as real-time graphs or numbers.
1686It can also list the processes responsible in a @command{top}-like table.
1687
1688A less common nmon feature is its ability to create highly detailed log files
1689in @acronym{CSV, comma-separated values} format. These can be imported into
1690spreadsheets or fed straight into an @acronym{RRD, round-robin database} using
1691@command{rrdtool} for further analysis, or to create colourful graphs.")
1692 (license license:gpl3+)))
1693
1694(define-public sipcalc
1695 (package
1696 (name "sipcalc")
1697 (version "1.1.6")
1698 (source
1699 (origin
1700 (method url-fetch)
1701 (uri (string-append "http://www.routemeister.net/projects"
1702 "/sipcalc/files/sipcalc" "-" version ".tar.gz"))
1703 (sha256
1704 (base32
1705 "0mv3wndj4z2bsshh2k8d5sy3j8wxzgf8mzmmkvj1k8gpcz37dm6g"))))
1706 (build-system gnu-build-system)
1707 (home-page "https://www.routemeister.net/projects/sipcalc/")
1708 (synopsis "Command-line IP subnet calculator")
1709 (description
1710 "Sipcalc is an advanced command-line IP subnet calculator. It can take
1711multiple forms of input (IPv4/IPv6/interface/hostname) and output a multitude
1712of information about a given subnet.
1713
1714Features include:
1715
1716@itemize @bullet
1717@item IPv4
1718@itemize
1719@item Retrieving of address information from interfaces.
1720@item Classfull and CIDR output.
1721@item Multiple address and netmask input and output formats (dotted quad, hex,
1722number of bits).
1723@item Output of broadcast address, network class, Cisco wildcard,
1724hosts/range, network range.
1725@item The ability to split a network based on a smaller netmask, now also with
1726recursive runs on the generated subnets. (also IPv6)
1727@end itemize
1728@item IPv6
1729@itemize
1730@item Compressed and expanded input and output addresses.
1731@item Standard IPv6 network output.
1732@item v4 in v6 output.
1733@item Reverse DNS address generation.
1734@end itemize
1735@end itemize\n")
1736 (license license:bsd-3)))
1737
1738(define-public prips
1739 (package
1740 (name "prips")
1741 (version "1.2.2")
1742 (source
1743 (origin
1744 (method url-fetch)
1745 (uri (string-append "https://devel.ringlet.net/files/sys/"
1746 name "/" name "-" version ".tar.xz"))
1747 (sha256
1748 (base32 "1cm0hmd4wz5k683fqa6a2f9m2ky8j8q0kdrknrl9y3ga36x11mzr"))))
1749 (build-system gnu-build-system)
1750 (arguments
1751 (list #:make-flags #~(list (string-append "CC=" #$(cc-for-target)))
1752 #:test-target "test"
1753 #:phases #~(modify-phases %standard-phases
1754 (delete 'configure)
1755 (replace 'install
1756 (lambda _
1757 (install-file "prips"
1758 (string-append #$output "/bin")))))))
1759 (native-inputs (list perl-test-harness))
1760 (synopsis "Tool that prints the IP addresses in a given range")
1761 (description "Prips can be used to print all of the IP addresses in
1762 a given range. This allows the enhancement of tools only work
1763 on one host at a time (e.g. whois).")
1764 (home-page "https://devel.ringlet.net/sysutils/prips/")
1765 (license license:gpl2+)))
1766
1767(define-public alive
1768 (package
1769 (name "alive")
1770 (version "2.0.5")
1771 (source (origin
1772 (method url-fetch)
1773 (uri (string-append "mirror://gnu/alive/alive-"
1774 version ".tar.lz"))
1775 (sha256
1776 (base32
1777 "12ahlxbbrynm6md8qc872qr795lqpfkr8kwlsig40i4nznzkvkwl"))))
1778 (build-system gnu-build-system)
1779 (arguments '(#:configure-flags '("alive_cv_nice_ping=yes")))
1780 (inputs
1781 (list guile-3.0
1782 inetutils))
1783 (native-inputs
1784 (list lzip))
1785 (home-page "https://www.gnu.org/software/alive/")
1786 (synopsis "Autologin and keep-alive daemon")
1787 (description
1788 "GNU Alive sends periodic pings to a server, generally to keep a
1789connection alive.")
1790 (license license:gpl3+)))
1791
1792(define-public isc-dhcp
1793 (let* ((bind-major-version "9")
1794 (bind-minor-version "11")
1795 (bind-patch-version "37")
1796 (bind-release-type "") ; for patch release, use "-P"
1797 (bind-release-version "") ; for patch release, e.g. "6"
1798 (bind-version (string-append bind-major-version
1799 "."
1800 bind-minor-version
1801 "."
1802 bind-patch-version
1803 bind-release-type
1804 bind-release-version)))
1805 (package
1806 (name "isc-dhcp")
1807 (version "4.4.3-P1")
1808 (source (origin
1809 (method url-fetch)
1810 (uri (string-append "https://ftp.isc.org/isc/dhcp/"
1811 version "/dhcp-" version ".tar.gz"))
1812 (sha256
1813 (base32
1814 "1ivkvhhvqxap6c51cli7pa6xn76ngxri1zbl45ishz4ranxidi0a"))
1815 (patches (search-patches
1816 "dhclient-script-resolvconf-support.patch"))))
1817 (build-system gnu-build-system)
1818 (arguments
1819 `(#:parallel-build? #f
1820 #:configure-flags '("--with-randomdev=/dev/random")
1821 #:phases
1822 (modify-phases %standard-phases
1823 (add-after 'unpack 'replace-bundled-bind
1824 (lambda* (#:key inputs native-inputs #:allow-other-keys)
1825 (delete-file "bind/bind.tar.gz")
1826 (copy-file (assoc-ref inputs "bind-source-tarball")
1827 "bind/bind.tar.gz")
1828 (chmod "bind/bind.tar.gz" #o644)
1829 (substitute* "bind/version.tmp"
1830 (("^MAJORVER=.*")
1831 (format #f "MAJORVER=~a\n" ,bind-major-version))
1832 (("^MINORVER=.*")
1833 (format #f "MINORVER=~a\n" ,bind-minor-version))
1834 (("^PATCHVER=.*")
1835 (format #f "PATCHVER=~a\n" ,bind-patch-version))
1836 (("^RELEASETYPE=.*")
1837 (format #f "RELEASETYPE=~a\n" ,bind-release-type))
1838 (("^RELEASEVER=.*")
1839 (format #f "RELEASEVER=~a\n" ,bind-release-version)))))
1840 ,@(if (%current-target-system)
1841 `((add-before 'configure 'fix-bind-cross-compilation
1842 (lambda _
1843 (substitute* "configure"
1844 (("--host=\\$host")
1845 "--host=$host_alias --build=$build_alias"))
1846 ;; BIND needs a native compiler because the DHCP
1847 ;; build system uses the built 'gen' executable.
1848 (setenv "BUILD_CC" "gcc")
1849 ;; powerpc-linux needs to be told to use -latomic.
1850 ,@(if (target-ppc32?)
1851 `((setenv "LIBS" "-latomic"))
1852 '()))))
1853 '())
1854 (add-before 'configure 'update-config-scripts
1855 (lambda* (#:key native-inputs inputs #:allow-other-keys)
1856 (for-each (lambda (file)
1857 (install-file
1858 (search-input-file
1859 (or native-inputs inputs)
1860 (string-append "/bin/" file)) "."))
1861 '("config.guess" "config.sub"))))
1862 (add-before 'build 'update-config-scripts-for-bind
1863 (lambda* (#:key native-inputs inputs #:allow-other-keys)
1864 (for-each (lambda (file)
1865 (install-file
1866 (search-input-file
1867 (or native-inputs inputs)
1868 (string-append "/bin/" file))
1869 (string-append "bind/bind-" ,bind-version)))
1870 '("config.guess" "config.sub"))))
1871 (add-after 'configure 'post-configure
1872 (lambda* (#:key outputs #:allow-other-keys)
1873 ;; Point to the right client script, which will be
1874 ;; installed in a later phase.
1875 (substitute* "includes/dhcpd.h"
1876 (("#define[[:blank:]]+_PATH_DHCLIENT_SCRIPT.*")
1877 (let ((out (assoc-ref outputs "out")))
1878 (string-append "#define _PATH_DHCLIENT_SCRIPT \""
1879 out "/libexec/dhclient-script"
1880 "\"\n"))))
1881
1882 ;; During the 'build' phase, 'bind.tar.gz' is extracted, so
1883 ;; we must patch shebangs in there and make sure the right
1884 ;; shell is used.
1885 (with-directory-excursion "bind"
1886 (substitute* "Makefile"
1887 (("\\./configure ")
1888 (let ((sh (which "sh")))
1889 (string-append "./configure CONFIG_SHELL="
1890 sh " SHELL=" sh " "))))
1891
1892 (let ((bind-directory (string-append "bind-" ,bind-version)))
1893 (invoke "tar" "xf" "bind.tar.gz")
1894 (for-each patch-shebang
1895 (find-files bind-directory ".*"))
1896 (substitute* (string-append bind-directory "/configure")
1897 (("/usr/bin/file")
1898 (which "file")))
1899 (invoke "tar" "cf" "bind.tar.gz"
1900 bind-directory
1901 ;; avoid non-determinism in the archive
1902 "--sort=name"
1903 "--mtime=@0"
1904 "--owner=root:0"
1905 "--group=root:0")))))
1906 (add-after 'install 'post-install
1907 (lambda* (#:key inputs outputs #:allow-other-keys)
1908 ;; Install the dhclient script for GNU/Linux and make sure
1909 ;; if finds all the programs it needs.
1910 (let* ((out (assoc-ref outputs "out"))
1911 (libexec (string-append out "/libexec"))
1912 (coreutils (assoc-ref inputs "coreutils*"))
1913 (inetutils (assoc-ref inputs "inetutils"))
1914 (grep (assoc-ref inputs "grep*"))
1915 (resolvconf (assoc-ref inputs "resolvconf*"))
1916 (sed (assoc-ref inputs "sed*"))
1917 (debianutils (assoc-ref inputs "debianutils")))
1918 (substitute* "client/scripts/linux"
1919 (("/sbin/ip")
1920 (search-input-file inputs "/sbin/ip")))
1921
1922 (mkdir-p libexec)
1923 (copy-file "client/scripts/linux"
1924 (string-append libexec "/dhclient-script"))
1925
1926 (wrap-program
1927 (string-append libexec "/dhclient-script")
1928 `("PATH" ":" prefix
1929 ,(map (lambda (dir)
1930 (string-append dir "/bin:"
1931 dir "/sbin"))
1932 (list inetutils coreutils grep sed resolvconf
1933 debianutils))))))))))
1934
1935 (native-inputs
1936 (list config perl file))
1937
1938 (inputs `(("inetutils" ,inetutils)
1939 ("bash" ,bash-minimal)
1940 ,@(if (target-hurd?)
1941 '()
1942 `(("iproute" ,iproute)))
1943
1944 ;; dhclient-script provides hooks to users and uses run-parts in
1945 ;; order to list users defined hooks.
1946 ("debianutils" ,debianutils)
1947
1948 ;; isc-dhcp bundles a copy of BIND, which has proved vulnerable
1949 ;; in the past. Use a BIND-VERSION of our choosing instead.
1950 ("bind-source-tarball"
1951 ,(origin
1952 (method url-fetch)
1953 (uri (string-append "https://ftp.isc.org/isc/bind9/"
1954 bind-version
1955 "/bind-" bind-version ".tar.gz"))
1956 (sha256
1957 (base32
1958 "1zsszgxs9043dfpxb6xs1iwk9jg7nxkl5pbawj8dlshnxkkzp3hd"))))
1959
1960 ("coreutils*" ,coreutils)
1961 ("grep*" ,grep)
1962 ("resolvconf*" ,openresolv)
1963 ("sed*" ,sed)))
1964
1965 (home-page "https://www.isc.org/dhcp/")
1966 (synopsis "Dynamic Host Configuration Protocol (DHCP) tools")
1967 (description
1968 "ISC's Dynamic Host Configuration Protocol (DHCP) distribution provides a
1969reference implementation of all aspects of DHCP, through a suite of DHCP
1970tools: server, client, and relay agent.
1971
1972This software is @emph{end-of-life}! ISC does not intend to issue any further
1973maintenance releases.")
1974 (license license:mpl2.0)
1975 (properties '((cpe-name . "dhcp"))))))
1976
1977(define-public dhcpcd
1978 (package
1979 (name "dhcpcd")
1980 (version "10.3.0")
1981 (source
1982 (origin
1983 (method git-fetch)
1984 (uri (git-reference
1985 (url "https://github.com/NetworkConfiguration/dhcpcd")
1986 (commit (string-append "v" version))))
1987 (file-name (git-file-name name version))
1988 (sha256
1989 (base32 "058k8wbzbjb6mm6qklv40z1y4k6sdb4ysap1xk6pny1m1f9xkdax"))))
1990 (inputs (list bash-minimal coreutils-minimal eudev sed))
1991 (build-system gnu-build-system)
1992 (arguments
1993 (list
1994 #:test-target "test"
1995 #:configure-flags #~(list "--enable-ipv6"
1996 "--enable-privsep"
1997 "--privsepuser=dhcpcd"
1998 (string-append "--dbdir=" "/var/db/dhcpcd")
1999 (string-append "--rundir=" "/var/run/dhcpcd")
2000 (string-append "CC=" #$(cc-for-target)))
2001 #:phases
2002 #~(modify-phases %standard-phases
2003 (add-after 'unpack 'do-not-create-dbdir
2004 (lambda _
2005 ;; Make sure that the Makefile doesn't attempt to create
2006 ;; /var/db/dhcpcd for which it doesn't have permissions.
2007 (substitute* "src/Makefile"
2008 (("\\$\\{INSTALL\\} -m \\$\\{DBMODE\\} -d\
2009 \\$\\{DESTDIR\\}\\$\\{DBDIR\\}")
2010 ""))))
2011 (add-before 'build 'setenv
2012 (lambda _
2013 (setenv "HOST_SH" (which "sh"))))
2014 (add-after 'install 'wrap-hooks
2015 (lambda* (#:key inputs outputs #:allow-other-keys)
2016 (let* ((sed (search-input-file inputs "/bin/sed"))
2017 (rm (search-input-file inputs "/bin/rm")))
2018 (wrap-program (string-append
2019 #$output "/libexec/dhcpcd-run-hooks")
2020 `("PATH" ":" suffix
2021 (,(dirname sed)
2022 ,(dirname rm))))))))))
2023 (home-page "https://roy.marples.name/projects/dhcpcd")
2024 (synopsis "Feature-rich DHCP and DHCPv6 client")
2025 (description
2026 "Provides a DHCP and a DHCPv6 client. Additionally,
2027dhcpcd is also an IPv4LL (aka ZeroConf) client. In layperson's terms,
2028dhcpcd runs on your machine and silently configures your computer to work
2029on the attached networks without trouble and mostly without configuration.")
2030 (license license:bsd-2)))
2031
2032(define-public radvd
2033 (package
2034 (name "radvd")
2035 (version "2.20")
2036 (source
2037 (origin
2038 (method git-fetch)
2039 (uri (git-reference
2040 (url "https://github.com/radvd-project/radvd")
2041 (commit (string-append "v" version))))
2042 (file-name (git-file-name name version))
2043 (sha256
2044 (base32 "090b8953cq7pvxf8i5wsippsi3zc8jxy559k6jpfjjmbbvl8zlmk"))))
2045 (build-system gnu-build-system)
2046 (native-inputs
2047 (list autoconf
2048 automake
2049 bison
2050 check
2051 flex
2052 pkg-config))
2053 (inputs (list libbsd))
2054 (arguments
2055 (if (%current-target-system)
2056 (list)
2057 (list #:configure-flags #~(list "--with-check"))))
2058 (home-page "https://radvd.litech.org/")
2059 (synopsis "IPv6 Router Advertisement Daemon")
2060 (description
2061 "The Router Advertisement Daemon (radvd) is run on systems acting as IPv6
2062routers. It sends Router Advertisement messages specified by RFC 2461
2063periodically and when requested by a node sending a Router Solicitation
2064message. These messages are required for IPv6 stateless autoconfiguration.")
2065 (license (license:non-copyleft "file://COPYRIGHT"))))
2066
2067(define-public ndppd
2068 (package
2069 (name "ndppd")
2070 (version "0.2.6")
2071 (source
2072 (origin
2073 (method git-fetch)
2074 (uri (git-reference
2075 (url "https://github.com/DanielAdolfsson/ndppd")
2076 (commit version)))
2077 (file-name (git-file-name name version))
2078 (sha256
2079 (base32 "1b0xda2cr4yq2pj8zch9gvfxqvz1n5rjl4nyqn70jyrincvsi8qn"))))
2080 (build-system gnu-build-system)
2081 (arguments
2082 (list #:tests? #f ; There are no tests
2083 #:make-flags #~(list (string-append "PREFIX=" #$output))
2084 #:phases
2085 #~(modify-phases %standard-phases
2086 (delete 'configure)
2087 (add-after 'unpack 'fix-paths
2088 (lambda _
2089 (substitute* "Makefile"
2090 (("/bin/gzip") "gzip")))))))
2091 (synopsis "NDP Proxy Daemon")
2092 (description
2093 "The Neighbor Discovery Protocol Proxy Daemon (ndppd) proxies some IPv6
2094NDP messages between interfaces to allow IPv6 routing between machines that
2095are in the same network but not on the same local link. It currently only
2096supports Neighbor Solicitation and Neighbor Advertisement messages.")
2097 (home-page "https://github.com/DanielAdolfsson/ndppd")
2098 (license license:gpl3+)))
2099
2100(define-public libpcap
2101 (package
2102 (name "libpcap")
2103 (version "1.10.1")
2104 (source (origin
2105 (method url-fetch)
2106 (uri (string-append "https://www.tcpdump.org/release/libpcap-"
2107 version ".tar.gz"))
2108 (sha256
2109 (base32
2110 "1m5x26vlbymp90k1qh0w3nj2nxzyvfrmfmwpj17k81dgri55ya7d"))))
2111 (build-system gnu-build-system)
2112 (native-inputs
2113 (list bison flex))
2114 (arguments
2115 ;; There are some tests in testprogs/, but no automated test suite.
2116 `(#:tests? #f
2117 #:phases
2118 (modify-phases %standard-phases
2119 (add-after 'unpack 'omit-static-library
2120 ;; Neither build nor install libpcap.a.
2121 (lambda _
2122 (substitute* "Makefile.in"
2123 ((" libpcap\\.a") "")
2124 ((" install-archive ") " ")))))))
2125 (home-page "https://www.tcpdump.org")
2126 (synopsis "Network packet capture library")
2127 (description
2128 "libpcap is an interface for user-level packet capture. It provides a
2129portable framework for low-level network monitoring. Applications include
2130network statistics collection, security monitoring, network debugging, etc.")
2131 (license (list license:bsd-4 ; fad-*.c and several other source files
2132 license:bsd-3 ; pcap/, sockutils.* & others
2133 license:bsd-2)))) ; the rest
2134
2135(define-public tcpdump
2136 (package
2137 (name "tcpdump")
2138 (version "4.99.4")
2139 (source (origin
2140 (method url-fetch)
2141 (uri (string-append "https://www.tcpdump.org/release/tcpdump-"
2142 version ".tar.gz"))
2143 (sha256
2144 (base32
2145 "1slzwjk5f8sygwxqci4vkbas0qqcgs5a0w3f8br6p7gjn8dj6ch2"))))
2146 (build-system gnu-build-system)
2147 (inputs (list libpcap openssl))
2148 (native-inputs (list perl)) ; for tests
2149 (home-page "https://www.tcpdump.org/")
2150 (synopsis "Network packet analyzer")
2151 (description
2152 "Tcpdump is a command-line tool to analyze network traffic passing
2153through the network interface controller.")
2154 (license license:bsd-3)))
2155
2156(define-public jnettop
2157 (package
2158 (name "jnettop")
2159 (version "0.13.0")
2160 (source (origin
2161 (method url-fetch)
2162 (uri
2163 (string-append "https://web.archive.org/web/20161221100811/"
2164 "http://jnettop.kubs.info/dist/jnettop-"
2165 version ".tar.gz"))
2166 (sha256
2167 (base32
2168 "1855np7c4b0bqzhf1l1dyzxb90fpnvrirdisajhci5am6als31z9"))))
2169 (build-system gnu-build-system)
2170 (arguments
2171 (list #:configure-flags
2172 #~'("CFLAGS=-O2 -g -Wno-implicit-function-declaration")))
2173 (native-inputs
2174 (list pkg-config))
2175 (inputs
2176 (list glib ncurses libpcap))
2177 (home-page
2178 "https://web.archive.org/web/20160703195221/http://jnettop.kubs.info/wiki/")
2179 (synopsis "Visualize network traffic by bandwidth use")
2180 (description
2181 "Jnettop is a traffic visualiser, which captures traffic going
2182through the host it is running from and displays streams sorted
2183by bandwidth they use.")
2184 (license license:gpl2+)))
2185
2186(define-public clusterssh
2187 (package
2188 (name "clusterssh")
2189 (version "4.13.2")
2190 (source (origin
2191 (method url-fetch)
2192 (uri (string-append "mirror://sourceforge/clusterssh/"
2193 "2.%20ClusterSSH%20Series%204/"
2194 "App-ClusterSSH-v" version ".tar.gz"))
2195 (sha256
2196 (base32
2197 "0rmk2p3f2wz1h092anidjclh212rv3gxyk0c641qk3frlrjnw6mp"))))
2198 (build-system perl-build-system)
2199 (arguments
2200 `(#:phases
2201 (modify-phases %standard-phases
2202 (add-after 'unpack 'refer-to-inputs
2203 (lambda* (#:key inputs #:allow-other-keys)
2204 (substitute* (list "lib/App/ClusterSSH/Config.pm"
2205 "t/15config.t")
2206 (("xterm")
2207 (which "xterm")))))
2208 (add-before 'check 'delete-failing-tests
2209 (lambda _
2210 ;; This checks whether all code is nicely formatted. The above
2211 ;; ‘refer-to-inputs’ phase breaks this pedantry, so disable it.
2212 (delete-file "t/perltidy.t")
2213 ;; Update the manifest so t/manifest.t happily passes.
2214 (substitute* "MANIFEST"
2215 (("t/perltidy.t\n") ""))))
2216 (add-after 'install 'augment-library-path
2217 (lambda* (#:key inputs outputs #:allow-other-keys)
2218 (let* ((out (assoc-ref outputs "out"))
2219 (bin (string-append out "/bin")))
2220 (with-directory-excursion bin
2221 (for-each
2222 (lambda (program)
2223 (wrap-program program
2224 `("PERL5LIB" ":" prefix
2225 ,(map (lambda (file-name)
2226 (string-append file-name
2227 "/lib/perl5/site_perl"))
2228 (cons out
2229 (map (lambda (input)
2230 (assoc-ref inputs input))
2231 ;; These may be propagated and hence
2232 ;; not explicitly listed as inputs.
2233 (list "perl-class-data-inheritable"
2234 "perl-devel-stacktrace"
2235 "perl-exception-class"
2236 "perl-tk"
2237 "perl-try-tiny"
2238 "perl-x11-protocol"
2239 "perl-x11-protocol-other")))))))
2240 (find-files "." ".*")))))))))
2241 (native-inputs
2242 (list perl-cpan-changes
2243 perl-file-slurp
2244 perl-file-which
2245 perl-module-build
2246 perl-readonly
2247 perl-test-differences
2248 perl-test-distmanifest
2249 perl-test-perltidy
2250 perl-test-pod
2251 perl-test-pod-coverage
2252 perl-test-trap
2253 perl-tidy))
2254 (inputs
2255 (list bash-minimal ;for wrap-program
2256 perl-exception-class
2257 perl-sort-naturally
2258 perl-tk
2259 perl-try-tiny
2260 perl-x11-protocol
2261 perl-x11-protocol-other
2262 xterm))
2263 ;; The clusterssh.sourceforge.net address requires login to view
2264 (home-page "https://sourceforge.net/projects/clusterssh/")
2265 (synopsis "Secure concurrent multi-server terminal control")
2266 (description
2267 "ClusterSSH controls a number of xterm windows via a single graphical
2268console window to allow commands to be interactively run on multiple servers
2269over ssh connections.")
2270 (license license:gpl2+)))
2271
2272(define-public realmd
2273 (package
2274 (name "realmd")
2275 (version "0.17.1")
2276 (source
2277 (origin
2278 (method git-fetch)
2279 (uri (git-reference
2280 (url "https://github.com/freedesktop/realmd")
2281 (commit version)))
2282 (file-name (git-file-name name version))
2283 (sha256
2284 (base32 "063cf4jkpfj548a7dxmffrpbh3j413nq3zy1zzj20lcfffnnaqwn"))))
2285 (build-system gnu-build-system)
2286 (arguments
2287 `(#:configure-flags '("--with-systemd-unit-dir=no"
2288 "--with-systemd-journal=no"
2289 "--with-distro=GNU guix"
2290 "--disable-doc")
2291 #:phases
2292 (modify-phases %standard-phases
2293 (add-before 'install 'fix-service
2294 (lambda* (#:key outputs #:allow-other-keys)
2295 ;; GNU Guix does not have service config file, therefore we remove
2296 ;; the line that copies the file.
2297 (substitute* "Makefile"
2298 ((".*/service/realmd-.*") "")))))))
2299 (native-inputs
2300 (list autoconf
2301 automake
2302 `(,glib "bin")
2303 intltool
2304 pkg-config
2305 python))
2306 (inputs
2307 (list glib mit-krb5 openldap polkit))
2308 (synopsis "DBus service for network authentication")
2309 (description "This package provides an on demand system DBus service.
2310It allows callers to configure network authentication and domain membership
2311in a standard way. Realmd discovers information about the domain or realm
2312automatically and does not require complicated configuration in order to join
2313a domain or realm. Dbus system service that manages discovery and enrollment in
2314realms/domains like Active Directory or IPA.")
2315 (home-page "https://www.freedesktop.org/software/realmd/")
2316 (license license:lgpl2.1+)))
2317
2318(define-public rename
2319 (package
2320 (name "rename")
2321 (version "2.02")
2322 (source (origin
2323 (method url-fetch)
2324 (uri (string-append
2325 "mirror://cpan/authors/id/R/RM/RMBARKER/File-Rename-"
2326 version ".tar.gz"))
2327 (sha256
2328 (base32
2329 "1pr0qmsb9gb5xqwpicabnr5jcxdbbvz1mgdqw3d3d0dn12060ysk"))))
2330 (build-system perl-build-system)
2331 (arguments
2332 `(#:phases
2333 (modify-phases %standard-phases
2334 (add-after 'install 'find-itself
2335 ;; Fix run-time 'Can't locate File/Rename.pm in @INC' failure.
2336 (lambda* (#:key outputs #:allow-other-keys)
2337 (let* ((out (assoc-ref outputs "out"))
2338 (bin (string-append out "/bin")))
2339 (with-directory-excursion bin
2340 (for-each
2341 (lambda (program)
2342 (wrap-program program
2343 `("PERL5LIB" ":" prefix
2344 (,(string-append out "/lib/perl5/site_perl")))))
2345 (find-files "." ".*")))))))))
2346 (native-inputs
2347 (list perl-module-build perl-test-pod perl-test-pod-coverage))
2348 (inputs (list bash-minimal)) ;for wrap-program
2349 (home-page "https://metacpan.org/pod/distribution/File-Rename/rename.PL")
2350 (synopsis "Perl extension for renaming multiple files")
2351 (description
2352 "This package provides a Perl interface (@code{Perl::Rename}) as well
2353as a command-line utility (@command{rename}) that can rename multiple files
2354at once based on a Perl regular expression.")
2355 (license license:perl-license)))
2356
2357(define-public rottlog
2358 (package
2359 (name "rottlog")
2360 (version "0.72.2")
2361 (source (origin
2362 (method url-fetch)
2363 (uri (string-append "mirror://gnu/rottlog/rottlog-"
2364 version ".tar.gz"))
2365 (sha256
2366 (base32
2367 "0751mb9l2f0jrk3vj6q8ilanifd121dliwk0c34g8k0dlzsv3kd7"))
2368 (modules '((guix build utils)))
2369 (patches (search-patches "rottlog-direntry.patch"))
2370 (snippet
2371 '(begin
2372 ;; Delete outdated Autotools build system files.
2373 (for-each delete-file
2374 (list "Makefile.in"
2375 "config.guess"
2376 "config.sub"
2377 "configure"
2378 "depcomp"
2379 "install-sh"
2380 "mdate-sh"
2381 "missing"
2382 "mkinstalldirs"
2383 "texinfo.tex"))
2384 (substitute* "Makefile.am"
2385 (("mkdir -p \\$\\(ROTT_STATDIR\\)")
2386 ;; Don't attempt to create /var/lib/rottlog.
2387 "true"))))))
2388 (build-system gnu-build-system)
2389 (arguments
2390 (list
2391 #:configure-flags #~(list "ROTT_ETCDIR=/etc/rottlog" ;rc file location
2392 "--localstatedir=/var")
2393 ;; Install example config files in OUT/etc.
2394 #:make-flags #~(list (string-append "ROTT_ETCDIR=" #$output "/etc")
2395 ;; Avoid the default -o root -g root arguments,
2396 ;; which fail due to not running as root.
2397 "INSTALL_RC=install"
2398 "INSTALL_SCRIPT=install")
2399 #:phases
2400 #~(modify-phases %standard-phases
2401 (add-after 'unpack 'patch-paths
2402 (lambda* (#:key inputs #:allow-other-keys)
2403 (substitute* "rc/rc"
2404 (("/usr/sbin/sendmail")
2405 (search-input-file inputs "/bin/mail")))
2406 (with-fluids ((%default-port-encoding "ISO-8859-1"))
2407 (substitute* "src/rottlog"
2408 (("awk")
2409 (search-input-file inputs "/bin/awk"))))))
2410 (add-after 'build 'set-packdir
2411 (lambda _
2412 ;; Set a default location for archived logs.
2413 (substitute* "rc/rc"
2414 (("packdir=\"\"")
2415 "packdir=\"/var/log\""))))
2416 (add-before 'install 'tweak-rc-weekly
2417 (lambda* (#:key inputs #:allow-other-keys)
2418 (substitute* "rc/weekly"
2419 (("/bin/kill")
2420 (search-input-file inputs "/bin/kill"))
2421 (("syslogd\\.pid")
2422 ;; The file is called 'syslog.pid' (no 'd').
2423 "syslog.pid"))))
2424 (add-after 'install 'install-info
2425 (lambda _
2426 (invoke "make" "install-info"))))))
2427 (native-inputs (list autoconf automake texinfo util-linux)) ; for 'cal'
2428 (inputs (list coreutils gawk mailutils))
2429 (home-page "https://www.gnu.org/software/rottlog/")
2430 (synopsis "Log rotation and management")
2431 (description
2432 "GNU Rot[t]log is a program for managing log files. It is used to
2433automatically rotate out log files when they have reached a given size or
2434according to a given schedule. It can also be used to automatically compress
2435and archive such logs. Rot[t]log will mail reports of its activity to the
2436system administrator.")
2437 (license license:gpl3+)))
2438
2439(define-public sudo
2440 (package
2441 (name "sudo")
2442 (version "1.9.17p1")
2443 (source (origin
2444 (method url-fetch)
2445 (uri
2446 (list (string-append "https://www.sudo.ws/sudo/dist/sudo-"
2447 version ".tar.gz")
2448 (string-append "ftp://ftp.sudo.ws/pub/sudo/OLD/sudo-"
2449 version ".tar.gz")))
2450 (sha256
2451 (base32
2452 "0cjx8lkwlqz03psnaia07rz9mpyn5ilpixvqi9rrf8872ykpwq7z"))
2453 (modules '((guix build utils)))
2454 (snippet
2455 '(begin
2456 (delete-file-recursively "lib/zlib")))))
2457 (build-system gnu-build-system)
2458 (outputs (list "out"))
2459 (arguments
2460 (list #:configure-flags
2461 #~(list (string-append "--docdir=" #$output
2462 "/share/doc/" #$name "-" #$version)
2463
2464 "--with-logpath=/var/log/sudo.log"
2465 "--with-rundir=/var/run/sudo" ; must be cleaned up at boot time
2466 "--with-vardir=/var/db/sudo"
2467 "--with-iologdir=/var/log/sudo-io"
2468
2469 ;; 'visudo.c' expects _PATH_MV to be defined, but glibc doesn't
2470 ;; provide it.
2471 (string-append "CPPFLAGS=-D_PATH_MV=\\\""
2472 (search-input-file %build-inputs "/bin/mv")
2473 "\\\"")
2474
2475 ;; When cross-compiling, assume we have a working 'snprintf' and
2476 ;; 'vsnprintf' (which we do, when using glibc). The default
2477 ;; choice fails with undefined references to 'sudo_snprintf' &
2478 ;; co. when linking.
2479 #$@(if (%current-target-system)
2480 '("ac_cv_have_working_snprintf=yes"
2481 "ac_cv_have_working_vsnprintf=yes")
2482 '()))
2483
2484 ;; Avoid non-determinism; see <http://bugs.gnu.org/21918>.
2485 #:parallel-build? #f
2486
2487 #:phases
2488 #~(modify-phases %standard-phases
2489 (add-before 'configure 'pre-configure
2490 (lambda _
2491 (substitute* "src/sudo_usage.h.in"
2492 ;; Do not capture 'configure' arguments since we would
2493 ;; unduly retain references, and also because the
2494 ;; CPPFLAGS above would close the string literal
2495 ;; prematurely.
2496 (("@CONFIGURE_ARGS@")
2497 "\"\""))
2498 (substitute* (find-files "." "Makefile\\.in")
2499 ;; Allow installation as non-root.
2500 (("-o [[:graph:]]+ -g [[:graph:]]+")
2501 "")
2502 ;; Don't try to create /etc/sudoers.
2503 (("^install: (.*)install-sudoers(.*)" _ before
2504 after)
2505 (string-append "install: " before after "\n"))
2506 ;; Don't try to create /run/sudo.
2507 (("\\$\\(DESTDIR\\)\\$\\(rundir\\)")
2508 "$(TMPDIR)/dummy")
2509 ;; Install example sudo{,_logsrvd}.conf to the right place.
2510 (("\\$\\(DESTDIR\\)\\$\\(sysconfdir\\)")
2511 "$(DESTDIR)/$(docdir)/examples")
2512 ;; Don't try to create /var/db/sudo.
2513 (("\\$\\(DESTDIR\\)\\$\\(vardir\\)")
2514 "$(TMPDIR)/dummy"))
2515
2516 ;; ‘Checking existing [/etc/]sudoers file for syntax errors’ is
2517 ;; not the task of the build system, and fails.
2518 (substitute* "plugins/sudoers/Makefile.in"
2519 (("^pre-install:" match)
2520 (string-append match "\ndisabled-" match))))))
2521
2522 ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
2523 ;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
2524 #:tests? #f))
2525 (native-inputs
2526 (list groff))
2527 (inputs
2528 (append (list coreutils zlib)
2529 (if (target-hurd?)
2530 (list libxcrypt)
2531 (list linux-pam))))
2532 (home-page "https://www.sudo.ws/")
2533 (synopsis "Run commands as root")
2534 (description
2535 "Sudo (su \"do\") allows a system administrator to delegate authority to
2536give certain users (or groups of users) the ability to run some (or all)
2537commands as root or another user while providing an audit trail of the
2538commands and their arguments.")
2539
2540 ;; See <http://www.sudo.ws/sudo/license.html>.
2541 (license license:x11)))
2542
2543(define-public opendoas
2544 (package
2545 (name "opendoas")
2546 (version "6.8.2")
2547 (source (origin
2548 (method git-fetch)
2549 (uri (git-reference
2550 (url "https://github.com/Duncaen/OpenDoas")
2551 (commit (string-append "v" version))))
2552 (file-name (git-file-name name version))
2553 (sha256
2554 (base32
2555 "1qrin7x9vcprk5pwjbr3w8z2qj8hk6xbvxicdhlk27xr6vcr1qzn"))))
2556 (build-system gnu-build-system)
2557 (arguments
2558 `(#:phases
2559 (modify-phases %standard-phases
2560 (add-before 'configure 'pre-configure
2561 (lambda* (#:key outputs #:allow-other-keys)
2562 (substitute* "GNUmakefile"
2563 (("^\tchown.*$") ""))
2564 ;; OpenDoas looks for binaries in safepath when a rule specifies a
2565 ;; relative command, such as “permit keepenv :wheel cmd guix”.
2566 (substitute* "doas.c"
2567 (("safepath =" match)
2568 (string-append match " \""
2569 "/run/privileged/bin:"
2570 "/run/current-system/profile/bin:"
2571 "/run/current-system/profile/sbin:"
2572 "\" ")))))
2573 (replace 'configure
2574 ;; The configure script doesn't accept most of the default flags.
2575 (lambda* (#:key configure-flags #:allow-other-keys)
2576 ;; The configure script can be told which compiler to use only
2577 ;; through environment variables.
2578 (setenv "CC" ,(cc-for-target))
2579 (apply invoke "./configure" configure-flags))))
2580 #:configure-flags
2581 (list (string-append "--prefix=" (assoc-ref %outputs "out"))
2582 "--with-timestamp")
2583 ;; Compiler choice is not carried over from the configure script.
2584 #:make-flags
2585 (list (string-append "CC=" ,(cc-for-target)))
2586 #:tests? #f)) ; no test suite
2587 (native-inputs
2588 (list bison))
2589 (inputs
2590 (list libxcrypt))
2591 (home-page "https://github.com/Duncaen/OpenDoas")
2592 (synopsis "Portable version of OpenBSD's doas command")
2593 (description "Doas is a minimal replacement for the venerable sudo. It was
2594initially written by Ted Unangst of the OpenBSD project to provide 95% of the
2595features of sudo with a fraction of the codebase.")
2596 (license (list license:bsd-3 ; libbsd/*
2597 license:isc)))) ; everything else
2598
2599(define-public wpa-supplicant-minimal
2600 (package
2601 (name "wpa-supplicant-minimal")
2602 (version "2.10")
2603 (source (origin
2604 (method url-fetch)
2605 (uri (string-append
2606 "https://w1.fi/releases/wpa_supplicant-"
2607 version ".tar.gz"))
2608 (sha256
2609 (base32
2610 "0bvvw7bx149a57llzrwzlpggyym84f8jdd4abwsk0f2b2pjpmpr0"))
2611 (modules '((guix build utils)))
2612 (snippet
2613 '(begin
2614 (substitute* "wpa_supplicant/defconfig"
2615 ;; Disable D-Bus to save ~14MiB on the closure size.
2616 (("^CONFIG_CTRL_IFACE_DBUS" line _)
2617 (string-append "#" line)))
2618 #t))))
2619 (build-system gnu-build-system)
2620 (arguments
2621 `(#:phases
2622 (modify-phases %standard-phases
2623 (replace 'configure
2624 (lambda _
2625 (chdir "wpa_supplicant")
2626 (copy-file "defconfig" ".config")
2627 (let ((port (open-file ".config" "al")))
2628 (display "
2629 CONFIG_DEBUG_SYSLOG=y
2630
2631 CONFIG_TLS=openssl
2632
2633 CONFIG_DRIVER_NL80211=y
2634 CFLAGS += $(shell pkg-config libnl-3.0 --cflags)
2635 CONFIG_LIBNL32=y
2636 CONFIG_READLINE=y\n" port)
2637 (close-port port))
2638 ;; Make sure we have a pkg-config when cross compiling
2639 (substitute* '(".config"
2640 "Android.mk"
2641 "Makefile"
2642 "dbus/Makefile")
2643 (("pkg-config")
2644 (or (which "pkg-config")
2645 (which (string-append ,(%current-target-system)
2646 "-pkg-config")))))
2647 #t))
2648 (add-after 'install 'install-documentation
2649 (lambda* (#:key outputs #:allow-other-keys)
2650 (let* ((out (assoc-ref outputs "out"))
2651 (doc (string-append out "/share/doc/wpa-supplicant"))
2652 (man (string-append out "/share/man"))
2653 (man5 (string-append man "/man5"))
2654 (man8 (string-append man "/man8")))
2655 (define (copy-man-page target)
2656 (lambda (file)
2657 (install-file file target)))
2658
2659 (mkdir-p man5) (mkdir man8)
2660 (for-each (copy-man-page man5)
2661 (find-files "doc/docbook" "\\.5"))
2662 (for-each (copy-man-page man8)
2663 (find-files "doc/docbook" "\\.8"))
2664
2665 ;; wpa_supplicant.conf(5) does not explain all configuration
2666 ;; options but refers to the example config file, so install it
2667 ;; along with READMEs.
2668 (for-each (lambda (file)
2669 (install-file file doc))
2670 '("README" "README-DPP" "README-HS20"
2671 "README-P2P" "README-WPS"
2672 "wpa_supplicant.conf"))
2673 #t))))
2674
2675 #:make-flags (list (string-append "CC=" ,(cc-for-target))
2676 (string-append "BINDIR=" (assoc-ref %outputs "out")
2677 "/sbin")
2678 (string-append "LIBDIR=" (assoc-ref %outputs "out")
2679 "/lib"))
2680 #:tests? #f))
2681 (inputs
2682 (list readline libnl openssl))
2683 (native-inputs
2684 (list pkg-config))
2685 (home-page "https://w1.fi/wpa_supplicant/")
2686 (synopsis "Connecting to WPA and WPA2-protected wireless networks")
2687 (description
2688 "wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
2689802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in
2690the client stations. It implements key negotiation with a WPA Authenticator
2691and it controls the roaming and IEEE 802.11 authentication/association of the
2692WLAN driver.
2693
2694This package provides the @code{wpa_supplicant} daemon and the @code{wpa_cli}
2695command.")
2696
2697 ;; In practice, this is linked against Readline, which makes it GPLv3+.
2698 (license license:bsd-3)
2699
2700 (properties `((cpe-name . "wpa_supplicant")))))
2701
2702(define-public wpa-supplicant
2703 (package (inherit wpa-supplicant-minimal)
2704 (name "wpa-supplicant")
2705 (inputs (modify-inputs (package-inputs wpa-supplicant-minimal)
2706 (prepend dbus)))
2707 (source (origin
2708 (inherit (package-source wpa-supplicant-minimal))
2709 (patches (search-patches
2710 "wpa-supplicant-dbus-group-policy.patch"))))
2711 (arguments
2712 (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
2713 ((#:phases phases)
2714 `(modify-phases ,phases
2715 (add-after 'configure 'set-config-options
2716 (lambda _
2717 (let ((port (open-file ".config" "al")))
2718 ;; Enable Opportunistic Wireless Encryption (OWE) and D-Bus
2719 ;; support.
2720 (display "
2721 CONFIG_OWE=y
2722 CONFIG_CTRL_IFACE_DBUS_NEW=y
2723 CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
2724 (close-port port))))
2725 (add-after 'install-documentation 'install-dbus-conf
2726 (lambda* (#:key outputs #:allow-other-keys)
2727 (let* ((out (assoc-ref outputs "out"))
2728 (interfaces (string-append out "/etc/dbus-1/system.d"))
2729 (services (string-append out
2730 "/share/dbus-1/system-services")))
2731 (mkdir-p interfaces)
2732 (copy-file "dbus/dbus-wpa_supplicant.conf"
2733 (string-append interfaces "/wpa_supplicant.conf"))
2734 (mkdir-p services)
2735 (copy-file "dbus/fi.w1.wpa_supplicant1.service"
2736 (string-append services
2737 "/fi.w1.wpa_supplicant1.service")))
2738 #t))))))))
2739
2740(define-public wpa-supplicant-gui
2741 (package
2742 (inherit wpa-supplicant)
2743 (name "wpa-supplicant-gui")
2744 (inputs (modify-inputs (package-inputs wpa-supplicant)
2745 (prepend qtbase-5 qtsvg-5 qtwayland-5)))
2746 (native-inputs
2747 ;; For icons.
2748 (modify-inputs (package-native-inputs wpa-supplicant)
2749 (prepend imagemagick/stable
2750 inkscape/pinned)))
2751 (build-system qt-build-system)
2752 (arguments
2753 (list
2754 #:tests? #f ; no tests
2755 ;; Make sure the (rarely updated) package 'imagemagick/stable'
2756 ;; does not end up in the closure.
2757 #:disallowed-references (list (this-package-native-input "imagemagick"))
2758 #:modules '((guix build qt-build-system)
2759 ((guix build gnu-build-system) #:prefix gnu:)
2760 (guix build utils))
2761 #:phases
2762 #~(modify-phases %standard-phases
2763 (add-after 'unpack 'chdir
2764 (lambda _ (chdir "wpa_supplicant/wpa_gui-qt4")))
2765 (replace 'configure
2766 (lambda _ (invoke "qmake" "wpa_gui.pro")))
2767 (replace 'build (assoc-ref gnu:%standard-phases 'build))
2768 (add-after 'build 'build-icons
2769 (lambda _
2770 ;; Inkscape complains (but works) without a writable $HOME.
2771 (setenv "HOME" "/tmp")
2772 (invoke "make" "-C" "icons")))
2773 (replace 'install
2774 (lambda _
2775 (install-file "wpa_gui" (string-append #$output "/bin"))
2776 (install-file "wpa_gui.desktop"
2777 (string-append #$output
2778 "/share/applications"))
2779 (copy-recursively "icons/hicolor"
2780 (string-append #$output
2781 "/share/icons/hicolor")))))))
2782 (synopsis "Graphical user interface for WPA supplicant")))
2783
2784(define-public hostapd
2785 (package
2786 (name "hostapd")
2787 (version "2.10")
2788 (source (origin
2789 (method url-fetch)
2790 (uri (string-append "https://w1.fi/releases/hostapd-" version
2791 ".tar.gz"))
2792 (sha256
2793 (base32
2794 "0pcik0a6yin9nib02frjhaglmg44hwik086iwg1751b7kdwpqvi0"))))
2795 (build-system gnu-build-system)
2796 (arguments
2797 (list #:phases
2798 #~(modify-phases %standard-phases
2799 (replace 'configure
2800 (lambda _
2801 ;; This is mostly copied from 'wpa-supplicant' above.
2802 (chdir "hostapd")
2803 (copy-file "defconfig" ".config")
2804 (let ((port (open-file ".config" "al")))
2805 (display "CONFIG_LIBNL32=y
2806 CONFIG_IEEE80211R=y
2807 CONFIG_IEEE80211N=y
2808 CONFIG_IEEE80211AC=y
2809 CONFIG_FULL_DYNAMIC_VLAN=y
2810 CONFIG_ACS=y\n" port)
2811 (close-port port))))
2812 (add-after 'unpack 'patch-pkg-config
2813 (lambda _
2814 (substitute* "src/drivers/drivers.mak"
2815 (("pkg-config")
2816 #$(pkg-config-for-target)))))
2817 (add-after 'install 'install-man-pages
2818 (lambda* (#:key outputs #:allow-other-keys)
2819 (let* ((man (string-append #$output "/share/man"))
2820 (man1 (string-append man "/man1"))
2821 (man8 (string-append man "/man8")))
2822 (define (copy-man-page target)
2823 (lambda (file)
2824 (install-file file target)))
2825 (for-each (copy-man-page man1)
2826 (find-files "." "\\.1"))
2827 (for-each (copy-man-page man8)
2828 (find-files "." "\\.8"))))))
2829 #:make-flags
2830 #~(list (string-append "CC=" #$(cc-for-target))
2831 (string-append "BINDIR=" #$output "/sbin")
2832 (string-append "LIBDIR=" #$output "/lib"))
2833 #:tests? #f))
2834 (native-inputs (list pkg-config))
2835
2836 ;; There's an optional dependency on SQLite.
2837 (inputs (list openssl libnl))
2838 (home-page "https://w1.fi/hostapd/")
2839 (synopsis "Daemon for Wi-Fi access points and authentication servers")
2840 (description
2841 "hostapd is a user-space daemon for WiFi access points and authentication
2842servers. It implements IEEE 802.11 access point management, IEEE
2843802.1X/WPA/WPA2/EAP Authenticators, RADIUS client, EAP server, and RADIUS
2844authentication server.")
2845
2846 ;; Same license as wpa_supplicant.
2847 (license license:bsd-3)))
2848
2849(define-public dmidecode
2850 (package
2851 (name "dmidecode")
2852 (version "3.6")
2853 (source
2854 (origin
2855 (method url-fetch)
2856 (uri (string-append "mirror://savannah/dmidecode/dmidecode-"
2857 version ".tar.xz"))
2858 (sha256
2859 (base32 "1blbvmsxba71fmjxckh0cn7x68kim7qlx6ilv0df7brxxkrna374"))))
2860 (build-system gnu-build-system)
2861 (arguments
2862 (list #:tests? #f ; no 'check' target
2863 #:make-flags
2864 #~(list (string-append "CC=" #$(cc-for-target))
2865 (string-append "prefix=" #$output))
2866 #:phases
2867 #~(modify-phases %standard-phases
2868 (delete 'configure)))) ; no configure script
2869 (home-page "https://www.nongnu.org/dmidecode/")
2870 (synopsis "Read hardware information from the BIOS")
2871 (description
2872 "Dmidecode reports information about your system's hardware as described
2873in your system BIOS according to the SMBIOS/DMI standard. This typically
2874includes system manufacturer, model name, serial number, BIOS version, asset
2875tag as well as a lot of other details of varying level of interest and
2876reliability depending on the manufacturer. This will often include usage
2877status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory
2878module slots, and the list of I/O ports (e.g. serial, parallel, USB).")
2879 (license license:gpl2+)))
2880
2881(define-public acpica
2882 (package
2883 (name "acpica")
2884 (version "20250807")
2885 (source
2886 (origin
2887 (method git-fetch)
2888 (uri (git-reference
2889 (url "https://github.com/acpica/acpica")
2890 (commit version)))
2891 (file-name (git-file-name name version))
2892 (sha256
2893 (base32 "06jh7y9aimw132hgcivn144rp6br2r30jqizh7hrq3nl589f73ir"))))
2894 (build-system gnu-build-system)
2895 (native-inputs (list flex bison))
2896 (arguments
2897 (list
2898 #:make-flags
2899 #~(list (string-append "PREFIX=" #$output)
2900 (string-append "CC=" #$(cc-for-target))
2901 "HOST=_LINUX"
2902 "OPT_CFLAGS=-Wall -fno-strict-aliasing")
2903 #:tests? #f ;no test suite
2904 #:phases
2905 #~(modify-phases %standard-phases
2906 (delete 'configure)))) ;no configure script
2907 (home-page "https://acpica.org/")
2908 (synopsis "Tools for the development and debugging of ACPI tables")
2909 (description
2910 "The @acronym{ACPICA, ACPI Component Architecture} project provides an
2911OS-independent reference implementation of the @acronym{ACPI, Advanced
2912Configuration and Power Interface} specification. ACPICA code contains those
2913portions of ACPI meant to be directly integrated into the host OS as a
2914kernel-resident subsystem, and a small set of tools to assist in developing and
2915debugging ACPI tables.
2916
2917This package contains only the user-space tools needed for ACPI table
2918development, not the kernel implementation of ACPI.")
2919 (license license:gpl2))) ;dual GPLv2/ACPICA Licence
2920
2921(define-public s-tui
2922 (package
2923 (name "s-tui")
2924 (version "1.2.0")
2925 (source
2926 (origin
2927 (method git-fetch)
2928 (uri (git-reference
2929 (url "https://github.com/amanusk/s-tui")
2930 (commit (string-append "v" version))))
2931 (file-name (git-file-name name version))
2932 (sha256
2933 (base32 "08mfclgdy6cb8xgp8sc7fpm4qxay37j71b1b3niywi6x206i5m2m"))))
2934 (build-system pyproject-build-system)
2935 (native-inputs
2936 (list python-pytest
2937 python-setuptools
2938 python-wheel))
2939 (inputs
2940 (list python-psutil
2941 python-urwid))
2942 (home-page "https://github.com/amanusk/s-tui")
2943 (synopsis "Interactive terminal stress test and monitoring tool")
2944 (description
2945 "The Stress Terminal UI displays graphs of the CPU frequency,
2946utilization, temperature and power.")
2947 (license license:gpl2+)))
2948
2949(define-public stress
2950 (package
2951 (name "stress")
2952 (version "1.0.7")
2953 (source (origin
2954 (method url-fetch)
2955 (uri (string-append "mirror://debian/pool/main/s/stress/stress_"
2956 version ".orig.tar.gz"))
2957 (sha256
2958 (base32
2959 "1cg0mklfrwfyzwqkzidd0151r8n2jgbiiqz1v0p3w4q62mkmdand"))
2960 (modules '((guix build utils)))
2961 (snippet
2962 #~(begin
2963 ;; The build fails with "implicit declaration of function
2964 ;; 'rpl_malloc'; did you mean 'realloc'?" when building
2965 ;; for RISCV64 target if "AC_FUNC_MALLOC" macro is present.
2966 ;; Remove it.
2967 (substitute* "configure.ac"
2968 (("AC_FUNC_MALLOC") ""))))))
2969 (build-system gnu-build-system)
2970 (native-inputs
2971 (list autoconf automake))
2972 (home-page "https://packages.debian.org/sid/stress")
2973 (synopsis "Impose load on and stress test a computer system")
2974 (description
2975 "Stress is a tool that imposes a configurable amount of CPU, memory, I/O,
2976or disk stress on a POSIX-compliant operating system and reports any errors it
2977detects.
2978
2979Stress is not a benchmark. It is a tool used by system administrators to
2980evaluate how well their systems will scale, by kernel programmers to evaluate
2981perceived performance characteristics, and by systems programmers to expose
2982the classes of bugs which only or more frequently manifest themselves when the
2983system is under heavy load.")
2984 (license license:gpl2+)))
2985
2986(define-public stress-ng
2987 (package
2988 (name "stress-ng")
2989 (version "0.19.06")
2990 (source
2991 (origin
2992 (method git-fetch)
2993 (uri (git-reference
2994 (url "https://github.com/ColinIanKing/stress-ng")
2995 (commit (string-append "V" version))))
2996 (file-name (git-file-name name version))
2997 (sha256
2998 (base32 "0fxyxxswkx5ay8i2w8ajsiagkysh8d41l88vls9c4rc35wxzhwf6"))))
2999 (build-system gnu-build-system)
3000 (arguments
3001 ;; XXX The test suite seems to cause instability on the VisionFive 2
3002 ;; build machines, maybe it's stressing them as intended but this is
3003 ;; unhelpful.
3004 (list #:tests? (and (not (%current-target-system))
3005 (not (target-riscv64?)))
3006 #:make-flags
3007 #~(list (string-append "CC=" #$(cc-for-target))
3008 (string-append "BINDIR=" #$output "/bin")
3009 ;; XXX Really: MAN1DIR, or man pages won't be found.
3010 (string-append "MANDIR=" #$output "/share/man/man1")
3011 (string-append "JOBDIR=" #$output
3012 "/share/stress-ng/example-jobs")
3013 (string-append "BASHDIR=" #$output
3014 "/share/bash-completion/completions"))
3015 ;; There is also a fast-test-all that very briefly runs every single
3016 ;; stressor, but its utility is questionable compared to its cost.
3017 ;; See this package's git history for details & which tests to skip.
3018 #:test-target "lite-test"
3019 #:phases
3020 #~(modify-phases %standard-phases
3021 (delete 'configure)))) ;no configure script
3022 (inputs
3023 (list keyutils
3024 kmod
3025 libaio
3026 libbsd
3027 libcap
3028 libgcrypt
3029 zlib))
3030 (home-page "https://github.com/ColinIanKing/stress-ng")
3031 (synopsis "Load and stress-test a computer system in various ways")
3032 (description
3033 "stress-ng stress-tests a computer system by exercising both physical
3034subsystems as operating system kernel interfaces. It can stress the CPU, cache,
3035disk, memory, socket and pipe I/O, scheduling, and much more, in various
3036selectable ways. This can trip hardware issues such as thermal overruns as well
3037as operating system bugs that occur only when a system is being thrashed hard.
3038
3039You can also measure test throughput rates, which can be useful to observe
3040performance changes across different operating system releases or types of
3041hardware. However, stress-ng is not a benchmark. Use it with caution: some of
3042the tests can make poorly designed hardware run dangerously hot or make the
3043whole system lock up.
3044
3045Compared to its inspiration, @command{stress}, @command{stress-ng} offers many
3046additional options such as the number of bogo operations to run, execution
3047metrics, verification of memory and computational operations, and considerably
3048more stress mechanisms.")
3049 (license license:gpl2+)))
3050
3051(define-public tree
3052 (package
3053 (name "tree")
3054 (version "2.2.1")
3055 (source (origin
3056 (method url-fetch)
3057 (uri (string-append "https://oldmanprogrammer.net/tar/tree/"
3058 "tree-" version ".tgz"))
3059 (sha256
3060 (base32 "1v5j8igc5yjzs7w63010p8il5rw5qb1zy032l2ni3hy0g3f4bb38"))))
3061 (build-system gnu-build-system)
3062 (arguments
3063 (list
3064 #:phases
3065 #~(modify-phases %standard-phases
3066 (delete 'configure)) ; No configure script.
3067 #:tests? #f ; No check target.
3068 #:make-flags
3069 #~(list (string-append "PREFIX=" #$output)
3070 (string-append "CC=" #$(cc-for-target)))))
3071 (synopsis "Recursively list the contents of a directory")
3072 (description
3073 "Tree is a recursive directory listing command that produces a depth
3074indented listing of files, which is colorized ala dircolors if the LS_COLORS
3075environment variable is set and output is to tty.")
3076 (home-page "https://oldmanprogrammer.net/source.php?dir=projects/tree")
3077 (license license:gpl2+)))
3078
3079(define-public lr
3080 (package
3081 (name "lr")
3082 (version "2.0.1")
3083 (source
3084 (origin
3085 (method git-fetch)
3086 (uri (git-reference
3087 (url "https://git.vuxu.org/lr/")
3088 (commit (string-append "v" version))))
3089 (file-name (git-file-name name version))
3090 (sha256
3091 (base32 "0mqhcgi4v3zzic0ikf7ja4km1mik29gdp15q8qwjw5bmh22d74ff"))))
3092 (build-system gnu-build-system)
3093 (arguments
3094 (list #:tests? #f ; There are no tests.
3095 #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
3096 (string-append "PREFIX=" %output))
3097 #:phases #~(modify-phases %standard-phases
3098 (delete 'configure))))
3099 (synopsis "Tool to generate customized file listings")
3100 (description
3101 "lr is a tool for generating file listings, which includes the best
3102features of ls(1), find(1), stat(1) and du(1).")
3103 (home-page "https://git.vuxu.org/lr/about")
3104 (license license:expat)))
3105
3106(define-public direvent
3107 (package
3108 (name "direvent")
3109 (version "5.4")
3110 (source (origin
3111 (method url-fetch)
3112 (uri (string-append "mirror://gnu/direvent/direvent-"
3113 version ".tar.gz"))
3114 (sha256
3115 (base32
3116 "1flmswj1by9afqal55hc70l2hshcawyn0j2if92y6rxb58cwdfqx"))))
3117 (build-system gnu-build-system)
3118 (arguments
3119 (list #:phases
3120 #~(modify-phases %standard-phases
3121 (add-before 'build 'substitute-file-names
3122 (lambda* (#:key inputs #:allow-other-keys)
3123 ;; Use the right shell when executing the watcher and
3124 ;; user-provided shell commands.
3125 (let ((bash (assoc-ref inputs "bash")))
3126 (substitute* '("src/direvent.c" "src/progman.c")
3127 (("\"/bin/sh\"")
3128 (string-append "\"" bash "/bin/sh\""))))
3129
3130 ;; Adjust the test suite similarly.
3131 (substitute* "tests/testsuite"
3132 (("(SHELL=|#![[:space:]]*)/bin/sh" _ prefix)
3133 (string-append prefix (which "sh")))
3134 (("/bin/kill")
3135 (which "kill"))))))))
3136 (home-page "https://www.gnu.org.ua/software/direvent/")
3137 (synopsis "Daemon to monitor directories for events such as file removal")
3138 (description
3139 "A daemon that monitors directories for events, such as creating,
3140deleting or modifying files. It can monitor different sets of directories for
3141different events. When an event is detected, direvent calls a specified
3142external program with information about the event, such as the location
3143within the file system where it occurred. Thus, \"direvent\" provides an
3144easy way to react immediately if given files undergo changes, for example, to
3145track changes in important system configuration files.")
3146 (license license:gpl3+)))
3147
3148(define-public libcap-ng
3149 (package
3150 (name "libcap-ng")
3151 (version "0.9")
3152 (source (origin
3153 (method git-fetch)
3154 (uri (git-reference
3155 (url "https://github.com/stevegrubb/libcap-ng")
3156 (commit (string-append "v" version))))
3157 (file-name (git-file-name name version))
3158 (sha256
3159 (base32
3160 "0izrrh2kmhi6dcy5iqcccmx90nwlaqcglhc60sl8n5ds8il14pi8"))))
3161 (build-system gnu-build-system)
3162 (arguments
3163 `(#:configure-flags
3164 (list "--disable-static"
3165 "--without-python")))
3166 (inputs
3167 (list libbpf))
3168 (native-inputs
3169 (list autoconf automake libtool pkg-config))
3170 (home-page "https://people.redhat.com/sgrubb/libcap-ng/")
3171 (synopsis "Library for more easily working with POSIX capabilities")
3172 (description
3173 "The libcap-ng library is intended to make programming with POSIX
3174capabilities easier than the traditional libcap library. It includes
3175utilities that can analyse all currently running applications and print out
3176any capabilities and whether or not it has an open ended bounding set. The
3177included utilities are designed to let admins and developers spot apps from
3178various ways that may be running with too much privilege.")
3179 ;; The library is lgpl2.1+, but also ships some utils which are gpl2+.
3180 (license (list license:lgpl2.1+ license:gpl2+))))
3181
3182(define-public smartmontools
3183 (package
3184 (name "smartmontools")
3185 (version "7.5")
3186 (source
3187 (origin
3188 (method git-fetch)
3189 (uri (git-reference
3190 (url "https://github.com/smartmontools/smartmontools")
3191 (commit (string-append "RELEASE_"
3192 (string-replace-substring version "." "_")))))
3193 (file-name (git-file-name name version))
3194 (sha256
3195 (base32 "00c58xcqv73lzxf0baly2q0sqkyd2vncv93iabjj7jkvbzf7nqpz"))))
3196 (build-system gnu-build-system)
3197 (arguments
3198 (list
3199 #:make-flags
3200 #~(list "BUILD_INFO=\"(Guix)\"")
3201 #:phases
3202 #~(modify-phases %standard-phases
3203 (add-after 'unpack 'chdir
3204 (lambda _
3205 (chdir "smartmontools"))))
3206 #:configure-flags
3207 #~(list (format #f "--with-scriptpath=~{~a:~}$PATH"
3208 (map (lambda (pkg)
3209 (in-vicinity pkg "bin"))
3210 '#$(list (this-package-input "coreutils-minimal")
3211 (this-package-input "sed")))))))
3212 (inputs (list automake autoconf coreutils-minimal libcap-ng sed))
3213 (home-page "https://www.smartmontools.org/")
3214 (synopsis "S.M.A.R.T. harddisk control and monitoring tools")
3215 (description
3216 "The smartmontools package contains utility programs to control and
3217monitor storage systems using the Self-Monitoring, Analysis and Reporting
3218Technology System (@dfn{S.M.A.R.T.}) built into most modern ATA and SCSI hard
3219disks. In many cases, these utilities will provide advanced warning of disk
3220degradation and failure.")
3221 (license license:gpl2+)))
3222
3223(define-public fdupes
3224 (package
3225 (name "fdupes")
3226 (version "2.4.0")
3227 (source
3228 (origin
3229 (method url-fetch)
3230 (uri (string-append "https://github.com/adrianlopezroche/fdupes/"
3231 "releases/download/v" version "/"
3232 "fdupes-" version ".tar.gz"))
3233 (sha256
3234 (base32 "0dhpgcylf99cnxz8h4i4dhv2i3124cs0n8lssbhwn783knijfysj"))))
3235 (build-system gnu-build-system)
3236 (inputs
3237 (list ncurses pcre2 sqlite))
3238 (home-page "https://github.com/adrianlopezroche/fdupes")
3239 (synopsis "Identify duplicate files")
3240 (description
3241 "fdupes is a program for identifying duplicate files residing within
3242specified directories.")
3243 (license license:expat)))
3244
3245(define-public ansible-core
3246 (package
3247 (name "ansible-core")
3248 ;; XXX: Starting from 2.18.1, Ansible requires Python 3.11 or newer on the
3249 ;; controller, this is the latest version supporting 3.10.
3250 (version "2.17.7")
3251 (source
3252 (origin
3253 (method url-fetch)
3254 (uri (pypi-uri "ansible_core" version))
3255 (sha256
3256 (base32 "1kysajyc0kh885dlba6aj0a2mnpcq06q09n3kcixdqn4sqsvgais"))))
3257 (build-system pyproject-build-system)
3258 (arguments
3259 (list
3260 #:modules '((guix build pyproject-build-system)
3261 (guix build utils)
3262 (ice-9 ftw))
3263 #:test-flags
3264 #~(list "units"
3265 "--exclude" "test/units/cli/test_adhoc.py"
3266 "--exclude" "test/units/galaxy/test_collection_install.py"
3267 "--num-workers" (number->string (parallel-job-count)))
3268 #:phases
3269 #~(modify-phases %standard-phases
3270 (add-after 'unpack 'relax-requirements
3271 (lambda _
3272 (substitute* "requirements.txt"
3273 ;; resolvelib >= 0.5.3, < 1.1.0
3274 ((">= 0.5.3, < 1.1.0") ""))))
3275 ;; Several ansible commands (ansible-config, ansible-console, etc.)
3276 ;; are just symlinks to a single ansible executable. The ansible
3277 ;; executable behaves differently based on the value of sys.argv[0].
3278 ;; This does not work well with our wrap phase, and therefore the
3279 ;; following two phases are required as a workaround.
3280 (add-after 'unpack 'hide-wrapping
3281 (lambda _
3282 ;; Overwrite sys.argv[0] to hide the wrapper script from it.
3283 (substitute* "bin/ansible"
3284 (("import traceback" all)
3285 (string-append all "
3286import re
3287sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
3288")))))
3289 (add-after 'install 'replace-symlinks
3290 (lambda _
3291 ;; Replace symlinks with duplicate copies of the ansible
3292 ;; executable so that sys.argv[0] has the correct value.
3293 (with-directory-excursion (string-append #$output "/bin")
3294 (for-each
3295 (lambda (ansible-symlink)
3296 (delete-file ansible-symlink)
3297 (copy-file "ansible" ansible-symlink))
3298 (scandir "." (lambda (x)
3299 (and (eq? 'symlink (stat:type (lstat x)))
3300 (string-prefix? "ansible-" x)
3301 (string=? "ansible" (readlink x)))))))))
3302 (add-after 'unpack 'patch-paths
3303 (lambda _
3304 (substitute* "lib/ansible/module_utils/compat/selinux.py"
3305 (("libselinux.so.1" name)
3306 (string-append #$(this-package-input "libselinux")
3307 "/lib/" name)))
3308 (substitute* "test/lib/ansible_test/_internal/ansible_util.py"
3309 (("PYTHONPATH=get_ansible_python_path\\(args\\)" all)
3310 (string-append all "+ ':' + os.environ['GUIX_PYTHONPATH']")))
3311 (substitute* "test/lib/ansible_test/_internal/commands/units/__init__.py"
3312 (("PYTHONPATH=get_units_ansible_python_path\\(args, test_context)" all)
3313 (string-append all "+ ':' + os.environ['GUIX_PYTHONPATH']")))
3314 (substitute* "test/units/modules/test_async_wrapper.py"
3315 (("/usr/bin/python")
3316 (which "python")))))
3317 (replace 'check
3318 (lambda* (#:key inputs outputs tests? test-flags #:allow-other-keys)
3319 (when tests?
3320 ;; Otherwise Ansible fails to create its config directory.
3321 (setenv "HOME" "/tmp")
3322 ;; The test suite needs to be run with 'ansible-test', which
3323 ;; does some extra environment setup. Taken from
3324 ;; https://raw.githubusercontent.com/ansible/ansible/\
3325 ;; devel/test/utils/shippable/shippable.sh.
3326 (apply invoke "python" "bin/ansible-test" test-flags)))))))
3327 (native-inputs
3328 (list openssh
3329 openssl
3330 python-mock
3331 python-pycryptodome
3332 python-pytest
3333 python-pytest-forked
3334 python-pytest-mock
3335 python-pytest-xdist
3336 python-pytz
3337 python-setuptools
3338 python-wheel))
3339 (inputs ;optional dependencies captured in wrap scripts
3340 (list libselinux
3341 sshpass))
3342 (propagated-inputs ;core dependencies listed in egg-info/requires.txt
3343 (list python-cryptography
3344 python-jinja2
3345 python-packaging ;for version number parsing
3346 python-paramiko
3347 python-passlib
3348 python-pexpect
3349 python-pyyaml
3350 python-resolvelib))
3351 (home-page "https://www.ansible.com/")
3352 (synopsis "Radically simple IT automation")
3353 (description "Ansible aims to be a radically simple IT automation system.
3354It handles configuration management, application deployment, cloud
3355provisioning, ad-hoc task execution, network automation, and multi-node
3356orchestration. Ansible facilitates complex changes like zero-downtime rolling
3357updates with load balancers. This package is the core of Ansible, which
3358provides the following commands:
3359@itemize
3360@item ansible
3361@item ansible-config
3362@item ansible-connection
3363@item ansible-console
3364@item ansible-doc
3365@item ansible-galaxy
3366@item ansible-inventory
3367@item ansible-playbook
3368@item ansible-pull
3369@item ansible-test
3370@item ansible-vault
3371@end itemize")
3372 (license license:gpl3+)))
3373
3374(define-public ansible
3375 (package
3376 (name "ansible")
3377 (version "10.1.0")
3378 (source
3379 (origin
3380 (method url-fetch)
3381 (uri (pypi-uri "ansible" version))
3382 (sha256
3383 (base32 "0apj783acx4jzkf3bnibn4y5jc6jd8ly7l0rdqq8f1jpgxal933x"))))
3384 (build-system pyproject-build-system)
3385 (arguments
3386 (list
3387 ;; XXX: All tests errored with:
3388 ;; from ...common.utils import (
3389 ;; E ImportError: attempted relative import with no known parent package
3390 ;;
3391 ;; tests: 17 skipped, 1 warning, 1132 errors
3392 #:tests? #f))
3393 (native-inputs
3394 (list python-setuptools))
3395 (propagated-inputs (list ansible-core))
3396 ;; The Ansible collections are found by ansible-core via the Python search
3397 ;; path; the following search path ensures that they are found even when
3398 ;; Python is not present in the profile.
3399 (native-search-paths
3400 ;; XXX: Attempting to use (package-native-search-paths python)
3401 ;; here would cause an error about python being an unbound
3402 ;; variable in the tests/import/cpan.scm test.
3403 (list (search-path-specification
3404 (variable "GUIX_PYTHONPATH")
3405 (files (list "lib/python3.11/site-packages")))))
3406 (home-page "https://www.ansible.com/")
3407 (synopsis "Radically simple IT automation")
3408 (description "Ansible aims to be a radically simple IT automation system.
3409It handles configuration management, application deployment, cloud
3410provisioning, ad-hoc task execution, network automation, and multi-node
3411orchestration. Ansible facilitates complex changes like zero-downtime rolling
3412updates with load balancers. This package provides a curated set of
3413community-maintained Ansible collections, which contain playbooks, roles,
3414modules and plugins that extend Ansible.")
3415 ;; Those actually concern the Jenkins Ansible plugin, rather than the
3416 ;; Ansible Jenkins plugin.
3417 (properties `((lint-hidden-cve . ("CVE-2023-32982" "CVE-2023-32983"))))
3418 (license license:gpl3+)))
3419
3420(define-public debops
3421 (package
3422 (name "debops")
3423 (version "3.2.5")
3424 (source
3425 (origin
3426 (method git-fetch)
3427 (uri (git-reference
3428 (url "https://github.com/debops/debops")
3429 (commit (string-append "v" version))))
3430 (file-name (git-file-name name version))
3431 (sha256
3432 (base32 "15wfhha2b315i15l40j3sylyvs3mdrfw5awzq4cix51l5jppx8z5"))
3433 (patches
3434 (search-patches "debops-setup-py-avoid-git.patch"))))
3435 (build-system pyproject-build-system)
3436 (native-inputs (list python-setuptools))
3437 (inputs
3438 (list ansible
3439 bash-minimal
3440 encfs
3441 fuse-2
3442 util-linux ;; for umount
3443 findutils
3444 git
3445 git-crypt
3446 gnupg
3447 which))
3448 (propagated-inputs
3449 (list python-distro
3450 python-dotenv
3451 python-future
3452 python-gitpython
3453 python-jinja2
3454 python-pyyaml
3455 python-pyxdg
3456 python-toml))
3457 (arguments
3458 (list
3459 #:tests? #f ;no tests
3460 #:modules '((guix build pyproject-build-system)
3461 (guix build utils)
3462 (srfi srfi-26))
3463 #:phases #~(modify-phases %standard-phases
3464 (add-after 'sanity-check 'wrap-script
3465 (lambda* (#:key inputs #:allow-other-keys)
3466 (wrap-program (string-append #$output "/bin/debops")
3467 `("PATH" ":" prefix
3468 ,(map dirname
3469 (map (cut search-input-file inputs <>)
3470 (list "bin/ansible"
3471 "bin/gpg"
3472 "bin/git"
3473 "bin/git-crypt"
3474 "bin/umount"))))))))))
3475 (home-page "https://www.debops.org/")
3476 (synopsis "Collection of general-purpose Ansible roles")
3477 (description "The Ansible roles provided by that can be used to manage
3478Debian or Ubuntu hosts. In addition, a default set of Ansible playbooks can
3479be used to apply the provided roles in a controlled way, using Ansible
3480inventory groups.
3481
3482The roles are written with a high customization in mind, which can be done
3483using Ansible inventory. This way the role and playbook code can be shared
3484between multiple environments, with different configuration in to each one.
3485
3486Services can be managed on a single host, or spread between multiple hosts.
3487DebOps provides support for different SQL and NoSQL databases, web servers,
3488programming languages and specialized applications useful in a data center
3489environment or in a cluster. The project can also be used to deploy
3490virtualization environments using KVM/libvirt, Docker or LXC technologies to
3491manage virtual machines and/or containers.")
3492 (license license:gpl3+)))
3493
3494(define-public cpulimit
3495 (package
3496 (name "cpulimit")
3497 (version "0.2")
3498 (source
3499 (origin
3500 (method git-fetch)
3501 (uri (git-reference
3502 (url "https://github.com/opsengine/cpulimit")
3503 (commit (string-append "v" version))))
3504 (file-name (git-file-name name version))
3505 (sha256
3506 (base32 "1dz045yhcsw1rdamzpz4bk8mw888in7fyqk1q1b3m1yk4pd1ahkh"))
3507 (patches (search-patches "cpulimit-with-glib-2.32.patch"))))
3508 (build-system gnu-build-system)
3509 (arguments
3510 `(#:phases (modify-phases %standard-phases
3511 (delete 'configure)
3512 (replace 'build
3513 (lambda* (#:key make-flags #:allow-other-keys)
3514 (apply invoke "make" "-Csrc" make-flags)))
3515 (replace 'check
3516 (lambda* (#:key tests? make-flags #:allow-other-keys)
3517 (when tests?
3518 (apply invoke "make" "-Ctests" make-flags))
3519 #t))
3520 (replace 'install
3521 (lambda* (#:key outputs #:allow-other-keys)
3522 (let* ((out (assoc-ref outputs "out"))
3523 (bin (string-append out "/bin")))
3524 (install-file "src/cpulimit" bin))
3525 #t)))
3526 #:make-flags (list (string-append "CC=" ,(cc-for-target)))))
3527 (home-page "https://github.com/opsengine/cpulimit")
3528 (synopsis "Limit CPU usage")
3529 (description
3530 "Cpulimit limits the CPU usage of a process. It does not change the nice
3531value or other scheduling priority settings, but the real CPU usage, and is
3532able to adapt itself dynamically to the overall system load. Children
3533processes and threads of the specified process may optionally share the same
3534limits.")
3535 (license license:gpl2+)))
3536
3537(define-public corectrl
3538 (package
3539 (name "corectrl")
3540 (version "1.5.1")
3541 (source
3542 (origin
3543 (method git-fetch)
3544 (uri (git-reference
3545 (url "https://gitlab.com/corectrl/corectrl")
3546 (commit (string-append "v" version))))
3547 (file-name (git-file-name name version))
3548 (sha256
3549 (base32 "0y2qjp73kl7m6sx99kc0myfvvlf0rjx2yb3hff7jr6l87ayan09p"))
3550 (patches (search-patches "corectrl-locate-polkit-with-pkg-config.patch"))))
3551 (build-system qt-build-system)
3552 (arguments
3553 (list
3554 #:configure-flags #~(list "-DINSTALL_DBUS_FILES_IN_PREFIX=true"
3555 (string-append "-DPOLKIT_POLICY_INSTALL_DIR="
3556 #$output
3557 "/share/polkit-1/actions")
3558 (string-append "-DWITH_PCI_IDS_PATH="
3559 #$(this-package-input "hwdata")
3560 "/share/hwdata/pci.ids"))
3561 #:phases
3562 #~(modify-phases %standard-phases
3563 (add-after 'unpack 'embed-absolute-references
3564 (lambda* (#:key inputs #:allow-other-keys)
3565 (substitute* "src/core/info/common/cpuinfolscpu.cpp"
3566 (("\"lscpu\"")
3567 (string-append
3568 "\"" (search-input-file inputs "bin/lscpu") "\"")))
3569 (substitute* "src/core/info/common/gpuinfovulkan.cpp"
3570 (("\"vulkaninfo\"")
3571 (string-append
3572 "\"" (search-input-file inputs "bin/vulkaninfo") "\"")))
3573 (substitute* (list "src/core/info/common/swinfomesa.cpp"
3574 "src/core/info/common/gpuinfoopengl.cpp")
3575 (("\"glxinfo\"")
3576 (string-append
3577 "\"" (search-input-file inputs "bin/glxinfo") "\""))))))))
3578 (native-inputs (list catch2-3.8
3579 pkg-config
3580 qttools))
3581 (inputs (list dbus
3582 botan
3583 hwdata
3584 mesa-utils
3585 polkit
3586 procps
3587 pugixml
3588 qt5compat
3589 qtbase
3590 qtcharts
3591 qtdeclarative
3592 qtquickcontrols2-5
3593 qtsvg
3594 qtwayland
3595 quazip
3596 spdlog
3597 trompeloeil
3598 units
3599 util-linux
3600 vulkan-tools
3601 zlib))
3602 (home-page "https://gitlab.com/corectrl/corectrl")
3603 (synopsis "Profile based system control utility")
3604 (description
3605 "CoreCtrl allows you to control with ease your computer hardware using
3606application profiles.")
3607 (license (list license:gpl3))))
3608
3609(define-public autojump
3610 (package
3611 (name "autojump")
3612 (version "22.5.3")
3613 (source
3614 (origin
3615 (method git-fetch)
3616 (uri (git-reference
3617 (url "https://github.com/wting/autojump")
3618 (commit (string-append "release-v" version))))
3619 (file-name (git-file-name name version))
3620 (sha256
3621 (base32 "1rgpsh70manr2dydna9da4x7p8ahii7dgdgwir5fka340n1wrcws"))))
3622 (build-system gnu-build-system)
3623 (native-inputs ; for tests
3624 (list python-mock python-pytest))
3625 (inputs
3626 `(("python" ,python-wrapper)))
3627 (arguments
3628 `(#:phases
3629 (modify-phases %standard-phases
3630 (add-after 'unpack 'make-git-checkout-writable
3631 ;; ‘install.py’ modifies files before installing them.
3632 (lambda _
3633 (for-each make-file-writable (find-files "."))
3634 #t))
3635 (delete 'configure)
3636 (delete 'build)
3637 (replace 'check
3638 (lambda _
3639 (invoke "python" "tests/unit/autojump_utils_test.py")))
3640 (replace 'install
3641 (lambda* (#:key outputs #:allow-other-keys)
3642 (setenv "SHELL" (which "bash"))
3643 (invoke "python" "install.py"
3644 (string-append "--destdir="
3645 (assoc-ref outputs "out"))))))))
3646 (home-page "https://github.com/wting/autojump")
3647 (synopsis "Shell extension for file system navigation")
3648 (description
3649 "Autojump provides a faster way to navigate your file system, with a \"cd
3650command that learns\". It works by maintaining a database of the directories
3651you use the most from the command line and allows you to \"jump\" to
3652frequently used directories by typing only a small pattern.")
3653 (license license:gpl3+)))
3654
3655(define-public fasd
3656 (package
3657 (name "fasd")
3658 (version "1.0.2")
3659 (source (origin
3660 (method git-fetch)
3661 (uri (git-reference
3662 (url "https://github.com/whjvenyl/fasd")
3663 (commit version)))
3664 (file-name (git-file-name name version))
3665 (sha256
3666 (base32
3667 "0q72a54dcahc9pan5qkmnsvpqiqgjjxwdxzzm8pxzylpr329jjyh"))))
3668 (build-system gnu-build-system)
3669 (arguments
3670 `(#:phases (modify-phases %standard-phases
3671 (delete 'configure)) ;no configuration
3672 #:tests? #f ;no tests
3673 #:make-flags (list (string-append "PREFIX=" %output))))
3674 (home-page "https://github.com/whjvenyl/fasd")
3675 (synopsis "Quick access to files and directories for shells")
3676 (description
3677 "Fasd (pronounced similar to \"fast\") is a command-line productivity booster.
3678Fasd offers quick access to files and directories for POSIX shells. It is inspired
3679by tools like @code{autojump}, @code{z}, and @code{v}. Fasd keeps track of files and
3680directories you have accessed so that you can quickly reference them in the command
3681line.")
3682 (license license:expat)))
3683
3684(define-public iftop
3685 (package
3686 (name "iftop")
3687 (version "1.0pre4")
3688 (source (origin
3689 (method url-fetch)
3690 (uri (string-append "http://www.ex-parrot.com/~pdw/iftop/download"
3691 "/iftop-" version ".tar.gz"))
3692 (sha256
3693 (base32
3694 "15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp"))))
3695 (build-system gnu-build-system)
3696 (inputs
3697 (list libpcap ncurses))
3698 (arguments
3699 ;; Fix build failure with GCC 10
3700 '(#:configure-flags '("CFLAGS=-O2 -g -fcommon")))
3701 (synopsis "Monitor network usage")
3702 (description "Iftop does for network usage what @command{top} does
3703for CPU usage. It listens to network traffic on a named interface and
3704displays a table of current bandwidth usage by pairs of hosts.")
3705 (home-page "http://www.ex-parrot.com/~pdw/iftop/")
3706 (license license:gpl2+)))
3707
3708(define-public nettop
3709 (let ((revision "0")
3710 (commit "689d6557196e9fcc92cffba82e00fac0386419e5"))
3711 (package
3712 (name "nettop")
3713 (version (git-version "0.5" revision commit))
3714 (source
3715 (origin
3716 (method git-fetch)
3717 (uri (git-reference
3718 (url "https://github.com/Emanem/nettop")
3719 (commit commit)))
3720 (file-name (git-file-name name version))
3721 (sha256
3722 (base32 "0f6qkj4p4c0gap16ncnhkm802vi6dr7z9rjfz7gzvzhm7jg08aj8"))
3723 (modules '((guix build utils)))
3724 (snippet
3725 #~(begin
3726 (substitute* "Makefile"
3727 (("-lcurses" _) "-lncurses"))))))
3728 (build-system gnu-build-system)
3729 (arguments
3730 (list
3731 #:tests? #f ; no make check
3732 #:make-flags #~(list "release")
3733 #:phases
3734 #~(modify-phases %standard-phases
3735 (delete 'configure) ; no configure script
3736 (replace 'install ; no install target
3737 (lambda _
3738 (let ((out (string-append #$output "/bin")))
3739 (install-file "nettop" out)))))))
3740 (inputs (list libpcap ncurses))
3741 (synopsis "Monitor network usage by process and host")
3742 (description "nettop is a traffic visualizer for the terminal that
3743summarizes network bandwidth by process and remote host.")
3744 (home-page "https://github.com/Emanem/nettop")
3745 (license license:gpl3+))))
3746
3747(define-public munge
3748 (package
3749 (name "munge")
3750 (version "0.5.14")
3751 (source (origin
3752 (method url-fetch)
3753 (uri (string-append "https://github.com/dun/munge/releases/"
3754 "download/munge-" version "/munge-"
3755 version ".tar.xz"))
3756 (sha256
3757 (base32
3758 "0h06sghb4rqvv1ywyd6mzsmbcgh712v6ygrff0gzm440y4ca41k6"))
3759 (modules '((guix build utils)))
3760 (snippet
3761 '(begin
3762 ;; Don't insist on write access to /var.
3763 (substitute* "src/etc/Makefile.in"
3764 (("\\$\\(INSTALL\\)(.*)localstatedir" _ middle)
3765 (string-append "-$(INSTALL)" middle "localstatedir"))
3766 (("\\$\\(MKDIR_P\\) .*(local|run)statedir.*")
3767 ""))
3768 #t))))
3769 (inputs
3770 (list openssl libgcrypt))
3771 (build-system gnu-build-system)
3772 (arguments
3773 `(#:configure-flags
3774 (list "--localstatedir=/var"
3775 (string-append "--with-pkgconfigdir="
3776 (assoc-ref %outputs "out") "/lib/pkgconfig")
3777 (string-append "--with-libgcrypt-prefix="
3778 (assoc-ref %build-inputs "libgcrypt"))
3779 ,@(if (%current-target-system)
3780 ;; Assume yes on pipes when cross compiling.
3781 `("ac_cv_file__dev_spx=yes"
3782 "x_ac_cv_check_fifo_recvfd=yes")
3783 '()))
3784 #:phases
3785 (modify-phases %standard-phases
3786 ;; XXX Many test series fail. Some might be fixable, others do no-no
3787 ;; things like invoking ‘sudo’.
3788 (add-after 'unpack 'skip-failing-tests
3789 (lambda _
3790 (for-each (lambda (test)
3791 (substitute* "t/Makefile.in"
3792 (((string-append test "\\.t ")) "")))
3793 (list "0100-munged-lock"
3794 "0010-basic"
3795 "0011-munged-cmdline"
3796 "0012-munge-cmdline"
3797 "0013-unmunge-cmdline"
3798 "0101-munged-security-socket"
3799 "0102-munged-security-keyfile"
3800 "0103-munged-security-logfile"
3801 "0110-munged-origin-addr"))
3802 #t)))))
3803 (home-page "https://dun.github.io/munge/")
3804 (synopsis "Cluster computing authentication service")
3805 (description
3806 "Munge is an authentication service for creating and validating
3807credentials. It allows a process to authenticate the UID and GID of another
3808local or remote process within a group of hosts having common users and
3809groups. These hosts form a security realm that is defined by a shared
3810cryptographic key. Clients within this security realm can create and validate
3811credentials without the use of root privileges, reserved ports, or
3812platform-specific methods.")
3813 (license license:gpl3+)))
3814
3815(define-public audit
3816 (package
3817 (name "audit")
3818 (home-page "https://people.redhat.com/sgrubb/audit/")
3819 (version "3.0.9")
3820 (source (origin
3821 (method url-fetch)
3822 (uri (string-append home-page "audit-" version ".tar.gz"))
3823 (sha256
3824 (base32
3825 "0y5w8pl91xapi49ih1pw7h48lac201cj7fm89hkklmzi9m2715gx"))))
3826 (build-system gnu-build-system)
3827 (arguments
3828 `(#:configure-flags (list "--with-python=no"
3829 "--disable-static")))
3830 (inputs
3831 (list openldap gnutls cyrus-sasl))
3832 (synopsis "User-space component to the Linux auditing system")
3833 (description
3834 "This is the user-space component to the Linux auditing system, which
3835allows logging of system calls made by user-land processes. @command{auditd} is
3836responsible for writing audit records to the disk. Viewing the logs is done
3837with the @code{ausearch} or @code{aureport} utilities. Configuring the audit
3838rules is done with the @code{auditctl} utility.")
3839 (license license:gpl2+)))
3840
3841(define-public nmap
3842 (package
3843 (name "nmap")
3844 (version "7.98")
3845 (source (origin
3846 (method url-fetch)
3847 (uri (string-append "https://nmap.org/dist/nmap-" version
3848 ".tar.bz2"))
3849 (sha256
3850 (base32
3851 "1rlpv238ixcj62d740w8xghcfmkvmg9453kh46gmr7mfx89p716f"))
3852 (modules '((guix build utils)))
3853 (snippet
3854 '(begin
3855 (for-each delete-file-recursively
3856 ;; Remove bundled lua, pcap, and pcre libraries.
3857 ;; FIXME: Remove bundled liblinear once packaged.
3858 '("liblua"
3859 "libpcap"
3860 "libpcre"
3861 ;; Remove pre-compiled binares.
3862 "mswin32"))))))
3863 (build-system gnu-build-system)
3864 (outputs '("out" "ndiff")) ; TODO Add zenmap output
3865 (arguments
3866 (list
3867 #:configure-flags #~(list "--without-zenmap")
3868 #:phases
3869 #~(modify-phases %standard-phases
3870 (add-after 'unpack 'patch-Makefile.in
3871 (lambda _
3872 (substitute* "Makefile.in"
3873 (("\\$\\(PYTHON\\) -m build \\$\\(NDIFFDIR\\)/")
3874 "$(PYTHON) -m build --wheel --no-isolation $(NDIFFDIR)/")
3875 (("\\$\\(PYTHON\\) -m pip install \\$\\(NDIFFDIR\\).*")
3876 (string-append "pip"
3877 " --no-cache-dir"
3878 " --no-input"
3879 " install"
3880 " --no-build-isolation"
3881 " --no-deps"
3882 " --prefix"
3883 " $(prefix)"
3884 " $(NDIFFDIR)/\n")))))
3885 (replace 'install
3886 (lambda* (#:key inputs outputs #:allow-other-keys)
3887 (define (make out . args)
3888 (apply invoke "make"
3889 (string-append "PYTHON="
3890 (search-input-file inputs "/bin/python"))
3891 (string-append "CC=" #$(cc-for-target))
3892 (string-append "prefix=" out)
3893 args))
3894 (define (python-path dir)
3895 (string-append dir "/lib/python"
3896 #$(version-major+minor
3897 (package-version python))
3898 "/site-packages"))
3899 (let ((ndiff (assoc-ref outputs "ndiff")))
3900 (for-each mkdir-p (list #$output ndiff))
3901 (make #$output
3902 "install-nmap"
3903 "install-nse"
3904 "install-ncat"
3905 "install-nping")
3906 (make ndiff "install-ndiff")
3907 (wrap-program (string-append ndiff "/bin/ndiff")
3908 `("GUIX_PYTHONPATH" prefix
3909 (,(python-path ndiff)))))))
3910 ;; These are the tests that do not require network access.
3911 (replace 'check
3912 (lambda* (#:key tests? #:allow-other-keys)
3913 (when tests?
3914 (invoke "make"
3915 "check-nse"
3916 "check-ndiff")))))
3917 ;; Nmap can't cope with out-of-source building.
3918 #:out-of-source? #f))
3919 (native-inputs (list python-pypa-build python-setuptools python-wheel))
3920 (inputs
3921 (list bash-minimal ;for wrap-program
3922 libpcap
3923 lua-5.4
3924 openssl-3.0
3925 pcre2
3926 zlib ; for NSE compression
3927 perl
3928 python-wrapper)) ; for ndiff
3929 (home-page "https://nmap.org/")
3930 (synopsis "Network discovery and security auditing tool")
3931 (description
3932 "Nmap (\"Network Mapper\") is a network discovery and security auditing
3933tool. It is also useful for tasks such as network inventory, managing service
3934upgrade schedules, and monitoring host or service uptime. It also provides an
3935advanced netcat implementation (ncat), a utility for comparing scan
3936results (ndiff), and a packet generation and response analysis tool (nping).")
3937 ;; See <https://github.com/nmap/nmap/issues/2199#issuecomment-1380592744>.
3938 ;; This package uses nmap's bundled versions of libdnet and liblinear, which
3939 ;; both use a 3-clause BSD license.
3940 (license (list license:nmap license:bsd-3))))
3941
3942(define-public dstat
3943 (package
3944 (name "dstat")
3945 (version "0.7.4")
3946 (source
3947 (origin
3948 (method git-fetch)
3949 (uri (git-reference
3950 (url "https://github.com/dstat-real/dstat")
3951 (commit (string-append "v" version))))
3952 (file-name (git-file-name "dstat" version))
3953 (sha256
3954 (base32 "1qnmkhqmjd1m3if05jj29dvr5hn6kayq9bkkkh881w472c0zhp8v"))
3955 (patches (search-patches "dstat-fix-crash-when-specifying-delay.patch"
3956 "dstat-skip-devices-without-io.patch"))))
3957 (build-system gnu-build-system)
3958 (arguments
3959 (list
3960 #:tests? #f ; no make check
3961 #:make-flags
3962 #~(list (string-append "prefix=" #$output))
3963 #:phases
3964 #~(modify-phases %standard-phases
3965 (add-after 'unpack 'fix-python3-DeprecationWarning
3966 (lambda _
3967 (substitute* "dstat"
3968 (("collections") "collections.abc"))))
3969 (delete 'configure) ; no configure script
3970 (add-after 'install 'wrap
3971 (lambda _
3972 (wrap-program (string-append #$output "/bin/dstat")
3973 `("GUIX_PYTHONPATH" ":" prefix
3974 (,(getenv "GUIX_PYTHONPATH")))))))))
3975 (inputs
3976 (list bash-minimal ;for wrap-program
3977 python-wrapper
3978 python-six))
3979 (synopsis "Versatile resource statistics tool")
3980 (description "Dstat is a versatile replacement for @command{vmstat},
3981@command{iostat}, @command{netstat}, and @command{ifstat}. Dstat overcomes
3982some of their limitations and adds some extra features, more counters and
3983flexibility. Dstat is handy for monitoring systems during performance tuning
3984tests, benchmarks or troubleshooting.
3985
3986Dstat allows you to view all of your system resources in real-time, you can,
3987e.g., compare disk utilization in combination with interrupts from your IDE
3988controller, or compare the network bandwidth numbers directly with the disk
3989throughput (in the same interval).")
3990 (home-page "http://dag.wiee.rs/home-made/dstat/")
3991 (license license:gpl2+)))
3992
3993(define-public dool
3994 (package
3995 (name "dool")
3996 (version "1.3.4")
3997 (source
3998 (origin
3999 (method git-fetch)
4000 (uri (git-reference
4001 (url "https://github.com/scottchiefbaker/dool")
4002 (commit (string-append "v" version))))
4003 (file-name (git-file-name name version))
4004 (sha256
4005 (base32 "11myxg4y4z0nr60cg0xi3r4akjypyjjg1mxbc4y2a6lg0pras9bv"))))
4006 (build-system pyproject-build-system)
4007 (arguments
4008 (list
4009 #:phases
4010 #~(modify-phases %standard-phases
4011 (add-after 'unpack 'remove-symlinks-and-snap-packaging
4012 ;; Remove symlinks that make 'ensure-no-mtimes-pre-1980 fail.
4013 (lambda _
4014 (delete-file-recursively "packaging/snap")))
4015 (delete 'build)
4016 (replace 'install
4017 (lambda _
4018 (substitute* "install.py"
4019 (("(bin_dir *= ?).*" _ prefix)
4020 (string-append prefix "\"" #$output "/bin/\"\n"))
4021 (("(plugin_dir *= ?).*" _ prefix)
4022 (string-append prefix "\"" #$output "/share/dool/\"\n"))
4023 (("(manpage_dir *= ?).*" _ prefix)
4024 (string-append prefix "\"" #$output "/share/man/man1/\"\n")))
4025 (invoke "python" "install.py" "--root")))
4026 (replace 'check
4027 (lambda* (#:key tests? #:allow-other-keys)
4028 (when tests?
4029 (invoke "./dool" "--version")
4030 (invoke "./dool" "-ta" "1" "5")))))))
4031 (synopsis "Command line system resource monitoring tool")
4032 (description "Dool is a command line tool to monitor many aspects of your
4033system: CPU, Memory, Network, Load Average, etc. It also includes a robust
4034plug-in architecture to allow monitoring other system metrics.")
4035 (home-page "https://github.com/scottchiefbaker/dool")
4036 (license license:gpl2+)))
4037
4038(define-public thefuck
4039 (package
4040 (name "thefuck")
4041 (version "3.32")
4042 (source
4043 (origin
4044 (method git-fetch)
4045 (uri (git-reference
4046 (url "https://github.com/nvbn/thefuck")
4047 (commit version)))
4048 (file-name (git-file-name name version))
4049 (sha256
4050 (base32 "18ipa1bm6q1n5drbi8i65726hhqhl1g41390lfqrc11hkbvv443d"))
4051 (patches (search-patches "thefuck-test-environ.patch"
4052 "thefuck-remove-broken-tests.patch"))))
4053 (build-system pyproject-build-system)
4054 (arguments
4055 (list
4056 #:phases
4057 #~(modify-phases %standard-phases
4058 (add-before 'check 'pre-check
4059 (lambda _
4060 ;; Tests look for installed package
4061 ;; Some tests need write access to $HOME.
4062 (setenv "HOME" "/tmp")
4063 ;; Even with that, this function tries to mkdir /.config.
4064 (substitute* "tests/test_utils.py"
4065 (("settings\\.init\\(\\)") "")))))))
4066 (native-inputs
4067 (list go
4068 python-mock
4069 python-pytest
4070 python-pytest-mock
4071 python-setuptools
4072 python-wheel))
4073 (inputs
4074 (list python-colorama
4075 python-decorator
4076 python-psutil
4077 python-pyte))
4078 (home-page "https://github.com/nvbn/thefuck")
4079 (synopsis "Correct mistyped console command")
4080 (description
4081 "The Fuck tries to match a rule for a previous, mistyped command, creates
4082a new command using the matched rule, and runs it.")
4083 (license license:x11)))
4084
4085(define-public di
4086 (package
4087 (name "di")
4088 (version "4.53")
4089 (source
4090 (origin
4091 (method url-fetch)
4092 (uri (string-append "mirror://sourceforge/diskinfo-di/"
4093 "di-" version ".tar.gz"))
4094 (sha256
4095 (base32 "0gp806m7jk2rfymy5r62a2lfd8jq879qy94blrjqvb0xq7pmpp80"))))
4096 (build-system gnu-build-system)
4097 (arguments
4098 (list
4099 #:tests? #f ; obscure test failures
4100 #:phases
4101 #~(modify-phases %standard-phases
4102 (delete 'configure) ; no configure script
4103 (add-before 'build 'override-environment
4104 (lambda _
4105 (setenv "CC" #$(cc-for-target))
4106 (setenv "prefix" #$output))))
4107 #:make-flags
4108 #~(list "--environment-overrides")))
4109 (home-page "https://gentoo.com/di/")
4110 (synopsis "Advanced df like disk information utility")
4111 (description
4112 "@code{di} is a disk information utility, displaying everything that your
4113@code{df} command does and more. It features the ability to display your disk
4114usage in whatever format you prefer. It is designed to be highly portable and
4115produce uniform output across heterogeneous networks.")
4116 (license license:zlib)))
4117
4118(define-public cbatticon
4119 (package
4120 (name "cbatticon")
4121 (version "1.6.13")
4122 (source
4123 (origin
4124 (method git-fetch)
4125 (uri (git-reference
4126 (url "https://github.com/valr/cbatticon")
4127 (commit version)))
4128 (sha256
4129 (base32 "1xs37xrycvk0021r5l3xs4ijgf3lm25d2zhm8dppb5kx66xcj22m"))
4130 (file-name (git-file-name name version))))
4131 (build-system gnu-build-system)
4132 (arguments
4133 `(#:tests? #f ; no tests
4134 #:make-flags
4135 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
4136 ,(string-append "CC=" (cc-for-target)))
4137 #:phases
4138 (modify-phases %standard-phases
4139 (delete 'configure)))) ; no configure script
4140 (inputs
4141 `(("gtk+" ,gtk+)
4142 ("gettext" ,gettext-minimal)
4143 ("libnotify" ,libnotify)))
4144 (native-inputs
4145 (list pkg-config))
4146 (synopsis "Lightweight battery icon for the system tray")
4147 (description "cbatticon is a lightweight battery icon that displays
4148the status of your battery in the system tray.")
4149 (home-page "https://github.com/valr/cbatticon")
4150 (license license:gpl2+)))
4151
4152(define-public interrobang
4153 (let ((revision "1")
4154 (commit "896543735e1c99144765fdbd7b6e6b5afbd8b881"))
4155 (package
4156 (name "interrobang")
4157 (version (git-version "0.0.0" revision commit))
4158 (source
4159 (origin
4160 (method git-fetch)
4161 (uri (git-reference
4162 (url "https://github.com/TrilbyWhite/interrobang")
4163 (commit commit)))
4164 (file-name (git-file-name name version))
4165 (sha256
4166 (base32 "1n13m70p1hfba5dy3i8hfclbr6k9q3d9dai3dg4jvhdhmxcpjzdf"))))
4167 (build-system gnu-build-system)
4168 (arguments
4169 `(#:tests? #f ; no tests
4170 #:phases
4171 (modify-phases %standard-phases
4172 (delete 'configure)) ; no configure script
4173 #:make-flags (list (string-append "PREFIX="
4174 (assoc-ref %outputs "out")))))
4175 (inputs
4176 (list libx11))
4177 (native-inputs
4178 (list pkg-config))
4179 (synopsis "Scriptable launcher menu")
4180 (description "Interrobang is a scriptable launcher menu with a customizable
4181shortcut syntax and completion options.")
4182 (home-page "https://github.com/TrilbyWhite/interrobang")
4183 (license license:gpl3+))))
4184
4185(define-public pam-hooks
4186 (package
4187 (name "pam-hooks")
4188 (version "0.2.0")
4189 (source
4190 (origin
4191 (method url-fetch)
4192 (uri (string-append "https://upsilon.cc/~zack/hacking/software/"
4193 name "/" name "_" version ".tar.gz"))
4194 (sha256
4195 (base32 "102azxhvs53akkhgg2dkqg8m0jd6804fx8v7gq7pp03qm3m7bhqi"))))
4196 (build-system gnu-build-system)
4197 (arguments
4198 (list #:make-flags #~`("CC=gcc"
4199 ,(string-append "DESTDIR=" #$output))
4200 #:phases #~(modify-phases %standard-phases
4201 (delete 'configure))
4202 ;; There is a test directory, but it's unclear how to run them.
4203 #:tests? #f))
4204 (inputs (list linux-pam))
4205 (home-page "https://upsilon.cc/~zack/hacking/software/pam-hooks/")
4206 (synopsis "Linux-PAM module for login/logout hooks")
4207 (description "@code{pam-hooks} is a tiny PAM module enabling the
4208execution of hook scripts when a PAM session is opened or closed. The
4209typical use case is the need of doing some per-user set-up when a user
4210logs via a PAM-aware login mechanism and/or the need of doing some
4211per-user clean-up when the user logs out.")
4212 (license license:gpl3+)))
4213
4214(define-public pam-krb5
4215 (package
4216 (name "pam-krb5")
4217 (version "4.8")
4218 (source (origin
4219 (method url-fetch)
4220 (uri
4221 (list (string-append
4222 "https://archives.eyrie.org/software/kerberos/"
4223 "pam-krb5-" version ".tar.xz")
4224 (string-append
4225 "https://archives.eyrie.org/software/ARCHIVE/"
4226 "pam-krb5/pam-krb5-" version ".tar.xz")))
4227 (patches (search-patches "pam-krb5-CVE-2020-10595.patch"))
4228 (sha256
4229 (base32
4230 "1qjp8i1s9bz7g6kiqrkzzkxn5pfspa4sy53b6z40fqmdf9przdfb"))))
4231 (build-system gnu-build-system)
4232 (arguments
4233 `(#:phases
4234 (modify-phases %standard-phases
4235 (add-before 'configure 'disable-tests
4236 (lambda _
4237 ;; The build container seems to interfere with some tests.
4238 (substitute* "tests/TESTS"
4239 (("module/basic\n") ""))
4240 (substitute* "tests/TESTS"
4241 (("pam-util/vector\n") ""))
4242 #t)))))
4243 (inputs
4244 (list linux-pam mit-krb5))
4245 (native-inputs
4246 (list perl perl-test-pod)) ; required for tests
4247 (synopsis "Kerberos PAM module")
4248 (description
4249 "Pam-krb5 is a Kerberos PAM module for either MIT Kerberos or Heimdal.
4250It supports ticket refreshing by screen savers, configurable
4251authorization handling, authentication of non-local accounts for network
4252services, password changing, and password expiration, as well as all the
4253standard expected PAM features. It works correctly with OpenSSH, even
4254with @code{ChallengeResponseAuthentication} and @code{PrivilegeSeparation}
4255enabled, and supports extensive configuration either by PAM options or in
4256krb5.conf or both. PKINIT is supported with recent versions of both MIT
4257Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.")
4258 (home-page "https://www.eyrie.org/~eagle/software/pam-krb5/")
4259 ;; Dual licenced under a homebrew non-copyleft OR GPL (any version)
4260 ;; However, the tarball does not contain a copy of the GPL, so unless
4261 ;; we put one in, we cannot distribute it under GPL without violating
4262 ;; clause requiring us to give all recipients a copy.
4263 (license license:gpl1+)))
4264
4265(define (sunxi-tools-source version)
4266 (origin
4267 (method git-fetch)
4268 (uri (git-reference
4269 (url "https://github.com/linux-sunxi/sunxi-tools")
4270 (commit (string-append "v" version))))
4271 (sha256
4272 (base32 "04f3jqg8ww4jxsf9c6ddcdgy2xbhkyp0b3l5f1hvvbv94p81rjxd"))
4273 (patches
4274 (search-patches "sunxi-tools-remove-sys-io.patch"))
4275 (modules '((guix build utils)))
4276 (snippet
4277 ;; Remove binaries contained in the tarball which are only for the
4278 ;; target and can be regenerated anyway.
4279 '(begin
4280 (delete-file-recursively "bin")
4281 #t))
4282 (file-name (git-file-name "sunxi-tools" version))))
4283
4284(define sunxi-target-tools
4285 (package
4286 (name "sunxi-target-tools")
4287 (version "1.4.2")
4288 (build-system gnu-build-system)
4289 (source
4290 (sunxi-tools-source version))
4291 (arguments
4292 `(#:system "armhf-linux"
4293 #:tests? #f
4294 #:make-flags (list (string-append "PREFIX="
4295 (assoc-ref %outputs "out"))
4296 (string-append "CROSS_COMPILE=")
4297 "CC=gcc")
4298 #:phases
4299 (modify-phases %standard-phases
4300 (delete 'configure)
4301 (replace 'build
4302 (lambda* (#:key make-flags #:allow-other-keys)
4303 (apply invoke "make" "target-tools" make-flags)))
4304 (replace 'install
4305 (lambda* (#:key make-flags #:allow-other-keys)
4306 (apply invoke "make" "install-target-tools"
4307 make-flags))))))
4308 (home-page "https://github.com/linux-sunxi/sunxi-tools")
4309 (synopsis "Hardware management tools for Allwinner computers")
4310 (description "This package contains tools for Allwinner devices:
4311@enumerate
4312@item @command{sunxi-meminfo}: Prints memory bus settings.
4313@end enumerate")
4314 (license license:gpl2+)))
4315
4316(define-public sunxi-tools
4317 (package
4318 (name "sunxi-tools")
4319 (version "1.4.2")
4320 (source
4321 (sunxi-tools-source version))
4322 (native-inputs
4323 (list sunxi-target-tools pkg-config))
4324 (inputs
4325 (list libusb))
4326 (build-system gnu-build-system)
4327 (arguments
4328 `(#:tests? #f ; no tests exist
4329 #:make-flags (list (string-append "PREFIX="
4330 (assoc-ref %outputs "out"))
4331 (string-append "CROSS_COMPILE=disabled")
4332 "CC=gcc")
4333 #:phases
4334 (modify-phases %standard-phases
4335 (delete 'configure)
4336 (replace 'build
4337 (lambda* (#:key make-flags #:allow-other-keys)
4338 (apply invoke "make" "tools" "misc" make-flags)))
4339 (replace 'install
4340 (lambda* (#:key inputs outputs make-flags #:allow-other-keys)
4341 ;; Those tools have been built for armhf but are part of the
4342 ;; installation in the upstream package. So do the same
4343 ;; here.
4344 (copy-recursively (assoc-ref inputs "sunxi-target-tools")
4345 (assoc-ref outputs "out"))
4346 (apply invoke "make" "install-tools" "install-misc"
4347 make-flags))))))
4348 (home-page "https://github.com/linux-sunxi/sunxi-tools")
4349 (synopsis "Hardware management tools for Allwinner computers")
4350 (description "This package contains tools for Allwinner devices:
4351@enumerate
4352@item @command{sunxi-fexc}, @command{bin2fex}, @command{fex2bin}: Compile
4353a textual description of a board (.fex) to a binary representation (.bin).
4354@item @command{sunxi-fel}: Puts an Allwinner device into FEL mode which
4355makes it register as a special USB device (rather than USB host).
4356You can then connect it to another computer and flash it from there.
4357@item @command{sunxi-nand-part}: Partitions NAND flash.
4358@item @command{sunxi-bootinfo}: Reads out boot0 and boot1 (Allwinner
4359bootloader) parameters.
4360@item @command{sunxi-pio}: Sets GPIO parameters and oscillates a GPIO
4361in order to be able to find it.
4362@item @command{sunxi-meminfo}: Prints memory bus settings.
4363@item @command{sunxi-nand-image-builder}: Prepares raw NAND images.
4364@end enumerate")
4365 (license license:gpl2+)))
4366
4367(define-public sedsed
4368 (package
4369 (name "sedsed")
4370 (version "2.0.0")
4371 (source
4372 (origin
4373 (method git-fetch)
4374 (uri (git-reference
4375 (url "https://github.com/aureliojargas/sedsed")
4376 (commit (string-append "v" version))))
4377 (file-name (git-file-name name version))
4378 (sha256
4379 (base32 "0sy26d60j89fw4z2bfvc7zblb7r1ras5q7f06gaqfg2058z5wj8m"))))
4380 (build-system pyproject-build-system)
4381 (arguments
4382 (list
4383 #:tests? #f ; XXX: test suit requires git set up, run by "./test/run"
4384 #:phases
4385 #~(modify-phases %standard-phases
4386 (add-after 'unpack 'patch-sed-in
4387 (lambda _
4388 (substitute* "sedsed.py"
4389 (("sedbin = 'sed'")
4390 (string-append "sedbin = '" (which "sed") "'")))))
4391 (delete 'build)
4392 (replace 'install
4393 (lambda _
4394 (let ((bin (string-append #$output "/bin")))
4395 ;; Just one file to copy around
4396 (install-file "sedsed.py" bin))))
4397 (add-after 'wrap 'symlink
4398 ;; Create 'sedsed' symlink to "sedsed.py".
4399 (lambda _
4400 (let* ((bin (string-append #$output "/bin"))
4401 (sed (string-append bin "/sedsed"))
4402 (sedpy (string-append bin "/sedsed.py")))
4403 (symlink sedpy sed)))))))
4404 (native-inputs
4405 (list python-setuptools
4406 python-wheel))
4407 (home-page "https://aurelio.net/projects/sedsed")
4408 (synopsis "Sed sed scripts")
4409 (description
4410 "@code{sedsed} can debug, indent, tokenize and HTMLize your @command{sed}
4411script.
4412
4413In debug mode, it reads your script and adds extra commands to it. When
4414executed you can see the data flow between the commands, revealing all the
4415magic sed performs on its internal buffers.
4416
4417In indent mode, your script is reformatted with standard spacing.
4418
4419In tokenize mode, you can see the elements of every command you use.
4420
4421In HTMLize mode, your script is converted to a beautiful colored HTML file,
4422with all the commands and parameters identified for your viewing pleasure.
4423
4424With sedsed you can master any sed script. No more secrets, no more hidden
4425buffers.")
4426 (license license:expat)))
4427
4428(define-public igt-gpu-tools
4429 (package
4430 (name "igt-gpu-tools")
4431 (version "1.28")
4432 (source
4433 (origin
4434 (method git-fetch)
4435 (uri (git-reference
4436 (url "https://gitlab.freedesktop.org/drm/igt-gpu-tools.git")
4437 (commit (string-append "v" version))))
4438 (file-name (git-file-name name version))
4439 (sha256
4440 (base32 "15mnsgzlpd4jkr2zy3jzx0b021g89fa61b8sdm8rjp27gxqkl8mm"))))
4441 (build-system meson-build-system)
4442 (arguments
4443 `(#:tests? #f ; many of the tests try to load kernel modules
4444 #:phases
4445 (modify-phases %standard-phases
4446 (add-after 'unpack 'find-rst2man.py
4447 (lambda _
4448 (substitute* "man/meson.build"
4449 (("'rst2man'") "'rst2man.py'")))))))
4450 (inputs
4451 (list cairo
4452 elfutils ; libdw
4453 eudev
4454 kmod
4455 libdrm
4456 libpciaccess
4457 libunwind
4458 procps
4459 python))
4460 (native-inputs
4461 (list bison flex pkg-config python-docutils))
4462 (home-page "https://gitlab.freedesktop.org/drm/igt-gpu-tools")
4463 (synopsis "Tools for development and testing of the Intel DRM driver")
4464 (description "IGT GPU Tools is a collection of tools for development and
4465testing of the Intel DRM driver. There are many macro-level test suites that
4466get used against the driver, including xtest, rendercheck, piglit, and
4467oglconform, but failures from those can be difficult to track down to kernel
4468changes, and many require complicated build procedures or specific testing
4469environments to get useful results. Therefore, IGT GPU Tools includes
4470low-level tools and tests specifically for development and testing of the
4471Intel DRM Driver.")
4472 (supported-systems '("i686-linux" "x86_64-linux"))
4473 (license license:expat)))
4474
4475(define-public neofetch
4476 (package
4477 (name "neofetch")
4478 (version "7.1.0")
4479 (source (origin
4480 (method git-fetch)
4481 (uri (git-reference
4482 (url "https://github.com/dylanaraps/neofetch")
4483 (commit version)))
4484 (file-name (git-file-name name version))
4485 (sha256
4486 (base32
4487 "0i7wpisipwzk0j62pzaigbiq42y1mn4sbraz4my2jlz6ahwf00kv"))))
4488 (build-system gnu-build-system)
4489 (arguments
4490 (list #:tests? #f ; there are no tests
4491 #:make-flags
4492 #~(list (string-append "PREFIX=" #$output))
4493 #:phases
4494 #~(modify-phases %standard-phases
4495 (delete 'configure)))) ; no configure script
4496 (home-page "https://github.com/dylanaraps/neofetch")
4497 (synopsis "System information script")
4498 (description "Neofetch is a command-line system information tool written in
4499Bash. Neofetch displays information about your system next to an image, your OS
4500logo, or any ASCII file of your choice. The main purpose of Neofetch is to be
4501used in screenshots to show other users what operating system or distribution
4502you are running, what theme or icon set you are using, etc.")
4503 (license license:expat)))
4504
4505(define-public hyfetch
4506 (package
4507 (name "hyfetch")
4508 (version "2.0.5")
4509 (source
4510 (origin
4511 (method git-fetch)
4512 (uri (git-reference
4513 (url "https://github.com/hykilpikonna/hyfetch")
4514 (commit version)))
4515 (file-name (git-file-name name version))
4516 (sha256
4517 (base32 "1xb0m7mna6mm3gc823c40rfdhnw39afdr3g7kb4cqrc21s7fdd5y"))))
4518 (build-system pyproject-build-system)
4519 (native-inputs
4520 (list python-hatchling
4521 python-pytest))
4522 (inputs
4523 (list python-typing-extensions))
4524 (home-page "https://github.com/hykilpikonna/HyFetch")
4525 (synopsis "@code{neofetch} with pride flags <3")
4526 (description "HyFetch is a command-line system information tool fork of
4527@code{neofetch}. HyFetch displays information about your system next to your
4528OS logo in ASCII representation. The ASCII representation is then colored in
4529the pattern of the pride flag of your choice. The main purpose of HyFetch is to
4530be used in screenshots to show other users what operating system or distribution
4531you are running, what theme or icon set you are using, etc.")
4532 (license license:expat)))
4533
4534(define-public uwufetch
4535 (package
4536 (name "uwufetch")
4537 (version "2.1")
4538 (source (origin
4539 (method git-fetch)
4540 (uri (git-reference
4541 (url "https://github.com/TheDarkBug/uwufetch")
4542 (commit version)))
4543 (file-name (git-file-name name version))
4544 (sha256
4545 (base32
4546 "182jwkm4vacz2bhyn7v4jl9bxs7md51az958r0qfp9ky71m2q3vh"))))
4547 (build-system gnu-build-system)
4548 (arguments
4549 (list
4550 #:tests? #f ;no tests
4551 #:make-flags
4552 #~(list (string-append "DESTDIR=" #$output)
4553 (string-append "ETC_DIR=" #$output "/etc")
4554 (string-append "CC=" #$(cc-for-target)))
4555 #:phases
4556 #~(modify-phases %standard-phases
4557 (delete 'configure)
4558 (add-before 'build 'patch-source-paths
4559 (lambda* (#:key inputs #:allow-other-keys)
4560 (let ((grep (search-input-file inputs "/bin/grep"))
4561 (awk (search-input-file inputs "/bin/awk")))
4562 (substitute* "fetch.c"
4563 (("grep") grep)
4564 (("awk") awk))
4565 (substitute* "uwufetch.c"
4566 (("(/usr(/local)?)(.*;)" all _ _ rest)
4567 (string-append #$output rest))))))
4568 ;; TODO this will be fixed in the next release of uwufetch
4569 (add-before 'install 'make-include-dir
4570 (lambda _
4571 (mkdir-p (string-append #$output "/include")))))))
4572 (inputs (list lshw
4573 gawk
4574 grep
4575 ;; viu XXX not yet packaged in Guix
4576 xwininfo))
4577 (home-page "https://github.com/TheDarkBug/uwufetch")
4578 (synopsis "Meme system info tool based on Nyan/UwU trend")
4579 (description
4580 "UwUFetch is a system information tool in the lineage of NeoFetch,
4581PFetch, HyFetch, and the like. It prints ASCII art of your system's logo as
4582well as a summary of system information. UwUFetch's unique contribution is the
4583uwu-ification of various words used in the description. For example, Guix
4584becomes gUwUix.")
4585 (license license:gpl3+)))
4586
4587(define-public screenfetch
4588 (package
4589 (name "screenfetch")
4590 (version "3.9.9")
4591 (source (origin
4592 (method git-fetch)
4593 (uri (git-reference
4594 (url "https://github.com/KittyKatt/screenFetch")
4595 (commit (string-append "v" version))))
4596 (file-name (git-file-name name version))
4597 (sha256
4598 (base32
4599 "0fly580235wmrqxgpf2mlblj587q05mikpsgaw1qq7z1nl44rmjh"))))
4600 (build-system trivial-build-system)
4601 (arguments
4602 `(#:modules ((guix build utils))
4603 #:builder
4604 (begin
4605 (use-modules (guix build utils))
4606 (let ((source (assoc-ref %build-inputs "source"))
4607 (out (assoc-ref %outputs "out")))
4608 (mkdir-p (string-append out "/bin/"))
4609 (copy-file (string-append source "/screenfetch-dev")
4610 (string-append out "/bin/screenfetch"))
4611 (install-file (string-append source "/screenfetch.1")
4612 (string-append out "/man/man1/"))
4613 (install-file (string-append source "/COPYING")
4614 (string-append out "/share/doc/" ,name "-" ,version))
4615 (substitute* (string-append out "/bin/screenfetch")
4616 (("/usr/bin/env bash")
4617 (search-input-file %build-inputs "/bin/bash")))
4618 (wrap-program
4619 (string-append out "/bin/screenfetch")
4620 `("PATH" ":" prefix
4621 (,(string-append (assoc-ref %build-inputs "bc") "/bin:"
4622 (assoc-ref %build-inputs "scrot") "/bin:"
4623 (assoc-ref %build-inputs "xdpyinfo") "/bin"
4624 (assoc-ref %build-inputs "xprop") "/bin"))))
4625 (substitute* (string-append out "/bin/screenfetch")
4626 (("#!#f")
4627 (string-append "#!"
4628 (search-input-file %build-inputs
4629 "/bin/bash"))))))))
4630 (inputs
4631 (list bash bc scrot xdpyinfo xprop))
4632 (home-page "https://github.com/KittyKatt/screenFetch")
4633 (synopsis "System information script")
4634 (description "Bash screenshot information tool which can be used to
4635generate those nifty terminal theme information and ASCII distribution logos in
4636everyone's screenshots nowadays.")
4637 (license license:gpl3)))
4638
4639(define-public ufetch
4640 (package
4641 (name "ufetch")
4642 (version "0.4")
4643 (source (origin
4644 (method git-fetch)
4645 (uri (git-reference
4646 (url "https://gitlab.com/jschx/ufetch.git")
4647 (commit (string-append "v" version))))
4648 (file-name (git-file-name name version))
4649 (sha256
4650 (base32
4651 "0858hq9lannyh4ipvrlk3syc576r2x6f6hr08n0hfsn3x3ndzjl9"))))
4652 (build-system trivial-build-system)
4653 (inputs
4654 `(("bash" ,bash)
4655 ("tput" ,ncurses)))
4656 (arguments
4657 `(#:modules ((guix build utils))
4658 #:builder
4659 (begin
4660 (use-modules (guix build utils))
4661 (let* ((source (assoc-ref %build-inputs "source"))
4662 (output (assoc-ref %outputs "out"))
4663 (bindir (string-append output "/bin"))
4664 (docdir (string-append output "/share/doc/ufetch-" ,version))
4665 (tput (search-input-file %build-inputs "/bin/tput")))
4666 (install-file (string-append source "/LICENSE") docdir)
4667 (setenv "PATH" (string-append (assoc-ref %build-inputs "bash") "/bin"))
4668 (mkdir-p bindir)
4669 (for-each (lambda (src)
4670 (let ((dst (string-append bindir "/" (basename src))))
4671 (copy-file src dst)
4672 (patch-shebang dst)
4673 (substitute* dst (("tput") tput))))
4674 (find-files source "ufetch-[[:alpha:]]*$"))
4675 ;; Note: the `ufetch` we create below will only work if run under
4676 ;; the Guix System. I.e. a user trying to run `ufetch` on a
4677 ;; foreign distro will not get great results. The `screenfetch`
4678 ;; program does actual runtime detection of the operating system,
4679 ;; and would be a better choice in such a situation.
4680 (symlink "ufetch-guix" (string-append bindir "/ufetch"))))))
4681 (home-page "https://gitlab.com/jschx/ufetch")
4682 (synopsis "Tiny system info")
4683 (description "This package provides a tiny system info utility.")
4684 (license license:expat)))
4685
4686(define-public pfetch
4687 (let ((commit "a906ff89680c78cec9785f3ff49ca8b272a0f96b")
4688 (revision "1"))
4689 (package
4690 (name "pfetch")
4691 (version (git-version "0.7.0" revision commit))
4692 (source (origin
4693 (method git-fetch)
4694 (uri (git-reference
4695 (url "https://github.com/dylanaraps/pfetch")
4696 (commit commit)))
4697 (file-name (git-file-name name version))
4698 (sha256
4699 (base32
4700 "1yhf8mxjn58gjfdii3bpn8522gfaicd8jxjxvmwi2jz7fgvp0zpn"))))
4701 (build-system trivial-build-system)
4702 (inputs (list bash))
4703 (arguments
4704 `(#:modules ((guix build utils))
4705 #:builder
4706 (begin
4707 (use-modules (guix build utils))
4708 (let* ((source (lambda (f)
4709 (string-append (assoc-ref %build-inputs "source") "/" f)))
4710 (output (assoc-ref %outputs "out"))
4711 (docdir (string-append output "/share/doc/pfetch-" ,version)))
4712 (install-file (source "LICENSE.md") docdir)
4713 (install-file (source "README.md") docdir)
4714 (install-file (source "pfetch") (string-append output "/bin"))
4715 (patch-shebang
4716 (string-append output "/bin/pfetch")
4717 (list (string-append (assoc-ref %build-inputs "bash") "/bin")))))))
4718 (home-page "https://github.com/dylanaraps/pfetch")
4719 (synopsis "System information tool")
4720 (description "This package provides a simple, configurable system
4721information tool.")
4722 (license license:expat))))
4723
4724(define-public fastfetch-minimal
4725 (package
4726 (name "fastfetch-minimal")
4727 (version "2.57.0")
4728 (source
4729 (origin
4730 (method git-fetch)
4731 (uri (git-reference
4732 (url "https://github.com/fastfetch-cli/fastfetch")
4733 (commit version)))
4734 (file-name (git-file-name name version))
4735 (sha256
4736 (base32 "1cipr083bf8frqijvxnff7bgzvzczxksicaqj0m22avyhzxc7p3d"))
4737 (modules '((guix build utils)))
4738 (snippet '(begin
4739 (delete-file-recursively "src/3rdparty")
4740 (substitute* "src/modules/logo/logo.c"
4741 (("\"3rdparty/yyjson/yyjson.h\"")
4742 "<yyjson.h>"))))))
4743 (build-system cmake-build-system)
4744 (arguments
4745 (list
4746 #:configure-flags #~(list "-DENABLE_SYSTEM_YYJSON=ON"
4747 "-DBUILD_FLASHFETCH=OFF"
4748 "-DBUILD_TESTS=ON"
4749 "-DINSTALL_LICENSE=OFF")))
4750 (inputs (list yyjson))
4751 (native-inputs (list pkg-config python-minimal))
4752 (home-page "https://github.com/fastfetch-cli/fastfetch")
4753 (synopsis "Display system information in a stylized manner")
4754 (description
4755 "Fastfetch is a tool for fetching system information and displaying it in
4756a stylized way. Fastfetch displays this information next to a logo of the
4757system distribution, akin to many similar tools.")
4758 (license license:expat)))
4759
4760(define-public fastfetch
4761 (package
4762 (inherit fastfetch-minimal)
4763 (name "fastfetch")
4764 (arguments
4765 (substitute-keyword-arguments (package-arguments fastfetch-minimal)
4766 ((#:configure-flags flags #~'())
4767 #~(append #$flags
4768 (list "-DBINARY_LINK_TYPE=dynamic"
4769 "-DENABLE_DIRECTX_HEADERS=OFF"
4770 (string-append "-DCUSTOM_PCI_IDS_PATH="
4771 #$(this-package-input "hwdata")
4772 "/share/hwdata/pci.ids")
4773 (string-append "-DCUSTOM_AMDGPU_IDS_PATH="
4774 #$(this-package-input "libdrm")
4775 "/share/libdrm/amdgpu.ids"))))))
4776 (inputs
4777 (modify-inputs (package-inputs fastfetch-minimal)
4778 (append dbus
4779 glib
4780 hwdata
4781 imagemagick
4782 libdrm
4783 libxcb
4784 mesa
4785 wayland
4786 zlib ;for imagemagick and an #ifdef
4787 zfs)))))
4788
4789(define-public nnn
4790 (package
4791 (name "nnn")
4792 (version "5.1")
4793 (source
4794 (origin
4795 (method url-fetch)
4796 (uri (string-append "https://github.com/jarun/nnn/releases/download/v"
4797 version "/nnn-v" version ".tar.gz"))
4798 (sha256
4799 (base32 "0igc119c1cicravlsh0p715rn7fc0cqjxnhplqw0cbm2xv3g32n8"))))
4800 (build-system gnu-build-system)
4801 (inputs
4802 (list ncurses readline))
4803 (native-inputs
4804 (list pkg-config))
4805 (arguments
4806 (list #:tests? #f ; no tests
4807 #:make-flags
4808 #~(list
4809 (string-append "PREFIX=" #$output)
4810 (string-append "CC=" #$(cc-for-target))
4811 (string-append "PKG_CONFIG=" #$(pkg-config-for-target)))
4812 #:phases
4813 #~(modify-phases %standard-phases
4814 (delete 'configure)))) ; no configure script
4815 (home-page "https://github.com/jarun/nnn")
4816 (synopsis "Terminal file browser")
4817 (description
4818 "@command{nnn} is a fork of @command{noice}, a fast and minimal text
4819terminal file browser with keyboard shortcuts for navigation, opening files and
4820running tasks. There is no configuration file and MIME associations are
4821hard-coded.")
4822 (license license:bsd-2)))
4823
4824(define-public thermald
4825 (package
4826 (name "thermald")
4827 (version "2.5.10")
4828 (source
4829 (origin
4830 (method git-fetch)
4831 (uri (git-reference
4832 (url "https://github.com/intel/thermal_daemon")
4833 (commit (string-append "v" version))))
4834 (file-name (git-file-name name version))
4835 (sha256
4836 (base32 "1d8yj3d9crqz9ikzb0n2cdaal52gmw25kp6vy2gldwj8x6a3gngr"))))
4837 (build-system gnu-build-system)
4838 (arguments
4839 (list
4840 #:configure-flags
4841 #~(list (string-append "--with-dbus-sys-dir="
4842 #$output "/etc/dbus-1/system.d")
4843 "--localstatedir=/var"
4844 "--disable-werror")
4845 #:make-flags
4846 #~(list "V=1") ; log build commands
4847 #:phases
4848 #~(modify-phases %standard-phases
4849 (add-before 'bootstrap 'no-early-./configure
4850 (lambda _
4851 (setenv "NO_CONFIGURE" "yet"))))))
4852 (native-inputs
4853 (list autoconf
4854 autoconf-archive
4855 automake
4856 `(,glib "bin") ; for glib-genmarshal, etc.
4857 gtk-doc/stable
4858 pkg-config))
4859 (inputs
4860 (list dbus-glib libevdev libxml2 upower xz))
4861 (home-page "https://github.com/intel/thermal_daemon")
4862 (synopsis "CPU scaling for thermal management")
4863 (description "The Linux Thermal Daemon helps monitor and control temperature
4864on systems running the Linux kernel.")
4865 ;; arm and aarch64 don't have cpuid.h.
4866 (supported-systems '("i686-linux" "x86_64-linux"))
4867 (license license:gpl2)))
4868
4869(define-public tcptrack
4870 (package
4871 (name "tcptrack")
4872 (version "1.4.3")
4873 (source (origin
4874 (method git-fetch)
4875 (uri (git-reference
4876 (url "https://github.com/bchretien/tcptrack")
4877 (commit (string-append "v" version))))
4878 (file-name (git-file-name name version))
4879 (sha256
4880 (base32
4881 "08lh3l67wn4kq9q0nfspc7rj0jvp9dzwjgxpvqliwcif8cy5mi45"))))
4882 (build-system gnu-build-system)
4883 (inputs (list libpcap ncurses))
4884 (synopsis "TCP connections sniffer")
4885 (description
4886 "Tcptrack is a sniffer which displays information about TCP connections
4887it sees on a network interface. This is a fork of Steve Benson’s tcptrack.")
4888 (home-page "https://github.com/bchretien/tcptrack")
4889 (license license:lgpl2.1+)))
4890
4891(define-public masscan
4892 (package
4893 (name "masscan")
4894 (version "1.3.2")
4895 (source
4896 (origin
4897 (method git-fetch)
4898 (uri (git-reference
4899 (url "https://github.com/robertdavidgraham/masscan")
4900 (commit version)))
4901 (file-name (git-file-name name version))
4902 (sha256
4903 (base32 "1y0ka1y01afmzcad8rw4jgkmlc17yccc30wk8xldj00hdbz84wcs"))))
4904 (build-system gnu-build-system)
4905 (inputs
4906 (list libpcap))
4907 (arguments
4908 (list #:test-target "regress"
4909 #:make-flags
4910 #~(list (string-append "CC=" #$(cc-for-target))
4911 (string-append "PREFIX=" #$output))
4912 #:phases
4913 #~(modify-phases %standard-phases
4914 (delete 'configure) ; no ./configure script
4915 (add-after 'unpack 'patch-path
4916 (lambda* (#:key inputs #:allow-other-keys)
4917 (let ((pcap (assoc-ref inputs "libpcap")))
4918 (substitute* "src/stub-pcap.c"
4919 (("libpcap.so")
4920 (string-append pcap "/lib/libpcap.so")))))))))
4921 (synopsis "TCP port scanner")
4922 (description "MASSCAN is an asynchronous TCP port scanner. It can detect
4923open ports, and also complete the TCP connection and interact with the remote
4924application, collecting the information received.")
4925 (home-page "https://github.com/robertdavidgraham/masscan")
4926 ;; 'src/siphash24.c' is the SipHash reference implementation, which
4927 ;; bears a CC0 Public Domain Dedication.
4928 (license license:agpl3+)))
4929
4930(define-public launchmon
4931 (package
4932 (name "launchmon")
4933 (version "1.0.2")
4934 (source (origin
4935 (method url-fetch)
4936 (uri (string-append
4937 "https://github.com/LLNL/LaunchMON/releases/download/v"
4938 version "/launchmon-v" version ".tar.gz"))
4939 (sha256
4940 (base32
4941 "0fm3nd9mydm9v2bf7bh01dbgrfnpwkapxa3dsvy3x1z0rz61qc0x"))
4942 (modules '((guix build utils)))
4943 (snippet
4944 '(begin
4945 ;; Fix build failure with GCC 7 due to a conversion error.
4946 ;; Remove for versions > 1.0.2.
4947 (substitute* "launchmon/src/linux/lmon_api/lmon_coloc_spawner.cxx"
4948 ((" lmonpl = '\\\\0'")
4949 " *lmonpl = '\\0'"))
4950 #t))))
4951 (build-system gnu-build-system)
4952 (arguments
4953 ;; GCC 11 defaults to c++17 but this package needs something older.
4954 (list #:configure-flags #~'("CXXFLAGS=-std=c++14 -O2 -g")))
4955 (inputs
4956 (list openmpi
4957 munge
4958 boost
4959 libelf
4960 libgcrypt
4961 libgpg-error))
4962 (synopsis "Infrastructure for large-scale tool daemon launching")
4963 (description
4964 "LaunchMON is a software infrastructure that enables HPC run-time
4965tools to co-locate tool daemons with a parallel job. Its API allows a
4966tool to identify all the remote processes of a job and to scalably
4967launch daemons into the relevant nodes.")
4968 (home-page "https://github.com/LLNL/LaunchMON")
4969 (supported-systems '("i686-linux" "x86_64-linux"))
4970 (license license:lgpl2.1)))
4971
4972(define-public spindle
4973 (package
4974 (name "spindle")
4975 (version "0.13")
4976 (source (origin
4977 ;; We use git checkout to avoid github auto-generated tarballs
4978 (method git-fetch)
4979 (uri (git-reference
4980 (url "https://github.com/hpc/Spindle")
4981 (commit (string-append "v" version))))
4982 (file-name (git-file-name name version))
4983 (sha256
4984 (base32
4985 "1z594nhash1him9v00qmyqv9jvikzrs4wxqy1cvnfwqwnrrkp707"))))
4986 (build-system gnu-build-system)
4987 (arguments '(#:configure-flags '("--enable-sec-launchmon"
4988 "--enable-sec-munge"
4989 "--enable-sec-none"
4990 ;; Fails to build as c++17.
4991 "CXXFLAGS=-std=c++14 -O2 -g")))
4992 (inputs
4993 (list openmpi munge launchmon libgcrypt zlib))
4994 (synopsis "Scalable library loading in HPC environments")
4995 (description
4996 "Spindle is a tool for improving the performance of dynamic library and
4997Python loading in HPC environments.")
4998 (home-page "https://github.com/hpc/Spindle")
4999 ;; This package supports x86_64 and PowerPC64
5000 (supported-systems '("x86_64-linux"))
5001 (license license:lgpl2.1)))
5002
5003(define-public inxi-minimal
5004 (let ((real-name "inxi"))
5005 (package
5006 (name "inxi-minimal")
5007 (version "3.3.31-2")
5008 (source
5009 (origin
5010 (method git-fetch)
5011 (uri (git-reference
5012 (url "https://github.com/smxi/inxi")
5013 (commit version)))
5014 (file-name (git-file-name real-name version))
5015 (sha256
5016 (base32 "1fca5minalpmizbxh5kmjiv8xrl7k6g91zn8d84fxmbhsk8vn3kk"))))
5017 (build-system trivial-build-system)
5018 (inputs
5019 (list bash-minimal
5020 perl
5021 procps))
5022 (native-inputs
5023 (list gzip))
5024 (arguments
5025 `(#:modules ((guix build utils))
5026 #:builder
5027 (begin
5028 (use-modules (guix build utils)
5029 (ice-9 match)
5030 (srfi srfi-26))
5031 (setenv "PATH" (string-join
5032 (map (lambda (file)
5033 (dirname (search-input-file %build-inputs
5034 file)))
5035 (list "bin/bash"
5036 "bin/gzip"
5037 "bin/perl"))
5038 ":"))
5039 (copy-recursively (assoc-ref %build-inputs "source")
5040 ,(string-append real-name "-" version))
5041 (with-directory-excursion ,(string-append real-name "-" version)
5042 (with-fluids ((%default-port-encoding #f))
5043 (substitute* "inxi" (("/usr/bin/env perl") (which "perl"))))
5044 (let ((bin (string-append %output "/bin")))
5045 (install-file "inxi" bin)
5046 (wrap-program (string-append bin "/inxi")
5047 `("PATH" ":" =
5048 ("$PATH"
5049 ,@(map (lambda (input)
5050 (match input
5051 ((name . store)
5052 (let ((store-append
5053 (cut string-append store <>)))
5054 (cond
5055 ((member name '("util-linux"))
5056 (string-append (store-append "/bin") ":"
5057 (store-append "/sbin")))
5058 ((member name '("dmidecode" "iproute2"))
5059 (store-append "/sbin"))
5060 (else (store-append "/bin")))))))
5061 %build-inputs)))
5062 `("PERL5LIB" ":" =
5063 ,(delete
5064 ""
5065 (map (match-lambda
5066 (((? (cut string-prefix? "perl-" <>) name) . dir)
5067 (string-append dir "/lib/perl5/site_perl"))
5068 (_ ""))
5069 %build-inputs)))))
5070 (invoke "gzip" "-n" "inxi.1")
5071 (install-file "inxi.1.gz"
5072 (string-append %output "/share/man/man1"))))))
5073 (home-page "https://smxi.org/docs/inxi.htm")
5074 (synopsis "Full-featured system information script")
5075 (description "Inxi is a system information script that can display
5076various things about your hardware and software to users in an IRC chatroom or
5077support forum. It runs with the @code{/exec} command in most IRC clients.")
5078 (license license:gpl3+))))
5079
5080(define-public inxi
5081 (package
5082 (inherit inxi-minimal)
5083 (name "inxi")
5084 (inputs
5085 `(("dmidecode" ,dmidecode)
5086 ("file" ,file)
5087 ("bind:utils" ,isc-bind "utils") ; dig
5088 ("gzip" ,gzip)
5089 ("iproute2" ,iproute) ; ip
5090 ("kmod" ,kmod) ; modinfo
5091 ("lm-sensors" ,lm-sensors)
5092 ("mesa-utils" ,mesa-utils)
5093 ("pciutils" ,pciutils)
5094 ("tar" ,tar)
5095 ("tree" ,tree)
5096 ("util-linux" ,util-linux) ; lsblk
5097 ("usbutils" ,usbutils) ; lsusb
5098 ("wmctrl" ,wmctrl)
5099 ("xdpyinfo" ,xdpyinfo)
5100 ("xprop" ,xprop)
5101 ("xrandr" ,xrandr)
5102 ("coreutils" ,coreutils) ; uptime
5103 ("inetutils" ,inetutils) ; ifconfig
5104 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
5105 ("perl-http-tiny" ,perl-http-tiny)
5106 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
5107 ("perl-json-xs" ,perl-json-xs)
5108 ("perl-time-hires" ,perl-time-hires)
5109 ("lvm2" ,lvm2) ; lvs
5110 ("mdadm" ,mdadm)
5111 ;; TODO: Add more inputs:
5112 ;; ipmi-sensors
5113 ;; hddtemp
5114 ;; perl-xml-dumper
5115 ;; ipmitool
5116 ,@(package-inputs inxi-minimal)))))
5117
5118(define-public pscircle
5119 (package
5120 (name "pscircle")
5121 (version "1.4.0")
5122 (source
5123 (origin
5124 (method git-fetch)
5125 (uri (git-reference
5126 (url "https://gitlab.com/mildlyparallel/pscircle")
5127 (commit (string-append "v" version))))
5128 (file-name (git-file-name name version))
5129 (sha256
5130 (base32 "0vdllrv2hxw71zhi1xrchkqvq0si4xas1qcsbqmgld8wvc2d19kf"))))
5131 (build-system meson-build-system)
5132 (native-inputs
5133 (list pkg-config))
5134 (inputs
5135 (list cairo libpng libx11))
5136 (home-page "https://gitlab.com/mildlyparallel/pscircle")
5137 (synopsis "Visualize Linux processes in a form of radial tree")
5138 (description
5139 "@code{pscircle} visualizes Linux processes in the form of a radial tree.")
5140 (license license:gpl2+)))
5141
5142(define-public python-pyudev
5143 (package
5144 (name "python-pyudev")
5145 (version "0.24.4")
5146 (source
5147 (origin
5148 (method git-fetch)
5149 (uri (git-reference
5150 (url "https://github.com/pyudev/pyudev")
5151 (commit (string-append "v" version))))
5152 (file-name (git-file-name name version))
5153 (sha256
5154 (base32
5155 "1m7xrsazbij5dcmnirn9hq6cwrfmzam5mr3kmvvcgnh24nhm401x"))))
5156 (build-system pyproject-build-system)
5157 (arguments
5158 (list
5159 ;; tests: 46 passed, 36 skipped, 79 deselected, 2 warnings
5160 #:test-flags
5161 ;; These tests actually try to read /sys/devices:
5162 #~(list "-k" (string-join
5163 (list "not test_action"
5164 "test_action_mock"
5165 "test_ancestors"
5166 "test_anything"
5167 "test_asbool"
5168 "test_asint"
5169 "test_asstring"
5170 "test_attributes"
5171 "test_contains_mock"
5172 "test_deprecated_handler"
5173 "test_device_node"
5174 "test_device_number"
5175 "test_device_ordering"
5176 "test_device_path"
5177 "test_device_sys_name"
5178 "test_driver"
5179 "test_equality"
5180 "test_fake"
5181 "test_fake_monitor"
5182 "test_find_parent_no_devtype_mock"
5183 "test_find_parent_with_devtype_mock"
5184 "test_from_device_file"
5185 "test_from_device_number"
5186 "test_from_device_number_wrong_type"
5187 "test_from_name"
5188 "test_from_name_no_device_in_existing_subsystem"
5189 "test_from_path"
5190 "test_from_path_strips_leading_slash"
5191 "test_from_sys_path"
5192 "test_getitem"
5193 "test_getitem"
5194 "test_getitem_nonexisting"
5195 "test_hash"
5196 "test_inequality"
5197 "test_is_initialized"
5198 "test_is_initialized_mock"
5199 "test_iteration"
5200 "test_iteration_mock"
5201 "test_key_subset"
5202 "test_length"
5203 "test_links"
5204 "test_match"
5205 "test_match_parent"
5206 "test_match_property_bool"
5207 "test_match_subsystem"
5208 "test_match_subsystem_nomatch_complete"
5209 "test_match_subsystem_nomatch_unfulfillable"
5210 "test_name"
5211 "test_non_iterable"
5212 "test_parent"
5213 "test_path"
5214 "test_sequence_number"
5215 "test_subsystem"
5216 "test_sys_number"
5217 "test_sys_path"
5218 "test_tags"
5219 "test_time_since_initialized"
5220 "test_time_since_initialized_mock"
5221 "test_traverse"
5222 "test_type"
5223 "test_unsetitem")
5224 " and not "))
5225 #:phases
5226 #~(modify-phases %standard-phases
5227 (add-after 'unpack 'patch-ctypes-udev
5228 (lambda* (#:key inputs #:allow-other-keys)
5229 (substitute* "src/pyudev/core.py"
5230 (("\"udev\"")
5231 (format #f "~s"
5232 (search-input-file inputs "/lib/libudev.so"))))
5233 (substitute* "src/pyudev/_ctypeslib/utils.py"
5234 ;; Use absolute paths instead of keys.
5235 (("= find_library") "= ")))))))
5236 (native-inputs
5237 (list python-pytest
5238 python-setuptools))
5239 (inputs
5240 (list eudev))
5241 (home-page "https://pyudev.readthedocs.io/")
5242 (synopsis "Python udev binding")
5243 (description "This package provides @code{udev} bindings for Python.")
5244 (license license:lgpl2.1)))
5245
5246(define-public vmtouch
5247 (package
5248 (name "vmtouch")
5249 (version "1.3.1")
5250 (source
5251 (origin
5252 (method git-fetch)
5253 (uri (git-reference
5254 (url "https://github.com/hoytech/vmtouch/")
5255 (commit (string-append "v" version))))
5256 (file-name (git-file-name name version))
5257 (sha256
5258 (base32 "08da6apzfkfjwasn4dxrlfxqfx7arl28apdzac5nvm0fhvws0dxk"))))
5259 (build-system gnu-build-system)
5260 (native-inputs
5261 (list perl))
5262 (arguments
5263 `(#:tests? #f ; no tests
5264 #:make-flags
5265 (list
5266 (string-append "CC=" ,(cc-for-target))
5267 (string-append "PREFIX=" (assoc-ref %outputs "out")))
5268 #:phases
5269 (modify-phases %standard-phases
5270 (delete 'configure))))
5271 (home-page "https://github.com/hoytech/vmtouch/")
5272 (synopsis "Portable file system cache diagnostics and control")
5273 (description
5274 "vmtouch is a tool for learning about and controlling the file system
5275cache of unix and unix-like systems.")
5276 (license license:bsd-3)))
5277
5278(define-public solaar
5279 (package
5280 (name "solaar")
5281 (version "1.1.18")
5282 (source
5283 (origin
5284 (method git-fetch)
5285 (uri (git-reference
5286 (url "https://github.com/pwr-Solaar/Solaar")
5287 (commit version)))
5288 (file-name (git-file-name name version))
5289 (sha256
5290 (base32 "0wf8rkm9anxr9iw51yxaav9cifpfkf1m4cw7i9rfsq8xb3aa2n9b"))))
5291 (build-system pyproject-build-system)
5292 (native-inputs
5293 (list python-pytest
5294 python-pytest-mock
5295 python-setuptools
5296 python-typing-extensions
5297 python-wheel))
5298 (propagated-inputs
5299 (list python-pygobject
5300 python-pyudev
5301 python-dbus-python
5302 python-evdev
5303 ;; For GUI.
5304 python-pyyaml
5305 python-psutil
5306 python-typing-extensions
5307 python-xlib
5308 gtk+
5309 python-pygobject))
5310 (home-page "https://pwr-solaar.github.io/Solaar/")
5311 (synopsis "Linux devices manager for the Logitech Unifying Receiver")
5312 (description "This package provides tools to manage clients of the
5313Logitech Unifying Receiver.")
5314 (license license:gpl2)))
5315
5316(define-public lynis
5317 (package
5318 (name "lynis")
5319 ;; Also update the ‘lynis-sdk’ input to the commit matching this release.
5320 (version "3.1.1")
5321 (source
5322 (origin
5323 (method git-fetch)
5324 (uri (git-reference
5325 (url "https://github.com/CISOfy/lynis")
5326 (commit version)))
5327 (file-name (git-file-name name version))
5328 (sha256
5329 (base32 "05bh16i916xz9w8p8fz8flzj9ayyzg7wpbi7q61ylrlahhc03nqd"))
5330 (modules '((guix build utils)))
5331 (snippet
5332 '(begin
5333 ;; Remove proprietary plugins. As of now, all plugins supplied with
5334 ;; lynis are proprietary. In the future, if free plugins are
5335 ;; provided, whitelist them from deletion.
5336 (for-each delete-file (find-files "plugins"))))))
5337 (build-system gnu-build-system)
5338 (native-inputs
5339 `(;; For tests
5340 ("lynis-sdk"
5341 ,(origin
5342 (method git-fetch)
5343 (uri (git-reference
5344 (url "https://github.com/CISOfy/lynis-sdk")
5345 (commit "f4f885f1f049f59940487a6ffc2d53806c729d12")))
5346 (file-name (git-file-name "lynis-sdk" version))
5347 (sha256
5348 (base32 "09d98wmvan7nlchm056kls5xm939d1231pwsvlp4q2aznz8cmg42"))))))
5349 (arguments
5350 (list
5351 #:phases
5352 #~(modify-phases %standard-phases
5353 (replace 'unpack
5354 ;; XXX Remove after fixing <https://issues.guix.gnu.org/55287>.
5355 (lambda* (#:key source #:allow-other-keys)
5356 (mkdir "source")
5357 (chdir "source")
5358 (copy-recursively source "."
5359 #:keep-mtime? #t)))
5360 (replace 'configure
5361 (lambda _
5362 (substitute* "lynis"
5363 (("/usr/share/lynis")
5364 (string-append #$output "/share/lynis")))
5365 (substitute* "include/functions"
5366 (("/usr/local/etc/lynis")
5367 (string-append #$output "/etc/lynis")))))
5368 (delete 'build)
5369 (replace 'install
5370 (lambda _
5371 (install-file "lynis" (string-append #$output "/bin/"))
5372 (install-file "default.prf" (string-append #$output "/etc/lynis"))
5373 (for-each
5374 (lambda (dir)
5375 (copy-recursively
5376 dir (string-append #$output "/share/lynis/" dir)))
5377 (list "db" "include" "plugins"))
5378 (install-file "lynis.8"
5379 (string-append #$output "/share/man/man8"))))
5380 (replace 'check
5381 (lambda _
5382 (copy-recursively #$(this-package-native-input "lynis-sdk")
5383 "../lynis-sdk")
5384 (setenv "LANG" "en_US.UTF-8")
5385 (let ((lynis-dir (getcwd)))
5386 (with-directory-excursion "../lynis-sdk"
5387 (substitute* "config"
5388 (("\\.\\./lynis") lynis-dir))
5389 (substitute* "unit-tests/tests-language-translations.sh"
5390 (("\\.\\./lynis") lynis-dir))
5391 (invoke "sh" "lynis-devkit" "run" "unit-tests"))))))))
5392 (home-page "https://cisofy.com/lynis/")
5393 (synopsis "Security auditing tool")
5394 (description "Lynis is a security auditing tool. It performs an in-depth
5395security scan and runs on the system itself. The primary goal is to test
5396security defenses and provide tips for further system hardening. It will also
5397scan for general system information, vulnerable software packages, and
5398possible configuration issues.")
5399 (license license:gpl3+)))
5400
5401(define-public ngrep
5402 (package
5403 (name "ngrep")
5404 (version "1.47")
5405 (source
5406 (origin
5407 (method git-fetch)
5408 (uri (git-reference
5409 (url "https://github.com/jpr5/ngrep/")
5410 (commit (string-append "V" (string-replace-substring version "." "_")))))
5411 (file-name (git-file-name name version))
5412 (sha256
5413 (base32
5414 "1x2fyd7wdqlj1r76ilal06cl2wmbz0ws6i3ys204sbjh1cj6dcl7"))))
5415 (build-system gnu-build-system)
5416 (inputs
5417 (list libpcap))
5418 (arguments
5419 `(#:tests? #f ;; No tests.
5420 #:configure-flags (list (string-append "--with-pcap-includes="
5421 (assoc-ref %build-inputs "libpcap")
5422 "/include/pcap"))))
5423 (home-page "https://github.com/jpr5/ngrep/")
5424 (synopsis "Grep-like utility to search for network packets on an interface")
5425 (description "@command{ngrep} is like GNU grep applied to the network
5426layer. It's a PCAP-based tool that allows you to specify an extended regular
5427or hexadecimal expression to match against data payloads of packets. It
5428understands many kinds of protocols, including IPv4/6, TCP, UDP, ICMPv4/6,
5429IGMP and Raw, across a wide variety of interface types, and understands BPF
5430filter logic in the same fashion as more common packet sniffing tools, such as
5431tcpdump and snoop.")
5432 (license license:bsd-3)))
5433
5434(define-public pam-mount
5435 (package
5436 (name "pam-mount")
5437 (version "2.20")
5438 (source
5439 (origin
5440 (method url-fetch)
5441 (uri (string-append "https://inai.de/files/pam_mount/pam_mount-"
5442 version ".tar.xz"))
5443 (sha256
5444 (base32 "1vbc6fd826qgj5qq5g06hc64x6n372xhb92bfvhzi02n91x209jl"))))
5445 (build-system gnu-build-system)
5446 (arguments
5447 (list
5448 #:configure-flags
5449 #~(list (string-append "--with-slibdir=" #$output "/lib")
5450 (string-append "--with-ssbindir=" #$output "/sbin")
5451 "--with-cryptsetup")
5452 #:phases
5453 #~(modify-phases %standard-phases
5454 (add-after 'unpack 'patch-file-names
5455 (lambda* (#:key inputs outputs #:allow-other-keys)
5456 (let ((out (assoc-ref outputs "out")))
5457 (substitute* "src/mtcrypt.c"
5458 (("\"(mount|umount)\";" _ command)
5459 (format #f "\"~a\";"
5460 (search-input-file inputs
5461 (string-append "bin/" command))))
5462 (("\"(fsck)\"," _ command)
5463 (format #f "\"~a\","
5464 (search-input-file inputs
5465 (string-append "sbin/" command)))))
5466 (substitute* "src/rdconf1.c"
5467 (("\"(mount|umount)\", \"" _ command)
5468 (format #f "\"~a\", \""
5469 (search-input-file inputs
5470 (string-append "bin/" command))))
5471 (("\"(fsck)\", \"" _ command)
5472 (format #f "\"~a\", \""
5473 (search-input-file inputs
5474 (string-append "sbin/" command))))
5475 (("\"pmvarrun\", \"")
5476 (format #f "\"~a/sbin/pmvarrun\", \"" out)))))))))
5477 (native-inputs
5478 (list perl pkg-config))
5479 (inputs
5480 (append
5481 (cons cryptsetup-minimal (libcryptsetup-propagated-inputs))
5482 (list libhx
5483 libxml2
5484 linux-pam
5485 openssl
5486 pcre2
5487 util-linux
5488 eudev)))
5489 (home-page "https://inai.de/projects/pam_mount/")
5490 (synopsis "PAM module to mount volumes for a user session")
5491 (description
5492 "Pam-mount is a PAM module to mount volumes when a user logs in.
5493It can mount all local file systems supported by @command{mount}, as well as
5494LUKS volumes encrypted with the user's log-in password.")
5495 (license (list license:gpl2+ license:lgpl2.1+))))
5496
5497(define-public pam-uaccess
5498 (let ((commit "54fbf043c63cc500b4850b0b4a12ea14078f2b53")
5499 (revision "0"))
5500 (package
5501 (name "pam-uaccess")
5502 (version (git-version "0.0.0" revision commit))
5503 (source (origin
5504 (method git-fetch)
5505 (uri (git-reference
5506 (url "https://git.sr.ht/~kennylevinsen/pam_uaccess")
5507 (commit commit)))
5508 (file-name (git-file-name name version))
5509 (sha256
5510 (base32
5511 "08068cw4nvcanym8b5dyccnnb3qc3f09pbvi6fcfiz227yx73npc"))))
5512 (build-system meson-build-system)
5513 (native-inputs (list pkg-config))
5514 (inputs (list acl eudev linux-pam))
5515 (home-page "https://git.sr.ht/~kennylevinsen/pam_uaccess")
5516 (synopsis
5517 "PAM module that grants access to devices tagged @code{uaccess} in udev")
5518 (description
5519 "@code{pam_uaccess} is a PAM module that grants access to devices tagged
5520@code{uaccess} in udev for the duration of the users' session, replacing
5521elogind's uaccess feature.")
5522 (license license:expat))))
5523
5524(define-public jc
5525 (package
5526 (name "jc")
5527 (version "1.25.6")
5528 (source
5529 (origin
5530 ;; The PyPI tarball lacks the test suite.
5531 (method git-fetch)
5532 (uri (git-reference
5533 (url "https://github.com/kellyjonbrazil/jc")
5534 (commit (string-append "v" version))))
5535 (file-name (git-file-name name version))
5536 (sha256
5537 (base32 "0bpna1hfwigv9r3i1xafl96jlj4335hrjq5rkrgh2nzc57453bly"))))
5538 (build-system pyproject-build-system)
5539 (arguments
5540 (list #:phases
5541 #~(modify-phases %standard-phases
5542 ;; XXX Guix's America/Los_Angeles time zone is somehow broken.
5543 (add-before 'check 'hack-time-zone
5544 (lambda _
5545 (setenv "TZ" "PST8PDT")
5546 (substitute* (find-files "tests" "^test.*\\.py$")
5547 (("America/Los_Angeles") "PST8PDT")))))))
5548 (native-inputs
5549 (list python-pytest
5550 python-setuptools
5551 python-wheel))
5552 (propagated-inputs
5553 (list python-pygments
5554 python-ruamel.yaml
5555 python-xmltodict))
5556 (home-page "https://github.com/kellyjonbrazil/jc")
5557 (synopsis "Convert the output of command-line tools to JSON")
5558 (description "@code{jc} JSONifies the output of many CLI tools and
5559file-types for easier parsing in scripts.")
5560 (license license:expat)))
5561
5562(define-public jtbl
5563 (package
5564 (name "jtbl")
5565 (version "1.6.0")
5566 (source
5567 (origin
5568 (method git-fetch)
5569 (uri (git-reference
5570 (url "https://github.com/kellyjonbrazil/jtbl")
5571 (commit (string-append "v" version))))
5572 (file-name (git-file-name name version))
5573 (sha256
5574 (base32 "1gryjfjchvfb2nv797h5ba2qz54ig5kkjwcq8ycfdffdk1931d10"))))
5575 (build-system pyproject-build-system)
5576 (native-inputs
5577 (list python-pytest
5578 python-setuptools
5579 python-wheel))
5580 (inputs
5581 (list python-tabulate))
5582 (home-page "https://github.com/kellyjonbrazil/jtbl")
5583 (synopsis "Command-line tool to print JSON data as a table in the terminal")
5584 (description
5585 "@code{jtbl} accepts piped JSON data from stdin and outputs a text table
5586representation to stdout.")
5587 (license license:expat)))
5588
5589(define-public hosts
5590 (package
5591 (name "hosts")
5592 (version "3.6.3")
5593 (source (origin
5594 (method git-fetch)
5595 (uri (git-reference
5596 (url "https://github.com/xwmx/hosts")
5597 (commit version)))
5598 (file-name (git-file-name name version))
5599 (sha256
5600 (base32
5601 "1ni4z89kxzgwm26hhx908g04f2h0fypy7lgfa0rvsz8d0wslgcsn"))))
5602 (build-system trivial-build-system)
5603 (inputs
5604 `(("bats" ,bats) ;for test
5605 ("awk" ,gawk)
5606 ("bash" ,bash)
5607 ("coreutils" ,coreutils)
5608 ("diffutils" ,diffutils)
5609 ("grep" ,grep)
5610 ("ncurses" ,ncurses) ;tput
5611 ("sed" ,sed)))
5612 (arguments
5613 `(#:modules ((guix build utils))
5614 #:builder
5615 (begin
5616 (use-modules (guix build utils))
5617 ;; copy source
5618 (copy-recursively (assoc-ref %build-inputs "source") ".")
5619 ;; patch-shebang phase
5620 (setenv "PATH"
5621 (string-append (assoc-ref %build-inputs "bash") "/bin"
5622 ":" (assoc-ref %build-inputs "awk") "/bin"
5623 ":" (assoc-ref %build-inputs "coreutils") "/bin"
5624 ":" (assoc-ref %build-inputs "diffutils") "/bin"
5625 ":" (assoc-ref %build-inputs "grep") "/bin"
5626 ":" (assoc-ref %build-inputs "ncurses") "/bin"
5627 ":" (assoc-ref %build-inputs "sed") "/bin"
5628 ":" "/run/privileged/bin"
5629 ":" (getenv "PATH")))
5630 (substitute* "hosts"
5631 (("#!/usr/bin/env bash")
5632 (string-append "#!" (which "bash")
5633 "\nPATH=" (getenv "PATH"))))
5634 ;; check phase
5635 (setenv "TERM" "linux") ;set to tty for test
5636 (invoke (search-input-file %build-inputs "/bin/bats")
5637 "test")
5638 ;; install phase
5639 (install-file "hosts" (string-append %output "/bin"))
5640 (let ((bash-completion
5641 (string-append %output "/etc/bash_completion.d")))
5642 (mkdir-p bash-completion)
5643 (copy-file "etc/hosts-completion.bash"
5644 (string-append bash-completion "/hosts")))
5645 (let ((zsh-completion
5646 (string-append %output "/share/zsh/site-functions")))
5647 (mkdir-p zsh-completion)
5648 (copy-file "etc/hosts-completion.zsh"
5649 (string-append zsh-completion "/_hosts")))
5650 (let ((doc (string-append %output "/share/doc/" ,name "-" ,version)))
5651 (mkdir-p doc)
5652 (install-file "LICENSE" doc)
5653 (install-file "README.md" doc))
5654 #t)))
5655 (home-page "https://github.com/xwmx/hosts/")
5656 (synopsis "Script for editing a foreign distro's @file{/etc/hosts} file")
5657 (description "Hosts is a command line program for managing
5658@file{/etc/hosts} entries. On Guix System, @file{/etc/hosts} is managed from
5659the system configuration; hosts only works when using the Guix package manager
5660on a foreign distro. @command{hosts} works with existing hosts files and
5661entries, providing commands to add, remove, comment, and search.")
5662 (license license:expat)))
5663
5664(define-public nmrpflash
5665 (package
5666 (name "nmrpflash")
5667 (version "0.9.26")
5668 (source
5669 (origin
5670 (method git-fetch)
5671 (uri
5672 (git-reference
5673 (url "https://github.com/jclehner/nmrpflash")
5674 (commit (string-append "v" version))))
5675 (sha256
5676 (base32 "19dna96qg32nscvsalgd0xslp3da84aj196cczdm0ixhv1k9pvi3"))
5677 (file-name (git-file-name name version))))
5678 (build-system gnu-build-system)
5679 (arguments
5680 (list
5681 #:tests? #f ; none exist
5682 #:make-flags
5683 #~(list (string-append "CC=" #$(cc-for-target))
5684 (string-append "PREFIX=" #$output))
5685 #:phases
5686 #~(modify-phases %standard-phases
5687 (delete 'configure)
5688 (add-before 'install 'prepare-install
5689 (lambda _
5690 (mkdir-p (string-append #$output "/bin")))))))
5691 (native-inputs
5692 (list pkg-config))
5693 (inputs
5694 (list libnl libpcap))
5695 (home-page "https://github.com/jclehner/nmrpflash")
5696 (synopsis "Reflash (``unbrick'') Netgear devices with corrupted firmware")
5697 (description "This package provides a utility to flash a new firmware
5698image to a Netgear device. It has been tested on Netgear EX2700, EX6120,
5699EX6150v2, DNG3700v2, R6100, R6220, R7000, D7000, WNR3500, R6400, R6800,
5700R8000, R8500, WNDR3800, but is likely to be compatible with many other
5701Netgear devices.")
5702 (license license:gpl3+)))
5703
5704(define-public atop
5705 (package
5706 (name "atop")
5707 (version "2.12.1")
5708 (source (origin
5709 (method url-fetch)
5710 (uri (string-append "https://www.atoptool.nl/download/atop-"
5711 version ".tar.gz"))
5712 (sha256
5713 (base32
5714 "1xhjpmaans63g0y4z9gzff09fxxf9sgmj64ycc2r9y7sbmyfdnsg"))))
5715 (build-system gnu-build-system)
5716 (arguments
5717 (list
5718 #:tests? #f ; no test suite
5719 #:make-flags
5720 #~(list (string-append "CC=" #$(cc-for-target))
5721 (string-append "DESTDIR=" #$output)
5722 (string-append "SYSDPATH=/etc/systemd/system")
5723 (string-append "PMPATHD=/etc/systemd/system-sleep")
5724 ;; Or else it tries to create /var/log/atop...
5725 (string-append "LOGPATH="))
5726 #:phases
5727 #~(modify-phases %standard-phases
5728 (delete 'configure) ; No ./configure script
5729 (add-before 'build 'patch-build
5730 (lambda _
5731 (substitute* "Makefile"
5732 ;; Don't use /usr as a prefix.
5733 (("/usr") "")
5734 ;; Otherwise, it creates a blank configuration file as a "default".
5735 (("touch.*DEFPATH)/atop") "")
5736 (("chmod.*DEFPATH)/atop") "")))))))
5737 (native-inputs (list pkg-config))
5738 (inputs
5739 (list glib
5740 ncurses
5741 python-wrapper ; for `atopgpud`
5742 zlib))
5743 (home-page "https://www.atoptool.nl/")
5744 (synopsis "Linux performance monitoring console")
5745 (description "Atop is an ASCII full-screen performance monitor for Linux
5746that is capable of reporting the activity of all processes (even processes have
5747finished during the monitoring interval), daily logging of system and process
5748activity for long-term analysis, highlighting overloaded system resources by
5749using colors, etc. At regular intervals, it shows system-level activity related
5750to the CPU, memory, swap, disks (including LVM) and network layers, and for
5751every process (and thread) it shows e.g. the CPU utilization, memory growth,
5752disk utilization, priority, username, state, and exit code.")
5753 (properties
5754 `((release-monitoring-url . "https://www.atoptool.nl/downloadatop.php")))
5755 (license license:gpl2+)))
5756
5757;; TODO: Pack u-root for: forth, and some tests.
5758(define-public fiano
5759 (package
5760 (name "fiano")
5761 ;; The versioning count has been changed since commit <2021-12-01>
5762 ;; 1eb599564549691603589219c2be34f966a32ff1.
5763 (version "1.2.0")
5764 (source (origin
5765 (method git-fetch)
5766 (uri (git-reference
5767 (url "https://github.com/linuxboot/fiano.git")
5768 (commit (string-append "v" version))))
5769 (file-name (git-file-name name version))
5770 (sha256
5771 (base32
5772 "0s5fx4lhgb68qbx4ql34rcm678qdf0c4xl97bgc8dx9xwwqifza1"))))
5773 (build-system go-build-system)
5774 (arguments
5775 (list
5776 #:install-source? #f
5777 #:import-path "github.com/linuxboot/fiano"
5778 #:phases
5779 #~(modify-phases %standard-phases
5780 ;; XXX: Replace this part when it's implemented in go-build-system.
5781 (replace 'build
5782 (lambda* (#:key import-path #:allow-other-keys)
5783 (for-each
5784 (lambda (cmd)
5785 (invoke "go" "build" "-v" "-x" "-ldflags=-s -w" "-trimpath"
5786 (string-append import-path "/cmds/" cmd)))
5787 (list "cbfs"
5788 "create-ffs"
5789 "fittool"
5790 "fmap"
5791 "fspinfo"
5792 "glzma"
5793 "guid2english"
5794 "microcode"
5795 "utk"))))
5796 (replace 'check
5797 (lambda* (#:key import-path tests? #:allow-other-keys)
5798 (when tests?
5799 (for-each
5800 (lambda (dir)
5801 (invoke "go" "test" "-v"
5802 (string-append import-path dir "/...")))
5803 (list "/pkg/bytes"
5804 "/pkg/amd"
5805 "/pkg/cbfs"
5806 "/pkg/compression"
5807 "/pkg/fmap"
5808 "/pkg/fsp"
5809 "/pkg/guid"
5810 "/pkg/guid2english"
5811 "/pkg/intel"
5812 "/pkg/knownguids"
5813 "/pkg/log"
5814 "/pkg/uefi"
5815 "/pkg/unicode"
5816 "/pkg/utk"
5817 "/pkg/visitors"
5818 "/cmds/cbfs"
5819 "/cmds/create-ffs"
5820 ;; TODO: Not packed yet in Guix, long journey:
5821 ;; - github.com/u-root/u-root
5822 ;;
5823 ;; "/cmds/fmap"
5824 ;; "/cmds/fittool"
5825 "/cmds/fspinfo"
5826 "/cmds/glzma"
5827 "/cmds/guid2english"
5828 "/cmds/microcode"
5829 "/cmds/utk")))))
5830 (replace 'install
5831 (lambda _
5832 (let ((bindir (string-append #$output "/bin")))
5833 (for-each
5834 (lambda (cmd)
5835 (install-file cmd bindir))
5836 (list "cbfs"
5837 "create-ffs"
5838 "fittool"
5839 "fmap"
5840 "fspinfo"
5841 "glzma"
5842 "guid2english"
5843 "microcode"
5844 "utk"))))))))
5845 (inputs
5846 (list go-github-com-dustin-go-humanize
5847 go-github-com-fatih-camelcase
5848 go-github-com-hashicorp-go-multierror
5849 go-github-com-jedib0t-go-pretty-v6
5850 go-github-com-jessevdk-go-flags
5851 go-github-com-klauspost-compress
5852 go-github-com-pierrec-lz4
5853 go-github-com-spf13-pflag
5854 go-github-com-stretchr-testify
5855 go-github-com-tjfoc-gmsm
5856 go-github-com-ulikunitz-xz
5857 go-github-com-xaionaro-go-bytesextra
5858 go-github-com-xaionaro-gosrc
5859 go-golang-org-x-text))
5860 (home-page "https://github.com/linuxboot/fiano")
5861 (synopsis "UEFI image editor")
5862 (description
5863 "This package provides a command-line UEFI image editor, including cbfs,
5864create-ffs, fmap, fspinfo, glzma, guid2english, microcode and utk CLI
5865utilities.")
5866 (license license:bsd-3)))
5867
5868(define-public novena-eeprom
5869 (package
5870 (name "novena-eeprom")
5871 (version "2.3")
5872 (source (origin
5873 (method git-fetch)
5874 (uri (git-reference
5875 (url "https://github.com/xobs/novena-eeprom.git")
5876 (commit (string-append "v" version))))
5877 (file-name (string-append name "-" version "-checkout"))
5878 (sha256
5879 (base32
5880 "00pd71mg0g20v0820ggp3ghf9nyj5s4wavaz9mkmrmsr91hcnf7i"))))
5881 (build-system gnu-build-system)
5882 (arguments
5883 `(#:tests? #f ; No tests exist
5884 #:make-flags
5885 (list (string-append "CC=" ,(cc-for-target)))
5886 #:phases
5887 (modify-phases %standard-phases
5888 (delete 'configure)
5889 (replace 'install
5890 (lambda* (#:key outputs #:allow-other-keys)
5891 (let* ((out (assoc-ref outputs "out"))
5892 (out-bin (string-append out "/bin"))
5893 (out-share-man (string-append out "/share/man/man8")))
5894 (install-file "novena-eeprom" out-bin)
5895 (install-file "novena-eeprom.8" out-share-man)))))))
5896 (inputs
5897 (list i2c-tools-3))
5898 (synopsis "Novena EEPROM editor")
5899 (description "This package provides an editor for the Novena EEPROM.
5900Novena boards contain a device-dependent descriptive EEPROM that defines
5901various parameters such as serial number, MAC address, and featureset.
5902This program allows you to view and manipulate this EEPROM list.")
5903 (home-page "https://github.com/xobs/novena-eeprom/")
5904 (supported-systems '("armhf-linux"))
5905 (license license:bsd-3)))
5906
5907(define-public lrzsz
5908 (package
5909 (name "lrzsz")
5910 (version "0.12.20")
5911 (source (origin
5912 (method url-fetch)
5913 (uri (string-append "https://www.ohse.de/uwe/releases/lrzsz-"
5914 version ".tar.gz"))
5915 (sha256
5916 (base32
5917 "1wcgfa9fsigf1gri74gq0pa7pyajk12m4z69x7ci9c6x9fqkd2y2"))))
5918 (build-system gnu-build-system)
5919 (arguments
5920 `(#:phases
5921 (modify-phases %standard-phases
5922 (replace 'configure
5923 (lambda* (#:key outputs #:allow-other-keys)
5924 (setenv "CONFIG_SHELL" (which "bash"))
5925 (setenv "CFLAGS"
5926 (string-append "-g -O2 "
5927 "-Wno-error=implicit-int "
5928 "-Wno-error=implicit-function-declaration "
5929 "-Wno-error=incompatible-pointer-types"))
5930 (invoke "./configure"
5931 (string-append "--prefix="
5932 (assoc-ref outputs "out"))))))))
5933 (synopsis "Implementation of XMODEM/YMODEM/ZMODEM transfer protocols")
5934 (description "This package provides programs that transfer files using
5935the XMODEM/YMODEM/ZMODEM file transfer protocols.")
5936 (home-page "https://ohse.de/uwe/software/lrzsz.html")
5937 (license license:gpl2+)))
5938
5939(define-public nq
5940 (package
5941 (name "nq")
5942 (version "1.0")
5943 (source
5944 (origin
5945 (method git-fetch)
5946 (uri (git-reference
5947 (url "https://github.com/leahneukirchen/nq")
5948 (commit (string-append "v" version))))
5949 (file-name (git-file-name name version))
5950 (sha256
5951 (base32 "0pl84vrjg7l0gyjar7v0qn4v63n30b93nbldxawbmqls9m443mc1"))))
5952 (build-system gnu-build-system)
5953 (native-inputs
5954 (list perl))
5955 (arguments
5956 (list #:make-flags
5957 #~(list (string-append "CC=" #$(cc-for-target))
5958 (string-append "PREFIX=" #$output))
5959 #:phases
5960 #~(modify-phases %standard-phases
5961 (delete 'configure))))
5962 (synopsis "Unix command line queue utility")
5963 (description
5964 "@code{nq} can create very lightweight job queue systems which require no
5965setup, maintenance, supervision, or any long-running processes.")
5966 (home-page "https://github.com/leahneukirchen/nq")
5967 (license license:public-domain)))
5968
5969(define-public lsofgraph
5970 (let ((commit "1d414bdc727c00a8c6cbfffc3c43128c60d6f0de")
5971 (revision "1"))
5972 (package
5973 (name "lsofgraph")
5974 (version (git-version "0.0.1" revision commit)) ;no upstream release
5975 (source (origin
5976 (method git-fetch)
5977 (uri (git-reference
5978 (url "https://github.com/zevv/lsofgraph")
5979 (commit commit)))
5980 (file-name (git-file-name name version))
5981 (sha256
5982 (base32
5983 "058x04yp6bc77hbl3qchqm7pa8f9vqfl9jryr88m8pzl7kvpif54"))))
5984 (build-system trivial-build-system)
5985 (inputs
5986 (list lua))
5987 (arguments
5988 `(#:modules ((guix build utils))
5989 #:builder
5990 (begin
5991 (use-modules (guix build utils))
5992 ;; copy source
5993 (copy-recursively (assoc-ref %build-inputs "source") ".")
5994 ;; patch-shebang phase
5995 (setenv "PATH"
5996 (string-append (assoc-ref %build-inputs "lua") "/bin"
5997 ":" (getenv "PATH")))
5998 (substitute* "lsofgraph"
5999 (("#!/usr/bin/env lua")
6000 (string-append "#!" (which "lua"))))
6001 ;; install phase
6002 (install-file "lsofgraph" (string-append %output "/bin"))
6003 (let ((doc (string-append
6004 %output "/share/doc/" ,name "-" ,version)))
6005 (mkdir-p doc)
6006 (install-file "LICENSE" doc)
6007 (install-file "README.md" doc))
6008 #t)))
6009 (home-page "https://github.com/zevv/lsofgraph")
6010 (synopsis "Convert @code{lsof} output to @code{graphviz}")
6011 (description "Utility to convert @code{lsof} output to a graph showing
6012FIFO and UNIX interprocess communication.")
6013 (license license:bsd-2))))
6014
6015(define-public runitor
6016 (package
6017 (name "runitor")
6018 (version "1.3.0-build.4")
6019 (source
6020 (origin
6021 (method git-fetch)
6022 (uri (git-reference
6023 (url "https://github.com/bdd/runitor")
6024 (commit (string-append "v" version))))
6025 (file-name (git-file-name name version))
6026 (sha256
6027 (base32 "00l83jcjmf5kcq8yzq575kk6ljkkr2xhm5cx27zzb1yhxn93xj7n"))))
6028 (build-system go-build-system)
6029 (arguments
6030 `(#:unpack-path "bdd.fi/x/runitor"
6031 #:build-flags '(,(string-append "-ldflags=-X main.Version=" version))
6032 #:import-path "bdd.fi/x/runitor/cmd/runitor"
6033 #:install-source? #f))
6034 (home-page "https://github.com/bdd/runitor")
6035 (synopsis "Command runner with healthchecks.io integration")
6036 (description
6037 "Runitor runs the supplied command, captures its output, and based on its
6038exit code reports successful or failed execution to
6039@url{https://healthchecks.io,https://healthchecks.io} or your private instance.")
6040 (license license:bsd-0)))
6041
6042(define-public udpcast
6043 (package
6044 (name "udpcast")
6045 (version "20250223")
6046 (source
6047 (origin
6048 (method url-fetch)
6049 ;; XXX: Original server is at https://www.udpcast.linux.lu is not
6050 ;; reliable.
6051 (uri (list (string-append
6052 "https://fossies.org/linux/privat/udpcast-"
6053 version ".tar.gz")
6054 (string-append
6055 "https://www.udpcast.linux.lu/download/udpcast-"
6056 version ".tar.gz")))
6057 (sha256
6058 (base32 "19qa6yp0svhvyra4898c6kjs56bn7yr9cavxk1vbrqbpr1a7bzff"))))
6059 (build-system gnu-build-system)
6060 (native-inputs
6061 (list autoconf automake m4 perl))
6062 (arguments
6063 (list #:tests? #f ;no test suite
6064 #:make-flags #~(list (string-append "sbindir=" #$output "/sbin/"))))
6065 (synopsis "Multicast file transfer tool")
6066 (description
6067 "UDPcast is a file transfer tool that can send data simultaneously to
6068many destinations on a LAN. This can for instance be used to install entire
6069classrooms of PC's at once. The advantage of UDPcast over using other
6070methods (nfs, ftp, whatever) is that UDPcast uses UDP's multicast abilities:
6071it won't take longer to install 15 machines than it would to install just 2.")
6072 (home-page "https://www.udpcast.linux.lu")
6073 (license license:gpl2+)))
6074
6075(define-public greetd
6076 (package
6077 (name "greetd")
6078 (version "0.10.3")
6079 (home-page "https://git.sr.ht/~kennylevinsen/greetd")
6080 (source (origin
6081 (method git-fetch)
6082 (uri (git-reference
6083 (url home-page)
6084 (commit version)))
6085 (file-name (git-file-name name version))
6086 (sha256
6087 (base32 "1j3c7skby9scsq6p1f6nacbiy9b26y1sswchdsp8p3vv7fgdh2wf"))))
6088 (build-system cargo-build-system)
6089 (arguments
6090 `(#:install-source? #f
6091 #:phases
6092 (modify-phases %standard-phases
6093 (add-after 'unpack 'patch-/bin/sh
6094 (lambda* (#:key inputs #:allow-other-keys)
6095 (substitute* "greetd/src/session/worker.rs"
6096 (("/bin/sh") (search-input-file inputs "/bin/sh")))))
6097 (add-after 'build 'build-man-pages
6098 (lambda* (#:key inputs #:allow-other-keys)
6099 (define (scdoc-cmd doc lvl)
6100 (system (string-append "scdoc < "
6101 doc "-" lvl ".scd > "
6102 doc "." lvl)))
6103 (with-directory-excursion "man"
6104 (scdoc-cmd "greetd" "1")
6105 (scdoc-cmd "greetd" "5")
6106 (scdoc-cmd "greetd-ipc" "7")
6107 (scdoc-cmd "agreety" "1"))))
6108 (replace 'install
6109 (lambda* (#:key inputs outputs #:allow-other-keys)
6110 (let* ((out (assoc-ref outputs "out"))
6111 (bin (string-append out "/bin"))
6112 (sbin (string-append out "/sbin"))
6113 (share (string-append out "/share"))
6114 (man (string-append share "/man"))
6115 (man1 (string-append man "/man1"))
6116 (man5 (string-append man "/man5"))
6117 (man7 (string-append man "/man7"))
6118 (release ,(if (%current-target-system)
6119 (string-append
6120 "target/"
6121 (platform-rust-target
6122 (lookup-platform-by-target
6123 (%current-target-system)))
6124 "/release")
6125 "target/release"))
6126 (greetd-bin (string-append release "/greetd"))
6127 (agreety-bin (string-append release "/agreety")))
6128 (install-file greetd-bin sbin)
6129 (install-file agreety-bin bin)
6130 (with-directory-excursion "man"
6131 (install-file "greetd.1" man1)
6132 (install-file "greetd.5" man5)
6133 (install-file "greetd-ipc.7" man7)
6134 (install-file "agreety.1" man1))))))))
6135 (inputs
6136 ;; Full bash, not bash-minimal. See https://issues.guix.gnu.org/76105.
6137 (cons* bash linux-pam (cargo-inputs 'greetd)))
6138 (native-inputs
6139 (list scdoc))
6140 (synopsis "Minimal and flexible login manager daemon")
6141 (description
6142 "greetd is a minimal and flexible login manager daemon
6143that makes no assumptions about what you want to launch.
6144
6145If you can run it from your shell in a TTY, greetd can start it.
6146
6147If it can be taught to speak a simple JSON-based IPC protocol,
6148then it can be a greeter.")
6149 (license license:gpl3+)))
6150
6151(define-public greetd-pam-mount
6152 (package
6153 (inherit pam-mount)
6154 (name "greetd-pam-mount")
6155 (arguments
6156 (substitute-keyword-arguments (package-arguments pam-mount)
6157 ((#:configure-flags flags ''())
6158 #~(cons* "--with-rundir=/run/greetd" #$flags))
6159 ((#:phases phases)
6160 #~(modify-phases #$phases
6161 (add-after 'unpack 'patch-config-file-name
6162 (lambda* (#:key inputs #:allow-other-keys)
6163 (substitute* "src/pam_mount.c"
6164 ((".*define CONFIGFILE .*$")
6165 "#define CONFIGFILE \"/etc/security/greetd_pam_mount.conf.xml\"\n")
6166 (("pam_mount_config") "greetd_pam_mount_config")
6167 (("pam_mount_system_authtok") "greetd_pam_mount_system_authtok"))))))))
6168 (synopsis "PAM module to mount volumes for a user session (greetd variant)")
6169 (description
6170 "Pam-mount is a PAM module to mount volumes when a user logs in.
6171It can mount all local file systems supported by @command{mount}, as well as
6172LUKS volumes encrypted with the user's log-in password.
6173
6174This package inherits pam-mount but is compiled specifically for use with
6175the @command{greetd} log-in manager. It uses a different configuration
6176location and PAM name space from the original.
6177
6178This allows greetd-pam-mount to auto-(un)mount @env{XDG_RUNTIME_DIR} without
6179interfering with any pam-mount configuration.")))
6180
6181(define-public wlgreet
6182 (package
6183 (name "wlgreet")
6184 (version "0.5.0")
6185 (source (origin
6186 (method git-fetch)
6187 (uri (git-reference
6188 (url "https://git.sr.ht/~kennylevinsen/wlgreet")
6189 (commit version)))
6190 (file-name (git-file-name name version))
6191 (sha256
6192 (base32
6193 "0d7lfx5jg2w7fp7llwrirnbsp27nv74f21mhrspd9ilk2cacf12d"))))
6194 (build-system cargo-build-system)
6195 (arguments
6196 (list #:phases
6197 #~(modify-phases %standard-phases
6198 (add-after 'unpack 'remove-bundled-fonts
6199 (lambda _
6200 (delete-file-recursively "fonts")))
6201 (add-after 'remove-bundled-fonts 'fix-font-references
6202 (lambda* (#:key inputs #:allow-other-keys)
6203 (substitute* "src/draw.rs"
6204 (("\\.\\./fonts/dejavu/DejaVuSansMono\\.ttf")
6205 (search-input-file
6206 inputs
6207 "share/fonts/truetype/DejaVuSansMono.ttf"))
6208 (("\\.\\./fonts/Roboto-Regular\\.ttf")
6209 (search-input-file
6210 inputs
6211 "share/fonts/truetype/Roboto-Regular.ttf")))))
6212 (add-after 'configure 'fix-library-references
6213 (lambda* (#:key inputs vendor-dir #:allow-other-keys)
6214 (substitute* (find-files vendor-dir "\\.rs$")
6215 (("lib(wayland-.*|xkbcommon)\\.so" so-file)
6216 (search-input-file
6217 inputs
6218 (string-append "lib/" so-file)))))))))
6219 (inputs
6220 (cons* font-dejavu
6221 font-google-roboto
6222 libxkbcommon
6223 wayland
6224 (cargo-inputs 'wlgreet)))
6225 (home-page "https://git.sr.ht/~kennylevinsen/wlgreet")
6226 (synopsis "Bare-bones Wayland-based greeter for @command{greetd}")
6227 (description
6228 "@command{wlgreet} provides a @command{greetd} greeter
6229that runs on a Wayland compositor such as @command{sway}. It
6230is implemented with pure Wayland APIs, so it does not depend
6231on a GUI toolkit.")
6232 (license license:gpl3)))
6233
6234(define-public gtkgreet
6235 (package
6236 (name "gtkgreet")
6237 (version "0.8")
6238 (source
6239 (origin
6240 (method git-fetch)
6241 (uri (git-reference
6242 (url "https://git.sr.ht/~kennylevinsen/gtkgreet")
6243 (commit version)))
6244 (file-name (git-file-name name version))
6245 (sha256
6246 (base32 "0bqxz39lc8vh6bkirvrbn2lgf1qz5b04lfwgp5xa1ki1bnm5i80q"))))
6247 (build-system meson-build-system)
6248 (native-inputs (list pkg-config scdoc))
6249 (inputs (list gtk+ gtk-layer-shell json-c))
6250 (synopsis "GTK-based greeter for greetd")
6251 (description
6252 "GTK-based greeter for greetd, to be run under a compositor such as Cage.")
6253 (home-page "https://git.sr.ht/~kennylevinsen/gtkgreet")
6254 (license license:gpl3+)))
6255
6256(define-public tuigreet
6257 (package
6258 (name "tuigreet")
6259 (version "0.9.1")
6260 (source (origin
6261 (method git-fetch)
6262 (uri (git-reference
6263 (url "https://github.com/apognu/tuigreet")
6264 (commit version)))
6265 (file-name (git-file-name name version))
6266 (sha256
6267 (base32
6268 "15h2b97clllbhlw5jc4lwkmir18njnyk56zghafsas84m6jjsikv"))))
6269 (build-system cargo-build-system)
6270 (arguments (list #:install-source? #f))
6271 (inputs (cargo-inputs 'tuigreet))
6272 (home-page "https://github.com/apognu/tuigreet")
6273 (synopsis "Graphical console greeter for @code{greetd}")
6274 (description
6275 "This package provides a graphical console greeter for @code{greetd}. It
6276doesn't need a Wayland compositor to be used.")
6277 (license license:gpl3+)))
6278
6279(define-public libseat
6280 (package
6281 (name "libseat")
6282 (version "0.9.1")
6283 (source (origin
6284 (method git-fetch)
6285 (uri (git-reference
6286 (url "https://git.sr.ht/~kennylevinsen/seatd")
6287 (commit version)))
6288 (file-name (git-file-name name version))
6289 (sha256
6290 (base32
6291 "1q1ih1f9v5240nlas1gz44giwq4k88p3yikfq7w0a4sw58yr6pz8"))))
6292 (build-system meson-build-system)
6293 (arguments
6294 (list #:configure-flags #~(list "-Dlibseat-logind=elogind"
6295 "-Dserver=disabled")))
6296 (native-inputs
6297 (list pkg-config))
6298 (propagated-inputs
6299 (list elogind))
6300 (home-page "https://sr.ht/~kennylevinsen/seatd")
6301 (synopsis "Seat management library")
6302 (description
6303 "This package provides a universal seat management library that
6304allows applications to use whatever seat management is available.")
6305 (license license:expat)))
6306
6307(define-public seatd
6308 (package
6309 (inherit libseat)
6310 (name "seatd")
6311 (arguments
6312 (list #:configure-flags #~(list "-Dlibseat-logind=elogind")
6313 #:phases
6314 #~(modify-phases %standard-phases
6315 (add-after 'install 'remove-libs
6316 (lambda* (#:key outputs #:allow-other-keys)
6317 (with-directory-excursion (assoc-ref outputs "out")
6318 (for-each delete-file-recursively '("lib" "include"))))))))
6319 (native-inputs
6320 (list pkg-config
6321 scdoc))
6322 (inputs '())
6323 (synopsis "Seat management daemon")
6324 (description
6325 "This package provides a minimal seat management daemon whose task is to
6326mediate access to shared devices, such as graphics and input, for applications
6327that require it.")
6328 (license license:expat)))
6329
6330(define-public sysdig
6331 (package
6332 (name "sysdig")
6333 (version "0.40.1")
6334 (source (origin
6335 (method git-fetch)
6336 (uri (git-reference
6337 (url "https://github.com/draios/sysdig")
6338 (commit version)))
6339 (file-name (git-file-name name version))
6340 (sha256
6341 (base32
6342 "1npm630fix7vssd7hiv2sh3jbs43jl748zbrhwpx8gly25zqvy1h"))))
6343 (build-system cmake-build-system)
6344 (arguments
6345 (list #:tests? #f ;no test suite
6346 #:configure-flags
6347 #~(list "-DUSE_BUNDLED_DEPS=OFF"
6348 ;; Already built and part of falcosecurity-libs, but
6349 ;; needed for the 'HAS_MODERN_BPF' define.
6350 "-DBUILD_SYSDIG_MODERN_BPF=ON"
6351 #$(string-append "-DSYSDIG_VERSION=" version))))
6352 (native-inputs (list pkg-config))
6353 (inputs
6354 (list falcosecurity-libs
6355 luajit
6356 ncurses
6357 nlohmann-json
6358 yaml-cpp
6359 zlib))
6360 (home-page "https://github.com/draios/sysdig")
6361 (synopsis "System exploration and troubleshooting tool")
6362 (description "Sysdig is a simple tool for deep system visibility, with
6363native support for containers. It combines features of multiple system
6364administration tools such as the @command{strace}, @command{tcpdump},
6365@command{htop}, @command{iftop} and @command{lsof} into a single interface.
6366The novel architecture of the tool means that the performance impact of the
6367tracing on the system is very light, compared to the likes of
6368@command{strace}. The @command{sysdig} command has an interface similar to
6369@command{strace}, while the @command{csysdig} command is better suited for
6370interactive used, and has a user interface similar to @command{htop}.
6371
6372If you use Guix System, the kernel Linux has @acronym{BPF, Berkeley Packet
6373Filter} support, and you should launch this tool using the @samp{--modern-bpf}
6374argument of the @command{sysdig} or @command{csysdig} commands. The following
6375Bash aliases can be added to your @file{~/.bash_profile} file, for example:
6376
6377alias sysdig=sudo sysdig --modern-bpf
6378alias cysdig=sudo csysdig --modern-bpf
6379") ;XXX no @example Texinfo support
6380 (license license:asl2.0)))
6381
6382(define-public fail2ban
6383 (package
6384 (name "fail2ban")
6385 (version "1.1.0")
6386 (source
6387 (origin
6388 (method git-fetch)
6389 (uri (git-reference
6390 (url "https://github.com/fail2ban/fail2ban")
6391 (commit version)))
6392 (file-name (git-file-name name version))
6393 (sha256
6394 (base32 "0lfakna6ad2xwz95sjxzkavipcsxiy7ybavkdkf9zzmspf2ws4yk"))
6395 (modules '((guix build utils)))
6396 (snippet #~(begin
6397 ;; Replacing those by our own paths-guix.conf
6398 (with-directory-excursion "config"
6399 (for-each delete-file
6400 '("paths-arch.conf" "paths-debian.conf"
6401 "paths-fedora.conf" "paths-freebsd.conf"
6402 "paths-opensuse.conf" "paths-osx.conf")))))
6403 (patches (search-patches "fail2ban-fix-sshd-filter.patch"
6404 "fail2ban-paths-guix-conf.patch"))))
6405 (build-system pyproject-build-system)
6406 (arguments
6407 (list
6408 #:phases
6409 #~(modify-phases %standard-phases
6410 (add-after 'unpack 'avoid-external-binary-in-/bin
6411 (lambda _
6412 (delete-file "fail2ban/setup.py")
6413 (substitute* '("bin/fail2ban-testcases" "setup.py")
6414 ((".*updatePyExec.*")
6415 ""))))
6416 (add-after 'unpack 'patch-setup.py
6417 (lambda _
6418 ;; Get rid of absolute file names.
6419 (substitute* "setup.py"
6420 (("/etc/fail2ban")
6421 "etc/fail2ban")
6422 (("/var/lib/fail2ban")
6423 "var/lib/fail2ban")
6424 (("\"/usr/bin/\"")
6425 "\"usr/bin/\"")
6426 (("\"/usr/lib/fail2ban/\"")
6427 "\"usr/lib/fail2ban/\"")
6428 (("'/usr/share/doc/fail2ban'")
6429 "'usr/share/doc/fail2ban'"))))
6430 (add-after 'unpack 'disable-some-tests
6431 (lambda _
6432 (define (make-suite-regex tests)
6433 (string-append "tests.addTest\\(loadTests\\(("
6434 (string-join tests "|")
6435 ")\\)\\)"))
6436 ;; disable tests performing unacceptable side-effects
6437 (substitute* "fail2ban/tests/utils.py"
6438 (((make-suite-regex (list "actiontestcase.CommandActionTest"
6439 "misctestcase.SetupTest"
6440 "filtertestcase.DNSUtilsNetworkTests"
6441 "filtertestcase.IgnoreIPDNS"
6442 "filtertestcase.GetFailures"
6443 "fail2banclienttestcase.Fail2banServerTest"
6444 "servertestcase.ServerConfigReaderTests")))
6445 ""))))
6446 (add-before 'build 'fix-default-config
6447 (lambda _
6448 (substitute* '("config/paths-common.conf"
6449 "fail2ban/tests/utils.py"
6450 "fail2ban/client/configreader.py"
6451 "fail2ban/client/fail2bancmdline.py"
6452 "fail2ban/client/fail2banregex.py")
6453 (("/etc/fail2ban")
6454 (string-append #$output "/etc/fail2ban")))))
6455 (replace 'check
6456 (lambda* (#:key tests? test-flags #:allow-other-keys)
6457 (when tests?
6458 (invoke "./bin/fail2ban-testcases"))))
6459 (add-after 'fix-default-config 'set-action-dependencies
6460 (lambda* (#:key inputs #:allow-other-keys)
6461 ;; deleting things that are not feasible to fix
6462 ;; or won't be used any way
6463 (with-directory-excursion "config/action.d"
6464 (for-each delete-file
6465 '("apf.conf"
6466 "bsd-ipfw.conf"
6467 "dshield.conf"
6468 "ipfilter.conf"
6469 "ipfw.conf"
6470 "firewallcmd-allports.conf"
6471 "firewallcmd-common.conf"
6472 "firewallcmd-ipset.conf"
6473 "firewallcmd-multiport.conf"
6474 "firewallcmd-new.conf"
6475 "firewallcmd-rich-logging.conf"
6476 "firewallcmd-rich-rules.conf"
6477 "osx-afctl.conf"
6478 "osx-ipfw.conf"
6479 "pf.conf"
6480 "nginx-block-map.conf"
6481 "npf.conf"
6482 "shorewall.conf"
6483 "shorewall-ipset-proto6.conf"
6484 "ufw.conf")))
6485 (define (lookup dir file)
6486 (search-input-file inputs (string-append "/" dir "/" file)))
6487
6488 (substitute* (find-files "config/action.d" "\\.conf$")
6489 ;; TODO: deal with geoiplookup ..
6490 (("(awk|curl|dig|jq)" all cmd)
6491 (lookup "bin" cmd))
6492 (("(cat|echo|grep|head|printf|wc) " all cmd)
6493 (string-append (lookup "bin" cmd) " "))
6494 ((" (date|rm|sed|tail|touch|tr) " all cmd)
6495 (string-append " " (lookup "bin" cmd) " "))
6496 (("cut -d")
6497 (string-append (lookup "bin" "cut") " -d"))
6498 (("`date`")
6499 (string-append "`" (lookup "bin" "date") "`"))
6500 (("id -")
6501 (string-append (lookup "bin" "id") " -"))
6502 (("ip (route|-[46] addr)" all rest)
6503 (string-append (lookup "sbin" "ip") rest))
6504 (("ipset ")
6505 (string-append (lookup "sbin" "ipset") " "))
6506 (("(iptables|ip6tables) <" all cmd)
6507 (string-append (lookup "sbin" cmd) " <"))
6508 (("/usr/bin/nsupdate")
6509 (lookup "bin" "nsupdate"))
6510 (("mail -E")
6511 (string-append (lookup "sbin" "sendmail") " -E"))
6512 (("nftables = nft")
6513 (string-append "nftables = " (lookup "sbin" "nft")))
6514 (("perl -e")
6515 (string-append (lookup "bin" "perl") " -e"))
6516 (("/usr/sbin/sendmail")
6517 (lookup "sbin" "sendmail"))
6518 (("test -e")
6519 (string-append (lookup "bin" "test") " -e"))
6520 (("_whois = whois")
6521 (string-append "_whois = " (lookup "bin" "whois"))))
6522
6523 (substitute* "config/jail.conf"
6524 (("before = paths-debian\\.conf")
6525 "before = paths-guix.conf"))))
6526 (add-after 'install 'copy-man-pages
6527 (lambda _
6528 (define (install-man m)
6529 (lambda (f)
6530 (install-file (string-append f "." m)
6531 (string-append #$output "man/man" m))))
6532
6533 (with-directory-excursion "man"
6534 (for-each (install-man "1")
6535 '("fail2ban" "fail2ban-client" "fail2ban-python"
6536 "fail2ban-regex" "fail2ban-server"
6537 "fail2ban-testcases"))
6538 ((install-man "5") "jail.conf")))))))
6539 (native-inputs (list python-aiosmtpd
6540 python-setuptools))
6541 (inputs (list gawk
6542 coreutils-minimal
6543 curl
6544 grep
6545 jq
6546 iproute
6547 ipset
6548 iptables
6549 `(,isc-bind "utils")
6550 nftables
6551 perl
6552 python-pyinotify
6553 sed
6554 sendmail
6555 sqlite
6556 whois))
6557 (home-page "http://www.fail2ban.org")
6558 (synopsis "Daemon to ban hosts that cause multiple authentication errors")
6559 (description
6560 "Fail2Ban scans log files like @file{/var/log/auth.log} and bans IP
6561addresses conducting too many failed login attempts. It does this by updating
6562system firewall rules to reject new connections from those IP addresses, for a
6563configurable amount of time. Fail2Ban comes out-of-the-box ready to read many
6564standard log files, such as those for sshd and Apache, and is easily
6565configured to read any log file of your choosing, for any error you wish.
6566
6567Though Fail2Ban is able to reduce the rate of incorrect authentication
6568attempts, it cannot eliminate the risk presented by weak authentication. Set
6569up services to use only two factor, or public/private authentication
6570mechanisms if you really want to protect services.")
6571 (license license:gpl2+)))
6572
6573(define-public restartd
6574 (let* ((commit "7044125ac55056f2663536f7137170edf92ebd75")
6575 ;; Version is 0.2.4 in the version file in the repo
6576 ;; but not in github tags.
6577 ;; It is released as 0.2.3-1.1 for other distributions.
6578 ;; Probably because of the lack of activity upstream.
6579 (revision "1"))
6580 (package
6581 (name "restartd")
6582 (version (git-version "0.2.3" revision commit))
6583 (source
6584 (origin
6585 (method git-fetch)
6586 (uri (git-reference
6587 (url "https://github.com/ajraymond/restartd")
6588 (commit commit)))
6589 (file-name (git-file-name name version))
6590 (sha256
6591 (base32
6592 "1m1np00b4zvvwx63gzysbi38i5vj1jsjvh2s0p9czl6dzyz582z0"))
6593 (patches (search-patches "restartd-update-robust.patch"))))
6594 (build-system gnu-build-system)
6595 (arguments
6596 (list
6597 #:tests? #f ; no tests
6598 #:make-flags
6599 #~(list (string-append "CC=" #$(cc-for-target)))
6600 #:phases
6601 #~(modify-phases %standard-phases
6602 (delete 'configure)
6603 (replace 'install
6604 (lambda _
6605 (install-file "restartd.conf" (string-append #$output "/etc"))
6606 (install-file "restartd" (string-append #$output "/sbin"))
6607 (install-file "restartd.8"
6608 (string-append #$output "/share/man/man8"))
6609 (mkdir-p (string-append #$output "/share/man/fr/man8"))
6610 (copy-file
6611 "restartd.fr.8"
6612 (string-append #$output "/share/man/fr/man8/restartd.8")))))))
6613 (home-page "https://launchpad.net/debian/+source/restartd")
6614 (synopsis "Daemon for restarting processes")
6615 (description "This package provides a daemon for checking running and
6616not running processes. It reads the @file{/proc} directory every @var{n}
6617seconds and does a POSIX regexp on the process names. The daemon runs a
6618user-provided script when it detects a program in the running processes, or an
6619alternate script if it doesn't detect the program. The daemon can only be
6620called by the root user, but can use @command{sudo -u user} in the process
6621called if needed.")
6622 (license license:gpl2+))))
6623
6624(define-public rex
6625 (package
6626 (name "rex")
6627 (version "4.1")
6628 (source (origin
6629 (method url-fetch)
6630 (uri (string-append
6631 "https://download.gnu.org.ua/pub/releases/rex/rex-"
6632 version ".tar.gz"))
6633 (sha256
6634 (base32
6635 "1arb8z602invwavskq36nhwy42a3v14iyhi06iqlngfai2k93fai"))))
6636 (build-system gnu-build-system)
6637 (arguments
6638 (list
6639 #:tests? #f ; no tests
6640 #:phases
6641 #~(modify-phases %standard-phases
6642 ;; No configure script and Makefile.
6643 (delete 'configure)
6644 (delete 'build)
6645 (add-before 'install 'patch-exec-expect
6646 (lambda _
6647 (substitute* "rex"
6648 (("exec expect") (string-append "exec " (which "expect"))))))
6649 (replace 'install
6650 (lambda _
6651 (invoke "./install"
6652 (string-append "--prefix=" #$output)))))))
6653 (inputs (list expect))
6654 (home-page "https://www.gnu.org.ua/software/rex/")
6655 (synopsis "Remote execution utility")
6656 (description "@command{rex} runs a supplied command or shell script on
6657several hosts in succession or in parallel. It can also be used to copy a
6658file or files to several hosts.")
6659 (license license:gpl3+)))
6660
6661(define-public doctl
6662 (package
6663 (name "doctl")
6664 (version "1.120.0")
6665 (source (origin
6666 (method git-fetch)
6667 (uri (git-reference
6668 (url "https://github.com/digitalocean/doctl")
6669 (commit (string-append "v" version))))
6670 (file-name (git-file-name name version))
6671 (sha256
6672 (base32
6673 "12fgymgiv6894ghar7ljg69hb7mi18pa2a74sp7fyymqvyhiv6z9"))
6674 (snippet
6675 ;; TODO: Unbundle more.
6676 #~(begin (use-modules (guix build utils))
6677 (for-each delete-file-recursively
6678 (list "vendor/golang.org"))))))
6679 (build-system go-build-system)
6680 (arguments
6681 (list #:import-path "github.com/digitalocean/doctl/cmd/doctl"
6682 #:unpack-path "github.com/digitalocean/doctl"
6683 #:build-flags
6684 #~(list (string-append "-ldflags=-X github.com/digitalocean/doctl.Label=release"
6685 " -X github.com/digitalocean/doctl.Major="
6686 (car (string-split #$version #\.))
6687 " -X github.com/digitalocean/doctl.Minor="
6688 (cadr (string-split #$version #\.))
6689 " -X github.com/digitalocean/doctl.Patch="
6690 (caddr (string-split #$version #\.))))
6691 #:install-source? #f
6692 #:phases
6693 #~(modify-phases %standard-phases
6694 (add-after 'install 'install-completions
6695 (lambda _
6696 (define (install-completion shell file)
6697 (let ((file (string-append #$output file)))
6698 (mkdir-p (dirname file))
6699 (with-output-to-file file
6700 (lambda _
6701 (invoke (string-append #$output "/bin/doctl")
6702 "completion" shell)))))
6703 (install-completion "bash" "/etc/bash_completion.d/doctl")
6704 (install-completion "fish"
6705 "/etc/fish/completions/doctl.fish")
6706 (install-completion "zsh"
6707 "/etc/zsh/site-functions/_doctl"))))))
6708 (native-inputs
6709 (list go-golang-org-x-crypto
6710 go-golang-org-x-mod
6711 go-golang-org-x-net
6712 go-golang-org-x-oauth2
6713 go-golang-org-x-sync
6714 go-golang-org-x-sys
6715 go-golang-org-x-term
6716 go-golang-org-x-text
6717 go-golang-org-x-time
6718 go-golang-org-x-tools))
6719 (home-page "https://github.com/digitalocean/doctl")
6720 (synopsis "Command line client for DigitalOcean")
6721 (description
6722 "@code{doctl} provides a unified command line interface to the DigitalOcean API.")
6723 (license license:asl2.0)))
6724
6725(define-public du-dust
6726 (package
6727 (name "du-dust")
6728 (version "1.2.0")
6729 (source
6730 (origin
6731 (method url-fetch)
6732 (uri (crate-uri "du-dust" version))
6733 (file-name (string-append name "-" version ".tar.gz"))
6734 (sha256
6735 (base32 "1nx3a1vij6m7jkmjybaxpjmwqygh0byjqis94f8lx02i1yyw2w1d"))))
6736 (build-system cargo-build-system)
6737 (arguments
6738 (list #:install-source? #f
6739 #:phases #~(modify-phases %standard-phases
6740 (add-after 'install 'install-extras
6741 (lambda* (#:key outputs #:allow-other-keys)
6742 (let* ((out (assoc-ref outputs "out"))
6743 (share (string-append out "/share")))
6744 (install-file "man-page/dust.1"
6745 (string-append share "/man/man1"))
6746 (mkdir-p (string-append out
6747 "/share/bash-completion/completions"))
6748 (copy-file
6749 "completions/dust.bash"
6750 (string-append
6751 out "/share/bash-completion/completions/dust"))
6752 (install-file "completions/dust.fish"
6753 (string-append share
6754 "/fish/vendor_completions.d"))
6755 (install-file "completions/_dust"
6756 (string-append share
6757 "/zsh/site-functions"))))))))
6758 (inputs (cargo-inputs 'du-dust))
6759 (home-page "https://github.com/bootandy/dust")
6760 (synopsis "Graphical disk usage analyzer")
6761 (description "This package provides a graphical disk usage analyzer in
6762text mode.")
6763 (license license:asl2.0)))
6764
6765(define-public mactelnet
6766 (package
6767 (name "mactelnet")
6768 (version "0.4.4")
6769 (source (origin
6770 (method git-fetch)
6771 (uri (git-reference
6772 (url "https://github.com/haakonnessjoen/MAC-Telnet")
6773 (commit (string-append "v" version))))
6774 (file-name (git-file-name name version))
6775 (sha256
6776 (base32
6777 "1z63dz22crrvrm0sh2cwpyqb7wqd9m45m6f2641mwmyp6hcpf4k4"))
6778 (patches (search-patches "mactelnet-remove-init.patch"))
6779 (modules '((guix build utils)))
6780 (snippet
6781 #~(begin
6782 (delete-file "src/utlist.h")
6783 (substitute* (find-files "src/" "\\.c$")
6784 (("\"utlist\\.h\"") "<utlist.h>"))))))
6785 (build-system gnu-build-system)
6786 (arguments
6787 (list
6788 #:tests? #f)) ; no tests
6789 (native-inputs (list autoconf automake gettext-minimal))
6790 (inputs (list uthash))
6791 (synopsis "MAC-Telnet utilities for communicating with RouterOS devices")
6792 (description "This package provides an implementation of the MAC-Telnet protocol
6793used by RouterOS devices. It provides the following commands:
6794@table @command
6795@item{macping}
6796Ping RouterOS devices or @command{mactelnetd} hosts.
6797@item{mactelnetd}
6798MAC-Telnet daemon.
6799@item{mactelnet}
6800MAC-Telnet client.
6801@item{mndp}
6802Discover other RouterOS devices or @command{mactelnetd} hosts.
6803@end table")
6804 (home-page "https://lunatic.no/2010/10/routeros-mac-telnet-application-for-linux-users/")
6805 (license
6806 (list license:gpl2+
6807 ;; Note: applies to src/md5.{c,h}
6808 ;; This file is likely to be gone in the next release.
6809 license:zlib))))
6810
6811(define-public bfs
6812 (package
6813 (name "bfs")
6814 (version "3.0.4")
6815 (source (origin
6816 (method git-fetch)
6817 (uri (git-reference
6818 (url "https://github.com/tavianator/bfs")
6819 (commit version)))
6820 (file-name (git-file-name name version))
6821 (sha256
6822 (base32
6823 "0n2y9m81278j85m8vk242m9nsxdcw62rxsar4hzwszs6p5cjz5ny"))))
6824 (build-system gnu-build-system)
6825 (arguments
6826 (list #:make-flags #~(list (string-append "CC="
6827 #$(cc-for-target))
6828 (string-append "PREFIX="
6829 #$output) "bfs")
6830 #:phases #~(modify-phases %standard-phases
6831 (delete 'configure)
6832 (add-before 'check 'disable-exec-no-path-test
6833 (lambda _
6834 ;; This test unsets PATH. It then probably cannot find
6835 ;; echo since it's not inside _PATH_STDPATH (?). We
6836 ;; delete the test to disable it.
6837 (delete-file "tests/posix/exec_nopath.sh"))))))
6838 (inputs (list acl attr libcap oniguruma))
6839 (synopsis "Breadth-first search for your files")
6840 (description
6841 "Bfs is a variant of the UNIX @command{find} command that operates
6842breadth-first rather than depth-first. It is otherwise compatible with many
6843versions of @command{find}, including POSIX, GNU, and *BSD find.")
6844 (home-page "https://tavianator.com/projects/bfs.html")
6845 (license license:bsd-0)))
6846
6847(define-public rdfind
6848 (package
6849 (name "rdfind")
6850 (version "1.7.0")
6851 (source
6852 (origin
6853 (method url-fetch)
6854 (uri (string-append "https://rdfind.pauldreik.se/" name "-" version
6855 ".tar.gz"))
6856 (sha256
6857 (base32 "0afzwhmzlzhzzckd9iwkbx6grrzm5p4vk0zbpz8lz7hx5qan7i3q"))))
6858 (build-system gnu-build-system)
6859 (native-inputs (list which))
6860 (inputs (list nettle))
6861 (arguments
6862 (list
6863 #:phases #~(modify-phases %standard-phases
6864 (add-before 'check 'patch-tests
6865 (lambda _
6866 (substitute* (list "testcases/hardlink_fails.sh"
6867 "testcases/symlinking_action.sh")
6868 (("\"/bin/sh -c\"")
6869 (format #f
6870 "\"~a -c\""
6871 (search-input-file %build-inputs "/bin/sh"))))
6872 (substitute* "testcases/common_funcs.sh"
6873 (("/bin/echo")
6874 (search-input-file %build-inputs "/bin/echo"))))))))
6875 (home-page "https://rdfind.pauldreik.se")
6876 (synopsis "Find duplicate files")
6877 (description
6878 "Rdfind is a command line tool that finds duplicate files based on
6879their content instead of their file names. It is useful for compressing
6880backup directories or just finding duplicate files.")
6881 (license license:gpl2+)))
6882
6883(define-public sshguard
6884 (package
6885 (name "sshguard")
6886 (version "2.5.1")
6887 (source
6888 (origin
6889 (method git-fetch)
6890 (uri (git-reference
6891 (url "https://bitbucket.org/sshguard/sshguard")
6892 (commit (string-append "v" version))))
6893 (file-name (git-file-name name version))
6894 (sha256
6895 (base32 "1wpxvqwk4k40liq6x5ada6zy77mnp319zz1w0cs2wyq3a5ilpnvr"))))
6896 (build-system gnu-build-system)
6897 (native-inputs
6898 (list autoconf automake bison flex python-docutils))
6899 (arguments
6900 (list #:phases
6901 #~(modify-phases %standard-phases
6902 ;; patch sshguard to find configuration through
6903 ;; environment variable
6904 (add-after 'unpack 'patch-sshguard
6905 (lambda _
6906 (substitute* "src/sshguard.in"
6907 (("^config=.*$")
6908 "config=${SSHGUARD_CONFIG_FILE:-@sysconfdir@/sshguard.conf}\n")))))))
6909 (home-page "https://sshguard.net/")
6910 (synopsis "Daemon to blocks SSH brute-force attacks")
6911 (description
6912 "SSHGuard protects hosts from brute-force attacks against SSH and other
6913services. It aggregates system logs and blocks repeat offenders using one of
6914several firewall backends.")
6915 (license license:isc)))
6916
6917(define-public px
6918 (package
6919 (name "px")
6920 (version "3.6.12")
6921 (source
6922 (origin
6923 (method git-fetch)
6924 (uri (git-reference
6925 (url "https://github.com/walles/px")
6926 (commit version)))
6927 (file-name (git-file-name name version))
6928 (sha256
6929 (base32 "06jg6izya1k5gk71pygv8691fcaa6zfnzns57fjknnihz3c42pzw"))))
6930 (build-system pyproject-build-system)
6931 (arguments
6932 (list
6933 #:test-flags
6934 ;; Tests requiring networking setup or root access.
6935 #~(list "-k" (string-join
6936 (list "not test_get_all_defaultlocale"
6937 "test_get_all_swedish"
6938 "test_match"
6939 "test_ps_line_to_process_1"
6940 "test_ps_line_to_process_2"
6941 "test_ps_line_to_process_unicode"
6942 "test_stdfds_ipc_and_network"
6943 "test_str_resolve"
6944 "test_to_screen_lines_unbounded"
6945 "test_to_screen_lines_unicode")
6946 " and not "))
6947 #:phases
6948 #~(modify-phases %standard-phases
6949 (add-after 'unpack 'patch-git
6950 (lambda* (#:key inputs #:allow-other-keys)
6951 (substitute* (find-files "px" "\\.py$")
6952 ;; We don't have MacOS X programs.
6953 (("px_exec_util[.]run[(]\\[\"(vm_stat)\"" all x)
6954 (string-append "px_exec_util.run([\""
6955 "/bin/false"
6956 "\""))
6957 ;; Patch names of executables in "sbin".
6958 (("px_exec_util[.]run[(]\\[\"(sysctl)\"" all x)
6959 (string-append "px_exec_util.run([\""
6960 (search-input-file inputs
6961 (string-append "sbin/" x))
6962 "\""))
6963 ;; Patch names of executables in "bin".
6964 (("px_exec_util[.]run[(]\\[\"([^/\"]*)\"" all x)
6965 (string-append "px_exec_util.run([\""
6966 (search-input-file inputs
6967 (string-append "bin/" x))
6968 "\"")))
6969 (substitute* "px/px_process.py"
6970 ;; Patch path name of "ps" executable.
6971 (("\"/bin/ps\"") (string-append "\""
6972 (assoc-ref inputs "procps")
6973 "/bin/ps\"")))
6974 (substitute* "setup.py"
6975 ;; Patch "git describe", replacing it by its result.
6976 (("\\[\"git\", \"describe\", \"--dirty\"\\]")
6977 (string-append "[\"echo\", \"" #$version "\"]"))))))))
6978 (native-inputs
6979 (list pkg-config
6980 python-setuptools
6981 python-wheel
6982 python-pytest
6983 python-dateutil))
6984 (inputs
6985 (list lsof
6986 net-tools
6987 procps
6988 sysstat
6989 util-linux))
6990 (home-page "https://github.com/walles/px")
6991 (synopsis "Alternative to @command{ps}, @command{top} and @command{pstree}")
6992 (description
6993 "This package provides a way to figure out which processes communicate
6994with which other processes. It provides more usable versions of @command{ps},
6995@command{top} and @command{pstree}.")
6996 (license license:expat)))
6997
6998(define-public wakelan
6999 (package
7000 (name "wakelan")
7001 (version "1.1")
7002 (source (origin
7003 (method url-fetch)
7004 (uri (string-append
7005 "ftp://ftp.gwdg.de/pub/linux/metalab/system/network/misc/wakelan-"
7006 version ".tar.gz"))
7007 (sha256
7008 (base32
7009 "0vydqpf44146ir6k87gmqaq6xy66xhc1gkr3nsd7jj3nhy7ypx9x"))))
7010 (build-system gnu-build-system)
7011 (arguments
7012 (list
7013 #:tests? #f
7014 #:phases
7015 #~(modify-phases %standard-phases
7016 (replace 'configure
7017 (lambda* (#:key inputs #:allow-other-keys)
7018 (mkdir-p (string-append #$output "/bin"))
7019 (mkdir-p (string-append #$output "/share/man/man1"))
7020
7021 ;; It's an old configure script that doesn't understand
7022 ;; the extra options we pass.
7023 (setenv "CONFIG_SHELL"
7024 (search-input-file %build-inputs "bin/bash"))
7025 (invoke "./configure"
7026 (string-append "--prefix=" #$output)
7027 (string-append "--mandir=" #$output
7028 "/share/man")))))))
7029 (home-page "https://www.kernel.org") ; really, no home page
7030 (synopsis "Send a wake-on-LAN packet")
7031 (description
7032 "WakeLan broadcasts a properly formatted UDP packet across the local area
7033network, which causes enabled computers to power on.")
7034 (license license:gpl2+)))
7035
7036(define-public witr
7037 (package
7038 (name "witr")
7039 (version "0.1.7")
7040 (source
7041 (origin
7042 (method git-fetch)
7043 (uri (git-reference
7044 (url "https://github.com/pranshuparmar/witr")
7045 (commit (string-append "v" version))))
7046 (file-name (git-file-name name version))
7047 (sha256
7048 (base32 "18xx01lxd5j019gy9jmpms3awv4snlr028w01bfkyfid6hlwxbq2"))))
7049 (build-system go-build-system)
7050 (arguments
7051 (list
7052 #:install-source? #f
7053 #:import-path "github.com/pranshuparmar/witr/cmd/witr"
7054 #:unpack-path "github.com/pranshuparmar/witr"
7055 #:build-flags #~(list "-ldflags"
7056 (string-append "-X main.version=" #$version))))
7057 (home-page "https://github.com/pranshuparmar/witr")
7058 (synopsis "Utility to show why the process is running")
7059 (description
7060 "The @dfn{witr} (why-is-this-running), is a utility to show:
7061@enumerate
7062@item What is running?
7063@item How did it start?
7064@item What is keeping it running?
7065@item What context does it belong to?
7066@end enumerate
7067It shows which process uses the port, and its information like process tree,
7068working directory, user, pid, command, and so on.")
7069 (license license:asl2.0)))
7070
7071(define-public xfel
7072 (package
7073 (name "xfel")
7074 (version "1.3.5")
7075 (source
7076 (origin
7077 (method git-fetch)
7078 (uri (git-reference
7079 (url "https://github.com/xboot/xfel")
7080 (commit (string-append "v" version))))
7081 (sha256
7082 (base32 "1vmb3dr3vplxdxn9i8i4chdnfihb429rakvkqsfccb885ivkkn3b"))
7083 (file-name (git-file-name name version))))
7084 (native-inputs
7085 (list pkg-config))
7086 (inputs
7087 (list libusb))
7088 (build-system gnu-build-system)
7089 (arguments
7090 (list #:tests? #f ; No tests exist
7091 #:make-flags #~(list "PREFIX="
7092 (string-append "DESTDIR=" #$output))
7093 #:phases
7094 #~(modify-phases %standard-phases
7095 (delete 'configure)
7096 (add-after 'unpack 'patch-makefile
7097 (lambda _
7098 (substitute* "Makefile"
7099 (("/usr/local")
7100 #$output)
7101 (("/usr/share")
7102 (string-append #$output "/share/"))
7103 (("/etc/udev/rules.d")
7104 (string-append #$output "/lib/udev/rules.d"))))))))
7105 (home-page "https://github.com/xboot/xfel")
7106 (synopsis "Remote debugging tool for Allwinner devices")
7107 (description "This package contains a debugging tool for Allwinner devices
7108(connects via USB OTG).")
7109 (license license:expat)))