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