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