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