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