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