projects/guix·blob java-team · refs

7167 lines · 287.8 KiB

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