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