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