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