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