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