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