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>
39 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
138 ;; This package uses su instead of sudo (because of SpaceFM).
139 (define-public ktsuss
148 (url "https://github.com/nomius/ktsuss.git")
151 (base32 "0q9931f9hp47v1n8scli4bdg2rkjpf5jf8v7jj2gdn83aia1r2hz"))
152 (file-name (git-file-name name version))))
153 (build-system glib-or-gtk-build-system)
156 (modify-phases %standard-phases
157 (add-after 'unpack 'patch-file-names
159 (substitute* "configure.ac"
160 (("supath=`which su 2>/dev/null`")
161 "supath=/run/setuid-programs/su"))
164 `(("autoconf" ,autoconf)
165 ("automake" ,automake)
167 ("pkg-config" ,pkg-config)))
171 (synopsis "Graphical front end for @command{su}")
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)))
186 (uri (string-append "https://github.com/aide/aide/releases/download/v"
187 version "/aide-" version ".tar.gz"))
189 (base32 "15xp47sz7kk1ciffw3f5xw2jg2mb2lqrbr3q6p4bkbz5dap9iy8p"))))
190 (build-system gnu-build-system)
195 `(("libgcrypt" ,libgcrypt)
196 ("libgpg-error" ,libgpg-error)
197 ("libmhash" ,libmhash)
198 ("pcre:static" ,pcre "static")
200 ("zlib:static" ,zlib "static")
202 (synopsis "File and directory integrity checker")
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+)))
213 (define-public progress
221 (url "https://github.com/Xfennec/progress.git")
222 (commit (string-append "v" version))))
224 (base32 "1cnb4ixlhshn139mj5sr42k5m6gjjbyqvkn1324c47niwrgp7dqm"))
225 (file-name (git-file-name name version))))
226 (build-system gnu-build-system)
228 `(("pkg-config" ,pkg-config)
231 `(("ncurses" ,ncurses)))
233 `(#:tests? #f ; no test suite
235 (let ((target ,(%current-target-system)))
236 (list ,(string-append "CC=" (cc-for-target))
237 (string-append "PKG_CONFIG="
239 (string-append target "-pkg-config")
241 (string-append "PREFIX=" (assoc-ref %outputs "out"))))
243 (modify-phases %standard-phases
244 (delete 'configure)))) ; no configure script
245 (home-page "https://github.com/Xfennec/progress")
246 (synopsis "Program to view the progress of the coreutils commands")
247 (description "A program that looks for coreutils basic commands (cp, mv,
248 dd, tar, gzip/gunzip, cat, etc.) currently running on your system and displays
249 the percentage of copied data. It can also show estimated time and throughput,
250 and provides a \"top-like\" mode (monitoring).")
251 (license license:gpl3+)))
253 (define-public shepherd
259 (uri (string-append "mirror://gnu/shepherd/shepherd-"
263 "0x9zr0x3xvk4qkb6jnda451d5iyrl06cz1bjzjsm0lxvjj3fabyk"))))
264 (build-system gnu-build-system)
266 '(#:configure-flags '("--localstatedir=/var")))
268 `(("pkg-config" ,pkg-config)
270 ;; This is the Guile we use as a cross-compiler...
271 ("guile" ,guile-3.0)))
273 ;; ... and this is the one that appears in shebangs when cross-compiling.
274 `(("guile" ,guile-3.0)
276 ;; The 'shepherd' command uses Readline when used interactively. It's
277 ;; an unusual use case though, so we don't propagate it.
278 ("guile-readline" ,guile-readline)))
279 (synopsis "System service manager")
281 "The GNU Shepherd is a daemon-managing daemon, meaning that it supervises
282 the execution of system services, replacing similar functionality found in
283 typical init systems. It provides dependency-handling through a convenient
284 interface and is based on GNU Guile.")
285 (license license:gpl3+)
286 (home-page "https://www.gnu.org/software/shepherd/")))
288 (define-public guile2.2-shepherd
291 (name "guile2.2-shepherd")
293 `(("pkg-config" ,pkg-config)
294 ("guile" ,guile-2.2)))
296 `(("guile" ,guile-2.2)))))
298 (define-public guile3.0-shepherd
299 (deprecated-package "guile3.0-shepherd" shepherd))
301 (define-public guile2.0-shepherd
304 (name "guile2.0-shepherd")
306 `(("pkg-config" ,pkg-config)
307 ("guile" ,guile-2.0)))
309 `(("guile" ,guile-2.0)))))
311 (define-public cloud-utils
319 "https://launchpad.net/cloud-utils/trunk/"
320 version "/+download/cloud-utils-" version ".tar.gz"))
323 "07fl3dlqwdzw4xx7mcxhpkks6dnmaxha80zgs9f6wmibgzni8z0r"))))
324 (build-system gnu-build-system)
327 (let ((out (assoc-ref %outputs "out")))
328 (list (string-append "BINDIR=" out "/bin")
329 (string-append "MANDIR=" out "/share/man/man1")
330 (string-append "DOCDIR=" out "/share/doc")))
332 (modify-phases %standard-phases
335 (add-after 'install 'wrap
336 (lambda* (#:key outputs inputs #:allow-other-keys)
337 (let ((growpart (string-append (assoc-ref outputs "out")
339 (wrap-program growpart
340 `("PATH" ":" prefix (,(dirname (which "sfdisk"))
341 ,(dirname (which "readlink"))))))
345 ("util-linux" ,util-linux))) ; contains sfdisk for growpart
346 (home-page "https://launchpad.net/cloud-utils")
347 (synopsis "Set of utilities for cloud computing environments")
349 "This package contains a set of utilities for cloud computing
353 @item @command{cloud-localds} Create a disk for cloud-init to utilize nocloud
354 @item @command{cloud-publish-image} Wrapper for cloud image publishing
355 @item @command{cloud-publish-tarball} Wrapper for publishing cloud tarballs
356 @item @command{cloud-publish-ubuntu} Import a Ubuntu cloud image
357 @item @command{ec2metadata} Query and display @acronym{EC2,Amazon Elastic
358 Compute Cloud} metadata
359 @item @command{growpart} Grow a partition to fill the device
360 @item @command{mount-image-callback} Mount a file and run a command
361 @item @command{resize-part-image} Resize a partition image to a new size
362 @item @command{ubuntu-cloudimg-query} Get the latest Ubuntu
363 @acronym{AMI,Amazon Machine Image}
364 @item @command{ubuntu-ec2-run} Run a @acronym{EC2,Amazon Elastic Compute
365 Cloud} instance using Ubuntu
366 @item @command{vcs-run} Obtain a repository, and run a command
367 @item @command{write-mime-multipart} Handle multipart
368 @acronym{MIME,Multipurpose Internet Mail Extensions} messages
370 (license license:gpl3)))
372 (define-public daemontools
379 "https://cr.yp.to/daemontools/"
380 "daemontools-" version ".tar.gz"))
383 "07scvw88faxkscxi91031pjkpccql6wspk4yrlnsbrrb5c0kamd5"))))
384 (build-system gnu-build-system)
386 `(#:tests? #f ;; No tests as far as I can tell.
388 (modify-phases %standard-phases
389 (add-after 'unpack 'chdir
391 (chdir ,(string-append "daemontools-" version))
394 (add-before 'build 'patch
396 (substitute* "src/error.h"
397 (("extern int errno;")
398 "#include <errno.h>"))
402 (invoke "package/compile")))
404 (lambda* (#:key outputs #:allow-other-keys)
405 (let* ((out (assoc-ref outputs "out"))
406 (bin (string-append out "/bin")))
407 (for-each (lambda (file)
408 (install-file file bin))
409 (find-files "command")))
411 (synopsis "Tools for managing UNIX style services")
413 "@code{daemontools} is a collection of tools for managing UNIX
415 (license license:public-domain)
416 (home-page "https://cr.yp.to/daemontools.html")))
426 "https://projects.gw-computing.net/attachments/download/615/dfc-"
430 "0m1fd7l85ckb7bq4c5c3g257bkjglm8gq7x42pkmpp87fkknc94n"))))
431 (build-system cmake-build-system)
432 (arguments '(#:tests? #f)) ; There are no tests.
433 (native-inputs `(("gettext" ,gettext-minimal)))
434 (home-page "https://projects.gw-computing.net/projects/dfc")
435 (synopsis "Display file system space usage using graphs and colors")
437 "dfc (df color) is a modern version of df. It uses colors, draws pretty
438 graphs and can export its output to different formats.")
439 (license license:bsd-3)))
441 (define-public facter
448 (url "https://github.com/puppetlabs/facter-ng")
450 (file-name (git-file-name name version))
453 "0bab3by926gavbhkvp0in82vim575ybj8z6av3b12jdvla1s9rmz"))))
454 (build-system ruby-build-system)
456 `(#:phases (modify-phases %standard-phases
457 (add-after 'unpack 'delete-facter-ng-gemspec
459 ;; XXX: ruby-build-system incorrectly finds
460 ;; facter-ng.gemspec from this directory and tries to
461 ;; build that instead of the proper facter.gemspec.
462 ;; Just delete it as a workaround, as it appears to
463 ;; only exist for backwards-compatibility after the
464 ;; facter-ng->facter rename.
465 (delete-file "agent/facter-ng.gemspec")
467 (add-after 'unpack 'embed-iproute-reference
468 (lambda* (#:key inputs #:allow-other-keys)
469 (let ((iproute (assoc-ref inputs "iproute")))
470 ;; Provide an absolute reference to the 'ip' executable
471 ;; to avoid propagating it.
472 (substitute* "lib/resolvers/networking_linux_resolver.rb"
474 (string-append "execute('" iproute "/sbin/ip")))
477 (add-after 'wrap 'check
478 (lambda* (#:key tests? outputs #:allow-other-keys)
479 ;; XXX: The test suite wants to run Bundler and
480 ;; complains that the gemspec is invalid. For now
481 ;; just make sure that we can run the wrapped
482 ;; executable directly.
484 (invoke (string-append (assoc-ref outputs "out")
486 ;; Many facts depend on /sys, /etc/os-release,
487 ;; etc, so we only run a small sample.
488 "facterversion" "architecture"
489 "kernel" "kernelversion")
490 (format #t "tests disabled~%"))
493 `(("iproute" ,iproute)
494 ("ruby-hocon" ,ruby-hocon)
495 ("ruby-sys-filesystem" ,ruby-sys-filesystem)
496 ("ruby-thor" ,ruby-thor)))
497 (synopsis "Collect and display system facts")
499 "Facter is a tool that gathers basic facts about nodes (systems) such
500 as hardware details, network settings, OS type and version, and more. These
501 facts can be collected on the command line with the @command{facter} command
502 or via the @code{facter} Ruby library.")
503 (home-page "https://github.com/puppetlabs/facter-ng")
504 (license license:expat)))
512 (uri (string-append "http://hisham.hm/htop/releases/"
513 version "/htop-" version ".tar.gz"))
516 "0mrwpb3cpn3ai7ar33m31yklj64c3pp576vh1naqff6f21pq5mnr"))))
517 (build-system gnu-build-system)
519 `(("ncurses" ,ncurses)))
521 `(("python" ,python-wrapper))) ;for scripts/MakeHeader.py
522 (home-page "https://hisham.hm/htop/")
523 (synopsis "Interactive process viewer")
525 "This is htop, an interactive process viewer. It is a text-mode
526 application (for console or X terminals) and requires ncurses.")
527 (license license:gpl2)))
536 (uri (string-append "mirror://gnu/pies/pies-"
540 "14jb4pa4zs26d5j2skxbaypnwhsx2lw8jgj1irrgs03c2dnf7gp6"))))
541 (build-system gnu-build-system)
543 '(#:phases (modify-phases %standard-phases
544 (add-before 'build 'patch-/bin/sh
545 (lambda* (#:key inputs #:allow-other-keys)
546 ;; Use the right shell when executing user-provided
548 (let ((bash (assoc-ref inputs "bash")))
549 (substitute* '("src/progman.c" "src/comp.c")
551 (string-append "\"" bash "/bin/sh\"")))
553 (home-page "https://www.gnu.org.ua/software/pies/")
554 (synopsis "Program invocation and execution supervisor")
556 "GNU pies is a program that supervises the invocation and execution of
557 other programs. It reads the list of programs to be started from its
558 configuration file, executes them, and then monitors their status,
559 re-executing them as necessary.")
560 (license license:gpl3+)))
562 (define-public inetutils
568 (uri (string-append "mirror://gnu/inetutils/inetutils-"
570 (patches (search-patches "inetutils-hurd.patch"))
573 "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy"))))
574 (build-system gnu-build-system)
576 `(#:configure-flags '("--localstatedir=/var"
578 ;; Make sure 'PATH_PROCNET_DEV' gets defined when
579 ;; cross-compiling (by default it does not.)
580 ,@(if (%current-target-system)
581 '("--with-path-procnet-dev=/proc/net/dev")
594 ;; On some systems, 'libls.sh' may fail with an error such as:
595 ;; "Failed to tell switch -a apart from -A".
596 #:parallel-tests? #f))
597 (inputs `(("ncurses" ,ncurses)
598 ("readline" ,readline))) ;for 'ftp'
599 (native-inputs (if (member (%current-system)
600 (package-supported-systems net-tools))
601 `(("netstat" ,net-tools)) ;for tests
603 (home-page "https://www.gnu.org/software/inetutils/")
604 (synopsis "Basic networking utilities")
606 "Inetutils is a collection of common network programs, such as an ftp
607 client and server, a telnet client and server, an rsh client and server, and
609 (license license:gpl3+)))
611 (define-public shadow
618 "https://github.com/shadow-maint/shadow/releases/"
619 "download/" version "/shadow-" version ".tar.xz"))
620 (patches (search-patches "shadow-hurd-pctrl.patch"))
623 "0qmfq50sdhz6xilgxvinblll8j2iqfl7hwk45bq744y4plq4dbd3"))))
624 (build-system gnu-build-system)
626 `(;; Assume System V `setpgrp (void)', which is the default on GNU
627 ;; variants (`AC_FUNC_SETPGRP' is not cross-compilation capable.)
629 '("--with-libpam" "ac_cv_func_setpgrp_void=yes")
632 (modify-phases %standard-phases
633 (add-before 'build 'set-nscd-file-name
634 (lambda* (#:key inputs #:allow-other-keys)
635 ;; Use the right file name for nscd.
636 (let ((libc (assoc-ref inputs
637 ,(if (%current-target-system)
640 (substitute* "lib/nscd.c"
642 (string-append libc "/sbin/nscd")))
644 (add-after 'install 'remove-groups
645 (lambda* (#:key outputs #:allow-other-keys)
646 ;; Remove `groups', which is already provided by Coreutils.
647 (let* ((out (assoc-ref outputs "out"))
648 (bin (string-append out "/bin"))
649 (man (string-append out "/share/man")))
650 (delete-file (string-append bin "/groups"))
651 (for-each delete-file (find-files man "^groups\\."))
654 (inputs `(("linux-pam" ,linux-pam)))
655 (home-page "https://github.com/shadow-maint/shadow")
656 (synopsis "Authentication-related tools such as passwd, su, and login")
658 "Shadow provides a number of authentication-related tools, including:
659 login, passwd, su, groupadd, and useradd.")
661 ;; The `vipw' program is GPLv2+.
662 ;; libmisc/salt.c is public domain.
663 (license license:bsd-3)))
665 (define-public mingetty
671 (uri (string-append "mirror://sourceforge/mingetty/mingetty/"
672 version "/mingetty-" version ".tar.gz"))
675 "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"))))
676 (build-system gnu-build-system)
679 (modify-phases %standard-phases
681 (lambda* (#:key inputs outputs target #:allow-other-keys)
682 (let* ((out (assoc-ref outputs "out"))
683 (man8 (string-append out "/share/man/man8"))
684 (sbin (string-append out "/sbin"))
685 (shadow (assoc-ref inputs "shadow"))
686 (login (string-append shadow "/bin/login")))
687 (substitute* "Makefile"
688 ,@(if (%current-target-system)
690 (string-append "CC=" target "-gcc\n")))
693 (string-append "SBINDIR = " out
696 (string-append "MANDIR = " out
697 "/share/man/man8\n")))
699 ;; Pick the right 'login' by default.
700 (substitute* "mingetty.c"
702 (string-append "\"" login "\"")))
707 #:tests? #f)) ; no tests
708 (inputs `(("shadow" ,shadow)))
710 (home-page "https://sourceforge.net/projects/mingetty")
711 (synopsis "Getty for the text console")
713 "Small console getty that is started on the Linux text console,
714 asks for a login name and then transfers over to @code{login}. It is extended
715 to allow automatic login and starting any app.")
716 (license license:gpl2+)))
718 (define-public net-base
725 "mirror://debian/pool/main/n/netbase/netbase_"
729 "12xqjwg3p4rzmmh2iib6sigm9l29y3dgk74mmnw64k84jnbwdxl1"))))
730 (build-system trivial-build-system)
732 `(#:modules ((guix build utils))
734 (use-modules (guix build utils)
737 (let* ((source (assoc-ref %build-inputs "source"))
738 (tar (assoc-ref %build-inputs "tar"))
739 (xz (assoc-ref %build-inputs "xz"))
740 (output (assoc-ref %outputs "out"))
741 (etc (string-append output "/etc")))
742 (setenv "PATH" (string-append xz "/bin"))
743 (invoke (string-append tar "/bin/tar") "xvf"
745 (chdir ,(string-append "netbase-" version))
748 '("etc-services" "etc-protocols" "etc-rpc")
749 (map (cut string-append etc "/" <>)
750 '("services" "protocols" "rpc")))
752 (native-inputs `(("tar" ,tar)
754 (synopsis "IANA protocol, port, and RPC number assignments")
756 "This package provides the /etc/services, /etc/protocols, and /etc/rpc
757 files, which contain information about the IANA-assigned port, protocol, and
759 (home-page "https://packages.debian.org/sid/netbase")
760 (license license:gpl2)))
762 (define-public netcat
768 (uri (string-append "mirror://sourceforge/netcat/netcat/" version
769 "/netcat-" version ".tar.bz2"))
772 "1frjcdkhkpzk0f84hx6hmw5l0ynpmji8vcbaxg8h5k2svyxz0nmm"))))
773 (build-system gnu-build-system)
776 ;; By default, man and info pages are put in PREFIX/{man,info},
777 ;; but we want them in PREFIX/share/{man,info}.
778 (let ((out (assoc-ref %outputs "out")))
779 (list (string-append "--mandir=" out "/share/man")
780 (string-append "--infodir=" out "/share/info")))))
781 (home-page "http://netcat.sourceforge.net")
782 (synopsis "Read and write data over TCP/IP")
784 "Netcat is a featured networking utility which reads and writes data
785 across network connections, using the TCP/IP protocol. It is designed to be a
786 reliable \"back-end\" tool that can be used directly or easily driven by other
787 programs and scripts. At the same time, it is a feature-rich network debugging
788 and exploration tool, since it can create almost any kind of connection you
789 would need and has several interesting built-in capabilities.")
790 (license license:gpl2+)))
792 (define-public netcat-openbsd
794 (name "netcat-openbsd")
799 (url "https://salsa.debian.org/debian/netcat-openbsd.git")
800 (commit (string-append "debian/" version))))
801 (file-name (git-file-name name version))
804 "0kcvi3pav2fdx5c22psjv5dggk4cmrqiaq2cklhqngsk4a7vrjan"))))
805 (build-system gnu-build-system)
807 `(#:tests? #f ; no test suite
811 (modify-phases %standard-phases
813 (add-before 'build 'patch
815 (setenv "QUILT_PATCHES" "debian/patches")
816 (invoke "quilt" "push" "-a")
819 (lambda* (#:key outputs #:allow-other-keys)
820 (let* ((out (assoc-ref outputs "out"))
821 (bin (string-append out "/bin"))
822 (man (string-append out "/share/man/man1"))
823 (doc (string-append out "/share/doc/netcat-openbsd-" ,version))
824 (examples (string-append doc "/examples")))
825 (install-file "nc" bin)
826 (install-file "nc.1" man)
827 (install-file "debian/copyright" doc)
828 (copy-recursively "debian/examples" examples)
830 (inputs `(("libbsd" ,libbsd)))
831 (native-inputs `(("pkg-config" ,pkg-config)
833 (home-page "https://packages.debian.org/sid/netcat-openbsd")
834 (synopsis "Read and write data over TCP/IP")
836 "Netcat is a simple Unix utility which reads and writes data across
837 network connections using TCP or UDP protocol. It is designed to be a reliable
838 \"back-end\" tool that can be used directly or easily driven by other programs
839 and scripts. At the same time it is a feature-rich network debugging and
840 exploration tool, since it can create almost any kind of connection you would
841 need and has several interesting built-in capabilities.
843 This package contains the OpenBSD rewrite of netcat, including support for
844 IPv6, proxies, and Unix sockets.")
845 (license (list license:bsd-3
846 license:bsd-2)))) ; atomicio.*, socks.c
848 (define-public sipcalc
855 (uri (string-append "http://www.routemeister.net/projects"
856 "/sipcalc/files/sipcalc" "-" version ".tar.gz"))
859 "0mv3wndj4z2bsshh2k8d5sy3j8wxzgf8mzmmkvj1k8gpcz37dm6g"))))
860 (build-system gnu-build-system)
861 (home-page "https://www.routemeister.net/projects/sipcalc/")
862 (synopsis "Command-line IP subnet calculator")
864 "Sipcalc is an advanced command-line IP subnet calculator. It can take
865 multiple forms of input (IPv4/IPv6/interface/hostname) and output a multitude
866 of information about a given subnet.
873 @item Retrieving of address information from interfaces.
874 @item Classfull and CIDR output.
875 @item Multiple address and netmask input and output formats (dotted quad, hex,
877 @item Output of broadcast address, network class, Cisco wildcard,
878 hosts/range, network range.
879 @item The ability to split a network based on a smaller netmask, now also with
880 recursive runs on the generated subnets. (also IPv6)
884 @item Compressed and expanded input and output addresses.
885 @item Standard IPv6 network output.
886 @item v4 in v6 output.
887 @item Reverse DNS address generation.
890 (license license:bsd-3)))
898 (uri (string-append "mirror://gnu/alive/alive-"
902 "1vrzg51ai68x9yld7vbgl58sxaw5qpx8rbakwcxn4cqq6vpxj38j"))))
903 (build-system gnu-build-system)
904 (arguments '(#:configure-flags '("alive_cv_nice_ping=yes")))
905 (inputs `(("guile" ,guile-2.0)
906 ("inetutils" ,inetutils)))
907 (home-page "https://www.gnu.org/software/alive/")
908 (synopsis "Autologin and keep-alive daemon")
910 "GNU Alive sends periodic pings to a server, generally to keep a
912 (license license:gpl3+)))
914 (define-public isc-dhcp
915 (let* ((bind-major-version "9")
916 (bind-minor-version "11")
917 (bind-patch-version "18")
918 (bind-release-type "") ; for patch release, use "-P"
919 (bind-release-version "") ; for patch release, e.g. "6"
920 (bind-version (string-append bind-major-version
926 bind-release-version)))
932 (uri (string-append "https://ftp.isc.org/isc/dhcp/"
933 version "/dhcp-" version ".tar.gz"))
936 "08a5003zdxgl41b29zjkxa92h2i40zyjgxg0npvnhpkfl5jcsz0s"))))
937 (build-system gnu-build-system)
939 `(#:parallel-build? #f
940 #:configure-flags '("--with-randomdev=/dev/random")
942 (modify-phases %standard-phases
943 (add-after 'unpack 'replace-bundled-bind
944 (lambda* (#:key inputs native-inputs #:allow-other-keys)
945 (delete-file "bind/bind.tar.gz")
946 (copy-file (assoc-ref inputs "bind-source-tarball")
948 (chmod "bind/bind.tar.gz" #o644)
949 (substitute* "bind/version.tmp"
951 (format #f "MAJORVER=~a\n" ,bind-major-version))
953 (format #f "MINORVER=~a\n" ,bind-minor-version))
955 (format #f "PATCHVER=~a\n" ,bind-patch-version))
957 (format #f "RELEASETYPE=~a\n" ,bind-release-type))
959 (format #f "RELEASEVER=~a\n" ,bind-release-version)))
961 ,@(if (%current-target-system)
962 '((add-before 'configure 'fix-bind-cross-compilation
964 (substitute* "configure"
966 "--host=$host_alias"))
967 ;; BIND needs a native compiler because the DHCP
968 ;; build system uses the built 'gen' executable.
969 (setenv "BUILD_CC" "gcc")
972 (add-after 'configure 'post-configure
973 (lambda* (#:key outputs #:allow-other-keys)
974 ;; Point to the right client script, which will be
975 ;; installed in a later phase.
976 (substitute* "includes/dhcpd.h"
977 (("#define[[:blank:]]+_PATH_DHCLIENT_SCRIPT.*")
978 (let ((out (assoc-ref outputs "out")))
979 (string-append "#define _PATH_DHCLIENT_SCRIPT \""
980 out "/libexec/dhclient-script"
983 ;; During the 'build' phase, 'bind.tar.gz' is extracted, so
984 ;; we must patch shebangs in there and make sure the right
986 (with-directory-excursion "bind"
987 (substitute* "Makefile"
989 (let ((sh (which "sh")))
990 (string-append "./configure CONFIG_SHELL="
991 sh " SHELL=" sh " "))))
993 (let ((bind-directory (string-append "bind-" ,bind-version)))
994 (invoke "tar" "xf" "bind.tar.gz")
995 (for-each patch-shebang
996 (find-files bind-directory ".*"))
997 (substitute* (string-append bind-directory "/configure")
1000 (invoke "tar" "cf" "bind.tar.gz"
1002 ;; avoid non-determinism in the archive
1006 "--group=root:0")))))
1007 (add-after 'install 'post-install
1008 (lambda* (#:key inputs outputs #:allow-other-keys)
1009 ;; Install the dhclient script for GNU/Linux and make sure
1010 ;; if finds all the programs it needs.
1011 (let* ((out (assoc-ref outputs "out"))
1012 (libexec (string-append out "/libexec"))
1013 (coreutils (assoc-ref inputs "coreutils"))
1014 (inetutils (assoc-ref inputs "inetutils"))
1015 (net-tools (assoc-ref inputs "net-tools"))
1016 (sed (assoc-ref inputs "sed")))
1017 (substitute* "client/scripts/linux"
1019 (string-append (assoc-ref inputs "iproute")
1023 (copy-file "client/scripts/linux"
1024 (string-append libexec "/dhclient-script"))
1027 (string-append libexec "/dhclient-script")
1030 (string-append dir "/bin:"
1032 (list inetutils net-tools coreutils sed))))
1039 (inputs `(("inetutils" ,inetutils)
1040 ,@(if (hurd-target?) '()
1041 `(("net-tools" ,net-tools)
1042 ("iproute" ,iproute)))
1044 ;; isc-dhcp bundles a copy of BIND, which has proved vulnerable
1045 ;; in the past. Use a BIND-VERSION of our choosing instead.
1046 ("bind-source-tarball"
1049 (uri (string-append "https://ftp.isc.org/isc/bind9/"
1051 "/bind-" bind-version ".tar.gz"))
1054 "0vws0zzb39mkphj4hhjrgfj9dzw951lc4pfa6pqg5ll5ma51mbsr"))))
1056 ;; When cross-compiling, we need the cross Coreutils and sed.
1057 ;; Otherwise just use those from %FINAL-INPUTS.
1058 ,@(if (%current-target-system)
1059 `(("coreutils" ,coreutils)
1063 (home-page "https://www.isc.org/products/DHCP/")
1064 (synopsis "Dynamic Host Configuration Protocol (DHCP) tools")
1066 "ISC's Dynamic Host Configuration Protocol (DHCP) distribution provides a
1067 reference implementation of all aspects of DHCP, through a suite of DHCP
1068 tools: server, client, and relay agent.")
1069 (license license:mpl2.0)
1070 (properties '((cpe-name . "dhcp"))))))
1072 (define-public libpcap
1078 (uri (string-append "https://www.tcpdump.org/release/libpcap-"
1082 "153h1378diqyc27jjgz6gg5nxmb4ddk006d9xg69nqavgiikflk3"))))
1083 (build-system gnu-build-system)
1088 ;; There are some tests in testprogs/, but no automated test suite.
1090 (home-page "https://www.tcpdump.org")
1091 (synopsis "Network packet capture library")
1093 "libpcap is an interface for user-level packet capture. It provides a
1094 portable framework for low-level network monitoring. Applications include
1095 network statistics collection, security monitoring, network debugging, etc.")
1096 (license (list license:bsd-4 ; fad-*.c and several other source files
1097 license:bsd-3 ; pcap/, sockutils.* & others
1098 license:bsd-2)))) ; the rest
1100 (define-public tcpdump
1106 (uri (string-append "https://www.tcpdump.org/release/tcpdump-"
1110 "0434vdcnbqaia672rggjzdn4bb8p8dchz559yiszzdk0sjrprm1c"))))
1111 (build-system gnu-build-system)
1112 (inputs `(("libpcap" ,libpcap)
1113 ("openssl" ,openssl)))
1114 (native-inputs `(("perl" ,perl))) ; for tests
1115 (home-page "https://www.tcpdump.org/")
1116 (synopsis "Network packet analyzer")
1118 "Tcpdump is a command-line tool to analyze network traffic passing
1119 through the network interface controller.")
1120 (license license:bsd-3)))
1122 (define-public jnettop
1129 (string-append "https://web.archive.org/web/20161221100811/"
1130 "http://jnettop.kubs.info/dist/jnettop-"
1134 "1855np7c4b0bqzhf1l1dyzxb90fpnvrirdisajhci5am6als31z9"))))
1135 (build-system gnu-build-system)
1137 `(("pkg-config" ,pkg-config)))
1140 ("ncurses" ,ncurses)
1141 ("libpcap" ,libpcap)))
1143 "https://web.archive.org/web/20160703195221/http://jnettop.kubs.info/wiki/")
1144 (synopsis "Visualize network traffic by bandwidth use")
1146 "Jnettop is a traffic visualiser, which captures traffic going
1147 through the host it is running from and displays streams sorted
1148 by bandwidth they use.")
1149 (license license:gpl2+)))
1151 (define-public clusterssh
1157 (uri (string-append "mirror://sourceforge/clusterssh/"
1158 "2.%20ClusterSSH%20Series%204/"
1159 "App-ClusterSSH-v" version ".tar.gz"))
1162 "0rmk2p3f2wz1h092anidjclh212rv3gxyk0c641qk3frlrjnw6mp"))))
1163 (build-system perl-build-system)
1166 (modify-phases %standard-phases
1167 (add-after 'unpack 'refer-to-inputs
1168 (lambda* (#:key inputs #:allow-other-keys)
1169 (substitute* (list "lib/App/ClusterSSH/Config.pm"
1174 (add-before 'check 'delete-failing-tests
1176 ;; This checks whether all code is nicely formatted. The above
1177 ;; ‘refer-to-inputs’ phase breaks this pedantry, so disable it.
1178 (delete-file "t/perltidy.t")
1179 ;; Update the manifest so t/manifest.t happily passes.
1180 (substitute* "MANIFEST"
1181 (("t/perltidy.t\n") ""))
1183 (add-after 'install 'augment-library-path
1184 (lambda* (#:key inputs outputs #:allow-other-keys)
1185 (let* ((out (assoc-ref outputs "out"))
1186 (bin (string-append out "/bin")))
1187 (with-directory-excursion bin
1190 (wrap-program program
1191 `("PERL5LIB" ":" prefix
1192 ,(map (lambda (file-name)
1193 (string-append file-name
1194 "/lib/perl5/site_perl"))
1196 (map (lambda (input)
1197 (assoc-ref inputs input))
1198 ;; These may be propagated and hence
1199 ;; not explicitly listed as inputs.
1200 (list "perl-class-data-inheritable"
1201 "perl-devel-stacktrace"
1202 "perl-exception-class"
1206 "perl-x11-protocol-other")))))))
1207 (find-files "." ".*")))
1210 `(("perl-cpan-changes" ,perl-cpan-changes)
1211 ("perl-file-slurp" ,perl-file-slurp)
1212 ("perl-file-which" ,perl-file-which)
1213 ("perl-module-build" ,perl-module-build)
1214 ("perl-readonly" ,perl-readonly)
1215 ("perl-test-differences" ,perl-test-differences)
1216 ("perl-test-distmanifest" ,perl-test-distmanifest)
1217 ("perl-test-perltidy" ,perl-test-perltidy)
1218 ("perl-test-pod" ,perl-test-pod)
1219 ("perl-test-pod-coverage" ,perl-test-pod-coverage)
1220 ("perl-test-trap" ,perl-test-trap)
1221 ("perltidy" ,perltidy)))
1223 `(("perl-exception-class" ,perl-exception-class)
1224 ("perl-sort-naturally" ,perl-sort-naturally)
1225 ("perl-tk" ,perl-tk)
1226 ("perl-try-tiny" ,perl-try-tiny)
1227 ("perl-x11-protocol" ,perl-x11-protocol)
1228 ("perl-x11-protocol-other" ,perl-x11-protocol-other)
1230 ;; The clusterssh.sourceforge.net address requires login to view
1231 (home-page "https://sourceforge.net/projects/clusterssh/")
1232 (synopsis "Secure concurrent multi-server terminal control")
1234 "ClusterSSH controls a number of xterm windows via a single graphical
1235 console window to allow commands to be interactively run on multiple servers
1236 over ssh connections.")
1237 (license license:gpl2+)))
1239 (define-public rename
1246 "mirror://cpan/authors/id/R/RM/RMBARKER/File-Rename-"
1250 "137m8s06r4n038ivlr5r1d9a7q9l7shmwpvnyx053r9ndhvbnkh5"))))
1251 (build-system perl-build-system)
1254 (modify-phases %standard-phases
1255 (add-after 'install 'find-itself
1256 ;; Fix run-time 'Can't locate File/Rename.pm in @INC' failure.
1257 (lambda* (#:key outputs #:allow-other-keys)
1258 (let* ((out (assoc-ref outputs "out"))
1259 (bin (string-append out "/bin")))
1260 (with-directory-excursion bin
1263 (wrap-program program
1264 `("PERL5LIB" ":" prefix
1265 (,(string-append out "/lib/perl5/site_perl")))))
1266 (find-files "." ".*")))
1269 `(("perl-module-build" ,perl-module-build)
1270 ("perl-test-pod" ,perl-test-pod)
1271 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1272 (home-page "https://metacpan.org/pod/distribution/File-Rename/rename.PL")
1273 (synopsis "Perl extension for renaming multiple files")
1275 "This package provides a Perl interface (@code{Perl::Rename}) as well
1276 as a command-line utility (@command{rename}) that can rename multiple files
1277 at once based on a Perl regular expression.")
1278 (license license:perl-license)))
1280 (define-public rottlog
1286 (uri (string-append "mirror://gnu/rottlog/rottlog-"
1290 "0751mb9l2f0jrk3vj6q8ilanifd121dliwk0c34g8k0dlzsv3kd7"))
1291 (modules '((guix build utils)))
1294 (substitute* "Makefile.in"
1295 (("-o \\$\\{LOG_OWN\\} -g \\$\\{LOG_GROUP\\}")
1296 ;; Don't try to chown root.
1298 (("mkdir -p \\$\\(ROTT_STATDIR\\)")
1299 ;; Don't attempt to create /var/lib/rottlog.
1302 (build-system gnu-build-system)
1304 `(#:configure-flags (list "ROTT_ETCDIR=/etc/rottlog" ;rc file location
1305 "--localstatedir=/var")
1307 ;; Install example config files in OUT/etc.
1308 #:make-flags (list (string-append "ROTT_ETCDIR="
1309 (assoc-ref %outputs "out")
1312 #:phases (modify-phases %standard-phases
1313 (add-after 'unpack 'patch-paths
1315 (substitute* "rc/rc"
1316 (("/usr/sbin/sendmail") "sendmail"))
1318 (add-after 'unpack 'fix-configure
1319 (lambda* (#:key inputs native-inputs #:allow-other-keys)
1320 ;; Replace outdated config.sub and config.guess:
1321 (for-each (lambda (file)
1325 (or native-inputs inputs) "automake")
1327 ,(version-major+minor
1328 (package-version automake))
1330 '("config.sub" "config.guess"))
1332 (add-after 'build 'set-packdir
1334 ;; Set a default location for archived logs.
1335 (substitute* "rc/rc"
1337 "packdir=\"/var/log\""))
1339 (add-before 'install 'tweak-rc-weekly
1341 (substitute* "rc/weekly"
1345 ;; The file is called 'syslog.pid' (no 'd').
1348 (add-after 'install 'install-info
1350 (invoke "make" "install-info"))))))
1351 (native-inputs `(("texinfo" ,texinfo)
1352 ("automake" ,automake)
1353 ("util-linux" ,util-linux))) ; for 'cal'
1354 (home-page "https://www.gnu.org/software/rottlog/")
1355 (synopsis "Log rotation and management")
1357 "GNU Rot[t]log is a program for managing log files. It is used to
1358 automatically rotate out log files when they have reached a given size or
1359 according to a given schedule. It can also be used to automatically compress
1360 and archive such logs. Rot[t]log will mail reports of its activity to the
1361 system administrator.")
1362 (license license:gpl3+)))
1371 (list (string-append "https://www.sudo.ws/sudo/dist/sudo-"
1373 (string-append "ftp://ftp.sudo.ws/pub/sudo/OLD/sudo-"
1374 version ".tar.gz")))
1377 "0p7r3cl16pjwbc48ff1gbhjw51lngrghvwblxz5lxpyzqlwi88xb"))
1378 (modules '((guix build utils)))
1381 (delete-file-recursively "lib/zlib")
1383 (build-system gnu-build-system)
1384 (outputs (list "out" "python"))
1387 (list (string-append "--docdir=" (assoc-ref %outputs "out")
1388 "/share/doc/" ,name "-" ,version)
1390 ;; XXX: Disable Python support when cross-compiling because
1391 ;; 'configure' tries to run 'python', which fails.
1392 ,(if (%current-target-system)
1394 "--enable-python") ; for plug-ins written in ~
1396 "--with-logpath=/var/log/sudo.log"
1397 "--with-rundir=/var/run/sudo" ; must be cleaned up at boot time
1398 "--with-vardir=/var/db/sudo"
1399 "--with-iologdir=/var/log/sudo-io"
1401 ;; 'visudo.c' expects _PATH_MV to be defined, but glibc doesn't
1403 (string-append "CPPFLAGS=-D_PATH_MV='\""
1404 (assoc-ref %build-inputs "coreutils")
1407 ;; Avoid non-determinism; see <http://bugs.gnu.org/21918>.
1408 #:parallel-build? #f
1411 (modify-phases %standard-phases
1412 (add-before 'configure 'pre-configure
1414 (substitute* "src/sudo_usage.h.in"
1415 ;; Do not capture 'configure' arguments since we would
1416 ;; unduly retain references, and also because the
1417 ;; CPPFLAGS above would close the string literal
1419 (("@CONFIGURE_ARGS@") "\"\""))
1420 (substitute* (find-files "." "Makefile\\.in")
1421 ;; Allow installation as non-root.
1422 (("-o [[:graph:]]+ -g [[:graph:]]+")
1424 ;; Don't try to create /etc/sudoers.
1425 (("^install: (.*)install-sudoers(.*)" _ before after)
1426 (string-append "install: " before after "\n"))
1427 ;; Don't try to create /run/sudo.
1428 (("\\$\\(DESTDIR\\)\\$\\(rundir\\)")
1430 ;; Install example sudo{,_logsrvd}.conf to the right place.
1431 (("\\$\\(DESTDIR\\)\\$\\(sysconfdir\\)")
1432 "$(DESTDIR)/$(docdir)/examples")
1433 ;; Don't try to create /var/db/sudo.
1434 (("\\$\\(DESTDIR\\)\\$\\(vardir\\)")
1437 ;; ‘Checking existing [/etc/]sudoers file for syntax errors’ is
1438 ;; not the task of the build system, and fails.
1439 (substitute* "plugins/sudoers/Makefile.in"
1440 (("^pre-install:" match)
1441 (string-append match "\ndisabled-" match)))
1443 (add-after 'install 'separate-python-output
1444 (lambda* (#:key target outputs #:allow-other-keys)
1445 (let ((out (assoc-ref outputs "out"))
1446 (out:python (assoc-ref outputs "python")))
1448 (mkdir-p (string-append out:python "/empty"))
1451 (let ((old (string-append out "/" file))
1452 (new (string-append out:python "/" file)))
1453 (mkdir-p (dirname new))
1454 (rename-file old new)))
1455 (list "libexec/sudo/python_plugin.so"
1456 "libexec/sudo/python_plugin.la")))
1459 ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
1460 ;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
1463 `(("groff" ,groff)))
1465 `(("coreutils" ,coreutils)
1466 ("linux-pam" ,linux-pam)
1467 ,@(if (%current-target-system)
1469 `(("python" ,python)))
1471 (home-page "https://www.sudo.ws/")
1472 (synopsis "Run commands as root")
1474 "Sudo (su \"do\") allows a system administrator to delegate authority to
1475 give certain users (or groups of users) the ability to run some (or all)
1476 commands as root or another user while providing an audit trail of the
1477 commands and their arguments.")
1479 ;; See <http://www.sudo.ws/sudo/license.html>.
1480 (license license:x11)))
1482 (define-public opendoas
1489 (url "https://github.com/Duncaen/OpenDoas.git")
1490 (commit (string-append "v" version))))
1491 (file-name (git-file-name name version))
1494 "07kkc5729p654jrgfsc8zyhiwicgmq38yacmwfvay2b3gmy728zn"))))
1495 (build-system gnu-build-system)
1498 (modify-phases %standard-phases
1500 ;; The configure script doesn't accept most of the default flags.
1501 (lambda* (#:key configure-flags #:allow-other-keys)
1502 ;; The configure script can only be told which compiler to use
1503 ;; through environment variables.
1504 (setenv "CC" ,(cc-for-target))
1505 (apply invoke "./configure" configure-flags)))
1506 (add-before 'install 'fix-makefile
1507 (lambda* (#:key outputs #:allow-other-keys)
1508 (substitute* "bsd.prog.mk"
1509 (("^\tchown.*$") ""))
1512 (list (string-append "--prefix=" (assoc-ref %outputs "out"))
1513 ;; Nothing is done with this value (yet?) but it's supported.
1514 ;; (string-append "--target=" (or ,(%current-target-system) ""))
1516 ;; Compiler choice is not carried over from the configure script.
1518 (list (string-append "CC=" ,(cc-for-target)))
1519 #:tests? #f)) ; no test suite
1521 `(("bison" ,bison)))
1522 (home-page "https://github.com/Duncaen/OpenDoas")
1523 (synopsis "Portable version of OpenBSD's doas command")
1524 (description "Doas is a minimal replacement for the venerable sudo. It was
1525 initially written by Ted Unangst of the OpenBSD project to provide 95% of the
1526 features of sudo with a fraction of the codebase.")
1527 (license (list license:bsd-3 ; libbsd/*
1528 license:isc)))) ; everything else
1530 (define-public wpa-supplicant-minimal
1532 (name "wpa-supplicant-minimal")
1537 "https://w1.fi/releases/wpa_supplicant-"
1541 "05qzak1mssnxcgdrafifxh9w86a4ha69qabkg4bsigk499xyxggw"))
1542 (modules '((guix build utils)))
1545 (substitute* "wpa_supplicant/defconfig"
1546 ;; Disable D-Bus to save ~14MiB on the closure size.
1547 (("^CONFIG_CTRL_IFACE_DBUS" line _)
1548 (string-append "#" line)))
1550 (build-system gnu-build-system)
1553 (modify-phases %standard-phases
1555 (lambda* (#:key outputs #:allow-other-keys)
1556 (chdir "wpa_supplicant")
1557 (copy-file "defconfig" ".config")
1558 (let ((port (open-file ".config" "al")))
1560 CONFIG_DEBUG_SYSLOG=y
1564 CONFIG_DRIVER_NL80211=y
1565 CFLAGS += $(shell pkg-config libnl-3.0 --cflags)
1567 CONFIG_READLINE=y\n" port)
1570 (add-after 'install 'install-documentation
1571 (lambda* (#:key outputs #:allow-other-keys)
1572 (let* ((out (assoc-ref outputs "out"))
1573 (doc (string-append out "/share/doc/wpa-supplicant"))
1574 (man (string-append out "/share/man"))
1575 (man5 (string-append man "/man5"))
1576 (man8 (string-append man "/man8")))
1577 (define (copy-man-page target)
1579 (install-file file target)))
1581 (mkdir-p man5) (mkdir man8)
1582 (for-each (copy-man-page man5)
1583 (find-files "doc/docbook" "\\.5"))
1584 (for-each (copy-man-page man8)
1585 (find-files "doc/docbook" "\\.8"))
1587 ;; wpa_supplicant.conf(5) does not explain all configuration
1588 ;; options but refers to the example config file, so install it
1589 ;; along with READMEs.
1590 (for-each (lambda (file)
1591 (install-file file doc))
1592 '("README" "README-DPP" "README-HS20"
1593 "README-P2P" "README-WPS"
1594 "wpa_supplicant.conf"))
1597 #:make-flags (list "CC=gcc"
1598 (string-append "BINDIR=" (assoc-ref %outputs "out")
1600 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1604 `(("readline" ,readline)
1606 ("openssl" ,openssl)))
1608 `(("pkg-config" ,pkg-config)))
1609 (home-page "https://w1.fi/wpa_supplicant/")
1610 (synopsis "Connecting to WPA and WPA2-protected wireless networks")
1612 "wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
1613 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in
1614 the client stations. It implements key negotiation with a WPA Authenticator
1615 and it controls the roaming and IEEE 802.11 authentication/association of the
1618 This package provides the @code{wpa_supplicant} daemon and the @code{wpa_cli}
1621 ;; In practice, this is linked against Readline, which makes it GPLv3+.
1622 (license license:bsd-3)
1624 (properties `((cpe-name . "wpa_supplicant")))))
1626 (define-public wpa-supplicant
1627 (package (inherit wpa-supplicant-minimal)
1628 (name "wpa-supplicant")
1629 (inputs `(("dbus" ,dbus)
1630 ,@(package-inputs wpa-supplicant-minimal)))
1632 (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
1634 `(modify-phases ,phases
1635 (add-after 'configure 'configure-for-dbus
1637 (let ((port (open-file ".config" "al")))
1639 CONFIG_CTRL_IFACE_DBUS_NEW=y
1640 CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
1643 (add-after 'install-documentation 'install-dbus-conf
1644 (lambda* (#:key outputs #:allow-other-keys)
1645 (let* ((out (assoc-ref outputs "out"))
1646 (dir (string-append out "/etc/dbus-1/system.d")))
1648 (copy-file "dbus/dbus-wpa_supplicant.conf"
1649 (string-append dir "/wpa_supplicant.conf")))
1652 (define-public wpa-supplicant-gui
1654 (inherit wpa-supplicant)
1655 (name "wpa-supplicant-gui")
1656 (inputs `(("qtbase" ,qtbase)
1658 ,@(package-inputs wpa-supplicant)))
1661 `(("imagemagick" ,imagemagick)
1662 ("inkscape" ,inkscape)
1663 ,@(package-native-inputs wpa-supplicant)))
1665 `(#:phases (modify-phases %standard-phases
1666 (add-after 'unpack 'chdir
1668 (chdir "wpa_supplicant/wpa_gui-qt4")
1673 (invoke "qmake" "wpa_gui.pro")
1674 (invoke "make" "-j" (number->string (parallel-job-count)))
1675 (invoke "make" "-C" "icons")))
1677 (lambda* (#:key inputs outputs #:allow-other-keys)
1678 (let ((out (assoc-ref outputs "out"))
1679 (qt '("qtbase" "qtsvg")))
1680 (install-file "wpa_gui" (string-append out "/bin"))
1681 (install-file "wpa_gui.desktop"
1682 (string-append out "/share/applications"))
1683 (copy-recursively "icons/hicolor"
1684 (string-append out "/share/icons/hicolor"))
1685 (wrap-program (string-append out "/bin/wpa_gui")
1686 `("QT_PLUGIN_PATH" ":" prefix
1687 ,(map (lambda (label)
1688 (string-append (assoc-ref inputs label)
1689 "/lib/qt5/plugins/"))
1692 (synopsis "Graphical user interface for WPA supplicant")))
1694 (define-public hostapd
1700 (uri (string-append "https://w1.fi/releases/hostapd-" version
1704 "1mrbvg4v7vm7mknf0n29mf88k3s4a4qj6r4d51wq8hmjj1m7s7c8"))))
1705 (build-system gnu-build-system)
1708 (modify-phases %standard-phases
1710 (lambda* (#:key outputs #:allow-other-keys)
1711 ;; This is mostly copied from 'wpa-supplicant' above.
1713 (copy-file "defconfig" ".config")
1714 (let ((port (open-file ".config" "al")))
1719 CONFIG_IEEE80211AC=y\n" port)
1722 (add-after 'install 'install-man-pages
1723 (lambda* (#:key outputs #:allow-other-keys)
1724 (let* ((out (assoc-ref outputs "out"))
1725 (man (string-append out "/share/man"))
1726 (man1 (string-append man "/man1"))
1727 (man8 (string-append man "/man8")))
1728 (define (copy-man-page target)
1730 (install-file file target)))
1732 (for-each (copy-man-page man1)
1733 (find-files "." "\\.1"))
1734 (for-each (copy-man-page man8)
1735 (find-files "." "\\.8"))
1738 #:make-flags (list "CC=gcc"
1739 (string-append "BINDIR=" (assoc-ref %outputs "out")
1741 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1744 (native-inputs `(("pkg-config" ,pkg-config)))
1746 ;; There's an optional dependency on SQLite.
1747 (inputs `(("openssl" ,openssl)
1749 (home-page "https://w1.fi/hostapd/")
1750 (synopsis "Daemon for Wi-Fi access points and authentication servers")
1752 "hostapd is a user-space daemon for WiFi access points and authentication
1753 servers. It implements IEEE 802.11 access point management, IEEE
1754 802.1X/WPA/WPA2/EAP Authenticators, RADIUS client, EAP server, and RADIUS
1755 authentication server.")
1757 ;; Same license as wpa_supplicant.
1758 (license license:bsd-3)))
1760 (define-public wakelan
1767 "ftp://ftp.gwdg.de/pub/linux/metalab/system/network/misc/wakelan-"
1771 "0vydqpf44146ir6k87gmqaq6xy66xhc1gkr3nsd7jj3nhy7ypx9x"))))
1772 (build-system gnu-build-system)
1775 (modify-phases %standard-phases
1777 (lambda* (#:key outputs #:allow-other-keys)
1778 (let ((out (assoc-ref outputs "out")))
1779 (mkdir-p (string-append out "/bin"))
1780 (mkdir-p (string-append out "/share/man/man1"))
1782 ;; It's an old configure script that doesn't understand
1783 ;; the extra options we pass.
1784 (setenv "CONFIG_SHELL" (which "bash"))
1785 (invoke "./configure"
1786 (string-append "--prefix=" out)
1787 (string-append "--mandir=" out
1790 (home-page "https://www.kernel.org") ; really, no home page
1791 (synopsis "Send a wake-on-LAN packet")
1793 "WakeLan broadcasts a properly formatted UDP packet across the local area
1794 network, which causes enabled computers to power on.")
1795 (license license:gpl2+)))
1797 (define-public dmidecode
1804 "mirror://savannah/dmidecode/dmidecode-"
1808 "1pcfhcgs2ifdjwp7amnsr3lq95pgxpr150bjhdinvl505px0cw07"))))
1809 (build-system gnu-build-system)
1811 '(#:phases (modify-phases %standard-phases (delete 'configure))
1812 #:tests? #f ; no 'check' target
1813 #:make-flags (list (string-append "prefix="
1814 (assoc-ref %outputs "out")))))
1815 (home-page "https://www.nongnu.org/dmidecode/")
1816 (synopsis "Read hardware information from the BIOS")
1818 "Dmidecode reports information about your system's hardware as described
1819 in your system BIOS according to the SMBIOS/DMI standard. This typically
1820 includes system manufacturer, model name, serial number, BIOS version, asset
1821 tag as well as a lot of other details of varying level of interest and
1822 reliability depending on the manufacturer. This will often include usage
1823 status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory
1824 module slots, and the list of I/O ports (e.g. serial, parallel, USB).")
1825 (license license:gpl2+)))
1827 (define-public acpica
1830 (version "20200528")
1834 "https://acpica.org/sites/acpica/files/acpica-unix2-"
1838 "01ajxnz9dpnvdbib7yv20dw21a1yyfgwiw3whg0xi57cf4app2md"))))
1839 (build-system gnu-build-system)
1840 (native-inputs `(("flex" ,flex)
1843 '(#:make-flags (list (string-append "PREFIX=" %output)
1846 "OPT_CFLAGS=-Wall -fno-strict-aliasing")
1847 #:tests? #f ; no 'check' target
1848 #:phases (modify-phases %standard-phases (delete 'configure))))
1849 (home-page "https://acpica.org/")
1850 (synopsis "Tools for the development and debugging of ACPI tables")
1852 "The @acronym{ACPICA, ACPI Component Architecture} project provides an
1853 OS-independent reference implementation of the @acronym{ACPI, Advanced
1854 Configuration and Power Interface} specification. ACPICA code contains those
1855 portions of ACPI meant to be directly integrated into the host OS as a
1856 kernel-resident subsystem, and a small set of tools to assist in developing and
1857 debugging ACPI tables.
1859 This package contains only the user-space tools needed for ACPI table
1860 development, not the kernel implementation of ACPI.")
1861 (license license:gpl2))) ; dual GPLv2/ACPICA Licence
1863 (define-public s-tui
1870 (uri (pypi-uri "s-tui" version))
1872 (base32 "0r5yhlsi5xiy7ii1w4kqkaxz9069v5bbfwi3x3xnxhk51yjfgr8n"))))
1873 (build-system python-build-system)
1875 `(("python-psutil" ,python-psutil)
1876 ("python-urwid" ,python-urwid)))
1877 (home-page "https://github.com/amanusk/s-tui")
1878 (synopsis "Interactive terminal stress test and monitoring tool")
1880 "The Stress Terminal UI displays graphs of the CPU frequency,
1881 utilization, temperature and power.")
1882 (license license:gpl2+)))
1884 (define-public stress
1890 (uri (string-append "mirror://debian/pool/main/s/stress/stress_"
1891 version ".orig.tar.gz"))
1894 "0nw210jajk38m3y7h8s130ps2qsbz7j75wab07hi2r3hlz14yzh5"))))
1895 (build-system gnu-build-system)
1896 (home-page "https://packages.debian.org/sid/stress")
1897 (synopsis "Impose load on and stress test a computer system")
1899 "Stress is a tool that imposes a configurable amount of CPU, memory, I/O,
1900 or disk stress on a POSIX-compliant operating system and reports any errors it
1903 Stress is not a benchmark. It is a tool used by system administrators to
1904 evaluate how well their systems will scale, by kernel programmers to evaluate
1905 perceived performance characteristics, and by systems programmers to expose
1906 the classes of bugs which only or more frequently manifest themselves when the
1907 system is under heavy load.")
1908 (license license:gpl2+)))
1910 (define-public detox
1917 (url "https://github.com/dharple/detox.git")
1918 (commit (string-append "v" version))))
1919 (file-name (git-file-name name version))
1922 "1dd608c7g65s5lj02cddvani3q9kzirddgkjqa22ap9d4f8b9xgr"))))
1923 (build-system gnu-build-system)
1925 `(("autoconf" ,autoconf)
1926 ("automake" ,automake)
1929 `(#:tests? #f ;no 'check' target
1930 #:phases (modify-phases %standard-phases
1931 (add-after 'unpack 'delete-configure
1932 ;; The "configure" script is present, but otherwise the
1933 ;; project is not bootstrapped: missing install-sh and
1934 ;; Makefile.in, so delete it so the bootstrap phase will
1936 (lambda _ (delete-file "configure") #t)))))
1937 (home-page "https://github.com/dharple/detox")
1938 (synopsis "Clean up file names")
1940 "Detox is a program that renames files to make them easier to work with
1941 under Unix and related operating systems. Spaces and various other unsafe
1942 characters (such as \"$\") get replaced with \"_\". ISO 8859-1 (Latin-1)
1943 characters can be replaced as well, as can UTF-8 characters.")
1944 (license license:bsd-3)))
1946 (define-public testdisk
1952 (uri (string-append "https://www.cgsecurity.org/testdisk-"
1953 version ".tar.bz2"))
1956 "1zlh44w67py416hkvw6nrfmjickc2d43v51vcli5p374d5sw84ql"))))
1957 (build-system gnu-build-system)
1959 `(("ntfs-3g" ,ntfs-3g)
1960 ("util-linux" ,util-linux "lib")
1961 ("openssl" ,openssl)
1962 ;; FIXME: add reiserfs.
1964 ("e2fsprogs" ,e2fsprogs)
1965 ("libjpeg" ,libjpeg-turbo)
1966 ("ncurses" ,ncurses)))
1967 (home-page "https://www.cgsecurity.org/wiki/TestDisk")
1968 (synopsis "Data recovery tool")
1970 "TestDisk is a program for data recovery, primarily designed to help
1971 recover lost partitions and/or make non-booting disks bootable again.")
1972 (license license:gpl2+)))
1981 "http://mama.indstate.edu/users/ice/tree/src/tree-"
1984 (base32 "1hmpz6k0mr6salv0nprvm1g0rdjva1kx03bdf1scw8a38d5mspbi"))))
1985 (build-system gnu-build-system)
1987 '(#:phases (modify-phases %standard-phases (delete 'configure))
1988 #:tests? #f ; no check target
1989 #:make-flags (let ((out (assoc-ref %outputs "out")))
1990 (list (string-append "prefix=" out)))))
1991 (synopsis "Recursively list the contents of a directory")
1993 "Tree is a recursive directory listing command that produces a depth
1994 indented listing of files, which is colorized ala dircolors if the LS_COLORS
1995 environment variable is set and output is to tty.")
1996 (home-page "http://mama.indstate.edu/users/ice/tree/")
1997 (license license:gpl2+)))
1999 (define-public direvent
2005 (uri (string-append "mirror://gnu/direvent/direvent-"
2009 "0m9vi01b1km0cpknflyzsjnknbava0s1n6393b2bpjwyvb6j5613"))
2010 (modules '((guix build utils)))
2012 (substitute* "tests/testsuite"
2013 (("#![[:blank:]]?/bin/sh")
2016 (build-system gnu-build-system)
2019 (modify-phases %standard-phases
2020 (add-before 'build 'patch-/bin/sh
2021 (lambda* (#:key inputs #:allow-other-keys)
2022 ;; Use the right shell when executing the watcher and
2023 ;; user-provided shell commands.
2024 (let ((bash (assoc-ref inputs "bash")))
2025 (substitute* '("src/direvent.c" "src/progman.c")
2027 (string-append "\"" bash "/bin/sh\"")))
2029 ;; Adjust the 'shell.at' test accordingly.
2030 (substitute* "tests/testsuite"
2032 (string-append "SHELL=" bash "/bin/sh")))
2035 (home-page "https://www.gnu.org.ua/software/direvent/")
2036 (synopsis "Daemon to monitor directories for events such as file removal")
2038 "A daemon that monitors directories for events, such as creating,
2039 deleting or modifying files. It can monitor different sets of directories for
2040 different events. When an event is detected, direvent calls a specified
2041 external program with information about the event, such as the location
2042 within the file system where it occurred. Thus, \"direvent\" provides an
2043 easy way to react immediately if given files undergo changes, for example, to
2044 track changes in important system configuration files.")
2045 (license license:gpl3+)))
2047 (define-public libcap-ng
2054 "https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-"
2058 "1gzzy12agfa9ddipdf72h9y68zqqnvsjjylv4vnq6hj4w2safk58"))))
2059 (build-system gnu-build-system)
2062 (list "--without-python")))
2063 (home-page "https://people.redhat.com/sgrubb/libcap-ng/")
2064 (synopsis "Library for more easily working with POSIX capabilities")
2066 "The libcap-ng library is intended to make programming with POSIX
2067 capabilities easier than the traditional libcap library. It includes
2068 utilities that can analyse all currently running applications and print out
2069 any capabilities and whether or not it has an open ended bounding set. The
2070 included utilities are designed to let admins and developers spot apps from
2071 various ways that may be running with too much privilege.")
2072 ;; The library is lgpl2.1+, but also ships some utils which are gpl2+.
2073 (license (list license:lgpl2.1+ license:gpl2+))))
2075 (define-public smartmontools
2077 (name "smartmontools")
2082 "mirror://sourceforge/smartmontools/smartmontools/"
2083 version "/smartmontools-" version ".tar.gz"))
2086 "0imqb7ka4ia5573w8rnpck571pjjc9698pdjcapy9cfyk4n4swrz"))))
2087 (build-system gnu-build-system)
2088 (inputs `(("libcap-ng" ,libcap-ng)))
2089 (home-page "https://www.smartmontools.org/")
2090 (synopsis "S.M.A.R.T. harddisk control and monitoring tools")
2092 "The smartmontools package contains utility programs to control and
2093 monitor storage systems using the Self-Monitoring, Analysis and Reporting
2094 Technology System (@dfn{S.M.A.R.T.}) built into most modern ATA and SCSI hard
2095 disks. In many cases, these utilities will provide advanced warning of disk
2096 degradation and failure.")
2097 (license license:gpl2+)))
2099 (define-public fdupes
2107 (url "https://github.com/adrianlopezroche/fdupes.git")
2108 (commit (string-append "v" version))))
2109 (file-name (git-file-name name version))
2111 (base32 "19b6vqblddaw8ccw4sn0qsqzbswlhrz8ia6n4m3hymvcxn8skpz9"))))
2112 (build-system gnu-build-system)
2114 '(#:phases (modify-phases %standard-phases
2115 (delete 'configure))
2116 #:tests? #f ; no 'check' target
2117 #:make-flags (list "CC=gcc"
2118 (string-append "PREFIX="
2119 (assoc-ref %outputs "out")))))
2120 (home-page "https://github.com/adrianlopezroche/fdupes")
2121 (synopsis "Identify duplicate files")
2123 "fdupes is a program for identifying duplicate files residing within
2124 specified directories.")
2125 (license license:expat)))
2127 (define-public graphios
2134 (uri (pypi-uri "graphios" version))
2137 "1h87hvc315wg6lklbf4l7csd3n5pgljwrfli1p3nasdi0izgn66i"))))
2138 (build-system python-build-system)
2140 ;; Be warned: Building with Python 3 succeeds, but the build process
2141 ;; throws a syntax error that is ignored.
2142 `(#:python ,python-2
2144 (modify-phases %standard-phases
2145 (add-before 'build 'fix-setup.py
2146 (lambda* (#:key outputs #:allow-other-keys)
2147 ;; Fix hardcoded, unprefixed file names.
2148 (let ((out (assoc-ref outputs "out")))
2149 (substitute* '("setup.py")
2150 (("/etc") (string-append out "/etc"))
2152 (("distro_ver = .*") "distro_ver = ''"))
2154 (home-page "https://github.com/shawn-sterling/graphios")
2155 (synopsis "Emit Nagios metrics to Graphite, Statsd, and Librato")
2157 "Graphios is a script to emit nagios perfdata to various upstream metrics
2158 processing and time-series systems. It's currently compatible with Graphite,
2159 Statsd, Librato and InfluxDB. Graphios can emit Nagios metrics to any number
2160 of supported upstream metrics systems simultaneously.")
2161 (license license:gpl2+)))
2163 (define-public ansible
2170 (uri (pypi-uri "ansible" version))
2172 (base32 "1l99vwkl48iwr8ffd1ihqia995mz8h8hwk4akm4w0cgiifp88gg8"))))
2173 (build-system python-build-system)
2175 `(("python-bcrypt" ,python-bcrypt)
2176 ("python-pynacl" ,python-pynacl)
2177 ("python-httplib2" ,python-httplib2)
2178 ("python-passlib" ,python-passlib)
2179 ("python-nose" ,python-nose)
2180 ("python-mock" ,python-mock)
2181 ("python-jinja2" ,python-jinja2)
2182 ("python-pyyaml" ,python-pyyaml)
2183 ("python-paramiko" ,python-paramiko)))
2185 `(("python-cryptography" ,python-cryptography)
2186 ("python-jinja2" ,python-jinja2)
2187 ("python-pyyaml" ,python-pyyaml)
2188 ("python-paramiko" ,python-paramiko)))
2191 (modify-phases %standard-phases
2192 ;; Several ansible commands (ansible-config, ansible-console, etc.)
2193 ;; are just symlinks to a single ansible executable. The ansible
2194 ;; executable behaves differently based on the value of
2195 ;; sys.argv[0]. This does not work well with our wrap phase, and
2196 ;; therefore the following two phases are required as a workaround.
2197 (add-after 'unpack 'hide-wrapping
2199 ;; Overwrite sys.argv[0] to hide the wrapper script from it.
2200 (substitute* "bin/ansible"
2201 (("import traceback" all)
2202 (string-append all "
2204 sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
2207 (add-after 'install 'replace-symlinks
2208 (lambda* (#:key outputs #:allow-other-keys)
2209 ;; Replace symlinks with duplicate copies of the ansible
2211 (let ((out (assoc-ref outputs "out")))
2213 (lambda (subprogram)
2214 (delete-file (string-append out "/bin/ansible-" subprogram))
2215 (copy-file (string-append out "/bin/ansible")
2216 (string-append out "/bin/ansible-" subprogram)))
2217 (list "config" "console" "doc" "galaxy"
2218 "inventory" "playbook" "pull" "vault")))
2220 (home-page "https://www.ansible.com/")
2221 (synopsis "Radically simple IT automation")
2222 (description "Ansible is a radically simple IT automation system. It
2223 handles configuration management, application deployment, cloud provisioning,
2224 ad hoc task execution, and multinode orchestration---including trivializing
2225 things like zero-downtime rolling updates with load balancers.")
2226 (license license:gpl3+)))
2228 (define-public debops
2236 (url "https://github.com/debops/debops")
2237 (commit (string-append "v" version))))
2238 (file-name (git-file-name name version))
2240 (base32 "052b2dykdn35pdpn9s4prawl6nl6yzih8nyf54hpvhpisvjrm1v5"))
2242 (search-patches "debops-constants-for-external-program-names.patch"
2243 "debops-debops-defaults-fall-back-to-less.patch"))))
2244 (build-system python-build-system)
2248 `(("ansible" ,ansible)
2251 ("util-linux" ,util-linux) ;; for umount
2252 ("findutils" ,findutils)
2256 `(("python-future" ,python-future)
2257 ("python-distro" ,python-distro)))
2261 (modify-phases %standard-phases
2262 (add-after 'unpack 'nuke-debops-update
2264 (chmod "bin/debops-update" #o755) ; FIXME work-around git-fetch issue
2265 (with-output-to-file "bin/debops-update"
2267 (format #t "#!/bin/sh
2268 echo 'debops is installed via guix. guix-update is useless in this case.
2269 Please use `guix package -u debops` instead.'")))
2271 ;; patch shebangs only in actuall scripts, not in files included in
2272 ;; roles (which are to be delivered to the targte systems)
2273 (delete `patch-generated-file-shebangs)
2274 (replace 'patch-source-shebangs
2276 (for-each patch-shebang
2279 ;; Filter out symlinks.
2280 (eq? 'regular (stat:type stat)))
2282 (add-after 'unpack 'fix-paths
2284 (define (substitute-program-names file)
2285 ;; e.g. ANSIBLE_PLAYBOOK = '/gnu/store/…/bin/ansible-playbook'
2288 (let ((varname (string-upcase
2290 (lambda (c) (if (char=? c #\-) #\_ c))
2293 (((string-append "^(" varname " = )'.*'") line prefix)
2294 (string-append prefix "'" (which name) "'")))))
2295 '("ansible-playbook" "encfs" "find" "fusermount"
2296 "umount" "gpg" "ansible" "which")))
2297 (for-each substitute-program-names
2299 "bin/debops-padlock"
2301 "debops/__init__.py"
2302 "debops/cmds/__init__.py"))
2304 (home-page "https://www.debops.org/")
2305 (synopsis "Collection of general-purpose Ansible roles")
2306 (description "The Ansible roles provided by that can be used to manage
2307 Debian or Ubuntu hosts. In addition, a default set of Ansible playbooks can
2308 be used to apply the provided roles in a controlled way, using Ansible
2311 The roles are written with a high customization in mind, which can be done
2312 using Ansible inventory. This way the role and playbook code can be shared
2313 between multiple environments, with different configuration in to each one.
2315 Services can be managed on a single host, or spread between multiple hosts.
2316 DebOps provides support for different SQL and NoSQL databases, web servers,
2317 programming languages and specialized applications useful in a data center
2318 environment or in a cluster. The project can also be used to deploy
2319 virtualization environments using KVM/libvirt, Docker or LXC technologies to
2320 manage virtual machines and/or containers.")
2321 (license license:gpl3+)))
2323 (define-public emacs-ansible-doc
2324 (let ((commit "86083a7bb2ed0468ca64e52076b06441a2f8e9e0"))
2326 (name "emacs-ansible-doc")
2327 (version (git-version "0.4" "1" commit))
2332 (url "https://github.com/lunaryorn/ansible-doc.el")
2334 (file-name (git-file-name name version))
2337 "0lap404ch74w99n3xip176jr42b38xhyzkfnkyqg0g3wk2cd3aq8"))))
2338 (build-system emacs-build-system)
2339 ;; Unmaintained by upstream.
2340 (home-page "https://github.com/lunaryorn/ansible-doc.el")
2341 (synopsis "Ansible documentation for Emacs")
2343 "This package provides an Ansible documentation for GNU Emacs.
2345 @code{ansible-doc} allows you to view the documentation of an Ansible
2346 module and @code{ansible-doc-mode} minor mode adds documentation
2347 lookup to YAML Mode. You could enable the mode with @code{(add-hook
2348 'yaml-mode-hook #'ansible-doc-mode)}.")
2349 (license license:gpl3+))))
2351 (define-public cpulimit
2359 (url "https://github.com/opsengine/cpulimit.git")
2360 (commit (string-append "v" version))))
2361 (file-name (git-file-name name version))
2363 (base32 "1dz045yhcsw1rdamzpz4bk8mw888in7fyqk1q1b3m1yk4pd1ahkh"))))
2364 (build-system gnu-build-system)
2366 `(#:phases (modify-phases %standard-phases
2370 (invoke "make" "CC=gcc" "-Csrc")))
2373 (invoke "make" "CC=gcc" "-Ctests")))
2375 (lambda* (#:key outputs #:allow-other-keys)
2376 (let* ((out (assoc-ref outputs "out"))
2377 (bin (string-append out "/bin")))
2378 (install-file "src/cpulimit" bin))
2380 (home-page "https://github.com/opsengine/cpulimit")
2381 (synopsis "Limit CPU usage")
2383 "Cpulimit limits the CPU usage of a process. It does not change the nice
2384 value or other scheduling priority settings, but the real CPU usage, and is
2385 able to adapt itself dynamically to the overall system load. Children
2386 processes and threads of the specified process may optionally share the same
2388 (license license:gpl2+)))
2390 (define-public autojump
2398 (url "https://github.com/wting/autojump.git")
2399 (commit (string-append "release-v" version))))
2400 (file-name (git-file-name name version))
2402 (base32 "1rgpsh70manr2dydna9da4x7p8ahii7dgdgwir5fka340n1wrcws"))))
2403 (build-system gnu-build-system)
2404 (native-inputs ; for tests
2405 `(("python-mock" ,python-mock)
2406 ("python-pytest" ,python-pytest)))
2408 `(("python" ,python-wrapper)))
2411 (modify-phases %standard-phases
2412 (add-after 'unpack 'make-git-checkout-writable
2413 ;; ‘install.py’ modifies files before installing them.
2415 (for-each make-file-writable (find-files "."))
2421 (invoke "python" "tests/unit/autojump_utils_test.py")))
2423 (lambda* (#:key outputs #:allow-other-keys)
2424 (setenv "SHELL" (which "bash"))
2425 (invoke "python" "install.py"
2426 (string-append "--destdir="
2427 (assoc-ref outputs "out"))))))))
2428 (home-page "https://github.com/wting/autojump")
2429 (synopsis "Shell extension for file system navigation")
2431 "Autojump provides a faster way to navigate your file system, with a \"cd
2432 command that learns\". It works by maintaining a database of the directories
2433 you use the most from the command line and allows you to \"jump\" to
2434 frequently used directories by typing only a small pattern.")
2435 (license license:gpl3+)))
2444 (url "https://github.com/clvv/fasd.git")
2446 (file-name (git-file-name name version))
2449 "1awi71jdv3mhjrmar2d4z1i90kn7apd7aq1w31sh6w4yibz9kiyj"))))
2450 (build-system gnu-build-system)
2452 `(#:phases (modify-phases %standard-phases
2453 (delete 'configure)) ;no configuration
2454 #:tests? #f ;no tests
2455 #:make-flags (list (string-append "PREFIX=" %output))))
2456 (home-page "https://github.com/clvv/fasd")
2457 (synopsis "Quick access to files and directories for shells")
2459 "Fasd (pronounced similar to \"fast\") is a command-line productivity
2460 booster. Fasd offers quick access to files and directories for POSIX shells.
2461 It is inspired by tools like autojump, z, and v. Fasd keeps track of files
2462 and directories you have accessed so that you can quickly reference them in
2464 (license license:x11)))
2466 (define-public iftop
2472 (uri (string-append "http://www.ex-parrot.com/~pdw/iftop/download"
2473 "/iftop-" version ".tar.gz"))
2476 "15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp"))))
2477 (build-system gnu-build-system)
2479 `(("libpcap" ,libpcap)
2480 ("ncurses" ,ncurses)))
2481 (synopsis "Monitor network usage")
2482 (description "Iftop does for network usage what @command{top} does
2483 for CPU usage. It listens to network traffic on a named interface and
2484 displays a table of current bandwidth usage by pairs of hosts.")
2485 (home-page "http://www.ex-parrot.com/~pdw/iftop/")
2486 (license license:gpl2+)))
2488 (define-public munge
2494 (uri (string-append "https://github.com/dun/munge/releases/"
2495 "download/munge-" version "/munge-"
2499 "0h06sghb4rqvv1ywyd6mzsmbcgh712v6ygrff0gzm440y4ca41k6"))
2500 (modules '((guix build utils)))
2503 ;; Don't insist on write access to /var.
2504 (substitute* "src/etc/Makefile.in"
2505 (("\\$\\(INSTALL\\)(.*)localstatedir" _ middle)
2506 (string-append "-$(INSTALL)" middle "localstatedir"))
2507 (("\\$\\(MKDIR_P\\) .*(local|run)statedir.*")
2511 `(("openssl" ,openssl)
2512 ("libgcrypt" ,libgcrypt)))
2513 (build-system gnu-build-system)
2516 (list "--localstatedir=/var"
2517 (string-append "--with-pkgconfigdir="
2518 (assoc-ref %outputs "out") "/lib/pkgconfig"))
2520 (modify-phases %standard-phases
2521 ;; XXX Many test series fail. Some might be fixable, others do no-no
2522 ;; things like invoking ‘sudo’.
2523 (add-after 'unpack 'skip-failing-tests
2525 (for-each (lambda (test)
2526 (substitute* "t/Makefile.in"
2527 (((string-append test "\\.t ")) "")))
2528 (list "0100-munged-lock"
2530 "0011-munged-cmdline"
2531 "0012-munge-cmdline"
2532 "0013-unmunge-cmdline"
2533 "0101-munged-security-socket"
2534 "0102-munged-security-keyfile"
2535 "0103-munged-security-logfile"
2536 "0110-munged-origin-addr"))
2538 (home-page "https://dun.github.io/munge/")
2539 (synopsis "Cluster computing authentication service")
2541 "Munge is an authentication service for creating and validating
2542 credentials. It allows a process to authenticate the UID and GID of another
2543 local or remote process within a group of hosts having common users and
2544 groups. These hosts form a security realm that is defined by a shared
2545 cryptographic key. Clients within this security realm can create and validate
2546 credentials without the use of root privileges, reserved ports, or
2547 platform-specific methods.")
2548 (license license:gpl3+)))
2550 (define-public audit
2553 (home-page "https://people.redhat.com/sgrubb/audit/")
2557 (uri (string-append home-page "audit-" version ".tar.gz"))
2560 "1dzcwb2q78q7x41shcachn7f4aksxbxd470yk38zh03fch1l2p8f"))))
2561 (build-system gnu-build-system)
2563 `(#:configure-flags (list "--with-python=no"
2564 "--disable-static")))
2566 `(("openldap" ,openldap)
2568 ("sasl" ,cyrus-sasl)))
2569 (synopsis "User-space component to the Linux auditing system")
2571 "auditd is the user-space component to the Linux auditing system, which
2572 allows logging of system calls made by user-land processes. It's responsible
2573 for writing audit records to the disk. Viewing the logs is done with the
2574 @code{ausearch} or @code{aureport} utilities. Configuring the audit rules is
2575 done with the @code{auditctl} utility.")
2576 (license license:gpl2+)))
2584 (uri (string-append "https://nmap.org/dist/nmap-" version
2588 "1aizfys6l9f9grm82bk878w56mg0zpkfns3spzj157h98875mypw"))
2589 (modules '((guix build utils)))
2592 (for-each delete-file-recursively
2593 ;; Remove bundled lua, pcap, and pcre libraries.
2594 ;; FIXME: Remove bundled liblinear once packaged.
2598 ;; Remove pre-compiled binares.
2601 (build-system gnu-build-system)
2603 `(("openssl" ,openssl)
2604 ("libpcap" ,libpcap)
2607 ("zlib" ,zlib) ;for NSE compression support
2610 ("python" ,python-2)))
2612 ;; TODO Add zenmap output.
2613 (outputs '("out" "ndiff"))
2615 `(#:configure-flags '("--without-zenmap")
2617 (modify-phases %standard-phases
2618 (add-after 'configure 'patch-Makefile
2620 (substitute* "Makefile"
2621 ;; Do not attempt to build lua.
2622 (("build-dnet build-lua") "build-dnet"))
2625 (lambda* (#:key outputs #:allow-other-keys)
2626 (define (make out . args)
2627 (apply invoke "make"
2628 (string-append "prefix=" out)
2630 (define (python-path dir)
2631 (string-append dir "/lib/python"
2632 ,(version-major+minor
2633 (package-version python))
2635 (let ((out (assoc-ref outputs "out"))
2636 (ndiff (assoc-ref outputs "ndiff")))
2637 (for-each mkdir-p (list out ndiff))
2643 (make ndiff "install-ndiff")
2644 (wrap-program (string-append ndiff "/bin/ndiff")
2645 `("PYTHONPATH" prefix
2646 (,(python-path ndiff)))))
2648 ;; These are the tests that do not require network access.
2650 (lambda _ (invoke "make"
2654 ;; Nmap can't cope with out-of-source building.
2655 #:out-of-source? #f))
2656 (home-page "https://nmap.org/")
2657 (synopsis "Network discovery and security auditing tool")
2659 "Nmap (\"Network Mapper\") is a network discovery and security auditing
2660 tool. It is also useful for tasks such as network inventory, managing service
2661 upgrade schedules, and monitoring host or service uptime. It also provides an
2662 advanced netcat implementation (ncat), a utility for comparing scan
2663 results (ndiff), and a packet generation and response analysis tool (nping).")
2664 ;; This package uses nmap's bundled versions of libdnet and liblinear, which
2665 ;; both use a 3-clause BSD license.
2666 (license (list license:nmap license:bsd-3))))
2668 (define-public dstat
2676 (url "https://github.com/dagwieers/dstat.git")
2677 (commit (string-append "v" version))))
2678 (file-name (git-file-name "dstat" version))
2680 (base32 "1qnmkhqmjd1m3if05jj29dvr5hn6kayq9bkkkh881w472c0zhp8v"))
2681 (patches (search-patches "dstat-fix-crash-when-specifying-delay.patch"
2682 "dstat-skip-devices-without-io.patch"))))
2683 (build-system gnu-build-system)
2685 `(#:tests? #f ; no make check
2686 #:make-flags (let ((out (assoc-ref %outputs "out")))
2687 (list (string-append "DESTDIR=" out)
2690 (modify-phases %standard-phases
2691 (add-after 'unpack 'fix-python3-DeprecationWarning
2693 (substitute* "dstat"
2694 (("collections") "collections.abc"))
2696 (delete 'configure) ; no configure script
2697 (add-after 'install 'wrap
2698 (lambda* (#:key outputs #:allow-other-keys)
2699 (let ((out (assoc-ref outputs "out")))
2700 (wrap-program (string-append out "/bin/dstat")
2701 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2704 `(("python" ,python-wrapper)
2705 ("python-six" ,python-six)))
2706 (synopsis "Versatile resource statistics tool")
2707 (description "Dstat is a versatile replacement for @command{vmstat},
2708 @command{iostat}, @command{netstat}, and @command{ifstat}. Dstat overcomes
2709 some of their limitations and adds some extra features, more counters and
2710 flexibility. Dstat is handy for monitoring systems during performance tuning
2711 tests, benchmarks or troubleshooting.
2713 Dstat allows you to view all of your system resources in real-time, you can,
2714 e.g., compare disk utilization in combination with interrupts from your IDE
2715 controller, or compare the network bandwidth numbers directly with the disk
2716 throughput (in the same interval).")
2717 (home-page "http://dag.wiee.rs/home-made/dstat/")
2718 (license license:gpl2+)))
2720 (define-public thefuck
2728 (url "https://github.com/nvbn/thefuck.git")
2730 (file-name (git-file-name name version))
2732 (base32 "0fnf78956pwhb9cgv1jmgypnkma5xzflkivfrkfiadbgin848yfg"))
2733 (patches (search-patches "thefuck-test-environ.patch"))))
2734 (build-system python-build-system)
2737 (modify-phases %standard-phases
2739 (add-after 'install 'check
2740 (lambda* (#:key inputs outputs #:allow-other-keys)
2741 ;; Tests look for installed package
2742 (add-installed-pythonpath inputs outputs)
2743 ;; Some tests need write access to $HOME.
2744 (setenv "HOME" "/tmp")
2745 (invoke "py.test" "-v")
2748 `(("python-colorama" ,python-colorama)
2749 ("python-decorator" ,python-decorator)
2750 ("python-psutil" ,python-psutil)
2751 ("python-pyte" ,python-pyte)
2752 ("python-six" ,python-six)))
2755 ("python-mock" ,python-mock)
2756 ("python-pytest" ,python-pytest)
2757 ("python-pytest-mock" ,python-pytest-mock)))
2758 (home-page "https://github.com/nvbn/thefuck")
2759 (synopsis "Correct mistyped console command")
2761 "The Fuck tries to match a rule for a previous, mistyped command, creates
2762 a new command using the matched rule, and runs it.")
2763 (license license:x11)))
2772 (uri (string-append "https://gentoo.com/di/di-" version ".tar.gz"))
2774 (base32 "0crvvfsxh8ryc0j19a2x52i9zacvggm8zi6j3kzygkcwnpz4km8r"))))
2775 (build-system gnu-build-system)
2777 `(#:tests? #f ; obscure test failures
2779 (modify-phases %standard-phases
2780 (delete 'configure) ; no configure script
2781 (add-before 'build 'setup-environment
2782 (lambda* (#:key outputs #:allow-other-keys)
2783 (setenv "CC" ,(cc-for-target))
2784 (setenv "prefix" (assoc-ref outputs "out"))
2786 #:make-flags (list "--environment-overrides")))
2787 (home-page "https://gentoo.com/di/")
2788 (synopsis "Advanced df like disk information utility")
2790 "@code{di} is a disk information utility, displaying everything that your
2791 @code{df} command does and more. It features the ability to display your disk
2792 usage in whatever format you prefer. It is designed to be highly portable and
2793 produce uniform output across heterogeneous networks.")
2794 (license license:zlib)))
2796 (define-public cbatticon
2804 (url "https://github.com/valr/cbatticon.git")
2807 (base32 "0ivm2dzhsa9ir25ry418r2qg2llby9j7a6m3arbvq5c3kaj8m9jr"))
2808 (file-name (git-file-name name version))))
2809 (build-system gnu-build-system)
2811 `(#:tests? #f ; no tests
2813 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2816 (modify-phases %standard-phases
2817 (delete 'configure)))) ; no configure script
2820 ("gettext" ,gettext-minimal)
2821 ("libnotify" ,libnotify)))
2823 `(("pkg-config" ,pkg-config)))
2824 (synopsis "Lightweight battery icon for the system tray")
2825 (description "cbatticon is a lightweight battery icon that displays
2826 the status of your battery in the system tray.")
2827 (home-page "https://github.com/valr/cbatticon")
2828 (license license:gpl2+)))
2830 (define-public interrobang
2831 (let ((revision "1")
2832 (commit "896543735e1c99144765fdbd7b6e6b5afbd8b881"))
2834 (name "interrobang")
2835 (version (git-version "0.0.0" revision commit))
2840 (url "https://github.com/TrilbyWhite/interrobang.git")
2842 (file-name (git-file-name name version))
2844 (base32 "1n13m70p1hfba5dy3i8hfclbr6k9q3d9dai3dg4jvhdhmxcpjzdf"))))
2845 (build-system gnu-build-system)
2847 `(#:tests? #f ; no tests
2849 (modify-phases %standard-phases
2850 (delete 'configure)) ; no configure script
2851 #:make-flags (list (string-append "PREFIX="
2852 (assoc-ref %outputs "out")))))
2854 `(("libx11" ,libx11)))
2856 `(("pkg-config" ,pkg-config)))
2857 (synopsis "Scriptable launcher menu")
2858 (description "Interrobang is a scriptable launcher menu with a customizable
2859 shortcut syntax and completion options.")
2860 (home-page "https://github.com/TrilbyWhite/interrobang")
2861 (license license:gpl3+))))
2863 (define-public pam-krb5
2870 "https://archives.eyrie.org/software/kerberos/"
2871 "pam-krb5-" version ".tar.xz"))
2872 (patches (search-patches "pam-krb5-CVE-2020-10595.patch"))
2875 "1qjp8i1s9bz7g6kiqrkzzkxn5pfspa4sy53b6z40fqmdf9przdfb"))))
2876 (build-system gnu-build-system)
2879 (modify-phases %standard-phases
2880 (add-before 'configure 'disable-tests
2882 ;; The build container seems to interfere with some tests.
2883 (substitute* "tests/TESTS"
2884 (("module/basic\n") ""))
2885 (substitute* "tests/TESTS"
2886 (("pam-util/vector\n") ""))
2889 `(("linux-pam" ,linux-pam)
2890 ("mit-krb5" ,mit-krb5)))
2893 ("perl-test-pod" ,perl-test-pod))) ; required for tests
2894 (synopsis "Kerberos PAM module")
2896 "Pam-krb5 is a Kerberos PAM module for either MIT Kerberos or Heimdal.
2897 It supports ticket refreshing by screen savers, configurable
2898 authorization handling, authentication of non-local accounts for network
2899 services, password changing, and password expiration, as well as all the
2900 standard expected PAM features. It works correctly with OpenSSH, even
2901 with @code{ChallengeResponseAuthentication} and @code{PrivilegeSeparation}
2902 enabled, and supports extensive configuration either by PAM options or in
2903 krb5.conf or both. PKINIT is supported with recent versions of both MIT
2904 Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.")
2905 (home-page "https://www.eyrie.org/~eagle/software/pam-krb5")
2906 ;; Dual licenced under a homebrew non-copyleft OR GPL (any version)
2907 ;; However, the tarball does not contain a copy of the GPL, so unless
2908 ;; we put one in, we cannot distribute it under GPL without violating
2909 ;; clause requiring us to give all recipients a copy.
2910 (license license:gpl1+)))
2912 (define (sunxi-tools-source version)
2916 (url "https://github.com/linux-sunxi/sunxi-tools.git")
2917 (commit (string-append "v" version))))
2919 (base32 "04f3jqg8ww4jxsf9c6ddcdgy2xbhkyp0b3l5f1hvvbv94p81rjxd"))
2920 (modules '((guix build utils)))
2922 ;; Remove binaries contained in the tarball which are only for the
2923 ;; target and can be regenerated anyway.
2925 (delete-file-recursively "bin")
2927 (file-name (git-file-name "sunxi-tools" version))))
2929 (define sunxi-target-tools
2931 (name "sunxi-target-tools")
2933 (build-system gnu-build-system)
2935 (sunxi-tools-source version))
2937 `(#:system "armhf-linux"
2939 #:make-flags (list (string-append "PREFIX="
2940 (assoc-ref %outputs "out"))
2941 (string-append "CROSS_COMPILE=")
2944 (modify-phases %standard-phases
2947 (lambda* (#:key make-flags #:allow-other-keys)
2948 (apply invoke "make" "target-tools" make-flags)))
2950 (lambda* (#:key make-flags #:allow-other-keys)
2951 (apply invoke "make" "install-target-tools"
2953 (home-page "https://github.com/linux-sunxi/sunxi-tools")
2954 (synopsis "Hardware management tools for Allwinner computers")
2955 (description "This package contains tools for Allwinner devices:
2957 @item @command{sunxi-meminfo}: Prints memory bus settings.
2959 (license license:gpl2+)))
2961 (define-public sunxi-tools
2963 (name "sunxi-tools")
2966 (sunxi-tools-source version))
2968 `(("sunxi-target-tools" ,sunxi-target-tools)
2969 ("pkg-config" ,pkg-config)))
2971 `(("libusb" ,libusb)))
2972 (build-system gnu-build-system)
2974 `(#:tests? #f ; no tests exist
2975 #:make-flags (list (string-append "PREFIX="
2976 (assoc-ref %outputs "out"))
2977 (string-append "CROSS_COMPILE=disabled")
2980 (modify-phases %standard-phases
2983 (lambda* (#:key make-flags #:allow-other-keys)
2984 (apply invoke "make" "tools" "misc" make-flags)))
2986 (lambda* (#:key inputs outputs make-flags #:allow-other-keys)
2987 ;; Those tools have been built for armhf but are part of the
2988 ;; installation in the upstream package. So do the same
2990 (copy-recursively (assoc-ref inputs "sunxi-target-tools")
2991 (assoc-ref outputs "out"))
2992 (apply invoke "make" "install-tools" "install-misc"
2994 (home-page "https://github.com/linux-sunxi/sunxi-tools")
2995 (synopsis "Hardware management tools for Allwinner computers")
2996 (description "This package contains tools for Allwinner devices:
2998 @item @command{sunxi-fexc}, @command{bin2fex}, @command{fex2bin}: Compile
2999 a textual description of a board (.fex) to a binary representation (.bin).
3000 @item @command{sunxi-fel}: Puts an Allwinner device into FEL mode which
3001 makes it register as a special USB device (rather than USB host).
3002 You can then connect it to another computer and flash it from there.
3003 @item @command{sunxi-nand-part}: Partitions NAND flash.
3004 @item @command{sunxi-bootinfo}: Reads out boot0 and boot1 (Allwinner
3005 bootloader) parameters.
3006 @item @command{sunxi-pio}: Sets GPIO parameters and oscillates a GPIO
3007 in order to be able to find it.
3008 @item @command{sunxi-meminfo}: Prints memory bus settings.
3009 @item @command{sunxi-nand-image-builder}: Prepares raw NAND images.
3011 (license license:gpl2+)))
3013 (define-public sedsed
3021 (url "https://github.com/aureliojargas/sedsed.git")
3022 (commit (string-append "v" version))))
3023 (file-name (git-file-name name version))
3025 (base32 "05cl35mwljdb9ynbbsfa8zx6ig8r0xncbg2cir9vwn5manndjj18"))))
3026 (build-system python-build-system)
3028 `(#:tests? #f ; no tests
3030 (modify-phases %standard-phases
3031 (add-after 'unpack 'patch-sed-in
3033 (substitute* "sedsed.py"
3035 (string-append "sedbin = '" (which "sed") "'")))
3039 (lambda* (#:key outputs #:allow-other-keys)
3040 (let* ((out (assoc-ref outputs "out"))
3041 (bin (string-append out "/bin")))
3042 ;; Just one file to copy around
3043 (install-file "sedsed.py" bin)
3045 (add-after 'wrap 'symlink
3046 ;; Create 'sedsed' symlink to "sedsed.py".
3047 (lambda* (#:key outputs #:allow-other-keys)
3048 (let* ((out (assoc-ref outputs "out"))
3049 (bin (string-append out "/bin"))
3050 (sed (string-append bin "/sedsed"))
3051 (sedpy (string-append bin "/sedsed.py")))
3054 (home-page "https://aurelio.net/projects/sedsed")
3055 (synopsis "Sed sed scripts")
3057 "@code{sedsed} can debug, indent, tokenize and HTMLize your @command{sed}
3060 In debug mode, it reads your script and adds extra commands to it. When
3061 executed you can see the data flow between the commands, revealing all the
3062 magic sed performs on its internal buffers.
3064 In indent mode, your script is reformatted with standard spacing.
3066 In tokenize mode, you can see the elements of every command you use.
3068 In HTMLize mode, your script is converted to a beautiful colored HTML file,
3069 with all the commands and parameters identified for your viewing pleasure.
3071 With sedsed you can master any sed script. No more secrets, no more hidden
3073 (license license:expat)))
3075 (define-public igt-gpu-tools
3077 (name "igt-gpu-tools")
3083 (url "https://gitlab.freedesktop.org/drm/igt-gpu-tools.git")
3084 (commit (string-append "igt-gpu-tools-" version))))
3085 (file-name (git-file-name name version))
3087 (base32 "1gpdjs5aj6vsnzwcjvw5bb120lgffvvshi4202phr0bzw3b92ky8"))))
3088 (build-system gnu-build-system)
3090 `(#:tests? #f)) ; many of the tests try to load kernel modules
3093 ("elfutils" ,elfutils) ; libdw
3098 ("libpciaccess" ,libpciaccess)
3099 ("libunwind" ,libunwind)
3100 ("libxrandr" ,libxrandr)
3101 ("openssl" ,openssl)
3103 ("util-macros" ,util-macros)))
3105 `(("autoconf" ,autoconf)
3106 ("automake" ,automake)
3107 ("libtool" ,libtool)
3108 ("pkg-config" ,pkg-config)))
3109 (home-page "https://gitlab.freedesktop.org/drm/igt-gpu-tools")
3110 (synopsis "Tools for development and testing of the Intel DRM driver")
3111 (description "IGT GPU Tools is a collection of tools for development and
3112 testing of the Intel DRM driver. There are many macro-level test suites that
3113 get used against the driver, including xtest, rendercheck, piglit, and
3114 oglconform, but failures from those can be difficult to track down to kernel
3115 changes, and many require complicated build procedures or specific testing
3116 environments to get useful results. Therefore, IGT GPU Tools includes
3117 low-level tools and tests specifically for development and testing of the
3119 (supported-systems '("i686-linux" "x86_64-linux"))
3120 (license license:expat)))
3122 (define-public fabric
3129 (uri (pypi-uri "Fabric" version))
3132 "1a3ndlpdw6bhn8fcw1jgznl117a8pnr84az9rb5fwnrypf1ph2b6"))))
3133 (build-system python-build-system)
3135 `(#:python ,python-2 ; Python 2 only
3137 (modify-phases %standard-phases
3141 "nosetests" "-v" "tests/"
3142 ;; This test hangs indefinitely when run on a single core VM
3143 ;; (see GNU bug #26647 and Debian bug #850230).
3144 "--exclude=test_nested_execution_with_explicit_ports"
3145 ;; This test randomly fails in certain environments causing too
3146 ;; much noise to be useful (see Debian bug #854686).
3147 "--exclude=test_should_use_sentinel_for_tasks_that_errored"))))))
3149 `(("python2-fudge" ,python2-fudge) ; Requires < 1.0
3150 ("python2-jinja2" ,python2-jinja2) ; Requires < 3.0
3151 ("python2-nose" ,python2-nose) ; Requires < 2.0
3152 ("python2-pynacl" ,python2-pynacl)
3153 ("python2-bcrypt" ,python2-bcrypt)))
3155 `(("python2-paramiko" ,python2-paramiko)))
3156 (home-page "https://www.fabfile.org/")
3157 (synopsis "Simple Pythonic remote execution and deployment tool")
3159 "Fabric is designed to upload files and run shell commands on a number of
3160 servers in parallel or serially. These commands are grouped in tasks (which
3161 are regular Python functions) and specified in a @dfn{fabfile}.
3163 It is similar to Capistrano, except it's implemented in Python and doesn't
3164 expect you to be deploying Rails applications. Fabric is a simple, Pythonic
3165 tool for remote execution and deployment.")
3166 (license license:bsd-2)))
3168 (define-public neofetch
3175 (url "https://github.com/dylanaraps/neofetch")
3177 (file-name (git-file-name name version))
3180 "0xc0fdc7n5bhqirh83agqiy8r14l14zwca07czvj8vgnsnfybslr"))))
3181 (build-system gnu-build-system)
3183 `(#:tests? #f ; there are no tests
3185 (list (string-append "PREFIX=" %output))
3187 (modify-phases %standard-phases
3188 (delete 'configure)))) ; no configure script
3189 (home-page "https://github.com/dylanaraps/neofetch")
3190 (synopsis "System information script")
3191 (description "Neofetch is a command-line system information tool written in
3192 Bash. Neofetch displays information about your system next to an image, your OS
3193 logo, or any ASCII file of your choice. The main purpose of Neofetch is to be
3194 used in screenshots to show other users what operating system or distribution
3195 you are running, what theme or icon set you are using, etc.")
3196 (license license:expat)))
3198 (define-public screenfetch
3200 (name "screenfetch")
3205 (url "https://github.com/KittyKatt/screenFetch")
3206 (commit (string-append "v" version))))
3207 (file-name (git-file-name name version))
3210 "04l8aqr474pb115nagn9f6y48jw92n1qfszgw7dbhgl4mpn95lcr"))))
3211 (build-system trivial-build-system)
3213 `(#:modules ((guix build utils))
3216 (use-modules (guix build utils))
3217 (let ((source (assoc-ref %build-inputs "source"))
3218 (out (assoc-ref %outputs "out")))
3219 (mkdir-p (string-append out "/bin/"))
3220 (copy-file (string-append source "/screenfetch-dev")
3221 (string-append out "/bin/screenfetch"))
3222 (install-file (string-append source "/screenfetch.1")
3223 (string-append out "/man/man1/"))
3224 (install-file (string-append source "/COPYING")
3225 (string-append out "/share/doc/" ,name "-" ,version))
3226 (substitute* (string-append out "/bin/screenfetch")
3227 (("/usr/bin/env bash")
3228 (string-append (assoc-ref %build-inputs "bash")
3231 (string-append out "/bin/screenfetch")
3233 (,(string-append (assoc-ref %build-inputs "bc") "/bin:"
3234 (assoc-ref %build-inputs "scrot") "/bin:"
3235 (assoc-ref %build-inputs "xdpyinfo") "/bin"
3236 (assoc-ref %build-inputs "xprop") "/bin"))))
3237 (substitute* (string-append out "/bin/screenfetch")
3239 (string-append "#!" (assoc-ref %build-inputs "bash")
3245 ("xdpyinfo" ,xdpyinfo)
3247 (home-page "https://github.com/KittyKatt/screenFetch")
3248 (synopsis "System information script")
3249 (description "Bash screenshot information tool which can be used to
3250 generate those nifty terminal theme information and ASCII distribution logos in
3251 everyone's screenshots nowadays.")
3252 (license license:gpl3)))
3261 (uri (string-append "https://github.com/jarun/nnn/releases/download/v"
3262 version "/nnn-v" version ".tar.gz"))
3264 (base32 "1zflz7yj5wzdnl0728g8qrld2z6dqn7sblbmkjvyqlv1fwjd1fsf"))))
3265 (build-system gnu-build-system)
3267 `(("ncurses" ,ncurses)
3268 ("readline" ,readline)))
3270 `(("pkg-config" ,pkg-config)))
3272 '(#:tests? #f ; no tests
3274 (modify-phases %standard-phases
3275 (delete 'configure)) ; no configure script
3278 (string-append "PREFIX="
3279 (assoc-ref %outputs "out"))
3281 (home-page "https://github.com/jarun/nnn")
3282 (synopsis "Terminal file browser")
3283 (description "@command{nnn} is a fork of @command{noice}, a blazing-fast
3284 lightweight terminal file browser with easy keyboard shortcuts for
3285 navigation, opening files and running tasks. There is no config file and
3286 mime associations are hard-coded. The incredible user-friendliness and speed
3287 make it a perfect utility on modern distros.")
3288 (license license:bsd-2)))
3290 (define-public thermald
3298 (url "https://github.com/01org/thermal_daemon")
3299 (commit (string-append "v" version))))
3300 (file-name (git-file-name name version))
3302 (base32 "0iagc3jqpnh6q2fa1gx4wx6r8qg0556j60xr159zqg95djr4dv99"))))
3303 (build-system gnu-build-system)
3306 (let ((out (assoc-ref %outputs "out")))
3307 (list (string-append "--sysconfdir="
3309 (string-append "--with-dbus-sys-dir="
3310 out "/etc/dbus-1/system.d")
3311 "--localstatedir=/var"))))
3313 `(("autoconf" ,autoconf)
3314 ("automake" ,automake)
3315 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
3316 ("pkg-config" ,pkg-config)))
3318 `(("dbus-glib" ,dbus-glib)
3319 ("libxml2" ,libxml2)))
3320 (home-page "https://01.org/linux-thermal-daemon/")
3321 (synopsis "CPU scaling for thermal management")
3322 (description "The Linux Thermal Daemon helps monitor and control temperature
3323 on systems running the Linux kernel.")
3324 ;; arm and aarch64 don't have cpuid.h.
3325 (supported-systems '("i686-linux" "x86_64-linux"))
3326 (license license:gpl2+)))
3328 (define-public masscan
3336 (url "https://github.com/robertdavidgraham/masscan.git")
3338 (file-name (git-file-name name version))
3340 (base32 "0q0c7bsf0pbl8napry1qyg0gl4pd8wn872h4mz9b56dx4rx90vqg"))))
3341 (build-system gnu-build-system)
3343 `(("libpcap" ,libpcap)))
3345 '(#:test-target "regress"
3348 (string-append "PREFIX=" (assoc-ref %outputs "out")))
3350 (modify-phases %standard-phases
3351 (delete 'configure) ; no ./configure script
3352 (add-after 'unpack 'patch-path
3353 (lambda* (#:key outputs inputs #:allow-other-keys)
3354 (let* ((out (assoc-ref outputs "out"))
3355 (pcap (assoc-ref inputs "libpcap")))
3356 (substitute* "src/rawsock-pcap.c"
3357 (("libpcap.so") (string-append pcap "/lib/libpcap.so")))
3359 (synopsis "TCP port scanner")
3360 (description "MASSCAN is an asynchronous TCP port scanner. It can detect
3361 open ports, and also complete the TCP connection and interact with the remote
3362 application, collecting the information received.")
3363 (home-page "https://github.com/robertdavidgraham/masscan")
3364 ;; 'src/siphash24.c' is the SipHash reference implementation, which
3365 ;; bears a CC0 Public Domain Dedication.
3366 (license license:agpl3+)))
3368 (define-public hungrycat
3374 (uri (string-append "https://github.com/jwilk/hungrycat/"
3375 "releases/download/" version "/"
3376 "hungrycat-" version ".tar.gz"))
3379 "03fc1zsrf99lvxa7b4ps6pbi43304wbxh1f6ci4q0vkal370yfwh"))))
3380 (build-system gnu-build-system)
3383 `(("python" ,python-wrapper)
3384 ("python-nose" ,python-nose)))
3386 `(#:test-target "test"))
3387 (synopsis "A single tool that combines @command{cat} & @command{rm}")
3389 "hungrycat prints the contents of a file to standard output, while
3390 simultaneously freeing the disk space it occupied. It is useful if you need
3391 to process a large file, don't have enough space to store both the input and
3392 output files, and don't need the input file afterwards.
3393 While similar in principle to running @command{cat} immediately followed by
3394 @command{rm}, @command{hungrycat} actually frees blocks as soon as they are
3395 printed instead of after the entire file has been read, which is often too
3397 (home-page "https://jwilk.net/software/hungrycat")
3398 (license license:expat)))
3400 (define-public launchmon
3407 "https://github.com/LLNL/LaunchMON/releases/download/v"
3408 version "/launchmon-v" version ".tar.gz"))
3411 "0fm3nd9mydm9v2bf7bh01dbgrfnpwkapxa3dsvy3x1z0rz61qc0x"))
3412 (modules '((guix build utils)))
3415 ;; Fix build failure with GCC 7 due to a conversion error.
3416 ;; Remove for versions > 1.0.2.
3417 (substitute* "launchmon/src/linux/lmon_api/lmon_coloc_spawner.cxx"
3418 ((" lmonpl = '\\\\0'")
3419 " *lmonpl = '\\0'"))
3421 (build-system gnu-build-system)
3427 ("libgcrypt" ,libgcrypt)
3428 ("libgpg-error" ,libgpg-error)))
3429 (synopsis "Infrastructue for large scale tool daemon launching")
3431 "LaunchMON is a software infrastructure that enables HPC run-time
3432 tools to co-locate tool daemons with a parallel job. Its API allows a
3433 tool to identify all the remote processes of a job and to scalably
3434 launch daemons into the relevant nodes.")
3435 (home-page "https://github.com/LLNL/LaunchMON")
3436 (supported-systems '("i686-linux" "x86_64-linux"))
3437 (license license:lgpl2.1)))
3439 (define-public spindle
3444 ;; We use git checkout to avoid github auto-generated tarballs
3447 (url "https://github.com/hpc/Spindle.git")
3448 (commit (string-append "v" version))))
3449 (file-name (git-file-name name version))
3452 "15n3ay0qq81r5v7fif61q1vdjcq44pp2nynkh3fvbzc9fj3c39wd"))))
3453 (build-system gnu-build-system)
3454 (arguments '(#:configure-flags '("--enable-sec-launchmon"
3455 "--enable-sec-munge"
3456 "--enable-sec-none")))
3460 ("launchmon" ,launchmon)
3461 ("libgcrypt" ,libgcrypt)))
3462 (synopsis "Scalable library loading in HPC environments")
3464 "Spindle is a tool for improving the performance of dynamic library and
3465 Python loading in HPC environments.")
3466 (home-page "https://github.com/hpc/Spindle")
3467 ;; This package supports x86_64 and PowerPC64
3468 (supported-systems '("x86_64-linux"))
3469 (license license:lgpl2.1)))
3471 (define-public inxi-minimal
3472 (let ((real-name "inxi"))
3474 (name "inxi-minimal")
3475 (version "3.1.01-1")
3480 (url "https://github.com/smxi/inxi")
3482 (file-name (git-file-name real-name version))
3484 (base32 "0r204w0r06ibdr4dck7yw2nmvj7xq68bjr7xwwiy7liqdml0n0yc"))))
3485 (build-system trivial-build-system)
3487 `(("bash" ,bash-minimal)
3489 ("procps" ,procps)))
3499 (use-modules (guix build utils)
3502 (setenv "PATH" (string-append
3503 (assoc-ref %build-inputs "bash") "/bin" ":"
3504 (assoc-ref %build-inputs "gzip") "/bin" ":"
3505 (assoc-ref %build-inputs "perl") "/bin" ":"))
3506 (copy-recursively (assoc-ref %build-inputs "source")
3507 ,(string-append real-name "-" version))
3508 (with-directory-excursion ,(string-append real-name "-" version)
3509 (with-fluids ((%default-port-encoding #f))
3510 (substitute* "inxi" (("/usr/bin/env perl") (which "perl"))))
3511 (let ((bin (string-append %output "/bin")))
3512 (install-file "inxi" bin)
3513 (wrap-program (string-append bin "/inxi")
3516 ,@(map (lambda (input)
3520 (cut string-append store <>)))
3522 ((member name '("util-linux"))
3523 (string-append (store-append "/bin") ":"
3524 (store-append "/sbin")))
3525 ((member name '("dmidecode" "iproute2"))
3526 (store-append "/sbin"))
3527 (else (store-append "/bin")))))))
3533 (((? (cut string-prefix? "perl-" <>) name) . dir)
3534 (string-append dir "/lib/perl5/site_perl"))
3537 (invoke "gzip" "inxi.1")
3538 (install-file "inxi.1.gz"
3539 (string-append %output "/share/man/man1")))
3541 (home-page "https://smxi.org/docs/inxi.htm")
3542 (synopsis "Full-featured system information script")
3543 (description "Inxi is a system information script that can display
3544 various things about your hardware and software to users in an IRC chatroom or
3545 support forum. It runs with the @code{/exec} command in most IRC clients.")
3546 (license license:gpl3+))))
3550 (inherit inxi-minimal)
3553 `(("dmidecode" ,dmidecode)
3555 ("bind:utils" ,isc-bind "utils") ; dig
3557 ("iproute2" ,iproute) ; ip
3558 ("kmod" ,kmod) ; modinfo
3559 ("lm-sensors" ,lm-sensors)
3560 ("mesa-utils" ,mesa-utils)
3561 ("pciutils" ,pciutils)
3564 ("util-linux" ,util-linux) ; lsblk
3565 ("usbutils" ,usbutils) ; lsusb
3567 ("xdpyinfo" ,xdpyinfo)
3570 ("coreutils" ,coreutils) ; uptime
3571 ("inetutils" ,inetutils) ; ifconfig
3572 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
3573 ("perl-http-tiny" ,perl-http-tiny)
3574 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
3575 ("perl-json-xs" ,perl-json-xs)
3576 ("perl-time-hires" ,perl-time-hires)
3577 ;; TODO: Add more inputs:
3582 ,@(package-inputs inxi-minimal)))))
3584 (define-public pscircle
3592 (url "https://gitlab.com/mildlyparallel/pscircle.git")
3593 (commit (string-append "v" version))))
3594 (file-name (git-file-name name version))
3596 (base32 "1sm99423hh90kr4wdjqi9sdrrpk65j2vz2hzj65zcxfxyr6khjci"))))
3597 (build-system meson-build-system)
3599 `(("pkg-config" ,pkg-config)))
3603 ("libx11" ,libx11)))
3604 (home-page "https://gitlab.com/mildlyparallel/pscircle")
3605 (synopsis "Visualize Linux processes in a form of radial tree")
3607 "@code{pscircle} visualizes Linux processes in the form of a radial tree.")
3608 (license license:gpl2+)))
3610 (define-public python-pyudev
3612 (name "python-pyudev")
3617 (uri (pypi-uri "pyudev" version))
3620 "0xmj6l08iih2js9skjqpv4w7y0dhxyg91zmrs6v5aa65gbmipfv9"))))
3621 (build-system python-build-system)
3623 `(#:tests? #f ; Tests require /sys
3625 (modify-phases %standard-phases
3626 (add-after 'unpack 'patch-ctypes-udev
3627 (lambda* (#:key inputs outputs #:allow-other-keys)
3628 (let ((eudev (assoc-ref inputs "eudev")))
3629 (substitute* "src/pyudev/core.py"
3631 (string-append "'" eudev "/lib/libudev.so'")))
3632 (substitute* "src/pyudev/_ctypeslib/utils.py"
3633 ;; Use absolute paths instead of keys.
3634 (("= find_library") "= "))
3637 `(("eudev" ,eudev)))
3639 `(("python-six" ,python-six)))
3641 `(("python-docutils" ,python-docutils)
3642 ("python-hypothesis" ,python-hypothesis)
3643 ("python-mock" ,python-mock)
3644 ("python-pytest" ,python-pytest)
3645 ("python-sphinx" ,python-sphinx)))
3646 (home-page "https://pyudev.readthedocs.io/")
3647 (synopsis "Python udev binding")
3648 (description "This package provides @code{udev} bindings for Python.")
3649 (license license:lgpl2.1)))
3651 (define-public solaar
3658 (url "https://github.com/pwr/Solaar.git")
3660 (file-name (git-file-name name version))
3663 "085mfa13dap3wqik1dqlad0d7kff4rv7j4ljh99c7l8nhczkqgwm"))))
3664 (build-system python-build-system)
3667 (modify-phases %standard-phases
3668 (add-after 'unpack 'fix-prefix-detection
3670 (substitute* "setup.py"
3671 (("'--prefix' in sys\\.argv")
3672 "len([x.startswith('--prefix=') for x in sys.argv]) > 0"))
3676 (invoke "python" "setup.py" "build")))
3677 (add-before 'check 'setenv-PATH
3679 (setenv "PYTHONPATH" (string-append "lib:" (getenv "PYTHONPATH")))
3682 `(("python-pygobject" ,python-pygobject)
3683 ("python-pyudev" ,python-pyudev)))
3684 (home-page "https://smxi.org/docs/inxi.htm")
3685 (synopsis "Linux devices manager for the Logitech Unifying Receiver")
3686 (description "This package provides tools to manage clients of the
3687 Logitech Unifying Receiver.")
3688 (license license:gpl2)))
3690 (define-public lynis
3693 ;; Also update the ‘lynis-sdk’ input to the commit matching this release.
3699 (url "https://github.com/CISOfy/lynis")
3701 (file-name (git-file-name name version))
3703 (base32 "1lkkbvxm0rgrrlx0szaxmf8ghc3d26wal96sgqk84m37mvs1f7p0"))
3704 (modules '((guix build utils)))
3707 ;; Remove proprietary plugins. As of now, all plugins supplied with
3708 ;; lynis are proprietary. In the future, if free plugins are
3709 ;; provided, whitelist them from deletion.
3710 (for-each delete-file (find-files "plugins"))
3712 (build-system gnu-build-system)
3719 (url "https://github.com/CISOfy/lynis-sdk")
3720 (commit "bf1c1d95121da9ca79a9eac5a15ed8d81e34094d")))
3721 (file-name (git-file-name "lynis-sdk" version))
3723 (base32 "1ndz5v0039dqa87cva2dk55a8hkw0fibsw8hh2ddmny9qkr4l3dp"))))))
3726 (modify-phases %standard-phases
3728 (lambda* (#:key inputs outputs #:allow-other-keys)
3729 (substitute* "lynis"
3730 (("/usr/share/lynis")
3731 (string-append (assoc-ref outputs "out") "/share/lynis")))
3732 (substitute* "include/functions"
3733 (("/usr/local/etc/lynis")
3734 (string-append (assoc-ref outputs "out") "/etc/lynis")))
3738 (lambda* (#:key outputs #:allow-other-keys)
3739 (let ((out (assoc-ref outputs "out")))
3740 (install-file "lynis" (string-append out "/bin/"))
3741 (install-file "default.prf" (string-append out "/etc/lynis"))
3744 (copy-recursively dir (string-append out "/share/lynis/" dir)))
3745 (list "db" "include" "plugins"))
3746 (install-file "lynis.8" (string-append out "/share/man/man8"))
3749 (lambda* (#:key inputs #:allow-other-keys)
3750 (copy-recursively (assoc-ref inputs "lynis-sdk") "../lynis-sdk")
3751 (setenv "LANG" "en_US.UTF-8")
3752 (let ((lynis-dir (getcwd)))
3753 (with-directory-excursion "../lynis-sdk"
3754 (substitute* "config"
3755 (("\\.\\./lynis") lynis-dir))
3756 (substitute* "unit-tests/tests-language-translations.sh"
3757 (("\\.\\./lynis") lynis-dir))
3758 (invoke "sh" "lynis-devkit" "run" "unit-tests"))))))))
3759 (home-page "https://cisofy.com/lynis/")
3760 (synopsis "Security auditing tool")
3761 (description "Lynis is a security auditing tool. It performs an in-depth
3762 security scan and runs on the system itself. The primary goal is to test
3763 security defenses and provide tips for further system hardening. It will also
3764 scan for general system information, vulnerable software packages, and
3765 possible configuration issues.")
3766 (license license:gpl3+)))
3768 (define-public ngrep
3776 (url "https://github.com/jpr5/ngrep/")
3777 (commit (string-append "V" (string-replace-substring version "." "_")))))
3778 (file-name (git-file-name name version))
3781 "1x2fyd7wdqlj1r76ilal06cl2wmbz0ws6i3ys204sbjh1cj6dcl7"))))
3782 (build-system gnu-build-system)
3784 `(("libpcap" ,libpcap)))
3786 `(#:tests? #f ;; No tests.
3787 #:configure-flags (list (string-append "--with-pcap-includes="
3788 (assoc-ref %build-inputs "libpcap")
3790 (home-page "https://github.com/jpr5/ngrep/")
3791 (synopsis "Grep-like utility to search for network packets on an interface")
3792 (description "@command{ngrep} is like GNU grep applied to the network
3793 layer. It's a PCAP-based tool that allows you to specify an extended regular
3794 or hexadecimal expression to match against data payloads of packets. It
3795 understands many kinds of protocols, including IPv4/6, TCP, UDP, ICMPv4/6,
3796 IGMP and Raw, across a wide variety of interface types, and understands BPF
3797 filter logic in the same fashion as more common packet sniffing tools, such as
3798 tcpdump and snoop.")
3799 (license license:bsd-3)))
3801 (define-public pam-mount
3808 (uri (string-append "mirror://sourceforge/pam-mount/pam_mount/"
3809 version "/pam_mount-" version ".tar.xz"))
3812 "1rvi4irb7ylsbhvx1cr6islm2xxw1a4b19q6z4a9864ndkm0f0mf"))
3814 ;; Patch adding support for encrypted volumes in LUKS2 format.
3815 ;; It comes from the Gentoo package definition for sys-auth/pam_mount.
3816 (search-patches "pam-mount-luks2-support.patch"))))
3817 (build-system gnu-build-system)
3820 ("pkg-config" ,pkg-config)))
3822 `(("cryptsetup" ,cryptsetup)
3824 ("libxml2" ,libxml2)
3825 ("linux-pam" ,linux-pam)
3827 ("openssl" ,openssl)
3829 ("libmount" ,util-linux "lib")
3830 ("util-linux" ,util-linux)))
3833 (list (string-append "--with-slibdir=" %output "/lib")
3834 (string-append "--with-ssbindir=" %output "/sbin"))
3836 (modify-phases %standard-phases
3837 (add-after 'unpack 'fix-program-paths
3838 (lambda* (#:key inputs outputs #:allow-other-keys)
3839 (let ((util-linux (assoc-ref inputs "util-linux"))
3840 (out (assoc-ref outputs "out")))
3841 (substitute* "src/mtcrypt.c"
3843 (string-append "\"" util-linux "/bin/mount\";"))
3845 (string-append "\"" util-linux "/bin/umount\";"))
3847 (string-append "\"" util-linux "/sbin/fsck\",")))
3848 (substitute* "src/rdconf1.c"
3850 (string-append "\"" util-linux "/bin/mount\", \""))
3852 (string-append "\"" util-linux "/bin/umount\", \""))
3854 (string-append "\"" util-linux "/sbin/fsck\", \""))
3855 (("\"pmvarrun\", \"")
3856 (string-append "\"" out "/sbin/pmvarrun\", \""))))
3858 (home-page "http://pam-mount.sourceforge.net")
3859 (synopsis "PAM module to mount volumes for a user session")
3861 "Pam-mount is a PAM module that can mount volumes when a user logs in.
3862 It supports mounting local filesystems of any kind the normal mount utility
3863 supports. It can also mount encrypted LUKS volumes using the password
3864 supplied by the user when logging in.")
3865 (license (list license:gpl2+ license:lgpl2.1+))))