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