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