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