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