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