gnu: opendoas: Don't pass unused target to ./configure.
[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 ;; Nothing is done with this value (yet?) but it's supported.
1492 ;; (string-append "--target=" (or ,(%current-target-system) ""))
1493 "--with-timestamp")
1494 ;; Compiler choice is not carried over from the configure script.
1495 #:make-flags
1496 (list (string-append "CC=" ,(cc-for-target)))
1497 #:tests? #f)) ; no test suite
1498 (native-inputs
1499 `(("bison" ,bison)))
1500 (home-page "https://github.com/Duncaen/OpenDoas")
1501 (synopsis "Portable version of OpenBSD's doas command")
1502 (description "Doas is a minimal replacement for the venerable sudo. It was
1503 initially written by Ted Unangst of the OpenBSD project to provide 95% of the
1504 features of sudo with a fraction of the codebase.")
1505 (license (list license:bsd-3 ; libbsd/*
1506 license:isc)))) ; everything else
1507
1508 (define-public wpa-supplicant-minimal
1509 (package
1510 (name "wpa-supplicant-minimal")
1511 (version "2.9")
1512 (source (origin
1513 (method url-fetch)
1514 (uri (string-append
1515 "https://w1.fi/releases/wpa_supplicant-"
1516 version ".tar.gz"))
1517 (sha256
1518 (base32
1519 "05qzak1mssnxcgdrafifxh9w86a4ha69qabkg4bsigk499xyxggw"))
1520 (modules '((guix build utils)))
1521 (snippet
1522 '(begin
1523 (substitute* "wpa_supplicant/defconfig"
1524 ;; Disable D-Bus to save ~14MiB on the closure size.
1525 (("^CONFIG_CTRL_IFACE_DBUS" line _)
1526 (string-append "#" line)))
1527 #t))))
1528 (build-system gnu-build-system)
1529 (arguments
1530 '(#:phases
1531 (modify-phases %standard-phases
1532 (replace 'configure
1533 (lambda* (#:key outputs #:allow-other-keys)
1534 (chdir "wpa_supplicant")
1535 (copy-file "defconfig" ".config")
1536 (let ((port (open-file ".config" "al")))
1537 (display "
1538 CONFIG_DEBUG_SYSLOG=y
1539
1540 CONFIG_TLS=openssl
1541
1542 CONFIG_DRIVER_NL80211=y
1543 CFLAGS += $(shell pkg-config libnl-3.0 --cflags)
1544 CONFIG_LIBNL32=y
1545 CONFIG_READLINE=y\n" port)
1546 (close-port port))
1547 #t))
1548 (add-after 'install 'install-documentation
1549 (lambda* (#:key outputs #:allow-other-keys)
1550 (let* ((out (assoc-ref outputs "out"))
1551 (doc (string-append out "/share/doc/wpa-supplicant"))
1552 (man (string-append out "/share/man"))
1553 (man5 (string-append man "/man5"))
1554 (man8 (string-append man "/man8")))
1555 (define (copy-man-page target)
1556 (lambda (file)
1557 (install-file file target)))
1558
1559 (mkdir-p man5) (mkdir man8)
1560 (for-each (copy-man-page man5)
1561 (find-files "doc/docbook" "\\.5"))
1562 (for-each (copy-man-page man8)
1563 (find-files "doc/docbook" "\\.8"))
1564
1565 ;; wpa_supplicant.conf(5) does not explain all configuration
1566 ;; options but refers to the example config file, so install it
1567 ;; along with READMEs.
1568 (for-each (lambda (file)
1569 (install-file file doc))
1570 '("README" "README-DPP" "README-HS20"
1571 "README-P2P" "README-WPS"
1572 "wpa_supplicant.conf"))
1573 #t))))
1574
1575 #:make-flags (list "CC=gcc"
1576 (string-append "BINDIR=" (assoc-ref %outputs "out")
1577 "/sbin")
1578 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1579 "/lib"))
1580 #:tests? #f))
1581 (inputs
1582 `(("readline" ,readline)
1583 ("libnl" ,libnl)
1584 ("openssl" ,openssl)))
1585 (native-inputs
1586 `(("pkg-config" ,pkg-config)))
1587 (home-page "https://w1.fi/wpa_supplicant/")
1588 (synopsis "Connecting to WPA and WPA2-protected wireless networks")
1589 (description
1590 "wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
1591 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in
1592 the client stations. It implements key negotiation with a WPA Authenticator
1593 and it controls the roaming and IEEE 802.11 authentication/association of the
1594 WLAN driver.
1595
1596 This package provides the @code{wpa_supplicant} daemon and the @code{wpa_cli}
1597 command.")
1598
1599 ;; In practice, this is linked against Readline, which makes it GPLv3+.
1600 (license license:bsd-3)
1601
1602 (properties `((cpe-name . "wpa_supplicant")))))
1603
1604 (define-public wpa-supplicant
1605 (package (inherit wpa-supplicant-minimal)
1606 (name "wpa-supplicant")
1607 (inputs `(("dbus" ,dbus)
1608 ,@(package-inputs wpa-supplicant-minimal)))
1609 (arguments
1610 (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
1611 ((#:phases phases)
1612 `(modify-phases ,phases
1613 (add-after 'configure 'configure-for-dbus
1614 (lambda _
1615 (let ((port (open-file ".config" "al")))
1616 (display "
1617 CONFIG_CTRL_IFACE_DBUS_NEW=y
1618 CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
1619 (close-port port))
1620 #t))
1621 (add-after 'install-documentation 'install-dbus-conf
1622 (lambda* (#:key outputs #:allow-other-keys)
1623 (let* ((out (assoc-ref outputs "out"))
1624 (dir (string-append out "/etc/dbus-1/system.d")))
1625 (mkdir-p dir)
1626 (copy-file "dbus/dbus-wpa_supplicant.conf"
1627 (string-append dir "/wpa_supplicant.conf")))
1628 #t))))))))
1629
1630 (define-public wpa-supplicant-gui
1631 (package
1632 (inherit wpa-supplicant)
1633 (name "wpa-supplicant-gui")
1634 (inputs `(("qtbase" ,qtbase)
1635 ("qtsvg" ,qtsvg)
1636 ,@(package-inputs wpa-supplicant)))
1637 (native-inputs
1638 ;; For icons.
1639 `(("imagemagick" ,imagemagick)
1640 ("inkscape" ,inkscape)
1641 ,@(package-native-inputs wpa-supplicant)))
1642 (arguments
1643 `(#:phases (modify-phases %standard-phases
1644 (add-after 'unpack 'chdir
1645 (lambda _
1646 (chdir "wpa_supplicant/wpa_gui-qt4")
1647 #t))
1648 (delete 'configure)
1649 (replace 'build
1650 (lambda _
1651 (invoke "qmake" "wpa_gui.pro")
1652 (invoke "make" "-j" (number->string (parallel-job-count)))
1653 (invoke "make" "-C" "icons")))
1654 (replace 'install
1655 (lambda* (#:key inputs outputs #:allow-other-keys)
1656 (let ((out (assoc-ref outputs "out"))
1657 (qt '("qtbase" "qtsvg")))
1658 (install-file "wpa_gui" (string-append out "/bin"))
1659 (install-file "wpa_gui.desktop"
1660 (string-append out "/share/applications"))
1661 (copy-recursively "icons/hicolor"
1662 (string-append out "/share/icons/hicolor"))
1663 (wrap-program (string-append out "/bin/wpa_gui")
1664 `("QT_PLUGIN_PATH" ":" prefix
1665 ,(map (lambda (label)
1666 (string-append (assoc-ref inputs label)
1667 "/lib/qt5/plugins/"))
1668 qt)))
1669 #t))))))
1670 (synopsis "Graphical user interface for WPA supplicant")))
1671
1672 (define-public hostapd
1673 (package
1674 (name "hostapd")
1675 (version "2.9")
1676 (source (origin
1677 (method url-fetch)
1678 (uri (string-append "https://w1.fi/releases/hostapd-" version
1679 ".tar.gz"))
1680 (sha256
1681 (base32
1682 "1mrbvg4v7vm7mknf0n29mf88k3s4a4qj6r4d51wq8hmjj1m7s7c8"))))
1683 (build-system gnu-build-system)
1684 (arguments
1685 '(#:phases
1686 (modify-phases %standard-phases
1687 (replace 'configure
1688 (lambda* (#:key outputs #:allow-other-keys)
1689 ;; This is mostly copied from 'wpa-supplicant' above.
1690 (chdir "hostapd")
1691 (copy-file "defconfig" ".config")
1692 (let ((port (open-file ".config" "al")))
1693 (display "
1694 CONFIG_LIBNL32=y
1695 CONFIG_IEEE80211R=y
1696 CONFIG_IEEE80211N=y
1697 CONFIG_IEEE80211AC=y\n" port)
1698 (close-port port))
1699 #t))
1700 (add-after 'install 'install-man-pages
1701 (lambda* (#:key outputs #:allow-other-keys)
1702 (let* ((out (assoc-ref outputs "out"))
1703 (man (string-append out "/share/man"))
1704 (man1 (string-append man "/man1"))
1705 (man8 (string-append man "/man8")))
1706 (define (copy-man-page target)
1707 (lambda (file)
1708 (install-file file target)))
1709
1710 (for-each (copy-man-page man1)
1711 (find-files "." "\\.1"))
1712 (for-each (copy-man-page man8)
1713 (find-files "." "\\.8"))
1714 #t))))
1715
1716 #:make-flags (list "CC=gcc"
1717 (string-append "BINDIR=" (assoc-ref %outputs "out")
1718 "/sbin")
1719 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1720 "/lib"))
1721 #:tests? #f))
1722 (native-inputs `(("pkg-config" ,pkg-config)))
1723
1724 ;; There's an optional dependency on SQLite.
1725 (inputs `(("openssl" ,openssl)
1726 ("libnl" ,libnl)))
1727 (home-page "https://w1.fi/hostapd/")
1728 (synopsis "Daemon for Wi-Fi access points and authentication servers")
1729 (description
1730 "hostapd is a user-space daemon for WiFi access points and authentication
1731 servers. It implements IEEE 802.11 access point management, IEEE
1732 802.1X/WPA/WPA2/EAP Authenticators, RADIUS client, EAP server, and RADIUS
1733 authentication server.")
1734
1735 ;; Same license as wpa_supplicant.
1736 (license license:bsd-3)))
1737
1738 (define-public wakelan
1739 (package
1740 (name "wakelan")
1741 (version "1.1")
1742 (source (origin
1743 (method url-fetch)
1744 (uri (string-append
1745 "ftp://ftp.gwdg.de/pub/linux/metalab/system/network/misc/wakelan-"
1746 version ".tar.gz"))
1747 (sha256
1748 (base32
1749 "0vydqpf44146ir6k87gmqaq6xy66xhc1gkr3nsd7jj3nhy7ypx9x"))))
1750 (build-system gnu-build-system)
1751 (arguments
1752 '(#:phases
1753 (modify-phases %standard-phases
1754 (replace 'configure
1755 (lambda* (#:key outputs #:allow-other-keys)
1756 (let ((out (assoc-ref outputs "out")))
1757 (mkdir-p (string-append out "/bin"))
1758 (mkdir-p (string-append out "/share/man/man1"))
1759
1760 ;; It's an old configure script that doesn't understand
1761 ;; the extra options we pass.
1762 (setenv "CONFIG_SHELL" (which "bash"))
1763 (invoke "./configure"
1764 (string-append "--prefix=" out)
1765 (string-append "--mandir=" out
1766 "/share/man"))))))
1767 #:tests? #f))
1768 (home-page "https://www.kernel.org") ; really, no home page
1769 (synopsis "Send a wake-on-LAN packet")
1770 (description
1771 "WakeLan broadcasts a properly formatted UDP packet across the local area
1772 network, which causes enabled computers to power on.")
1773 (license license:gpl2+)))
1774
1775 (define-public dmidecode
1776 (package
1777 (name "dmidecode")
1778 (version "3.2")
1779 (source (origin
1780 (method url-fetch)
1781 (uri (string-append
1782 "mirror://savannah/dmidecode/dmidecode-"
1783 version ".tar.xz"))
1784 (sha256
1785 (base32
1786 "1pcfhcgs2ifdjwp7amnsr3lq95pgxpr150bjhdinvl505px0cw07"))))
1787 (build-system gnu-build-system)
1788 (arguments
1789 '(#:phases (modify-phases %standard-phases (delete 'configure))
1790 #:tests? #f ; no 'check' target
1791 #:make-flags (list (string-append "prefix="
1792 (assoc-ref %outputs "out")))))
1793 (home-page "https://www.nongnu.org/dmidecode/")
1794 (synopsis "Read hardware information from the BIOS")
1795 (description
1796 "Dmidecode reports information about your system's hardware as described
1797 in your system BIOS according to the SMBIOS/DMI standard. This typically
1798 includes system manufacturer, model name, serial number, BIOS version, asset
1799 tag as well as a lot of other details of varying level of interest and
1800 reliability depending on the manufacturer. This will often include usage
1801 status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory
1802 module slots, and the list of I/O ports (e.g. serial, parallel, USB).")
1803 (license license:gpl2+)))
1804
1805 (define-public acpica
1806 (package
1807 (name "acpica")
1808 (version "20200430")
1809 (source (origin
1810 (method url-fetch)
1811 (uri (string-append
1812 "https://acpica.org/sites/acpica/files/acpica-unix2-"
1813 version ".tar.gz"))
1814 (sha256
1815 (base32
1816 "1hiaz9lrmjzdbi5zl0ajfflja41cixzx2j76iyx02qbjlmy9cfjc"))))
1817 (build-system gnu-build-system)
1818 (native-inputs `(("flex" ,flex)
1819 ("bison" ,bison)))
1820 (arguments
1821 '(#:make-flags (list (string-append "PREFIX=" %output)
1822 "CC=gcc"
1823 "HOST=_LINUX"
1824 "OPT_CFLAGS=-Wall -fno-strict-aliasing")
1825 #:tests? #f ; no 'check' target
1826 #:phases (modify-phases %standard-phases (delete 'configure))))
1827 (home-page "https://acpica.org/")
1828 (synopsis "Tools for the development and debugging of ACPI tables")
1829 (description
1830 "The @acronym{ACPICA, ACPI Component Architecture} project provides an
1831 OS-independent reference implementation of the @acronym{ACPI, Advanced
1832 Configuration and Power Interface} specification. ACPICA code contains those
1833 portions of ACPI meant to be directly integrated into the host OS as a
1834 kernel-resident subsystem, and a small set of tools to assist in developing and
1835 debugging ACPI tables.
1836
1837 This package contains only the user-space tools needed for ACPI table
1838 development, not the kernel implementation of ACPI.")
1839 (license license:gpl2))) ; dual GPLv2/ACPICA Licence
1840
1841 (define-public s-tui
1842 (package
1843 (name "s-tui")
1844 (version "1.0.0")
1845 (source
1846 (origin
1847 (method url-fetch)
1848 (uri (pypi-uri "s-tui" version))
1849 (sha256
1850 (base32 "0r5yhlsi5xiy7ii1w4kqkaxz9069v5bbfwi3x3xnxhk51yjfgr8n"))))
1851 (build-system python-build-system)
1852 (inputs
1853 `(("python-psutil" ,python-psutil)
1854 ("python-urwid" ,python-urwid)))
1855 (home-page "https://github.com/amanusk/s-tui")
1856 (synopsis "Interactive terminal stress test and monitoring tool")
1857 (description
1858 "The Stress Terminal UI displays graphs of the CPU frequency,
1859 utilization, temperature and power.")
1860 (license license:gpl2+)))
1861
1862 (define-public stress
1863 (package
1864 (name "stress")
1865 (version "1.0.4")
1866 (source (origin
1867 (method url-fetch)
1868 (uri (string-append "mirror://debian/pool/main/s/stress/stress_"
1869 version ".orig.tar.gz"))
1870 (sha256
1871 (base32
1872 "0nw210jajk38m3y7h8s130ps2qsbz7j75wab07hi2r3hlz14yzh5"))))
1873 (build-system gnu-build-system)
1874 (home-page "https://packages.debian.org/sid/stress")
1875 (synopsis "Impose load on and stress test a computer system")
1876 (description
1877 "Stress is a tool that imposes a configurable amount of CPU, memory, I/O,
1878 or disk stress on a POSIX-compliant operating system and reports any errors it
1879 detects.
1880
1881 Stress is not a benchmark. It is a tool used by system administrators to
1882 evaluate how well their systems will scale, by kernel programmers to evaluate
1883 perceived performance characteristics, and by systems programmers to expose
1884 the classes of bugs which only or more frequently manifest themselves when the
1885 system is under heavy load.")
1886 (license license:gpl2+)))
1887
1888 (define-public detox
1889 (package
1890 (name "detox")
1891 (version "1.3.0")
1892 (source (origin
1893 (method git-fetch)
1894 (uri (git-reference
1895 (url "https://github.com/dharple/detox.git")
1896 (commit (string-append "v" version))))
1897 (file-name (git-file-name name version))
1898 (sha256
1899 (base32
1900 "1dd608c7g65s5lj02cddvani3q9kzirddgkjqa22ap9d4f8b9xgr"))))
1901 (build-system gnu-build-system)
1902 (native-inputs
1903 `(("autoconf" ,autoconf)
1904 ("automake" ,automake)
1905 ("flex" ,flex)))
1906 (arguments
1907 `(#:tests? #f ;no 'check' target
1908 #:phases (modify-phases %standard-phases
1909 (add-after 'unpack 'delete-configure
1910 ;; The "configure" script is present, but otherwise the
1911 ;; project is not bootstrapped: missing install-sh and
1912 ;; Makefile.in, so delete it so the bootstrap phase will
1913 ;; take over.
1914 (lambda _ (delete-file "configure") #t)))))
1915 (home-page "https://github.com/dharple/detox")
1916 (synopsis "Clean up file names")
1917 (description
1918 "Detox is a program that renames files to make them easier to work with
1919 under Unix and related operating systems. Spaces and various other unsafe
1920 characters (such as \"$\") get replaced with \"_\". ISO 8859-1 (Latin-1)
1921 characters can be replaced as well, as can UTF-8 characters.")
1922 (license license:bsd-3)))
1923
1924 (define-public testdisk
1925 (package
1926 (name "testdisk")
1927 (version "7.1")
1928 (source (origin
1929 (method url-fetch)
1930 (uri (string-append "https://www.cgsecurity.org/testdisk-"
1931 version ".tar.bz2"))
1932 (sha256
1933 (base32
1934 "1zlh44w67py416hkvw6nrfmjickc2d43v51vcli5p374d5sw84ql"))))
1935 (build-system gnu-build-system)
1936 (inputs
1937 `(("ntfs-3g" ,ntfs-3g)
1938 ("util-linux" ,util-linux "lib")
1939 ("openssl" ,openssl)
1940 ;; FIXME: add reiserfs.
1941 ("zlib" ,zlib)
1942 ("e2fsprogs" ,e2fsprogs)
1943 ("libjpeg" ,libjpeg-turbo)
1944 ("ncurses" ,ncurses)))
1945 (home-page "https://www.cgsecurity.org/wiki/TestDisk")
1946 (synopsis "Data recovery tool")
1947 (description
1948 "TestDisk is a program for data recovery, primarily designed to help
1949 recover lost partitions and/or make non-booting disks bootable again.")
1950 (license license:gpl2+)))
1951
1952 (define-public tree
1953 (package
1954 (name "tree")
1955 (version "1.8.0")
1956 (source (origin
1957 (method url-fetch)
1958 (uri (string-append
1959 "http://mama.indstate.edu/users/ice/tree/src/tree-"
1960 version ".tgz"))
1961 (sha256
1962 (base32 "1hmpz6k0mr6salv0nprvm1g0rdjva1kx03bdf1scw8a38d5mspbi"))))
1963 (build-system gnu-build-system)
1964 (arguments
1965 '(#:phases (modify-phases %standard-phases (delete 'configure))
1966 #:tests? #f ; no check target
1967 #:make-flags (let ((out (assoc-ref %outputs "out")))
1968 (list (string-append "prefix=" out)))))
1969 (synopsis "Recursively list the contents of a directory")
1970 (description
1971 "Tree is a recursive directory listing command that produces a depth
1972 indented listing of files, which is colorized ala dircolors if the LS_COLORS
1973 environment variable is set and output is to tty.")
1974 (home-page "http://mama.indstate.edu/users/ice/tree/")
1975 (license license:gpl2+)))
1976
1977 (define-public direvent
1978 (package
1979 (name "direvent")
1980 (version "5.2")
1981 (source (origin
1982 (method url-fetch)
1983 (uri (string-append "mirror://gnu/direvent/direvent-"
1984 version ".tar.gz"))
1985 (sha256
1986 (base32
1987 "0m9vi01b1km0cpknflyzsjnknbava0s1n6393b2bpjwyvb6j5613"))
1988 (modules '((guix build utils)))
1989 (snippet '(begin
1990 (substitute* "tests/testsuite"
1991 (("#![[:blank:]]?/bin/sh")
1992 "#!$SHELL"))
1993 #t))))
1994 (build-system gnu-build-system)
1995 (arguments
1996 '(#:phases
1997 (modify-phases %standard-phases
1998 (add-before 'build 'patch-/bin/sh
1999 (lambda* (#:key inputs #:allow-other-keys)
2000 ;; Use the right shell when executing the watcher and
2001 ;; user-provided shell commands.
2002 (let ((bash (assoc-ref inputs "bash")))
2003 (substitute* '("src/direvent.c" "src/progman.c")
2004 (("\"/bin/sh\"")
2005 (string-append "\"" bash "/bin/sh\"")))
2006
2007 ;; Adjust the 'shell.at' test accordingly.
2008 (substitute* "tests/testsuite"
2009 (("SHELL=/bin/sh")
2010 (string-append "SHELL=" bash "/bin/sh")))
2011
2012 #t))))))
2013 (home-page "https://www.gnu.org.ua/software/direvent/")
2014 (synopsis "Daemon to monitor directories for events such as file removal")
2015 (description
2016 "A daemon that monitors directories for events, such as creating,
2017 deleting or modifying files. It can monitor different sets of directories for
2018 different events. When an event is detected, direvent calls a specified
2019 external program with information about the event, such as the location
2020 within the file system where it occurred. Thus, \"direvent\" provides an
2021 easy way to react immediately if given files undergo changes, for example, to
2022 track changes in important system configuration files.")
2023 (license license:gpl3+)))
2024
2025 (define-public libcap-ng
2026 (package
2027 (name "libcap-ng")
2028 (version "0.7.10")
2029 (source (origin
2030 (method url-fetch)
2031 (uri (string-append
2032 "https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-"
2033 version ".tar.gz"))
2034 (sha256
2035 (base32
2036 "1gzzy12agfa9ddipdf72h9y68zqqnvsjjylv4vnq6hj4w2safk58"))))
2037 (build-system gnu-build-system)
2038 (arguments
2039 `(#:configure-flags
2040 (list "--without-python")))
2041 (home-page "https://people.redhat.com/sgrubb/libcap-ng/")
2042 (synopsis "Library for more easily working with POSIX capabilities")
2043 (description
2044 "The libcap-ng library is intended to make programming with POSIX
2045 capabilities easier than the traditional libcap library. It includes
2046 utilities that can analyse all currently running applications and print out
2047 any capabilities and whether or not it has an open ended bounding set. The
2048 included utilities are designed to let admins and developers spot apps from
2049 various ways that may be running with too much privilege.")
2050 ;; The library is lgpl2.1+, but also ships some utils which are gpl2+.
2051 (license (list license:lgpl2.1+ license:gpl2+))))
2052
2053 (define-public smartmontools
2054 (package
2055 (name "smartmontools")
2056 (version "7.1")
2057 (source (origin
2058 (method url-fetch)
2059 (uri (string-append
2060 "mirror://sourceforge/smartmontools/smartmontools/"
2061 version "/smartmontools-" version ".tar.gz"))
2062 (sha256
2063 (base32
2064 "0imqb7ka4ia5573w8rnpck571pjjc9698pdjcapy9cfyk4n4swrz"))))
2065 (build-system gnu-build-system)
2066 (inputs `(("libcap-ng" ,libcap-ng)))
2067 (home-page "https://www.smartmontools.org/")
2068 (synopsis "S.M.A.R.T. harddisk control and monitoring tools")
2069 (description
2070 "The smartmontools package contains utility programs to control and
2071 monitor storage systems using the Self-Monitoring, Analysis and Reporting
2072 Technology System (@dfn{S.M.A.R.T.}) built into most modern ATA and SCSI hard
2073 disks. In many cases, these utilities will provide advanced warning of disk
2074 degradation and failure.")
2075 (license license:gpl2+)))
2076
2077 (define-public fdupes
2078 (package
2079 (name "fdupes")
2080 (version "1.6.1")
2081 (source
2082 (origin
2083 (method git-fetch)
2084 (uri (git-reference
2085 (url "https://github.com/adrianlopezroche/fdupes.git")
2086 (commit (string-append "v" version))))
2087 (file-name (git-file-name name version))
2088 (sha256
2089 (base32 "19b6vqblddaw8ccw4sn0qsqzbswlhrz8ia6n4m3hymvcxn8skpz9"))))
2090 (build-system gnu-build-system)
2091 (arguments
2092 '(#:phases (modify-phases %standard-phases
2093 (delete 'configure))
2094 #:tests? #f ; no 'check' target
2095 #:make-flags (list "CC=gcc"
2096 (string-append "PREFIX="
2097 (assoc-ref %outputs "out")))))
2098 (home-page "https://github.com/adrianlopezroche/fdupes")
2099 (synopsis "Identify duplicate files")
2100 (description
2101 "fdupes is a program for identifying duplicate files residing within
2102 specified directories.")
2103 (license license:expat)))
2104
2105 (define-public graphios
2106 (package
2107 (name "graphios")
2108 (version "2.0.3")
2109 (source
2110 (origin
2111 (method url-fetch)
2112 (uri (pypi-uri "graphios" version))
2113 (sha256
2114 (base32
2115 "1h87hvc315wg6lklbf4l7csd3n5pgljwrfli1p3nasdi0izgn66i"))))
2116 (build-system python-build-system)
2117 (arguments
2118 ;; Be warned: Building with Python 3 succeeds, but the build process
2119 ;; throws a syntax error that is ignored.
2120 `(#:python ,python-2
2121 #:phases
2122 (modify-phases %standard-phases
2123 (add-before 'build 'fix-setup.py
2124 (lambda* (#:key outputs #:allow-other-keys)
2125 ;; Fix hardcoded, unprefixed file names.
2126 (let ((out (assoc-ref outputs "out")))
2127 (substitute* '("setup.py")
2128 (("/etc") (string-append out "/etc"))
2129 (("/usr") out)
2130 (("distro_ver = .*") "distro_ver = ''"))
2131 #t))))))
2132 (home-page "https://github.com/shawn-sterling/graphios")
2133 (synopsis "Emit Nagios metrics to Graphite, Statsd, and Librato")
2134 (description
2135 "Graphios is a script to emit nagios perfdata to various upstream metrics
2136 processing and time-series systems. It's currently compatible with Graphite,
2137 Statsd, Librato and InfluxDB. Graphios can emit Nagios metrics to any number
2138 of supported upstream metrics systems simultaneously.")
2139 (license license:gpl2+)))
2140
2141 (define-public ansible
2142 (package
2143 (name "ansible")
2144 (version "2.9.9")
2145 (source
2146 (origin
2147 (method url-fetch)
2148 (uri (pypi-uri "ansible" version))
2149 (sha256
2150 (base32 "1l99vwkl48iwr8ffd1ihqia995mz8h8hwk4akm4w0cgiifp88gg8"))))
2151 (build-system python-build-system)
2152 (native-inputs
2153 `(("python-bcrypt" ,python-bcrypt)
2154 ("python-pynacl" ,python-pynacl)
2155 ("python-httplib2" ,python-httplib2)
2156 ("python-passlib" ,python-passlib)
2157 ("python-nose" ,python-nose)
2158 ("python-mock" ,python-mock)
2159 ("python-jinja2" ,python-jinja2)
2160 ("python-pyyaml" ,python-pyyaml)
2161 ("python-paramiko" ,python-paramiko)))
2162 (inputs
2163 `(("python-cryptography" ,python-cryptography)
2164 ("python-jinja2" ,python-jinja2)
2165 ("python-pyyaml" ,python-pyyaml)
2166 ("python-paramiko" ,python-paramiko)))
2167 (arguments
2168 `(#:phases
2169 (modify-phases %standard-phases
2170 ;; Several ansible commands (ansible-config, ansible-console, etc.)
2171 ;; are just symlinks to a single ansible executable. The ansible
2172 ;; executable behaves differently based on the value of
2173 ;; sys.argv[0]. This does not work well with our wrap phase, and
2174 ;; therefore the following two phases are required as a workaround.
2175 (add-after 'unpack 'hide-wrapping
2176 (lambda _
2177 ;; Overwrite sys.argv[0] to hide the wrapper script from it.
2178 (substitute* "bin/ansible"
2179 (("import traceback" all)
2180 (string-append all "
2181 import re
2182 sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
2183 ")))
2184 #t))
2185 (add-after 'install 'replace-symlinks
2186 (lambda* (#:key outputs #:allow-other-keys)
2187 ;; Replace symlinks with duplicate copies of the ansible
2188 ;; executable.
2189 (let ((out (assoc-ref outputs "out")))
2190 (for-each
2191 (lambda (subprogram)
2192 (delete-file (string-append out "/bin/ansible-" subprogram))
2193 (copy-file (string-append out "/bin/ansible")
2194 (string-append out "/bin/ansible-" subprogram)))
2195 (list "config" "console" "doc" "galaxy"
2196 "inventory" "playbook" "pull" "vault")))
2197 #t)))))
2198 (home-page "https://www.ansible.com/")
2199 (synopsis "Radically simple IT automation")
2200 (description "Ansible is a radically simple IT automation system. It
2201 handles configuration management, application deployment, cloud provisioning,
2202 ad hoc task execution, and multinode orchestration---including trivializing
2203 things like zero-downtime rolling updates with load balancers.")
2204 (license license:gpl3+)))
2205
2206 (define-public debops
2207 (package
2208 (name "debops")
2209 (version "1.1.0")
2210 (source
2211 (origin
2212 (method git-fetch)
2213 (uri (git-reference
2214 (url "https://github.com/debops/debops")
2215 (commit (string-append "v" version))))
2216 (file-name (git-file-name name version))
2217 (sha256
2218 (base32 "052b2dykdn35pdpn9s4prawl6nl6yzih8nyf54hpvhpisvjrm1v5"))
2219 (patches
2220 (search-patches "debops-constants-for-external-program-names.patch"
2221 "debops-debops-defaults-fall-back-to-less.patch"))))
2222 (build-system python-build-system)
2223 (native-inputs
2224 `(("git" ,git)))
2225 (inputs
2226 `(("ansible" ,ansible)
2227 ("encfs" ,encfs)
2228 ("fuse" ,fuse)
2229 ("util-linux" ,util-linux) ;; for umount
2230 ("findutils" ,findutils)
2231 ("gnupg" ,gnupg)
2232 ("which" ,which)))
2233 (propagated-inputs
2234 `(("python-future" ,python-future)
2235 ("python-distro" ,python-distro)))
2236 (arguments
2237 `(#:tests? #f
2238 #:phases
2239 (modify-phases %standard-phases
2240 (add-after 'unpack 'nuke-debops-update
2241 (lambda _
2242 (chmod "bin/debops-update" #o755) ; FIXME work-around git-fetch issue
2243 (with-output-to-file "bin/debops-update"
2244 (lambda ()
2245 (format #t "#!/bin/sh
2246 echo 'debops is installed via guix. guix-update is useless in this case.
2247 Please use `guix package -u debops` instead.'")))
2248 #t))
2249 ;; patch shebangs only in actuall scripts, not in files included in
2250 ;; roles (which are to be delivered to the targte systems)
2251 (delete `patch-generated-file-shebangs)
2252 (replace 'patch-source-shebangs
2253 (lambda _
2254 (for-each patch-shebang
2255 (find-files "bin"
2256 (lambda (file stat)
2257 ;; Filter out symlinks.
2258 (eq? 'regular (stat:type stat)))
2259 #:stat lstat))))
2260 (add-after 'unpack 'fix-paths
2261 (lambda _
2262 (define (substitute-program-names file)
2263 ;; e.g. ANSIBLE_PLAYBOOK = '/gnu/store/…/bin/ansible-playbook'
2264 (for-each
2265 (lambda (name)
2266 (let ((varname (string-upcase
2267 (string-map
2268 (lambda (c) (if (char=? c #\-) #\_ c))
2269 name))))
2270 (substitute* file
2271 (((string-append "^(" varname " = )'.*'") line prefix)
2272 (string-append prefix "'" (which name) "'")))))
2273 '("ansible-playbook" "encfs" "find" "fusermount"
2274 "umount" "gpg" "ansible" "which")))
2275 (for-each substitute-program-names
2276 '("bin/debops"
2277 "bin/debops-padlock"
2278 "bin/debops-task"
2279 "debops/__init__.py"
2280 "debops/cmds/__init__.py"))
2281 #t)))))
2282 (home-page "https://www.debops.org/")
2283 (synopsis "Collection of general-purpose Ansible roles")
2284 (description "The Ansible roles provided by that can be used to manage
2285 Debian or Ubuntu hosts. In addition, a default set of Ansible playbooks can
2286 be used to apply the provided roles in a controlled way, using Ansible
2287 inventory groups.
2288
2289 The roles are written with a high customization in mind, which can be done
2290 using Ansible inventory. This way the role and playbook code can be shared
2291 between multiple environments, with different configuration in to each one.
2292
2293 Services can be managed on a single host, or spread between multiple hosts.
2294 DebOps provides support for different SQL and NoSQL databases, web servers,
2295 programming languages and specialized applications useful in a data center
2296 environment or in a cluster. The project can also be used to deploy
2297 virtualization environments using KVM/libvirt, Docker or LXC technologies to
2298 manage virtual machines and/or containers.")
2299 (license license:gpl3+)))
2300
2301 (define-public emacs-ansible-doc
2302 (let ((commit "86083a7bb2ed0468ca64e52076b06441a2f8e9e0"))
2303 (package
2304 (name "emacs-ansible-doc")
2305 (version (git-version "0.4" "1" commit))
2306 (source
2307 (origin
2308 (method git-fetch)
2309 (uri (git-reference
2310 (url "https://github.com/lunaryorn/ansible-doc.el")
2311 (commit commit)))
2312 (file-name (git-file-name name version))
2313 (sha256
2314 (base32
2315 "0lap404ch74w99n3xip176jr42b38xhyzkfnkyqg0g3wk2cd3aq8"))))
2316 (build-system emacs-build-system)
2317 ;; Unmaintained by upstream.
2318 (home-page "https://github.com/lunaryorn/ansible-doc.el")
2319 (synopsis "Ansible documentation for Emacs")
2320 (description
2321 "This package provides an Ansible documentation for GNU Emacs.
2322
2323 @code{ansible-doc} allows you to view the documentation of an Ansible
2324 module and @code{ansible-doc-mode} minor mode adds documentation
2325 lookup to YAML Mode. You could enable the mode with @code{(add-hook
2326 'yaml-mode-hook #'ansible-doc-mode)}.")
2327 (license license:gpl3+))))
2328
2329 (define-public cpulimit
2330 (package
2331 (name "cpulimit")
2332 (version "0.2")
2333 (source
2334 (origin
2335 (method git-fetch)
2336 (uri (git-reference
2337 (url "https://github.com/opsengine/cpulimit.git")
2338 (commit (string-append "v" version))))
2339 (file-name (git-file-name name version))
2340 (sha256
2341 (base32 "1dz045yhcsw1rdamzpz4bk8mw888in7fyqk1q1b3m1yk4pd1ahkh"))))
2342 (build-system gnu-build-system)
2343 (arguments
2344 `(#:phases (modify-phases %standard-phases
2345 (delete 'configure)
2346 (replace 'build
2347 (lambda _
2348 (invoke "make" "CC=gcc" "-Csrc")))
2349 (replace 'check
2350 (lambda _
2351 (invoke "make" "CC=gcc" "-Ctests")))
2352 (replace 'install
2353 (lambda* (#:key outputs #:allow-other-keys)
2354 (let* ((out (assoc-ref outputs "out"))
2355 (bin (string-append out "/bin")))
2356 (install-file "src/cpulimit" bin))
2357 #t)))))
2358 (home-page "https://github.com/opsengine/cpulimit")
2359 (synopsis "Limit CPU usage")
2360 (description
2361 "Cpulimit limits the CPU usage of a process. It does not change the nice
2362 value or other scheduling priority settings, but the real CPU usage, and is
2363 able to adapt itself dynamically to the overall system load. Children
2364 processes and threads of the specified process may optionally share the same
2365 limits.")
2366 (license license:gpl2+)))
2367
2368 (define-public autojump
2369 (package
2370 (name "autojump")
2371 (version "22.5.3")
2372 (source
2373 (origin
2374 (method git-fetch)
2375 (uri (git-reference
2376 (url "https://github.com/wting/autojump.git")
2377 (commit (string-append "release-v" version))))
2378 (file-name (git-file-name name version))
2379 (sha256
2380 (base32 "1rgpsh70manr2dydna9da4x7p8ahii7dgdgwir5fka340n1wrcws"))))
2381 (build-system gnu-build-system)
2382 (native-inputs ; for tests
2383 `(("python-mock" ,python-mock)
2384 ("python-pytest" ,python-pytest)))
2385 (inputs
2386 `(("python" ,python-wrapper)))
2387 (arguments
2388 `(#:phases
2389 (modify-phases %standard-phases
2390 (add-after 'unpack 'make-git-checkout-writable
2391 ;; ‘install.py’ modifies files before installing them.
2392 (lambda _
2393 (for-each make-file-writable (find-files "."))
2394 #t))
2395 (delete 'configure)
2396 (delete 'build)
2397 (replace 'check
2398 (lambda _
2399 (invoke "python" "tests/unit/autojump_utils_test.py")))
2400 (replace 'install
2401 (lambda* (#:key outputs #:allow-other-keys)
2402 (setenv "SHELL" (which "bash"))
2403 (invoke "python" "install.py"
2404 (string-append "--destdir="
2405 (assoc-ref outputs "out"))))))))
2406 (home-page "https://github.com/wting/autojump")
2407 (synopsis "Shell extension for file system navigation")
2408 (description
2409 "Autojump provides a faster way to navigate your file system, with a \"cd
2410 command that learns\". It works by maintaining a database of the directories
2411 you use the most from the command line and allows you to \"jump\" to
2412 frequently used directories by typing only a small pattern.")
2413 (license license:gpl3+)))
2414
2415 (define-public fasd
2416 (package
2417 (name "fasd")
2418 (version "1.0.1")
2419 (source (origin
2420 (method git-fetch)
2421 (uri (git-reference
2422 (url "https://github.com/clvv/fasd.git")
2423 (commit version)))
2424 (file-name (git-file-name name version))
2425 (sha256
2426 (base32
2427 "1awi71jdv3mhjrmar2d4z1i90kn7apd7aq1w31sh6w4yibz9kiyj"))))
2428 (build-system gnu-build-system)
2429 (arguments
2430 `(#:phases (modify-phases %standard-phases
2431 (delete 'configure)) ;no configuration
2432 #:tests? #f ;no tests
2433 #:make-flags (list (string-append "PREFIX=" %output))))
2434 (home-page "https://github.com/clvv/fasd")
2435 (synopsis "Quick access to files and directories for shells")
2436 (description
2437 "Fasd (pronounced similar to \"fast\") is a command-line productivity
2438 booster. Fasd offers quick access to files and directories for POSIX shells.
2439 It is inspired by tools like autojump, z, and v. Fasd keeps track of files
2440 and directories you have accessed so that you can quickly reference them in
2441 the command line.")
2442 (license license:x11)))
2443
2444 (define-public iftop
2445 (package
2446 (name "iftop")
2447 (version "1.0pre4")
2448 (source (origin
2449 (method url-fetch)
2450 (uri (string-append "http://www.ex-parrot.com/~pdw/iftop/download"
2451 "/iftop-" version ".tar.gz"))
2452 (sha256
2453 (base32
2454 "15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp"))))
2455 (build-system gnu-build-system)
2456 (inputs
2457 `(("libpcap" ,libpcap)
2458 ("ncurses" ,ncurses)))
2459 (synopsis "Monitor network usage")
2460 (description "Iftop does for network usage what @command{top} does
2461 for CPU usage. It listens to network traffic on a named interface and
2462 displays a table of current bandwidth usage by pairs of hosts.")
2463 (home-page "http://www.ex-parrot.com/~pdw/iftop/")
2464 (license license:gpl2+)))
2465
2466 (define-public munge
2467 (package
2468 (name "munge")
2469 (version "0.5.14")
2470 (source (origin
2471 (method url-fetch)
2472 (uri (string-append "https://github.com/dun/munge/releases/"
2473 "download/munge-" version "/munge-"
2474 version ".tar.xz"))
2475 (sha256
2476 (base32
2477 "0h06sghb4rqvv1ywyd6mzsmbcgh712v6ygrff0gzm440y4ca41k6"))
2478 (modules '((guix build utils)))
2479 (snippet
2480 '(begin
2481 ;; Don't insist on write access to /var.
2482 (substitute* "src/etc/Makefile.in"
2483 (("\\$\\(INSTALL\\)(.*)localstatedir" _ middle)
2484 (string-append "-$(INSTALL)" middle "localstatedir"))
2485 (("\\$\\(MKDIR_P\\) .*(local|run)statedir.*")
2486 ""))
2487 #t))))
2488 (inputs
2489 `(("openssl" ,openssl)
2490 ("libgcrypt" ,libgcrypt)))
2491 (build-system gnu-build-system)
2492 (arguments
2493 '(#:configure-flags
2494 (list "--localstatedir=/var"
2495 (string-append "--with-pkgconfigdir="
2496 (assoc-ref %outputs "out") "/lib/pkgconfig"))
2497 #:phases
2498 (modify-phases %standard-phases
2499 ;; XXX Many test series fail. Some might be fixable, others do no-no
2500 ;; things like invoking ‘sudo’.
2501 (add-after 'unpack 'skip-failing-tests
2502 (lambda _
2503 (for-each (lambda (test)
2504 (substitute* "t/Makefile.in"
2505 (((string-append test "\\.t ")) "")))
2506 (list "0100-munged-lock"
2507 "0010-basic"
2508 "0011-munged-cmdline"
2509 "0012-munge-cmdline"
2510 "0013-unmunge-cmdline"
2511 "0101-munged-security-socket"
2512 "0102-munged-security-keyfile"
2513 "0103-munged-security-logfile"
2514 "0110-munged-origin-addr"))
2515 #t)))))
2516 (home-page "https://dun.github.io/munge/")
2517 (synopsis "Cluster computing authentication service")
2518 (description
2519 "Munge is an authentication service for creating and validating
2520 credentials. It allows a process to authenticate the UID and GID of another
2521 local or remote process within a group of hosts having common users and
2522 groups. These hosts form a security realm that is defined by a shared
2523 cryptographic key. Clients within this security realm can create and validate
2524 credentials without the use of root privileges, reserved ports, or
2525 platform-specific methods.")
2526 (license license:gpl3+)))
2527
2528 (define-public audit
2529 (package
2530 (name "audit")
2531 (home-page "https://people.redhat.com/sgrubb/audit/")
2532 (version "2.8.5")
2533 (source (origin
2534 (method url-fetch)
2535 (uri (string-append home-page "audit-" version ".tar.gz"))
2536 (sha256
2537 (base32
2538 "1dzcwb2q78q7x41shcachn7f4aksxbxd470yk38zh03fch1l2p8f"))))
2539 (build-system gnu-build-system)
2540 (arguments
2541 `(#:configure-flags (list "--with-python=no"
2542 "--disable-static")))
2543 (inputs
2544 `(("openldap" ,openldap)
2545 ("gnutls" ,gnutls)
2546 ("sasl" ,cyrus-sasl)))
2547 (synopsis "User-space component to the Linux auditing system")
2548 (description
2549 "auditd is the user-space component to the Linux auditing system, which
2550 allows logging of system calls made by user-land processes. It's responsible
2551 for writing audit records to the disk. Viewing the logs is done with the
2552 @code{ausearch} or @code{aureport} utilities. Configuring the audit rules is
2553 done with the @code{auditctl} utility.")
2554 (license license:gpl2+)))
2555
2556 (define-public nmap
2557 (package
2558 (name "nmap")
2559 (version "7.80")
2560 (source (origin
2561 (method url-fetch)
2562 (uri (string-append "https://nmap.org/dist/nmap-" version
2563 ".tar.bz2"))
2564 (sha256
2565 (base32
2566 "1aizfys6l9f9grm82bk878w56mg0zpkfns3spzj157h98875mypw"))
2567 (modules '((guix build utils)))
2568 (snippet
2569 '(begin
2570 (for-each delete-file-recursively
2571 ;; Remove bundled lua, pcap, and pcre libraries.
2572 ;; FIXME: Remove bundled liblinear once packaged.
2573 '("liblua"
2574 "libpcap"
2575 "libpcre"
2576 ;; Remove pre-compiled binares.
2577 "mswin32"))
2578 #t))))
2579 (build-system gnu-build-system)
2580 (inputs
2581 `(("openssl" ,openssl)
2582 ("libpcap" ,libpcap)
2583 ("pcre" ,pcre)
2584 ("lua" ,lua)
2585 ("zlib" ,zlib) ;for NSE compression support
2586
2587 ;; For 'ndiff'.
2588 ("python" ,python-2)))
2589
2590 ;; TODO Add zenmap output.
2591 (outputs '("out" "ndiff"))
2592 (arguments
2593 `(#:configure-flags '("--without-zenmap")
2594 #:phases
2595 (modify-phases %standard-phases
2596 (add-after 'configure 'patch-Makefile
2597 (lambda _
2598 (substitute* "Makefile"
2599 ;; Do not attempt to build lua.
2600 (("build-dnet build-lua") "build-dnet"))
2601 #t))
2602 (replace 'install
2603 (lambda* (#:key outputs #:allow-other-keys)
2604 (define (make out . args)
2605 (apply invoke "make"
2606 (string-append "prefix=" out)
2607 args))
2608 (define (python-path dir)
2609 (string-append dir "/lib/python"
2610 ,(version-major+minor
2611 (package-version python))
2612 "/site-packages"))
2613 (let ((out (assoc-ref outputs "out"))
2614 (ndiff (assoc-ref outputs "ndiff")))
2615 (for-each mkdir-p (list out ndiff))
2616 (make out
2617 "install-nmap"
2618 "install-nse"
2619 "install-ncat"
2620 "install-nping")
2621 (make ndiff "install-ndiff")
2622 (wrap-program (string-append ndiff "/bin/ndiff")
2623 `("PYTHONPATH" prefix
2624 (,(python-path ndiff)))))
2625 #t))
2626 ;; These are the tests that do not require network access.
2627 (replace 'check
2628 (lambda _ (invoke "make"
2629 "check-nse"
2630 "check-ndiff"
2631 "check-dns"))))
2632 ;; Nmap can't cope with out-of-source building.
2633 #:out-of-source? #f))
2634 (home-page "https://nmap.org/")
2635 (synopsis "Network discovery and security auditing tool")
2636 (description
2637 "Nmap (\"Network Mapper\") is a network discovery and security auditing
2638 tool. It is also useful for tasks such as network inventory, managing service
2639 upgrade schedules, and monitoring host or service uptime. It also provides an
2640 advanced netcat implementation (ncat), a utility for comparing scan
2641 results (ndiff), and a packet generation and response analysis tool (nping).")
2642 ;; This package uses nmap's bundled versions of libdnet and liblinear, which
2643 ;; both use a 3-clause BSD license.
2644 (license (list license:nmap license:bsd-3))))
2645
2646 (define-public dstat
2647 (package
2648 (name "dstat")
2649 (version "0.7.4")
2650 (source
2651 (origin
2652 (method git-fetch)
2653 (uri (git-reference
2654 (url "https://github.com/dagwieers/dstat.git")
2655 (commit (string-append "v" version))))
2656 (file-name (git-file-name "dstat" version))
2657 (sha256
2658 (base32 "1qnmkhqmjd1m3if05jj29dvr5hn6kayq9bkkkh881w472c0zhp8v"))
2659 (patches (search-patches "dstat-fix-crash-when-specifying-delay.patch"
2660 "dstat-skip-devices-without-io.patch"))))
2661 (build-system gnu-build-system)
2662 (arguments
2663 `(#:tests? #f ; no make check
2664 #:make-flags (let ((out (assoc-ref %outputs "out")))
2665 (list (string-append "DESTDIR=" out)
2666 "prefix=/"))
2667 #:phases
2668 (modify-phases %standard-phases
2669 (add-after 'unpack 'fix-python3-DeprecationWarning
2670 (lambda _
2671 (substitute* "dstat"
2672 (("collections") "collections.abc"))
2673 #t))
2674 (delete 'configure) ; no configure script
2675 (add-after 'install 'wrap
2676 (lambda* (#:key outputs #:allow-other-keys)
2677 (let ((out (assoc-ref outputs "out")))
2678 (wrap-program (string-append out "/bin/dstat")
2679 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2680 #t))))))
2681 (inputs
2682 `(("python" ,python-wrapper)
2683 ("python-six" ,python-six)))
2684 (synopsis "Versatile resource statistics tool")
2685 (description "Dstat is a versatile replacement for @command{vmstat},
2686 @command{iostat}, @command{netstat}, and @command{ifstat}. Dstat overcomes
2687 some of their limitations and adds some extra features, more counters and
2688 flexibility. Dstat is handy for monitoring systems during performance tuning
2689 tests, benchmarks or troubleshooting.
2690
2691 Dstat allows you to view all of your system resources in real-time, you can,
2692 e.g., compare disk utilization in combination with interrupts from your IDE
2693 controller, or compare the network bandwidth numbers directly with the disk
2694 throughput (in the same interval).")
2695 (home-page "http://dag.wiee.rs/home-made/dstat/")
2696 (license license:gpl2+)))
2697
2698 (define-public thefuck
2699 (package
2700 (name "thefuck")
2701 (version "3.30")
2702 (source
2703 (origin
2704 (method git-fetch)
2705 (uri (git-reference
2706 (url "https://github.com/nvbn/thefuck.git")
2707 (commit version)))
2708 (file-name (git-file-name name version))
2709 (sha256
2710 (base32 "0fnf78956pwhb9cgv1jmgypnkma5xzflkivfrkfiadbgin848yfg"))
2711 (patches (search-patches "thefuck-test-environ.patch"))))
2712 (build-system python-build-system)
2713 (arguments
2714 '(#:phases
2715 (modify-phases %standard-phases
2716 (delete 'check)
2717 (add-after 'install 'check
2718 (lambda* (#:key inputs outputs #:allow-other-keys)
2719 ;; Tests look for installed package
2720 (add-installed-pythonpath inputs outputs)
2721 ;; Some tests need write access to $HOME.
2722 (setenv "HOME" "/tmp")
2723 (invoke "py.test" "-v")
2724 #t)))))
2725 (propagated-inputs
2726 `(("python-colorama" ,python-colorama)
2727 ("python-decorator" ,python-decorator)
2728 ("python-psutil" ,python-psutil)
2729 ("python-pyte" ,python-pyte)
2730 ("python-six" ,python-six)))
2731 (native-inputs
2732 `(("go" ,go)
2733 ("python-mock" ,python-mock)
2734 ("python-pytest" ,python-pytest)
2735 ("python-pytest-mock" ,python-pytest-mock)))
2736 (home-page "https://github.com/nvbn/thefuck")
2737 (synopsis "Correct mistyped console command")
2738 (description
2739 "The Fuck tries to match a rule for a previous, mistyped command, creates
2740 a new command using the matched rule, and runs it.")
2741 (license license:x11)))
2742
2743 (define-public di
2744 (package
2745 (name "di")
2746 (version "4.47.3")
2747 (source
2748 (origin
2749 (method url-fetch)
2750 (uri (string-append "https://gentoo.com/di/di-" version ".tar.gz"))
2751 (sha256
2752 (base32 "0m4npba50sf5s61g5z3xd2r7937zwja941f2h3f081xi24c2hfck"))))
2753 (build-system gnu-build-system)
2754 (arguments
2755 `(#:tests? #f ; obscure test failures
2756 #:phases
2757 (modify-phases %standard-phases
2758 (delete 'configure) ; no configure script
2759 (add-before 'build 'setup-environment
2760 (lambda* (#:key outputs #:allow-other-keys)
2761 (setenv "CC" "gcc")
2762 (setenv "prefix" (assoc-ref outputs "out"))
2763 #t)))
2764 #:make-flags (list "--environment-overrides")))
2765 (home-page "https://gentoo.com/di/")
2766 (synopsis "Advanced df like disk information utility")
2767 (description
2768 "@code{di} is a disk information utility, displaying everything that your
2769 @code{df} command does and more. It features the ability to display your disk
2770 usage in whatever format you prefer. It is designed to be highly portable and
2771 produce uniform output across heterogeneous networks.")
2772 (license license:zlib)))
2773
2774 (define-public cbatticon
2775 (package
2776 (name "cbatticon")
2777 (version "1.6.10")
2778 (source
2779 (origin
2780 (method git-fetch)
2781 (uri (git-reference
2782 (url "https://github.com/valr/cbatticon.git")
2783 (commit version)))
2784 (sha256
2785 (base32 "0ivm2dzhsa9ir25ry418r2qg2llby9j7a6m3arbvq5c3kaj8m9jr"))
2786 (file-name (git-file-name name version))))
2787 (build-system gnu-build-system)
2788 (arguments
2789 `(#:tests? #f ; no tests
2790 #:make-flags
2791 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2792 "CC=gcc")
2793 #:phases
2794 (modify-phases %standard-phases
2795 (delete 'configure)))) ; no configure script
2796 (inputs
2797 `(("gtk+" ,gtk+)
2798 ("gettext" ,gettext-minimal)
2799 ("libnotify" ,libnotify)))
2800 (native-inputs
2801 `(("pkg-config" ,pkg-config)))
2802 (synopsis "Lightweight battery icon for the system tray")
2803 (description "cbatticon is a lightweight battery icon that displays
2804 the status of your battery in the system tray.")
2805 (home-page "https://github.com/valr/cbatticon")
2806 (license license:gpl2+)))
2807
2808 (define-public interrobang
2809 (let ((revision "1")
2810 (commit "896543735e1c99144765fdbd7b6e6b5afbd8b881"))
2811 (package
2812 (name "interrobang")
2813 (version (git-version "0.0.0" revision commit))
2814 (source
2815 (origin
2816 (method git-fetch)
2817 (uri (git-reference
2818 (url "https://github.com/TrilbyWhite/interrobang.git")
2819 (commit commit)))
2820 (file-name (git-file-name name version))
2821 (sha256
2822 (base32 "1n13m70p1hfba5dy3i8hfclbr6k9q3d9dai3dg4jvhdhmxcpjzdf"))))
2823 (build-system gnu-build-system)
2824 (arguments
2825 `(#:tests? #f ; no tests
2826 #:phases
2827 (modify-phases %standard-phases
2828 (delete 'configure)) ; no configure script
2829 #:make-flags (list (string-append "PREFIX="
2830 (assoc-ref %outputs "out")))))
2831 (inputs
2832 `(("libx11" ,libx11)))
2833 (native-inputs
2834 `(("pkg-config" ,pkg-config)))
2835 (synopsis "Scriptable launcher menu")
2836 (description "Interrobang is a scriptable launcher menu with a customizable
2837 shortcut syntax and completion options.")
2838 (home-page "https://github.com/TrilbyWhite/interrobang")
2839 (license license:gpl3+))))
2840
2841 (define-public pam-krb5
2842 (package
2843 (name "pam-krb5")
2844 (version "4.8")
2845 (source (origin
2846 (method url-fetch)
2847 (uri (string-append
2848 "https://archives.eyrie.org/software/kerberos/"
2849 "pam-krb5-" version ".tar.xz"))
2850 (patches (search-patches "pam-krb5-CVE-2020-10595.patch"))
2851 (sha256
2852 (base32
2853 "1qjp8i1s9bz7g6kiqrkzzkxn5pfspa4sy53b6z40fqmdf9przdfb"))))
2854 (build-system gnu-build-system)
2855 (arguments
2856 `(#:phases
2857 (modify-phases %standard-phases
2858 (add-before 'configure 'disable-tests
2859 (lambda _
2860 ;; The build container seems to interfere with some tests.
2861 (substitute* "tests/TESTS"
2862 (("module/basic\n") ""))
2863 (substitute* "tests/TESTS"
2864 (("pam-util/vector\n") ""))
2865 #t)))))
2866 (inputs
2867 `(("linux-pam" ,linux-pam)
2868 ("mit-krb5" ,mit-krb5)))
2869 (native-inputs
2870 `(("perl" ,perl)
2871 ("perl-test-pod" ,perl-test-pod))) ; required for tests
2872 (synopsis "Kerberos PAM module")
2873 (description
2874 "Pam-krb5 is a Kerberos PAM module for either MIT Kerberos or Heimdal.
2875 It supports ticket refreshing by screen savers, configurable
2876 authorization handling, authentication of non-local accounts for network
2877 services, password changing, and password expiration, as well as all the
2878 standard expected PAM features. It works correctly with OpenSSH, even
2879 with @code{ChallengeResponseAuthentication} and @code{PrivilegeSeparation}
2880 enabled, and supports extensive configuration either by PAM options or in
2881 krb5.conf or both. PKINIT is supported with recent versions of both MIT
2882 Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.")
2883 (home-page "https://www.eyrie.org/~eagle/software/pam-krb5")
2884 ;; Dual licenced under a homebrew non-copyleft OR GPL (any version)
2885 ;; However, the tarball does not contain a copy of the GPL, so unless
2886 ;; we put one in, we cannot distribute it under GPL without violating
2887 ;; clause requiring us to give all recipients a copy.
2888 (license license:gpl1+)))
2889
2890 (define (sunxi-tools-source version)
2891 (origin
2892 (method git-fetch)
2893 (uri (git-reference
2894 (url "https://github.com/linux-sunxi/sunxi-tools.git")
2895 (commit (string-append "v" version))))
2896 (sha256
2897 (base32 "04f3jqg8ww4jxsf9c6ddcdgy2xbhkyp0b3l5f1hvvbv94p81rjxd"))
2898 (modules '((guix build utils)))
2899 (snippet
2900 ;; Remove binaries contained in the tarball which are only for the
2901 ;; target and can be regenerated anyway.
2902 '(begin
2903 (delete-file-recursively "bin")
2904 #t))
2905 (file-name (git-file-name "sunxi-tools" version))))
2906
2907 (define sunxi-target-tools
2908 (package
2909 (name "sunxi-target-tools")
2910 (version "1.4.2")
2911 (build-system gnu-build-system)
2912 (source
2913 (sunxi-tools-source version))
2914 (arguments
2915 `(#:system "armhf-linux"
2916 #:tests? #f
2917 #:make-flags (list (string-append "PREFIX="
2918 (assoc-ref %outputs "out"))
2919 (string-append "CROSS_COMPILE=")
2920 "CC=gcc")
2921 #:phases
2922 (modify-phases %standard-phases
2923 (delete 'configure)
2924 (replace 'build
2925 (lambda* (#:key make-flags #:allow-other-keys)
2926 (apply invoke "make" "target-tools" make-flags)))
2927 (replace 'install
2928 (lambda* (#:key make-flags #:allow-other-keys)
2929 (apply invoke "make" "install-target-tools"
2930 make-flags))))))
2931 (home-page "https://github.com/linux-sunxi/sunxi-tools")
2932 (synopsis "Hardware management tools for Allwinner computers")
2933 (description "This package contains tools for Allwinner devices:
2934 @enumerate
2935 @item @command{sunxi-meminfo}: Prints memory bus settings.
2936 @end enumerate")
2937 (license license:gpl2+)))
2938
2939 (define-public sunxi-tools
2940 (package
2941 (name "sunxi-tools")
2942 (version "1.4.2")
2943 (source
2944 (sunxi-tools-source version))
2945 (native-inputs
2946 `(("sunxi-target-tools" ,sunxi-target-tools)
2947 ("pkg-config" ,pkg-config)))
2948 (inputs
2949 `(("libusb" ,libusb)))
2950 (build-system gnu-build-system)
2951 (arguments
2952 `(#:tests? #f ; no tests exist
2953 #:make-flags (list (string-append "PREFIX="
2954 (assoc-ref %outputs "out"))
2955 (string-append "CROSS_COMPILE=disabled")
2956 "CC=gcc")
2957 #:phases
2958 (modify-phases %standard-phases
2959 (delete 'configure)
2960 (replace 'build
2961 (lambda* (#:key make-flags #:allow-other-keys)
2962 (apply invoke "make" "tools" "misc" make-flags)))
2963 (replace 'install
2964 (lambda* (#:key inputs outputs make-flags #:allow-other-keys)
2965 ;; Those tools have been built for armhf but are part of the
2966 ;; installation in the upstream package. So do the same
2967 ;; here.
2968 (copy-recursively (assoc-ref inputs "sunxi-target-tools")
2969 (assoc-ref outputs "out"))
2970 (apply invoke "make" "install-tools" "install-misc"
2971 make-flags))))))
2972 (home-page "https://github.com/linux-sunxi/sunxi-tools")
2973 (synopsis "Hardware management tools for Allwinner computers")
2974 (description "This package contains tools for Allwinner devices:
2975 @enumerate
2976 @item @command{sunxi-fexc}, @command{bin2fex}, @command{fex2bin}: Compile
2977 a textual description of a board (.fex) to a binary representation (.bin).
2978 @item @command{sunxi-fel}: Puts an Allwinner device into FEL mode which
2979 makes it register as a special USB device (rather than USB host).
2980 You can then connect it to another computer and flash it from there.
2981 @item @command{sunxi-nand-part}: Partitions NAND flash.
2982 @item @command{sunxi-bootinfo}: Reads out boot0 and boot1 (Allwinner
2983 bootloader) parameters.
2984 @item @command{sunxi-pio}: Sets GPIO parameters and oscillates a GPIO
2985 in order to be able to find it.
2986 @item @command{sunxi-meminfo}: Prints memory bus settings.
2987 @item @command{sunxi-nand-image-builder}: Prepares raw NAND images.
2988 @end enumerate")
2989 (license license:gpl2+)))
2990
2991 (define-public sedsed
2992 (package
2993 (name "sedsed")
2994 (version "1.1")
2995 (source
2996 (origin
2997 (method git-fetch)
2998 (uri (git-reference
2999 (url "https://github.com/aureliojargas/sedsed.git")
3000 (commit (string-append "v" version))))
3001 (file-name (git-file-name name version))
3002 (sha256
3003 (base32 "05cl35mwljdb9ynbbsfa8zx6ig8r0xncbg2cir9vwn5manndjj18"))))
3004 (build-system python-build-system)
3005 (arguments
3006 `(#:tests? #f ; no tests
3007 #:phases
3008 (modify-phases %standard-phases
3009 (add-after 'unpack 'patch-sed-in
3010 (lambda _
3011 (substitute* "sedsed.py"
3012 (("sedbin = 'sed'")
3013 (string-append "sedbin = '" (which "sed") "'")))
3014 #t))
3015 (delete 'build)
3016 (replace 'install
3017 (lambda* (#:key outputs #:allow-other-keys)
3018 (let* ((out (assoc-ref outputs "out"))
3019 (bin (string-append out "/bin")))
3020 ;; Just one file to copy around
3021 (install-file "sedsed.py" bin)
3022 #t)))
3023 (add-after 'wrap 'symlink
3024 ;; Create 'sedsed' symlink to "sedsed.py".
3025 (lambda* (#:key outputs #:allow-other-keys)
3026 (let* ((out (assoc-ref outputs "out"))
3027 (bin (string-append out "/bin"))
3028 (sed (string-append bin "/sedsed"))
3029 (sedpy (string-append bin "/sedsed.py")))
3030 (symlink sedpy sed)
3031 #t))))))
3032 (home-page "https://aurelio.net/projects/sedsed")
3033 (synopsis "Sed sed scripts")
3034 (description
3035 "@code{sedsed} can debug, indent, tokenize and HTMLize your @command{sed}
3036 script.
3037
3038 In debug mode, it reads your script and adds extra commands to it. When
3039 executed you can see the data flow between the commands, revealing all the
3040 magic sed performs on its internal buffers.
3041
3042 In indent mode, your script is reformatted with standard spacing.
3043
3044 In tokenize mode, you can see the elements of every command you use.
3045
3046 In HTMLize mode, your script is converted to a beautiful colored HTML file,
3047 with all the commands and parameters identified for your viewing pleasure.
3048
3049 With sedsed you can master any sed script. No more secrets, no more hidden
3050 buffers.")
3051 (license license:expat)))
3052
3053 (define-public igt-gpu-tools
3054 (package
3055 (name "igt-gpu-tools")
3056 (version "1.24")
3057 (source
3058 (origin
3059 (method git-fetch)
3060 (uri (git-reference
3061 (url "https://gitlab.freedesktop.org/drm/igt-gpu-tools.git")
3062 (commit (string-append "igt-gpu-tools-" version))))
3063 (file-name (git-file-name name version))
3064 (sha256
3065 (base32 "1gpdjs5aj6vsnzwcjvw5bb120lgffvvshi4202phr0bzw3b92ky8"))))
3066 (build-system gnu-build-system)
3067 (arguments
3068 `(#:tests? #f)) ; many of the tests try to load kernel modules
3069 (inputs
3070 `(("cairo" ,cairo)
3071 ("elfutils" ,elfutils) ; libdw
3072 ("eudev" ,eudev)
3073 ("glib" ,glib)
3074 ("kmod" ,kmod)
3075 ("libdrm" ,libdrm)
3076 ("libpciaccess" ,libpciaccess)
3077 ("libunwind" ,libunwind)
3078 ("libxrandr" ,libxrandr)
3079 ("openssl" ,openssl)
3080 ("procps" ,procps)
3081 ("util-macros" ,util-macros)))
3082 (native-inputs
3083 `(("autoconf" ,autoconf)
3084 ("automake" ,automake)
3085 ("libtool" ,libtool)
3086 ("pkg-config" ,pkg-config)))
3087 (home-page "https://gitlab.freedesktop.org/drm/igt-gpu-tools")
3088 (synopsis "Tools for development and testing of the Intel DRM driver")
3089 (description "IGT GPU Tools is a collection of tools for development and
3090 testing of the Intel DRM driver. There are many macro-level test suites that
3091 get used against the driver, including xtest, rendercheck, piglit, and
3092 oglconform, but failures from those can be difficult to track down to kernel
3093 changes, and many require complicated build procedures or specific testing
3094 environments to get useful results. Therefore, IGT GPU Tools includes
3095 low-level tools and tests specifically for development and testing of the
3096 Intel DRM Driver.")
3097 (supported-systems '("i686-linux" "x86_64-linux"))
3098 (license license:expat)))
3099
3100 (define-public fabric
3101 (package
3102 (name "fabric")
3103 (version "1.14.1")
3104 (source
3105 (origin
3106 (method url-fetch)
3107 (uri (pypi-uri "Fabric" version))
3108 (sha256
3109 (base32
3110 "1a3ndlpdw6bhn8fcw1jgznl117a8pnr84az9rb5fwnrypf1ph2b6"))))
3111 (build-system python-build-system)
3112 (arguments
3113 `(#:python ,python-2 ; Python 2 only
3114 #:phases
3115 (modify-phases %standard-phases
3116 (replace 'check
3117 (lambda _
3118 (invoke
3119 "nosetests" "-v" "tests/"
3120 ;; This test hangs indefinitely when run on a single core VM
3121 ;; (see GNU bug #26647 and Debian bug #850230).
3122 "--exclude=test_nested_execution_with_explicit_ports"
3123 ;; This test randomly fails in certain environments causing too
3124 ;; much noise to be useful (see Debian bug #854686).
3125 "--exclude=test_should_use_sentinel_for_tasks_that_errored"))))))
3126 (native-inputs
3127 `(("python2-fudge" ,python2-fudge) ; Requires < 1.0
3128 ("python2-jinja2" ,python2-jinja2) ; Requires < 3.0
3129 ("python2-nose" ,python2-nose) ; Requires < 2.0
3130 ("python2-pynacl" ,python2-pynacl)
3131 ("python2-bcrypt" ,python2-bcrypt)))
3132 (propagated-inputs
3133 `(("python2-paramiko" ,python2-paramiko)))
3134 (home-page "https://www.fabfile.org/")
3135 (synopsis "Simple Pythonic remote execution and deployment tool")
3136 (description
3137 "Fabric is designed to upload files and run shell commands on a number of
3138 servers in parallel or serially. These commands are grouped in tasks (which
3139 are regular Python functions) and specified in a @dfn{fabfile}.
3140
3141 It is similar to Capistrano, except it's implemented in Python and doesn't
3142 expect you to be deploying Rails applications. Fabric is a simple, Pythonic
3143 tool for remote execution and deployment.")
3144 (license license:bsd-2)))
3145
3146 (define-public neofetch
3147 (package
3148 (name "neofetch")
3149 (version "7.0.0")
3150 (source (origin
3151 (method git-fetch)
3152 (uri (git-reference
3153 (url "https://github.com/dylanaraps/neofetch")
3154 (commit version)))
3155 (file-name (git-file-name name version))
3156 (sha256
3157 (base32
3158 "0xc0fdc7n5bhqirh83agqiy8r14l14zwca07czvj8vgnsnfybslr"))))
3159 (build-system gnu-build-system)
3160 (arguments
3161 `(#:tests? #f ; there are no tests
3162 #:make-flags
3163 (list (string-append "PREFIX=" %output))
3164 #:phases
3165 (modify-phases %standard-phases
3166 (delete 'configure)))) ; no configure script
3167 (home-page "https://github.com/dylanaraps/neofetch")
3168 (synopsis "System information script")
3169 (description "Neofetch is a command-line system information tool written in
3170 Bash. Neofetch displays information about your system next to an image, your OS
3171 logo, or any ASCII file of your choice. The main purpose of Neofetch is to be
3172 used in screenshots to show other users what operating system or distribution
3173 you are running, what theme or icon set you are using, etc.")
3174 (license license:expat)))
3175
3176 (define-public screenfetch
3177 (package
3178 (name "screenfetch")
3179 (version "3.9.1")
3180 (source (origin
3181 (method git-fetch)
3182 (uri (git-reference
3183 (url "https://github.com/KittyKatt/screenFetch")
3184 (commit (string-append "v" version))))
3185 (file-name (git-file-name name version))
3186 (sha256
3187 (base32
3188 "04l8aqr474pb115nagn9f6y48jw92n1qfszgw7dbhgl4mpn95lcr"))))
3189 (build-system trivial-build-system)
3190 (arguments
3191 `(#:modules ((guix build utils))
3192 #:builder
3193 (begin
3194 (use-modules (guix build utils))
3195 (let ((source (assoc-ref %build-inputs "source"))
3196 (out (assoc-ref %outputs "out")))
3197 (mkdir-p (string-append out "/bin/"))
3198 (copy-file (string-append source "/screenfetch-dev")
3199 (string-append out "/bin/screenfetch"))
3200 (install-file (string-append source "/screenfetch.1")
3201 (string-append out "/man/man1/"))
3202 (install-file (string-append source "/COPYING")
3203 (string-append out "/share/doc/" ,name "-" ,version))
3204 (substitute* (string-append out "/bin/screenfetch")
3205 (("/usr/bin/env bash")
3206 (string-append (assoc-ref %build-inputs "bash")
3207 "/bin/bash")))
3208 (wrap-program
3209 (string-append out "/bin/screenfetch")
3210 `("PATH" ":" prefix
3211 (,(string-append (assoc-ref %build-inputs "bc") "/bin:"
3212 (assoc-ref %build-inputs "scrot") "/bin:"
3213 (assoc-ref %build-inputs "xdpyinfo") "/bin"
3214 (assoc-ref %build-inputs "xprop") "/bin"))))
3215 (substitute* (string-append out "/bin/screenfetch")
3216 (("#!#f")
3217 (string-append "#!" (assoc-ref %build-inputs "bash")
3218 "/bin/bash")))))))
3219 (inputs
3220 `(("bash" ,bash)
3221 ("bc" ,bc)
3222 ("scrot" ,scrot)
3223 ("xdpyinfo" ,xdpyinfo)
3224 ("xprop" ,xprop)))
3225 (home-page "https://github.com/KittyKatt/screenFetch")
3226 (synopsis "System information script")
3227 (description "Bash screenshot information tool which can be used to
3228 generate those nifty terminal theme information and ASCII distribution logos in
3229 everyone's screenshots nowadays.")
3230 (license license:gpl3)))
3231
3232 (define-public nnn
3233 (package
3234 (name "nnn")
3235 (version "3.2")
3236 (source
3237 (origin
3238 (method url-fetch)
3239 (uri (string-append "https://github.com/jarun/nnn/releases/download/v"
3240 version "/nnn-v" version ".tar.gz"))
3241 (sha256
3242 (base32 "1zflz7yj5wzdnl0728g8qrld2z6dqn7sblbmkjvyqlv1fwjd1fsf"))))
3243 (build-system gnu-build-system)
3244 (inputs
3245 `(("ncurses" ,ncurses)
3246 ("readline" ,readline)))
3247 (native-inputs
3248 `(("pkg-config" ,pkg-config)))
3249 (arguments
3250 '(#:tests? #f ; no tests
3251 #:phases
3252 (modify-phases %standard-phases
3253 (delete 'configure)) ; no configure script
3254 #:make-flags
3255 (list
3256 (string-append "PREFIX="
3257 (assoc-ref %outputs "out"))
3258 "CC=gcc")))
3259 (home-page "https://github.com/jarun/nnn")
3260 (synopsis "Terminal file browser")
3261 (description "@command{nnn} is a fork of @command{noice}, a blazing-fast
3262 lightweight terminal file browser with easy keyboard shortcuts for
3263 navigation, opening files and running tasks. There is no config file and
3264 mime associations are hard-coded. The incredible user-friendliness and speed
3265 make it a perfect utility on modern distros.")
3266 (license license:bsd-2)))
3267
3268 (define-public thermald
3269 (package
3270 (name "thermald")
3271 (version "1.9.1")
3272 (source
3273 (origin
3274 (method git-fetch)
3275 (uri (git-reference
3276 (url "https://github.com/01org/thermal_daemon")
3277 (commit (string-append "v" version))))
3278 (file-name (git-file-name name version))
3279 (sha256
3280 (base32 "0iagc3jqpnh6q2fa1gx4wx6r8qg0556j60xr159zqg95djr4dv99"))))
3281 (build-system gnu-build-system)
3282 (arguments
3283 `(#:configure-flags
3284 (let ((out (assoc-ref %outputs "out")))
3285 (list (string-append "--sysconfdir="
3286 out "/etc")
3287 (string-append "--with-dbus-sys-dir="
3288 out "/etc/dbus-1/system.d")
3289 "--localstatedir=/var"))))
3290 (native-inputs
3291 `(("autoconf" ,autoconf)
3292 ("automake" ,automake)
3293 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
3294 ("pkg-config" ,pkg-config)))
3295 (inputs
3296 `(("dbus-glib" ,dbus-glib)
3297 ("libxml2" ,libxml2)))
3298 (home-page "https://01.org/linux-thermal-daemon/")
3299 (synopsis "CPU scaling for thermal management")
3300 (description "The Linux Thermal Daemon helps monitor and control temperature
3301 on systems running the Linux kernel.")
3302 ;; arm and aarch64 don't have cpuid.h.
3303 (supported-systems '("i686-linux" "x86_64-linux"))
3304 (license license:gpl2+)))
3305
3306 (define-public masscan
3307 (package
3308 (name "masscan")
3309 (version "1.0.5")
3310 (source
3311 (origin
3312 (method git-fetch)
3313 (uri (git-reference
3314 (url "https://github.com/robertdavidgraham/masscan.git")
3315 (commit version)))
3316 (file-name (git-file-name name version))
3317 (sha256
3318 (base32 "0q0c7bsf0pbl8napry1qyg0gl4pd8wn872h4mz9b56dx4rx90vqg"))))
3319 (build-system gnu-build-system)
3320 (inputs
3321 `(("libpcap" ,libpcap)))
3322 (arguments
3323 '(#:test-target "regress"
3324 #:make-flags
3325 (list "CC=gcc"
3326 (string-append "PREFIX=" (assoc-ref %outputs "out")))
3327 #:phases
3328 (modify-phases %standard-phases
3329 (delete 'configure) ; no ./configure script
3330 (add-after 'unpack 'patch-path
3331 (lambda* (#:key outputs inputs #:allow-other-keys)
3332 (let* ((out (assoc-ref outputs "out"))
3333 (pcap (assoc-ref inputs "libpcap")))
3334 (substitute* "src/rawsock-pcap.c"
3335 (("libpcap.so") (string-append pcap "/lib/libpcap.so")))
3336 #t))))))
3337 (synopsis "TCP port scanner")
3338 (description "MASSCAN is an asynchronous TCP port scanner. It can detect
3339 open ports, and also complete the TCP connection and interact with the remote
3340 application, collecting the information received.")
3341 (home-page "https://github.com/robertdavidgraham/masscan")
3342 ;; 'src/siphash24.c' is the SipHash reference implementation, which
3343 ;; bears a CC0 Public Domain Dedication.
3344 (license license:agpl3+)))
3345
3346 (define-public hungrycat
3347 (package
3348 (name "hungrycat")
3349 (version "0.4.1")
3350 (source (origin
3351 (method url-fetch)
3352 (uri (string-append "https://github.com/jwilk/hungrycat/"
3353 "releases/download/" version "/"
3354 "hungrycat-" version ".tar.gz"))
3355 (sha256
3356 (base32
3357 "03fc1zsrf99lvxa7b4ps6pbi43304wbxh1f6ci4q0vkal370yfwh"))))
3358 (build-system gnu-build-system)
3359 (native-inputs
3360 ;; For tests.
3361 `(("python" ,python-wrapper)
3362 ("python-nose" ,python-nose)))
3363 (arguments
3364 `(#:test-target "test"))
3365 (synopsis "A single tool that combines @command{cat} & @command{rm}")
3366 (description
3367 "hungrycat prints the contents of a file to standard output, while
3368 simultaneously freeing the disk space it occupied. It is useful if you need
3369 to process a large file, don't have enough space to store both the input and
3370 output files, and don't need the input file afterwards.
3371 While similar in principle to running @command{cat} immediately followed by
3372 @command{rm}, @command{hungrycat} actually frees blocks as soon as they are
3373 printed instead of after the entire file has been read, which is often too
3374 late.")
3375 (home-page "https://jwilk.net/software/hungrycat")
3376 (license license:expat)))
3377
3378 (define-public launchmon
3379 (package
3380 (name "launchmon")
3381 (version "1.0.2")
3382 (source (origin
3383 (method url-fetch)
3384 (uri (string-append
3385 "https://github.com/LLNL/LaunchMON/releases/download/v"
3386 version "/launchmon-v" version ".tar.gz"))
3387 (sha256
3388 (base32
3389 "0fm3nd9mydm9v2bf7bh01dbgrfnpwkapxa3dsvy3x1z0rz61qc0x"))
3390 (modules '((guix build utils)))
3391 (snippet
3392 '(begin
3393 ;; Fix build failure with GCC 7 due to a conversion error.
3394 ;; Remove for versions > 1.0.2.
3395 (substitute* "launchmon/src/linux/lmon_api/lmon_coloc_spawner.cxx"
3396 ((" lmonpl = '\\\\0'")
3397 " *lmonpl = '\\0'"))
3398 #t))))
3399 (build-system gnu-build-system)
3400 (inputs
3401 `(("mpi" ,openmpi)
3402 ("munge" ,munge)
3403 ("boost" ,boost)
3404 ("libelf" ,libelf)
3405 ("libgcrypt" ,libgcrypt)
3406 ("libgpg-error" ,libgpg-error)))
3407 (synopsis "Infrastructue for large scale tool daemon launching")
3408 (description
3409 "LaunchMON is a software infrastructure that enables HPC run-time
3410 tools to co-locate tool daemons with a parallel job. Its API allows a
3411 tool to identify all the remote processes of a job and to scalably
3412 launch daemons into the relevant nodes.")
3413 (home-page "https://github.com/LLNL/LaunchMON")
3414 (supported-systems '("i686-linux" "x86_64-linux"))
3415 (license license:lgpl2.1)))
3416
3417 (define-public spindle
3418 (package
3419 (name "spindle")
3420 (version "0.10")
3421 (source (origin
3422 ;; We use git checkout to avoid github auto-generated tarballs
3423 (method git-fetch)
3424 (uri (git-reference
3425 (url "https://github.com/hpc/Spindle.git")
3426 (commit (string-append "v" version))))
3427 (file-name (git-file-name name version))
3428 (sha256
3429 (base32
3430 "15n3ay0qq81r5v7fif61q1vdjcq44pp2nynkh3fvbzc9fj3c39wd"))))
3431 (build-system gnu-build-system)
3432 (arguments '(#:configure-flags '("--enable-sec-launchmon"
3433 "--enable-sec-munge"
3434 "--enable-sec-none")))
3435 (inputs
3436 `(("mpi" ,openmpi)
3437 ("munge" ,munge)
3438 ("launchmon" ,launchmon)
3439 ("libgcrypt" ,libgcrypt)))
3440 (synopsis "Scalable library loading in HPC environments")
3441 (description
3442 "Spindle is a tool for improving the performance of dynamic library and
3443 Python loading in HPC environments.")
3444 (home-page "https://github.com/hpc/Spindle")
3445 ;; This package supports x86_64 and PowerPC64
3446 (supported-systems '("x86_64-linux"))
3447 (license license:lgpl2.1)))
3448
3449 (define-public inxi-minimal
3450 (let ((real-name "inxi"))
3451 (package
3452 (name "inxi-minimal")
3453 (version "3.1.00-1")
3454 (source
3455 (origin
3456 (method git-fetch)
3457 (uri (git-reference
3458 (url "https://github.com/smxi/inxi")
3459 (commit version)))
3460 (file-name (git-file-name real-name version))
3461 (sha256
3462 (base32 "0md6yfd297l8695g0rsbs4mm74dc3k00rfjl4x2n4i33mkylp6qa"))))
3463 (build-system trivial-build-system)
3464 (inputs
3465 `(("bash" ,bash-minimal)
3466 ("perl" ,perl)
3467 ("procps" ,procps)))
3468 (native-inputs
3469 `(("gzip" ,gzip)))
3470 (arguments
3471 `(#:modules
3472 ((guix build utils)
3473 (ice-9 match)
3474 (srfi srfi-26))
3475 #:builder
3476 (begin
3477 (use-modules (guix build utils)
3478 (ice-9 match)
3479 (srfi srfi-26))
3480 (setenv "PATH" (string-append
3481 (assoc-ref %build-inputs "bash") "/bin" ":"
3482 (assoc-ref %build-inputs "gzip") "/bin" ":"
3483 (assoc-ref %build-inputs "perl") "/bin" ":"))
3484 (copy-recursively (assoc-ref %build-inputs "source")
3485 ,(string-append real-name "-" version))
3486 (with-directory-excursion ,(string-append real-name "-" version)
3487 (with-fluids ((%default-port-encoding #f))
3488 (substitute* "inxi" (("/usr/bin/env perl") (which "perl"))))
3489 (let ((bin (string-append %output "/bin")))
3490 (install-file "inxi" bin)
3491 (wrap-program (string-append bin "/inxi")
3492 `("PATH" ":" =
3493 ("$PATH"
3494 ,@(map (lambda (input)
3495 (match input
3496 ((name . store)
3497 (let ((store-append
3498 (cut string-append store <>)))
3499 (cond
3500 ((member name '("util-linux"))
3501 (string-append (store-append "/bin") ":"
3502 (store-append "/sbin")))
3503 ((member name '("dmidecode" "iproute2"))
3504 (store-append "/sbin"))
3505 (else (store-append "/bin")))))))
3506 %build-inputs)))
3507 `("PERL5LIB" ":" =
3508 ,(delete
3509 ""
3510 (map (match-lambda
3511 (((? (cut string-prefix? "perl-" <>) name) . dir)
3512 (string-append dir "/lib/perl5/site_perl"))
3513 (_ ""))
3514 %build-inputs)))))
3515 (invoke "gzip" "inxi.1")
3516 (install-file "inxi.1.gz"
3517 (string-append %output "/share/man/man1")))
3518 #t)))
3519 (home-page "https://smxi.org/docs/inxi.htm")
3520 (synopsis "Full-featured system information script")
3521 (description "Inxi is a system information script that can display
3522 various things about your hardware and software to users in an IRC chatroom or
3523 support forum. It runs with the @code{/exec} command in most IRC clients.")
3524 (license license:gpl3+))))
3525
3526 (define-public inxi
3527 (package
3528 (inherit inxi-minimal)
3529 (name "inxi")
3530 (inputs
3531 `(("dmidecode" ,dmidecode)
3532 ("file" ,file)
3533 ("bind:utils" ,isc-bind "utils") ; dig
3534 ("gzip" ,gzip)
3535 ("iproute2" ,iproute) ; ip
3536 ("kmod" ,kmod) ; modinfo
3537 ("lm-sensors" ,lm-sensors)
3538 ("mesa-utils" ,mesa-utils)
3539 ("pciutils" ,pciutils)
3540 ("tar" ,tar)
3541 ("tree" ,tree)
3542 ("util-linux" ,util-linux) ; lsblk
3543 ("usbutils" ,usbutils) ; lsusb
3544 ("wmctrl" ,wmctrl)
3545 ("xdpyinfo" ,xdpyinfo)
3546 ("xprop" ,xprop)
3547 ("xrandr" ,xrandr)
3548 ("coreutils" ,coreutils) ; uptime
3549 ("inetutils" ,inetutils) ; ifconfig
3550 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
3551 ("perl-http-tiny" ,perl-http-tiny)
3552 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
3553 ("perl-json-xs" ,perl-json-xs)
3554 ("perl-time-hires" ,perl-time-hires)
3555 ;; TODO: Add more inputs:
3556 ;; ipmi-sensors
3557 ;; hddtemp
3558 ;; perl-xml-dumper
3559 ;; ipmitool
3560 ,@(package-inputs inxi-minimal)))))
3561
3562 (define-public pscircle
3563 (package
3564 (name "pscircle")
3565 (version "1.3.1")
3566 (source
3567 (origin
3568 (method git-fetch)
3569 (uri (git-reference
3570 (url "https://gitlab.com/mildlyparallel/pscircle.git")
3571 (commit (string-append "v" version))))
3572 (file-name (git-file-name name version))
3573 (sha256
3574 (base32 "1sm99423hh90kr4wdjqi9sdrrpk65j2vz2hzj65zcxfxyr6khjci"))))
3575 (build-system meson-build-system)
3576 (native-inputs
3577 `(("pkg-config" ,pkg-config)))
3578 (inputs
3579 `(("cairo" ,cairo)
3580 ("libpng" ,libpng)
3581 ("libx11" ,libx11)))
3582 (home-page "https://gitlab.com/mildlyparallel/pscircle")
3583 (synopsis "Visualize Linux processes in a form of radial tree")
3584 (description
3585 "@code{pscircle} visualizes Linux processes in the form of a radial tree.")
3586 (license license:gpl2+)))
3587
3588 (define-public python-pyudev
3589 (package
3590 (name "python-pyudev")
3591 (version "0.22.0")
3592 (source
3593 (origin
3594 (method url-fetch)
3595 (uri (pypi-uri "pyudev" version))
3596 (sha256
3597 (base32
3598 "0xmj6l08iih2js9skjqpv4w7y0dhxyg91zmrs6v5aa65gbmipfv9"))))
3599 (build-system python-build-system)
3600 (arguments
3601 `(#:tests? #f ; Tests require /sys
3602 #:phases
3603 (modify-phases %standard-phases
3604 (add-after 'unpack 'patch-ctypes-udev
3605 (lambda* (#:key inputs outputs #:allow-other-keys)
3606 (let ((eudev (assoc-ref inputs "eudev")))
3607 (substitute* "src/pyudev/core.py"
3608 (("'udev'")
3609 (string-append "'" eudev "/lib/libudev.so'")))
3610 (substitute* "src/pyudev/_ctypeslib/utils.py"
3611 ;; Use absolute paths instead of keys.
3612 (("= find_library") "= "))
3613 #t))))))
3614 (inputs
3615 `(("eudev" ,eudev)))
3616 (propagated-inputs
3617 `(("python-six" ,python-six)))
3618 (native-inputs
3619 `(("python-docutils" ,python-docutils)
3620 ("python-hypothesis" ,python-hypothesis)
3621 ("python-mock" ,python-mock)
3622 ("python-pytest" ,python-pytest)
3623 ("python-sphinx" ,python-sphinx)))
3624 (home-page "https://pyudev.readthedocs.io/")
3625 (synopsis "Python udev binding")
3626 (description "This package provides @code{udev} bindings for Python.")
3627 (license license:lgpl2.1)))
3628
3629 (define-public solaar
3630 (package
3631 (name "solaar")
3632 (version "0.9.2")
3633 (source (origin
3634 (method git-fetch)
3635 (uri (git-reference
3636 (url "https://github.com/pwr/Solaar.git")
3637 (commit version)))
3638 (file-name (git-file-name name version))
3639 (sha256
3640 (base32
3641 "085mfa13dap3wqik1dqlad0d7kff4rv7j4ljh99c7l8nhczkqgwm"))))
3642 (build-system python-build-system)
3643 (arguments
3644 `(#:phases
3645 (modify-phases %standard-phases
3646 (add-after 'unpack 'fix-prefix-detection
3647 (lambda _
3648 (substitute* "setup.py"
3649 (("'--prefix' in sys\\.argv")
3650 "len([x.startswith('--prefix=') for x in sys.argv]) > 0"))
3651 #t))
3652 (replace 'build
3653 (lambda _
3654 (invoke "python" "setup.py" "build")))
3655 (add-before 'check 'setenv-PATH
3656 (lambda _
3657 (setenv "PYTHONPATH" (string-append "lib:" (getenv "PYTHONPATH")))
3658 #t)))))
3659 (propagated-inputs
3660 `(("python-pygobject" ,python-pygobject)
3661 ("python-pyudev" ,python-pyudev)))
3662 (home-page "https://smxi.org/docs/inxi.htm")
3663 (synopsis "Linux devices manager for the Logitech Unifying Receiver")
3664 (description "This package provides tools to manage clients of the
3665 Logitech Unifying Receiver.")
3666 (license license:gpl2)))
3667
3668 (define-public lynis
3669 (package
3670 (name "lynis")
3671 ;; Also update the ‘lynis-sdk’ input to the commit matching this release.
3672 (version "2.7.5")
3673 (source
3674 (origin
3675 (method git-fetch)
3676 (uri (git-reference
3677 (url "https://github.com/CISOfy/lynis")
3678 (commit version)))
3679 (file-name (git-file-name name version))
3680 (sha256
3681 (base32 "1lkkbvxm0rgrrlx0szaxmf8ghc3d26wal96sgqk84m37mvs1f7p0"))
3682 (modules '((guix build utils)))
3683 (snippet
3684 '(begin
3685 ;; Remove proprietary plugins. As of now, all plugins supplied with
3686 ;; lynis are proprietary. In the future, if free plugins are
3687 ;; provided, whitelist them from deletion.
3688 (for-each delete-file (find-files "plugins"))
3689 #t))))
3690 (build-system gnu-build-system)
3691 (native-inputs
3692 `(;; For tests
3693 ("lynis-sdk"
3694 ,(origin
3695 (method git-fetch)
3696 (uri (git-reference
3697 (url "https://github.com/CISOfy/lynis-sdk")
3698 (commit "bf1c1d95121da9ca79a9eac5a15ed8d81e34094d")))
3699 (file-name (git-file-name "lynis-sdk" version))
3700 (sha256
3701 (base32 "1ndz5v0039dqa87cva2dk55a8hkw0fibsw8hh2ddmny9qkr4l3dp"))))))
3702 (arguments
3703 `(#:phases
3704 (modify-phases %standard-phases
3705 (replace 'configure
3706 (lambda* (#:key inputs outputs #:allow-other-keys)
3707 (substitute* "lynis"
3708 (("/usr/share/lynis")
3709 (string-append (assoc-ref outputs "out") "/share/lynis")))
3710 (substitute* "include/functions"
3711 (("/usr/local/etc/lynis")
3712 (string-append (assoc-ref outputs "out") "/etc/lynis")))
3713 #t))
3714 (delete 'build)
3715 (replace 'install
3716 (lambda* (#:key outputs #:allow-other-keys)
3717 (let ((out (assoc-ref outputs "out")))
3718 (install-file "lynis" (string-append out "/bin/"))
3719 (install-file "default.prf" (string-append out "/etc/lynis"))
3720 (for-each
3721 (lambda (dir)
3722 (copy-recursively dir (string-append out "/share/lynis/" dir)))
3723 (list "db" "include" "plugins"))
3724 (install-file "lynis.8" (string-append out "/share/man/man8"))
3725 #t)))
3726 (replace 'check
3727 (lambda* (#:key inputs #:allow-other-keys)
3728 (copy-recursively (assoc-ref inputs "lynis-sdk") "../lynis-sdk")
3729 (setenv "LANG" "en_US.UTF-8")
3730 (let ((lynis-dir (getcwd)))
3731 (with-directory-excursion "../lynis-sdk"
3732 (substitute* "config"
3733 (("\\.\\./lynis") lynis-dir))
3734 (substitute* "unit-tests/tests-language-translations.sh"
3735 (("\\.\\./lynis") lynis-dir))
3736 (invoke "sh" "lynis-devkit" "run" "unit-tests"))))))))
3737 (home-page "https://cisofy.com/lynis/")
3738 (synopsis "Security auditing tool")
3739 (description "Lynis is a security auditing tool. It performs an in-depth
3740 security scan and runs on the system itself. The primary goal is to test
3741 security defenses and provide tips for further system hardening. It will also
3742 scan for general system information, vulnerable software packages, and
3743 possible configuration issues.")
3744 (license license:gpl3+)))
3745
3746 (define-public ngrep
3747 (package
3748 (name "ngrep")
3749 (version "1.47")
3750 (source
3751 (origin
3752 (method git-fetch)
3753 (uri (git-reference
3754 (url "https://github.com/jpr5/ngrep/")
3755 (commit (string-append "V" (string-replace-substring version "." "_")))))
3756 (file-name (git-file-name name version))
3757 (sha256
3758 (base32
3759 "1x2fyd7wdqlj1r76ilal06cl2wmbz0ws6i3ys204sbjh1cj6dcl7"))))
3760 (build-system gnu-build-system)
3761 (inputs
3762 `(("libpcap" ,libpcap)))
3763 (arguments
3764 `(#:tests? #f ;; No tests.
3765 #:configure-flags (list (string-append "--with-pcap-includes="
3766 (assoc-ref %build-inputs "libpcap")
3767 "/include/pcap"))))
3768 (home-page "https://github.com/jpr5/ngrep/")
3769 (synopsis "Grep-like utility to search for network packets on an interface")
3770 (description "@command{ngrep} is like GNU grep applied to the network
3771 layer. It's a PCAP-based tool that allows you to specify an extended regular
3772 or hexadecimal expression to match against data payloads of packets. It
3773 understands many kinds of protocols, including IPv4/6, TCP, UDP, ICMPv4/6,
3774 IGMP and Raw, across a wide variety of interface types, and understands BPF
3775 filter logic in the same fashion as more common packet sniffing tools, such as
3776 tcpdump and snoop.")
3777 (license license:bsd-3)))
3778
3779 (define-public pam-mount
3780 (package
3781 (name "pam-mount")
3782 (version "2.16")
3783 (source
3784 (origin
3785 (method url-fetch)
3786 (uri (string-append "mirror://sourceforge/pam-mount/pam_mount/"
3787 version "/pam_mount-" version ".tar.xz"))
3788 (sha256
3789 (base32
3790 "1rvi4irb7ylsbhvx1cr6islm2xxw1a4b19q6z4a9864ndkm0f0mf"))
3791 (patches
3792 ;; Patch adding support for encrypted volumes in LUKS2 format.
3793 ;; It comes from the Gentoo package definition for sys-auth/pam_mount.
3794 (search-patches "pam-mount-luks2-support.patch"))))
3795 (build-system gnu-build-system)
3796 (native-inputs
3797 `(("perl" ,perl)
3798 ("pkg-config" ,pkg-config)))
3799 (inputs
3800 `(("cryptsetup" ,cryptsetup)
3801 ("libhx" ,libhx)
3802 ("libxml2" ,libxml2)
3803 ("linux-pam" ,linux-pam)
3804 ("lvm2" ,lvm2)
3805 ("openssl" ,openssl)
3806 ("pcre" ,pcre)
3807 ("libmount" ,util-linux "lib")
3808 ("util-linux" ,util-linux)))
3809 (arguments
3810 `(#:configure-flags
3811 (list (string-append "--with-slibdir=" %output "/lib")
3812 (string-append "--with-ssbindir=" %output "/sbin"))
3813 #:phases
3814 (modify-phases %standard-phases
3815 (add-after 'unpack 'fix-program-paths
3816 (lambda* (#:key inputs outputs #:allow-other-keys)
3817 (let ((util-linux (assoc-ref inputs "util-linux"))
3818 (out (assoc-ref outputs "out")))
3819 (substitute* "src/mtcrypt.c"
3820 (("\"mount\";")
3821 (string-append "\"" util-linux "/bin/mount\";"))
3822 (("\"umount\";")
3823 (string-append "\"" util-linux "/bin/umount\";"))
3824 (("\"fsck\",")
3825 (string-append "\"" util-linux "/sbin/fsck\",")))
3826 (substitute* "src/rdconf1.c"
3827 (("\"mount\", \"")
3828 (string-append "\"" util-linux "/bin/mount\", \""))
3829 (("\"umount\", \"")
3830 (string-append "\"" util-linux "/bin/umount\", \""))
3831 (("\"fsck\", \"")
3832 (string-append "\"" util-linux "/sbin/fsck\", \""))
3833 (("\"pmvarrun\", \"")
3834 (string-append "\"" out "/sbin/pmvarrun\", \""))))
3835 #t)))))
3836 (home-page "http://pam-mount.sourceforge.net")
3837 (synopsis "PAM module to mount volumes for a user session")
3838 (description
3839 "Pam-mount is a PAM module that can mount volumes when a user logs in.
3840 It supports mounting local filesystems of any kind the normal mount utility
3841 supports. It can also mount encrypted LUKS volumes using the password
3842 supplied by the user when logging in.")
3843 (license (list license:gpl2+ license:lgpl2.1+))))