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