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