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