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