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