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