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