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