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