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