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