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