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, 2020 Eric Bavier <bavier@posteo.net>
6 ;;; Copyright © 2015, 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
7 ;;; Copyright © 2015 Alex Sassmannshausen <alex.sassmannshausen@gmail.com>
8 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
9 ;;; Copyright © 2016, 2017 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 gawk)
89 #:use-module (gnu packages gettext)
90 #:use-module (gnu packages gl)
91 #:use-module (gnu packages glib)
92 #:use-module (gnu packages gnome)
93 #:use-module (gnu packages gnupg)
94 #:use-module (gnu packages golang)
95 #:use-module (gnu packages groff)
96 #:use-module (gnu packages gtk)
97 #:use-module (gnu packages guile)
98 #:use-module (gnu packages hurd)
99 #:use-module (gnu packages image)
100 #:use-module (gnu packages imagemagick)
101 #:use-module (gnu packages inkscape)
102 #:use-module (gnu packages kerberos)
103 #:use-module (gnu packages libbsd)
104 #:use-module (gnu packages libftdi)
105 #:use-module (gnu packages libunwind)
106 #:use-module (gnu packages libusb)
107 #:use-module (gnu packages linux)
108 #:use-module (gnu packages lua)
109 #:use-module (gnu packages man)
110 #:use-module (gnu packages mcrypt)
111 #:use-module (gnu packages mpi)
112 #:use-module (gnu packages ncurses)
113 #:use-module (gnu packages openldap)
114 #:use-module (gnu packages patchutils)
115 #:use-module (gnu packages pciutils)
116 #:use-module (gnu packages pcre)
117 #:use-module (gnu packages perl)
118 #:use-module (gnu packages perl-check)
119 #:use-module (gnu packages pkg-config)
120 #:use-module (gnu packages popt)
121 #:use-module (gnu packages python)
122 #:use-module (gnu packages python-crypto)
123 #:use-module (gnu packages python-web)
124 #:use-module (gnu packages python-xyz)
125 #:use-module (gnu packages qt)
126 #:use-module (gnu packages readline)
127 #:use-module (gnu packages ruby)
128 #:use-module (gnu packages serialization)
129 #:use-module (gnu packages sphinx)
130 #:use-module (gnu packages tcl)
131 #:use-module (gnu packages terminals)
132 #:use-module (gnu packages texinfo)
133 #:use-module (gnu packages tls)
134 #:use-module (gnu packages version-control)
135 #:use-module (gnu packages web)
136 #:use-module (gnu packages xdisorg)
137 #:use-module (gnu packages xml)
138 #:use-module (gnu packages xorg))
140 ;; This package uses su instead of sudo (because of SpaceFM).
141 (define-public ktsuss
150 (url "https://github.com/nomius/ktsuss")
153 (base32 "0q9931f9hp47v1n8scli4bdg2rkjpf5jf8v7jj2gdn83aia1r2hz"))
154 (file-name (git-file-name name version))))
155 (build-system glib-or-gtk-build-system)
158 (modify-phases %standard-phases
159 (add-after 'unpack 'patch-file-names
161 (substitute* "configure.ac"
162 (("supath=`which su 2>/dev/null`")
163 "supath=/run/setuid-programs/su"))
166 `(("autoconf" ,autoconf)
167 ("automake" ,automake)
169 ("pkg-config" ,pkg-config)))
173 (synopsis "Graphical front end for @command{su}")
175 "Ktsuss stands for ``Keep the @command{su} simple, stupid''.
176 It is a graphical version of @command{su} written in C and GTK+ 2, with
177 simplicity in mind.")
178 (home-page "https://github.com/nomius/ktsuss")
179 (license license:bsd-3)))
188 (uri (string-append "https://github.com/aide/aide/releases/download/v"
189 version "/aide-" version ".tar.gz"))
191 (base32 "15xp47sz7kk1ciffw3f5xw2jg2mb2lqrbr3q6p4bkbz5dap9iy8p"))))
192 (build-system gnu-build-system)
197 `(("libgcrypt" ,libgcrypt)
198 ("libgpg-error" ,libgpg-error)
199 ("libmhash" ,libmhash)
200 ("pcre:static" ,pcre "static")
202 ("zlib:static" ,zlib "static")
204 (synopsis "File and directory integrity checker")
206 "AIDE (Advanced Intrusion Detection Environment) is a file and directory
207 integrity checker. It creates a database from the regular expression rules
208 that it finds from its configuration files. Once this database is initialized
209 it can be used to verify the integrity of the files. It has several message
210 digest algorithms that are used to check the integrity of files. All of the
211 usual file attributes can be checked for inconsistencies.")
212 (home-page "https://aide.github.io/")
213 (license license:gpl2+)))
215 (define-public progress
223 (url "https://github.com/Xfennec/progress")
224 (commit (string-append "v" version))))
226 (base32 "1cnb4ixlhshn139mj5sr42k5m6gjjbyqvkn1324c47niwrgp7dqm"))
227 (file-name (git-file-name name version))))
228 (build-system gnu-build-system)
230 `(("pkg-config" ,pkg-config)
233 `(("ncurses" ,ncurses)))
235 `(#:tests? #f ; no test suite
237 (let ((target ,(%current-target-system)))
238 (list ,(string-append "CC=" (cc-for-target))
239 (string-append "PKG_CONFIG="
241 (string-append target "-pkg-config")
243 (string-append "PREFIX=" (assoc-ref %outputs "out"))))
245 (modify-phases %standard-phases
246 (delete 'configure)))) ; no configure script
247 (home-page "https://github.com/Xfennec/progress")
248 (synopsis "Program to view the progress of the coreutils commands")
249 (description "A program that looks for coreutils basic commands (cp, mv,
250 dd, tar, gzip/gunzip, cat, etc.) currently running on your system and displays
251 the percentage of copied data. It can also show estimated time and throughput,
252 and provides a \"top-like\" mode (monitoring).")
253 (license license:gpl3+)))
255 (define-public shepherd
261 (uri (string-append "mirror://gnu/shepherd/shepherd-"
265 "0x9zr0x3xvk4qkb6jnda451d5iyrl06cz1bjzjsm0lxvjj3fabyk"))))
266 (build-system gnu-build-system)
268 '(#:configure-flags '("--localstatedir=/var")))
270 `(("pkg-config" ,pkg-config)
272 ;; This is the Guile we use as a cross-compiler...
273 ("guile" ,guile-3.0)))
275 ;; ... and this is the one that appears in shebangs when cross-compiling.
276 `(("guile" ,guile-3.0)
278 ;; The 'shepherd' command uses Readline when used interactively. It's
279 ;; an unusual use case though, so we don't propagate it.
280 ("guile-readline" ,guile-readline)))
281 (synopsis "System service manager")
283 "The GNU Shepherd is a daemon-managing daemon, meaning that it supervises
284 the execution of system services, replacing similar functionality found in
285 typical init systems. It provides dependency-handling through a convenient
286 interface and is based on GNU Guile.")
287 (license license:gpl3+)
288 (home-page "https://www.gnu.org/software/shepherd/")))
290 (define-public guile2.2-shepherd
293 (name "guile2.2-shepherd")
295 `(("pkg-config" ,pkg-config)
296 ("guile" ,guile-2.2)))
298 `(("guile" ,guile-2.2)))))
300 (define-public guile3.0-shepherd
301 (deprecated-package "guile3.0-shepherd" shepherd))
303 (define-public guile2.0-shepherd
306 (name "guile2.0-shepherd")
308 `(("pkg-config" ,pkg-config)
309 ("guile" ,guile-2.0)))
311 `(("guile" ,guile-2.0)))))
313 (define-public cloud-utils
321 "https://launchpad.net/cloud-utils/trunk/"
322 version "/+download/cloud-utils-" version ".tar.gz"))
325 "07fl3dlqwdzw4xx7mcxhpkks6dnmaxha80zgs9f6wmibgzni8z0r"))))
326 (build-system gnu-build-system)
329 (let ((out (assoc-ref %outputs "out")))
330 (list (string-append "BINDIR=" out "/bin")
331 (string-append "MANDIR=" out "/share/man/man1")
332 (string-append "DOCDIR=" out "/share/doc")))
334 (modify-phases %standard-phases
337 (add-after 'install 'wrap
338 (lambda* (#:key outputs inputs #:allow-other-keys)
339 (let ((growpart (string-append (assoc-ref outputs "out")
341 (wrap-program growpart
342 `("PATH" ":" prefix (,(dirname (which "sfdisk"))
343 ,(dirname (which "readlink"))))))
347 ("util-linux" ,util-linux))) ; contains sfdisk for growpart
348 (home-page "https://launchpad.net/cloud-utils")
349 (synopsis "Set of utilities for cloud computing environments")
351 "This package contains a set of utilities for cloud computing
355 @item @command{cloud-localds} Create a disk for cloud-init to utilize nocloud
356 @item @command{cloud-publish-image} Wrapper for cloud image publishing
357 @item @command{cloud-publish-tarball} Wrapper for publishing cloud tarballs
358 @item @command{cloud-publish-ubuntu} Import a Ubuntu cloud image
359 @item @command{ec2metadata} Query and display @acronym{EC2,Amazon Elastic
360 Compute Cloud} metadata
361 @item @command{growpart} Grow a partition to fill the device
362 @item @command{mount-image-callback} Mount a file and run a command
363 @item @command{resize-part-image} Resize a partition image to a new size
364 @item @command{ubuntu-cloudimg-query} Get the latest Ubuntu
365 @acronym{AMI,Amazon Machine Image}
366 @item @command{ubuntu-ec2-run} Run a @acronym{EC2,Amazon Elastic Compute
367 Cloud} instance using Ubuntu
368 @item @command{vcs-run} Obtain a repository, and run a command
369 @item @command{write-mime-multipart} Handle multipart
370 @acronym{MIME,Multipurpose Internet Mail Extensions} messages
372 (license license:gpl3)))
374 (define-public daemontools
381 "https://cr.yp.to/daemontools/"
382 "daemontools-" version ".tar.gz"))
385 "07scvw88faxkscxi91031pjkpccql6wspk4yrlnsbrrb5c0kamd5"))))
386 (build-system gnu-build-system)
388 `(#:tests? #f ;; No tests as far as I can tell.
390 (modify-phases %standard-phases
391 (add-after 'unpack 'chdir
393 (chdir ,(string-append "daemontools-" version))
396 (add-before 'build 'patch
398 (substitute* "src/error.h"
399 (("extern int errno;")
400 "#include <errno.h>"))
404 (invoke "package/compile")))
406 (lambda* (#:key outputs #:allow-other-keys)
407 (let* ((out (assoc-ref outputs "out"))
408 (bin (string-append out "/bin")))
409 (for-each (lambda (file)
410 (install-file file bin))
411 (find-files "command")))
413 (synopsis "Tools for managing UNIX style services")
415 "@code{daemontools} is a collection of tools for managing UNIX
417 (license license:public-domain)
418 (home-page "https://cr.yp.to/daemontools.html")))
428 "https://projects.gw-computing.net/attachments/download/615/dfc-"
432 "0m1fd7l85ckb7bq4c5c3g257bkjglm8gq7x42pkmpp87fkknc94n"))))
433 (build-system cmake-build-system)
434 (arguments '(#:tests? #f)) ; There are no tests.
435 (native-inputs `(("gettext" ,gettext-minimal)))
436 (home-page "https://projects.gw-computing.net/projects/dfc")
437 (synopsis "Display file system space usage using graphs and colors")
439 "dfc (df color) is a modern version of df. It uses colors, draws pretty
440 graphs and can export its output to different formats.")
441 (license license:bsd-3)))
443 (define-public facter
450 (url "https://github.com/puppetlabs/facter-ng")
452 (file-name (git-file-name name version))
455 "0bab3by926gavbhkvp0in82vim575ybj8z6av3b12jdvla1s9rmz"))))
456 (build-system ruby-build-system)
458 `(#:phases (modify-phases %standard-phases
459 (add-after 'unpack 'delete-facter-ng-gemspec
461 ;; XXX: ruby-build-system incorrectly finds
462 ;; facter-ng.gemspec from this directory and tries to
463 ;; build that instead of the proper facter.gemspec.
464 ;; Just delete it as a workaround, as it appears to
465 ;; only exist for backwards-compatibility after the
466 ;; facter-ng->facter rename.
467 (delete-file "agent/facter-ng.gemspec")
469 (add-after 'unpack 'embed-iproute-reference
470 (lambda* (#:key inputs #:allow-other-keys)
471 (let ((iproute (assoc-ref inputs "iproute")))
472 ;; Provide an absolute reference to the 'ip' executable
473 ;; to avoid propagating it.
474 (substitute* "lib/resolvers/networking_linux_resolver.rb"
476 (string-append "execute('" iproute "/sbin/ip")))
479 (add-after 'wrap 'check
480 (lambda* (#:key tests? outputs #:allow-other-keys)
481 ;; XXX: The test suite wants to run Bundler and
482 ;; complains that the gemspec is invalid. For now
483 ;; just make sure that we can run the wrapped
484 ;; executable directly.
486 (invoke (string-append (assoc-ref outputs "out")
488 ;; Many facts depend on /sys, /etc/os-release,
489 ;; etc, so we only run a small sample.
490 "facterversion" "architecture"
491 "kernel" "kernelversion")
492 (format #t "tests disabled~%"))
495 `(("iproute" ,iproute)
496 ("ruby-hocon" ,ruby-hocon)
497 ("ruby-sys-filesystem" ,ruby-sys-filesystem)
498 ("ruby-thor" ,ruby-thor)))
499 (synopsis "Collect and display system facts")
501 "Facter is a tool that gathers basic facts about nodes (systems) such
502 as hardware details, network settings, OS type and version, and more. These
503 facts can be collected on the command line with the @command{facter} command
504 or via the @code{facter} Ruby library.")
505 (home-page "https://github.com/puppetlabs/facter-ng")
506 (license license:expat)))
514 (uri (string-append "http://hisham.hm/htop/releases/"
515 version "/htop-" version ".tar.gz"))
518 "0mrwpb3cpn3ai7ar33m31yklj64c3pp576vh1naqff6f21pq5mnr"))))
519 (build-system gnu-build-system)
521 `(("ncurses" ,ncurses)))
523 `(("python" ,python-wrapper))) ;for scripts/MakeHeader.py
524 (home-page "https://hisham.hm/htop/")
525 (synopsis "Interactive process viewer")
527 "This is htop, an interactive process viewer. It is a text-mode
528 application (for console or X terminals) and requires ncurses.")
529 (license license:gpl2)))
538 (uri (string-append "mirror://gnu/pies/pies-"
542 "14jb4pa4zs26d5j2skxbaypnwhsx2lw8jgj1irrgs03c2dnf7gp6"))))
543 (build-system gnu-build-system)
545 '(#:phases (modify-phases %standard-phases
546 (add-before 'build 'patch-/bin/sh
547 (lambda* (#:key inputs #:allow-other-keys)
548 ;; Use the right shell when executing user-provided
550 (let ((bash (assoc-ref inputs "bash")))
551 (substitute* '("src/progman.c" "src/comp.c")
553 (string-append "\"" bash "/bin/sh\"")))
555 (home-page "https://www.gnu.org.ua/software/pies/")
556 (synopsis "Program invocation and execution supervisor")
558 "GNU pies is a program that supervises the invocation and execution of
559 other programs. It reads the list of programs to be started from its
560 configuration file, executes them, and then monitors their status,
561 re-executing them as necessary.")
562 (license license:gpl3+)))
564 (define-public inetutils
570 (uri (string-append "mirror://gnu/inetutils/inetutils-"
572 (patches (search-patches "inetutils-hurd.patch"))
575 "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy"))))
576 (build-system gnu-build-system)
578 `(#:configure-flags '("--localstatedir=/var"
580 ;; Make sure 'PATH_PROCNET_DEV' gets defined when
581 ;; cross-compiling (by default it does not.)
582 ,@(if (%current-target-system)
583 '("--with-path-procnet-dev=/proc/net/dev")
596 ;; On some systems, 'libls.sh' may fail with an error such as:
597 ;; "Failed to tell switch -a apart from -A".
598 #:parallel-tests? #f))
599 (inputs `(("ncurses" ,ncurses)
600 ("readline" ,readline))) ;for 'ftp'
601 (native-inputs (if (member (%current-system)
602 (package-supported-systems net-tools))
603 `(("netstat" ,net-tools)) ;for tests
605 (home-page "https://www.gnu.org/software/inetutils/")
606 (synopsis "Basic networking utilities")
608 "Inetutils is a collection of common network programs, such as an ftp
609 client and server, a telnet client and server, an rsh client and server, and
611 (license license:gpl3+)))
613 (define-public shadow
620 "https://github.com/shadow-maint/shadow/releases/"
621 "download/" version "/shadow-" version ".tar.xz"))
622 (patches (search-patches "shadow-hurd-pctrl.patch"))
625 "0qmfq50sdhz6xilgxvinblll8j2iqfl7hwk45bq744y4plq4dbd3"))))
626 (build-system gnu-build-system)
628 `(;; Assume System V `setpgrp (void)', which is the default on GNU
629 ;; variants (`AC_FUNC_SETPGRP' is not cross-compilation capable.)
631 '("--with-libpam" "ac_cv_func_setpgrp_void=yes")
634 (modify-phases %standard-phases
635 (add-before 'build 'set-nscd-file-name
636 (lambda* (#:key inputs #:allow-other-keys)
637 ;; Use the right file name for nscd.
638 (let ((libc (assoc-ref inputs
639 ,(if (%current-target-system)
642 (substitute* "lib/nscd.c"
644 (string-append libc "/sbin/nscd")))
646 (add-after 'install 'remove-groups
647 (lambda* (#:key outputs #:allow-other-keys)
648 ;; Remove `groups', which is already provided by Coreutils.
649 (let* ((out (assoc-ref outputs "out"))
650 (bin (string-append out "/bin"))
651 (man (string-append out "/share/man")))
652 (delete-file (string-append bin "/groups"))
653 (for-each delete-file (find-files man "^groups\\."))
656 (inputs `(("linux-pam" ,linux-pam)))
657 (home-page "https://github.com/shadow-maint/shadow")
658 (synopsis "Authentication-related tools such as passwd, su, and login")
660 "Shadow provides a number of authentication-related tools, including:
661 login, passwd, su, groupadd, and useradd.")
663 ;; The `vipw' program is GPLv2+.
664 ;; libmisc/salt.c is public domain.
665 (license license:bsd-3)))
667 (define-public mingetty
673 (uri (string-append "mirror://sourceforge/mingetty/mingetty/"
674 version "/mingetty-" version ".tar.gz"))
677 "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"))))
678 (build-system gnu-build-system)
681 (modify-phases %standard-phases
683 (lambda* (#:key inputs outputs target #:allow-other-keys)
684 (let* ((out (assoc-ref outputs "out"))
685 (man8 (string-append out "/share/man/man8"))
686 (sbin (string-append out "/sbin"))
687 (shadow (assoc-ref inputs "shadow"))
688 (login (string-append shadow "/bin/login")))
689 (substitute* "Makefile"
690 ,@(if (%current-target-system)
692 (string-append "CC=" target "-gcc\n")))
695 (string-append "SBINDIR = " out
698 (string-append "MANDIR = " out
699 "/share/man/man8\n")))
701 ;; Pick the right 'login' by default.
702 (substitute* "mingetty.c"
704 (string-append "\"" login "\"")))
709 #:tests? #f)) ; no tests
710 (inputs `(("shadow" ,shadow)))
712 (home-page "https://sourceforge.net/projects/mingetty")
713 (synopsis "Getty for the text console")
715 "Small console getty that is started on the Linux text console,
716 asks for a login name and then transfers over to @code{login}. It is extended
717 to allow automatic login and starting any app.")
718 (license license:gpl2+)))
720 (define-public net-base
727 "mirror://debian/pool/main/n/netbase/netbase_"
731 "12xqjwg3p4rzmmh2iib6sigm9l29y3dgk74mmnw64k84jnbwdxl1"))))
732 (build-system trivial-build-system)
734 `(#:modules ((guix build utils))
736 (use-modules (guix build utils)
739 (let* ((source (assoc-ref %build-inputs "source"))
740 (tar (assoc-ref %build-inputs "tar"))
741 (xz (assoc-ref %build-inputs "xz"))
742 (output (assoc-ref %outputs "out"))
743 (etc (string-append output "/etc")))
744 (setenv "PATH" (string-append xz "/bin"))
745 (invoke (string-append tar "/bin/tar") "xvf"
747 (chdir ,(string-append "netbase-" version))
750 '("etc-services" "etc-protocols" "etc-rpc")
751 (map (cut string-append etc "/" <>)
752 '("services" "protocols" "rpc")))
754 (native-inputs `(("tar" ,tar)
756 (synopsis "IANA protocol, port, and RPC number assignments")
758 "This package provides the /etc/services, /etc/protocols, and /etc/rpc
759 files, which contain information about the IANA-assigned port, protocol, and
761 (home-page "https://packages.debian.org/sid/netbase")
762 (license license:gpl2)))
764 (define-public netcat
770 (uri (string-append "mirror://sourceforge/netcat/netcat/" version
771 "/netcat-" version ".tar.bz2"))
774 "1frjcdkhkpzk0f84hx6hmw5l0ynpmji8vcbaxg8h5k2svyxz0nmm"))))
775 (build-system gnu-build-system)
778 ;; By default, man and info pages are put in PREFIX/{man,info},
779 ;; but we want them in PREFIX/share/{man,info}.
780 (let ((out (assoc-ref %outputs "out")))
781 (list (string-append "--mandir=" out "/share/man")
782 (string-append "--infodir=" out "/share/info")))))
783 (home-page "http://netcat.sourceforge.net")
784 (synopsis "Read and write data over TCP/IP")
786 "Netcat is a featured networking utility which reads and writes data
787 across network connections, using the TCP/IP protocol. It is designed to be a
788 reliable \"back-end\" tool that can be used directly or easily driven by other
789 programs and scripts. At the same time, it is a feature-rich network debugging
790 and exploration tool, since it can create almost any kind of connection you
791 would need and has several interesting built-in capabilities.")
792 (license license:gpl2+)))
794 (define-public netcat-openbsd
796 (name "netcat-openbsd")
801 (url "https://salsa.debian.org/debian/netcat-openbsd.git")
802 (commit (string-append "debian/" version))))
803 (file-name (git-file-name name version))
806 "0kcvi3pav2fdx5c22psjv5dggk4cmrqiaq2cklhqngsk4a7vrjan"))))
807 (build-system gnu-build-system)
809 `(#:tests? #f ; no test suite
813 (modify-phases %standard-phases
815 (add-before 'build 'patch
817 (setenv "QUILT_PATCHES" "debian/patches")
818 (invoke "quilt" "push" "-a")
821 (lambda* (#:key outputs #:allow-other-keys)
822 (let* ((out (assoc-ref outputs "out"))
823 (bin (string-append out "/bin"))
824 (man (string-append out "/share/man/man1"))
825 (doc (string-append out "/share/doc/netcat-openbsd-" ,version))
826 (examples (string-append doc "/examples")))
827 (install-file "nc" bin)
828 (install-file "nc.1" man)
829 (install-file "debian/copyright" doc)
830 (copy-recursively "debian/examples" examples)
832 (inputs `(("libbsd" ,libbsd)))
833 (native-inputs `(("pkg-config" ,pkg-config)
835 (home-page "https://packages.debian.org/sid/netcat-openbsd")
836 (synopsis "Read and write data over TCP/IP")
838 "Netcat is a simple Unix utility which reads and writes data across
839 network connections using TCP or UDP protocol. It is designed to be a reliable
840 \"back-end\" tool that can be used directly or easily driven by other programs
841 and scripts. At the same time it is a feature-rich network debugging and
842 exploration tool, since it can create almost any kind of connection you would
843 need and has several interesting built-in capabilities.
845 This package contains the OpenBSD rewrite of netcat, including support for
846 IPv6, proxies, and Unix sockets.")
847 (license (list license:bsd-3
848 license:bsd-2)))) ; atomicio.*, socks.c
850 (define-public sipcalc
857 (uri (string-append "http://www.routemeister.net/projects"
858 "/sipcalc/files/sipcalc" "-" version ".tar.gz"))
861 "0mv3wndj4z2bsshh2k8d5sy3j8wxzgf8mzmmkvj1k8gpcz37dm6g"))))
862 (build-system gnu-build-system)
863 (home-page "https://www.routemeister.net/projects/sipcalc/")
864 (synopsis "Command-line IP subnet calculator")
866 "Sipcalc is an advanced command-line IP subnet calculator. It can take
867 multiple forms of input (IPv4/IPv6/interface/hostname) and output a multitude
868 of information about a given subnet.
875 @item Retrieving of address information from interfaces.
876 @item Classfull and CIDR output.
877 @item Multiple address and netmask input and output formats (dotted quad, hex,
879 @item Output of broadcast address, network class, Cisco wildcard,
880 hosts/range, network range.
881 @item The ability to split a network based on a smaller netmask, now also with
882 recursive runs on the generated subnets. (also IPv6)
886 @item Compressed and expanded input and output addresses.
887 @item Standard IPv6 network output.
888 @item v4 in v6 output.
889 @item Reverse DNS address generation.
892 (license license:bsd-3)))
900 (uri (string-append "mirror://gnu/alive/alive-"
904 "1vrzg51ai68x9yld7vbgl58sxaw5qpx8rbakwcxn4cqq6vpxj38j"))))
905 (build-system gnu-build-system)
906 (arguments '(#:configure-flags '("alive_cv_nice_ping=yes")))
907 (inputs `(("guile" ,guile-2.0)
908 ("inetutils" ,inetutils)))
909 (home-page "https://www.gnu.org/software/alive/")
910 (synopsis "Autologin and keep-alive daemon")
912 "GNU Alive sends periodic pings to a server, generally to keep a
914 (license license:gpl3+)))
916 (define-public isc-dhcp
917 (let* ((bind-major-version "9")
918 (bind-minor-version "11")
919 (bind-patch-version "18")
920 (bind-release-type "") ; for patch release, use "-P"
921 (bind-release-version "") ; for patch release, e.g. "6"
922 (bind-version (string-append bind-major-version
928 bind-release-version)))
934 (uri (string-append "https://ftp.isc.org/isc/dhcp/"
935 version "/dhcp-" version ".tar.gz"))
938 "08a5003zdxgl41b29zjkxa92h2i40zyjgxg0npvnhpkfl5jcsz0s"))))
939 (build-system gnu-build-system)
941 `(#:parallel-build? #f
942 #:configure-flags '("--with-randomdev=/dev/random")
944 (modify-phases %standard-phases
945 (add-after 'unpack 'replace-bundled-bind
946 (lambda* (#:key inputs native-inputs #:allow-other-keys)
947 (delete-file "bind/bind.tar.gz")
948 (copy-file (assoc-ref inputs "bind-source-tarball")
950 (chmod "bind/bind.tar.gz" #o644)
951 (substitute* "bind/version.tmp"
953 (format #f "MAJORVER=~a\n" ,bind-major-version))
955 (format #f "MINORVER=~a\n" ,bind-minor-version))
957 (format #f "PATCHVER=~a\n" ,bind-patch-version))
959 (format #f "RELEASETYPE=~a\n" ,bind-release-type))
961 (format #f "RELEASEVER=~a\n" ,bind-release-version)))
963 ,@(if (%current-target-system)
964 '((add-before 'configure 'fix-bind-cross-compilation
966 (substitute* "configure"
968 "--host=$host_alias"))
969 ;; BIND needs a native compiler because the DHCP
970 ;; build system uses the built 'gen' executable.
971 (setenv "BUILD_CC" "gcc")
974 (add-after 'configure 'post-configure
975 (lambda* (#:key outputs #:allow-other-keys)
976 ;; Point to the right client script, which will be
977 ;; installed in a later phase.
978 (substitute* "includes/dhcpd.h"
979 (("#define[[:blank:]]+_PATH_DHCLIENT_SCRIPT.*")
980 (let ((out (assoc-ref outputs "out")))
981 (string-append "#define _PATH_DHCLIENT_SCRIPT \""
982 out "/libexec/dhclient-script"
985 ;; During the 'build' phase, 'bind.tar.gz' is extracted, so
986 ;; we must patch shebangs in there and make sure the right
988 (with-directory-excursion "bind"
989 (substitute* "Makefile"
991 (let ((sh (which "sh")))
992 (string-append "./configure CONFIG_SHELL="
993 sh " SHELL=" sh " "))))
995 (let ((bind-directory (string-append "bind-" ,bind-version)))
996 (invoke "tar" "xf" "bind.tar.gz")
997 (for-each patch-shebang
998 (find-files bind-directory ".*"))
999 (substitute* (string-append bind-directory "/configure")
1002 (invoke "tar" "cf" "bind.tar.gz"
1004 ;; avoid non-determinism in the archive
1008 "--group=root:0")))))
1009 (add-after 'install 'post-install
1010 (lambda* (#:key inputs outputs #:allow-other-keys)
1011 ;; Install the dhclient script for GNU/Linux and make sure
1012 ;; if finds all the programs it needs.
1013 (let* ((out (assoc-ref outputs "out"))
1014 (libexec (string-append out "/libexec"))
1015 (coreutils (assoc-ref inputs "coreutils"))
1016 (inetutils (assoc-ref inputs "inetutils"))
1017 (net-tools (assoc-ref inputs "net-tools"))
1018 (sed (assoc-ref inputs "sed")))
1019 (substitute* "client/scripts/linux"
1021 (string-append (assoc-ref inputs "iproute")
1025 (copy-file "client/scripts/linux"
1026 (string-append libexec "/dhclient-script"))
1029 (string-append libexec "/dhclient-script")
1032 (string-append dir "/bin:"
1034 (list inetutils net-tools coreutils sed))))
1041 (inputs `(("inetutils" ,inetutils)
1042 ,@(if (hurd-target?) '()
1043 `(("net-tools" ,net-tools)
1044 ("iproute" ,iproute)))
1046 ;; isc-dhcp bundles a copy of BIND, which has proved vulnerable
1047 ;; in the past. Use a BIND-VERSION of our choosing instead.
1048 ("bind-source-tarball"
1051 (uri (string-append "https://ftp.isc.org/isc/bind9/"
1053 "/bind-" bind-version ".tar.gz"))
1056 "0vws0zzb39mkphj4hhjrgfj9dzw951lc4pfa6pqg5ll5ma51mbsr"))))
1058 ;; When cross-compiling, we need the cross Coreutils and sed.
1059 ;; Otherwise just use those from %FINAL-INPUTS.
1060 ,@(if (%current-target-system)
1061 `(("coreutils" ,coreutils)
1065 (home-page "https://www.isc.org/products/DHCP/")
1066 (synopsis "Dynamic Host Configuration Protocol (DHCP) tools")
1068 "ISC's Dynamic Host Configuration Protocol (DHCP) distribution provides a
1069 reference implementation of all aspects of DHCP, through a suite of DHCP
1070 tools: server, client, and relay agent.")
1071 (license license:mpl2.0)
1072 (properties '((cpe-name . "dhcp"))))))
1074 (define-public libpcap
1080 (uri (string-append "https://www.tcpdump.org/release/libpcap-"
1084 "153h1378diqyc27jjgz6gg5nxmb4ddk006d9xg69nqavgiikflk3"))))
1085 (build-system gnu-build-system)
1090 ;; There are some tests in testprogs/, but no automated test suite.
1092 (home-page "https://www.tcpdump.org")
1093 (synopsis "Network packet capture library")
1095 "libpcap is an interface for user-level packet capture. It provides a
1096 portable framework for low-level network monitoring. Applications include
1097 network statistics collection, security monitoring, network debugging, etc.")
1098 (license (list license:bsd-4 ; fad-*.c and several other source files
1099 license:bsd-3 ; pcap/, sockutils.* & others
1100 license:bsd-2)))) ; the rest
1102 (define-public tcpdump
1108 (uri (string-append "https://www.tcpdump.org/release/tcpdump-"
1112 "0434vdcnbqaia672rggjzdn4bb8p8dchz559yiszzdk0sjrprm1c"))))
1113 (build-system gnu-build-system)
1114 (inputs `(("libpcap" ,libpcap)
1115 ("openssl" ,openssl)))
1116 (native-inputs `(("perl" ,perl))) ; for tests
1117 (home-page "https://www.tcpdump.org/")
1118 (synopsis "Network packet analyzer")
1120 "Tcpdump is a command-line tool to analyze network traffic passing
1121 through the network interface controller.")
1122 (license license:bsd-3)))
1124 (define-public jnettop
1131 (string-append "https://web.archive.org/web/20161221100811/"
1132 "http://jnettop.kubs.info/dist/jnettop-"
1136 "1855np7c4b0bqzhf1l1dyzxb90fpnvrirdisajhci5am6als31z9"))))
1137 (build-system gnu-build-system)
1139 `(("pkg-config" ,pkg-config)))
1142 ("ncurses" ,ncurses)
1143 ("libpcap" ,libpcap)))
1145 "https://web.archive.org/web/20160703195221/http://jnettop.kubs.info/wiki/")
1146 (synopsis "Visualize network traffic by bandwidth use")
1148 "Jnettop is a traffic visualiser, which captures traffic going
1149 through the host it is running from and displays streams sorted
1150 by bandwidth they use.")
1151 (license license:gpl2+)))
1153 (define-public clusterssh
1159 (uri (string-append "mirror://sourceforge/clusterssh/"
1160 "2.%20ClusterSSH%20Series%204/"
1161 "App-ClusterSSH-v" version ".tar.gz"))
1164 "0rmk2p3f2wz1h092anidjclh212rv3gxyk0c641qk3frlrjnw6mp"))))
1165 (build-system perl-build-system)
1168 (modify-phases %standard-phases
1169 (add-after 'unpack 'refer-to-inputs
1170 (lambda* (#:key inputs #:allow-other-keys)
1171 (substitute* (list "lib/App/ClusterSSH/Config.pm"
1176 (add-before 'check 'delete-failing-tests
1178 ;; This checks whether all code is nicely formatted. The above
1179 ;; ‘refer-to-inputs’ phase breaks this pedantry, so disable it.
1180 (delete-file "t/perltidy.t")
1181 ;; Update the manifest so t/manifest.t happily passes.
1182 (substitute* "MANIFEST"
1183 (("t/perltidy.t\n") ""))
1185 (add-after 'install 'augment-library-path
1186 (lambda* (#:key inputs outputs #:allow-other-keys)
1187 (let* ((out (assoc-ref outputs "out"))
1188 (bin (string-append out "/bin")))
1189 (with-directory-excursion bin
1192 (wrap-program program
1193 `("PERL5LIB" ":" prefix
1194 ,(map (lambda (file-name)
1195 (string-append file-name
1196 "/lib/perl5/site_perl"))
1198 (map (lambda (input)
1199 (assoc-ref inputs input))
1200 ;; These may be propagated and hence
1201 ;; not explicitly listed as inputs.
1202 (list "perl-class-data-inheritable"
1203 "perl-devel-stacktrace"
1204 "perl-exception-class"
1208 "perl-x11-protocol-other")))))))
1209 (find-files "." ".*")))
1212 `(("perl-cpan-changes" ,perl-cpan-changes)
1213 ("perl-file-slurp" ,perl-file-slurp)
1214 ("perl-file-which" ,perl-file-which)
1215 ("perl-module-build" ,perl-module-build)
1216 ("perl-readonly" ,perl-readonly)
1217 ("perl-test-differences" ,perl-test-differences)
1218 ("perl-test-distmanifest" ,perl-test-distmanifest)
1219 ("perl-test-perltidy" ,perl-test-perltidy)
1220 ("perl-test-pod" ,perl-test-pod)
1221 ("perl-test-pod-coverage" ,perl-test-pod-coverage)
1222 ("perl-test-trap" ,perl-test-trap)
1223 ("perltidy" ,perltidy)))
1225 `(("perl-exception-class" ,perl-exception-class)
1226 ("perl-sort-naturally" ,perl-sort-naturally)
1227 ("perl-tk" ,perl-tk)
1228 ("perl-try-tiny" ,perl-try-tiny)
1229 ("perl-x11-protocol" ,perl-x11-protocol)
1230 ("perl-x11-protocol-other" ,perl-x11-protocol-other)
1232 ;; The clusterssh.sourceforge.net address requires login to view
1233 (home-page "https://sourceforge.net/projects/clusterssh/")
1234 (synopsis "Secure concurrent multi-server terminal control")
1236 "ClusterSSH controls a number of xterm windows via a single graphical
1237 console window to allow commands to be interactively run on multiple servers
1238 over ssh connections.")
1239 (license license:gpl2+)))
1241 (define-public rename
1248 "mirror://cpan/authors/id/R/RM/RMBARKER/File-Rename-"
1252 "137m8s06r4n038ivlr5r1d9a7q9l7shmwpvnyx053r9ndhvbnkh5"))))
1253 (build-system perl-build-system)
1256 (modify-phases %standard-phases
1257 (add-after 'install 'find-itself
1258 ;; Fix run-time 'Can't locate File/Rename.pm in @INC' failure.
1259 (lambda* (#:key outputs #:allow-other-keys)
1260 (let* ((out (assoc-ref outputs "out"))
1261 (bin (string-append out "/bin")))
1262 (with-directory-excursion bin
1265 (wrap-program program
1266 `("PERL5LIB" ":" prefix
1267 (,(string-append out "/lib/perl5/site_perl")))))
1268 (find-files "." ".*")))
1271 `(("perl-module-build" ,perl-module-build)
1272 ("perl-test-pod" ,perl-test-pod)
1273 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1274 (home-page "https://metacpan.org/pod/distribution/File-Rename/rename.PL")
1275 (synopsis "Perl extension for renaming multiple files")
1277 "This package provides a Perl interface (@code{Perl::Rename}) as well
1278 as a command-line utility (@command{rename}) that can rename multiple files
1279 at once based on a Perl regular expression.")
1280 (license license:perl-license)))
1282 (define-public rottlog
1288 (uri (string-append "mirror://gnu/rottlog/rottlog-"
1292 "0751mb9l2f0jrk3vj6q8ilanifd121dliwk0c34g8k0dlzsv3kd7"))
1293 (modules '((guix build utils)))
1296 (substitute* "Makefile.in"
1297 (("-o \\$\\{LOG_OWN\\} -g \\$\\{LOG_GROUP\\}")
1298 ;; Don't try to chown root.
1300 (("mkdir -p \\$\\(ROTT_STATDIR\\)")
1301 ;; Don't attempt to create /var/lib/rottlog.
1304 (build-system gnu-build-system)
1306 `(#:configure-flags (list "ROTT_ETCDIR=/etc/rottlog" ;rc file location
1307 "--localstatedir=/var")
1309 ;; Install example config files in OUT/etc.
1310 #:make-flags (list (string-append "ROTT_ETCDIR="
1311 (assoc-ref %outputs "out")
1314 #:phases (modify-phases %standard-phases
1315 (add-after 'unpack 'patch-paths
1317 (substitute* "rc/rc"
1318 (("/usr/sbin/sendmail") "sendmail"))
1320 (add-after 'unpack 'fix-configure
1321 (lambda* (#:key inputs native-inputs #:allow-other-keys)
1322 ;; Replace outdated config.sub and config.guess:
1323 (for-each (lambda (file)
1327 (or native-inputs inputs) "automake")
1329 ,(version-major+minor
1330 (package-version automake))
1332 '("config.sub" "config.guess"))
1334 (add-after 'build 'set-packdir
1336 ;; Set a default location for archived logs.
1337 (substitute* "rc/rc"
1339 "packdir=\"/var/log\""))
1341 (add-before 'install 'tweak-rc-weekly
1343 (substitute* "rc/weekly"
1347 ;; The file is called 'syslog.pid' (no 'd').
1350 (add-after 'install 'install-info
1352 (invoke "make" "install-info"))))))
1353 (native-inputs `(("texinfo" ,texinfo)
1354 ("automake" ,automake)
1355 ("util-linux" ,util-linux))) ; for 'cal'
1356 (home-page "https://www.gnu.org/software/rottlog/")
1357 (synopsis "Log rotation and management")
1359 "GNU Rot[t]log is a program for managing log files. It is used to
1360 automatically rotate out log files when they have reached a given size or
1361 according to a given schedule. It can also be used to automatically compress
1362 and archive such logs. Rot[t]log will mail reports of its activity to the
1363 system administrator.")
1364 (license license:gpl3+)))
1373 (list (string-append "https://www.sudo.ws/sudo/dist/sudo-"
1375 (string-append "ftp://ftp.sudo.ws/pub/sudo/OLD/sudo-"
1376 version ".tar.gz")))
1379 "1zxd6hxwhxqrm876wsn9bfajbfc4hc6l9ivzj5rjg80hzv71ch99"))
1380 (modules '((guix build utils)))
1383 (delete-file-recursively "lib/zlib")
1385 (build-system gnu-build-system)
1386 (outputs (list "out" "python"))
1389 (list (string-append "--docdir=" (assoc-ref %outputs "out")
1390 "/share/doc/" ,name "-" ,version)
1392 ;; XXX: Disable Python support when cross-compiling because
1393 ;; 'configure' tries to run 'python', which fails.
1394 ,(if (%current-target-system)
1396 "--enable-python") ; for plug-ins written in ~
1398 "--with-logpath=/var/log/sudo.log"
1399 "--with-rundir=/var/run/sudo" ; must be cleaned up at boot time
1400 "--with-vardir=/var/db/sudo"
1401 "--with-iologdir=/var/log/sudo-io"
1403 ;; 'visudo.c' expects _PATH_MV to be defined, but glibc doesn't
1405 (string-append "CPPFLAGS=-D_PATH_MV='\""
1406 (assoc-ref %build-inputs "coreutils")
1409 ;; Avoid non-determinism; see <http://bugs.gnu.org/21918>.
1410 #:parallel-build? #f
1413 (modify-phases %standard-phases
1414 (add-before 'configure 'pre-configure
1416 (substitute* "src/sudo_usage.h.in"
1417 ;; Do not capture 'configure' arguments since we would
1418 ;; unduly retain references, and also because the
1419 ;; CPPFLAGS above would close the string literal
1421 (("@CONFIGURE_ARGS@") "\"\""))
1422 (substitute* (find-files "." "Makefile\\.in")
1423 ;; Allow installation as non-root.
1424 (("-o [[:graph:]]+ -g [[:graph:]]+")
1426 ;; Don't try to create /etc/sudoers.
1427 (("^install: (.*)install-sudoers(.*)" _ before after)
1428 (string-append "install: " before after "\n"))
1429 ;; Don't try to create /run/sudo.
1430 (("\\$\\(DESTDIR\\)\\$\\(rundir\\)")
1432 ;; Install example sudo{,_logsrvd}.conf to the right place.
1433 (("\\$\\(DESTDIR\\)\\$\\(sysconfdir\\)")
1434 "$(DESTDIR)/$(docdir)/examples")
1435 ;; Don't try to create /var/db/sudo.
1436 (("\\$\\(DESTDIR\\)\\$\\(vardir\\)")
1439 ;; ‘Checking existing [/etc/]sudoers file for syntax errors’ is
1440 ;; not the task of the build system, and fails.
1441 (substitute* "plugins/sudoers/Makefile.in"
1442 (("^pre-install:" match)
1443 (string-append match "\ndisabled-" match)))
1445 (add-after 'install 'separate-python-output
1446 (lambda* (#:key target outputs #:allow-other-keys)
1447 (let ((out (assoc-ref outputs "out"))
1448 (out:python (assoc-ref outputs "python")))
1450 (mkdir-p (string-append out:python "/empty"))
1453 (let ((old (string-append out "/" file))
1454 (new (string-append out:python "/" file)))
1455 (mkdir-p (dirname new))
1456 (rename-file old new)))
1457 (list "libexec/sudo/python_plugin.so"
1458 "libexec/sudo/python_plugin.la")))
1461 ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
1462 ;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
1465 `(("groff" ,groff)))
1467 `(("coreutils" ,coreutils)
1468 ("linux-pam" ,linux-pam)
1469 ,@(if (%current-target-system)
1471 `(("python" ,python)))
1473 (home-page "https://www.sudo.ws/")
1474 (synopsis "Run commands as root")
1476 "Sudo (su \"do\") allows a system administrator to delegate authority to
1477 give certain users (or groups of users) the ability to run some (or all)
1478 commands as root or another user while providing an audit trail of the
1479 commands and their arguments.")
1481 ;; See <http://www.sudo.ws/sudo/license.html>.
1482 (license license:x11)))
1484 (define-public opendoas
1491 (url "https://github.com/Duncaen/OpenDoas")
1492 (commit (string-append "v" version))))
1493 (file-name (git-file-name name version))
1496 "07kkc5729p654jrgfsc8zyhiwicgmq38yacmwfvay2b3gmy728zn"))))
1497 (build-system gnu-build-system)
1500 (modify-phases %standard-phases
1502 ;; The configure script doesn't accept most of the default flags.
1503 (lambda* (#:key configure-flags #:allow-other-keys)
1504 ;; The configure script can only be told which compiler to use
1505 ;; through environment variables.
1506 (setenv "CC" ,(cc-for-target))
1507 (apply invoke "./configure" configure-flags)))
1508 (add-before 'install 'fix-makefile
1509 (lambda* (#:key outputs #:allow-other-keys)
1510 (substitute* "bsd.prog.mk"
1511 (("^\tchown.*$") ""))
1514 (list (string-append "--prefix=" (assoc-ref %outputs "out"))
1515 ;; Nothing is done with this value (yet?) but it's supported.
1516 ;; (string-append "--target=" (or ,(%current-target-system) ""))
1518 ;; Compiler choice is not carried over from the configure script.
1520 (list (string-append "CC=" ,(cc-for-target)))
1521 #:tests? #f)) ; no test suite
1523 `(("bison" ,bison)))
1524 (home-page "https://github.com/Duncaen/OpenDoas")
1525 (synopsis "Portable version of OpenBSD's doas command")
1526 (description "Doas is a minimal replacement for the venerable sudo. It was
1527 initially written by Ted Unangst of the OpenBSD project to provide 95% of the
1528 features of sudo with a fraction of the codebase.")
1529 (license (list license:bsd-3 ; libbsd/*
1530 license:isc)))) ; everything else
1532 (define-public wpa-supplicant-minimal
1534 (name "wpa-supplicant-minimal")
1539 "https://w1.fi/releases/wpa_supplicant-"
1543 "05qzak1mssnxcgdrafifxh9w86a4ha69qabkg4bsigk499xyxggw"))
1544 (modules '((guix build utils)))
1547 (substitute* "wpa_supplicant/defconfig"
1548 ;; Disable D-Bus to save ~14MiB on the closure size.
1549 (("^CONFIG_CTRL_IFACE_DBUS" line _)
1550 (string-append "#" line)))
1552 (build-system gnu-build-system)
1555 (modify-phases %standard-phases
1557 (lambda* (#:key outputs #:allow-other-keys)
1558 (chdir "wpa_supplicant")
1559 (copy-file "defconfig" ".config")
1560 (let ((port (open-file ".config" "al")))
1562 CONFIG_DEBUG_SYSLOG=y
1566 CONFIG_DRIVER_NL80211=y
1567 CFLAGS += $(shell pkg-config libnl-3.0 --cflags)
1569 CONFIG_READLINE=y\n" port)
1572 (add-after 'install 'install-documentation
1573 (lambda* (#:key outputs #:allow-other-keys)
1574 (let* ((out (assoc-ref outputs "out"))
1575 (doc (string-append out "/share/doc/wpa-supplicant"))
1576 (man (string-append out "/share/man"))
1577 (man5 (string-append man "/man5"))
1578 (man8 (string-append man "/man8")))
1579 (define (copy-man-page target)
1581 (install-file file target)))
1583 (mkdir-p man5) (mkdir man8)
1584 (for-each (copy-man-page man5)
1585 (find-files "doc/docbook" "\\.5"))
1586 (for-each (copy-man-page man8)
1587 (find-files "doc/docbook" "\\.8"))
1589 ;; wpa_supplicant.conf(5) does not explain all configuration
1590 ;; options but refers to the example config file, so install it
1591 ;; along with READMEs.
1592 (for-each (lambda (file)
1593 (install-file file doc))
1594 '("README" "README-DPP" "README-HS20"
1595 "README-P2P" "README-WPS"
1596 "wpa_supplicant.conf"))
1599 #:make-flags (list "CC=gcc"
1600 (string-append "BINDIR=" (assoc-ref %outputs "out")
1602 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1606 `(("readline" ,readline)
1608 ("openssl" ,openssl)))
1610 `(("pkg-config" ,pkg-config)))
1611 (home-page "https://w1.fi/wpa_supplicant/")
1612 (synopsis "Connecting to WPA and WPA2-protected wireless networks")
1614 "wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
1615 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in
1616 the client stations. It implements key negotiation with a WPA Authenticator
1617 and it controls the roaming and IEEE 802.11 authentication/association of the
1620 This package provides the @code{wpa_supplicant} daemon and the @code{wpa_cli}
1623 ;; In practice, this is linked against Readline, which makes it GPLv3+.
1624 (license license:bsd-3)
1626 (properties `((cpe-name . "wpa_supplicant")))))
1628 (define-public wpa-supplicant
1629 (package (inherit wpa-supplicant-minimal)
1630 (name "wpa-supplicant")
1631 (inputs `(("dbus" ,dbus)
1632 ,@(package-inputs wpa-supplicant-minimal)))
1634 (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
1636 `(modify-phases ,phases
1637 (add-after 'configure 'configure-for-dbus
1639 (let ((port (open-file ".config" "al")))
1641 CONFIG_CTRL_IFACE_DBUS_NEW=y
1642 CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
1645 (add-after 'install-documentation 'install-dbus-conf
1646 (lambda* (#:key outputs #:allow-other-keys)
1647 (let* ((out (assoc-ref outputs "out"))
1648 (dir (string-append out "/etc/dbus-1/system.d")))
1650 (copy-file "dbus/dbus-wpa_supplicant.conf"
1651 (string-append dir "/wpa_supplicant.conf")))
1654 (define-public wpa-supplicant-gui
1656 (inherit wpa-supplicant)
1657 (name "wpa-supplicant-gui")
1658 (inputs `(("qtbase" ,qtbase)
1660 ,@(package-inputs wpa-supplicant)))
1663 `(("imagemagick" ,imagemagick)
1664 ("inkscape" ,inkscape)
1665 ,@(package-native-inputs wpa-supplicant)))
1667 `(#:phases (modify-phases %standard-phases
1668 (add-after 'unpack 'chdir
1670 (chdir "wpa_supplicant/wpa_gui-qt4")
1675 (invoke "qmake" "wpa_gui.pro")
1676 (invoke "make" "-j" (number->string (parallel-job-count)))
1677 (invoke "make" "-C" "icons")))
1679 (lambda* (#:key inputs outputs #:allow-other-keys)
1680 (let ((out (assoc-ref outputs "out"))
1681 (qt '("qtbase" "qtsvg")))
1682 (install-file "wpa_gui" (string-append out "/bin"))
1683 (install-file "wpa_gui.desktop"
1684 (string-append out "/share/applications"))
1685 (copy-recursively "icons/hicolor"
1686 (string-append out "/share/icons/hicolor"))
1687 (wrap-program (string-append out "/bin/wpa_gui")
1688 `("QT_PLUGIN_PATH" ":" prefix
1689 ,(map (lambda (label)
1690 (string-append (assoc-ref inputs label)
1691 "/lib/qt5/plugins/"))
1694 (synopsis "Graphical user interface for WPA supplicant")))
1696 (define-public hostapd
1702 (uri (string-append "https://w1.fi/releases/hostapd-" version
1706 "1mrbvg4v7vm7mknf0n29mf88k3s4a4qj6r4d51wq8hmjj1m7s7c8"))))
1707 (build-system gnu-build-system)
1710 (modify-phases %standard-phases
1712 (lambda* (#:key outputs #:allow-other-keys)
1713 ;; This is mostly copied from 'wpa-supplicant' above.
1715 (copy-file "defconfig" ".config")
1716 (let ((port (open-file ".config" "al")))
1721 CONFIG_IEEE80211AC=y\n" port)
1724 (add-after 'install 'install-man-pages
1725 (lambda* (#:key outputs #:allow-other-keys)
1726 (let* ((out (assoc-ref outputs "out"))
1727 (man (string-append out "/share/man"))
1728 (man1 (string-append man "/man1"))
1729 (man8 (string-append man "/man8")))
1730 (define (copy-man-page target)
1732 (install-file file target)))
1734 (for-each (copy-man-page man1)
1735 (find-files "." "\\.1"))
1736 (for-each (copy-man-page man8)
1737 (find-files "." "\\.8"))
1740 #:make-flags (list "CC=gcc"
1741 (string-append "BINDIR=" (assoc-ref %outputs "out")
1743 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1746 (native-inputs `(("pkg-config" ,pkg-config)))
1748 ;; There's an optional dependency on SQLite.
1749 (inputs `(("openssl" ,openssl)
1751 (home-page "https://w1.fi/hostapd/")
1752 (synopsis "Daemon for Wi-Fi access points and authentication servers")
1754 "hostapd is a user-space daemon for WiFi access points and authentication
1755 servers. It implements IEEE 802.11 access point management, IEEE
1756 802.1X/WPA/WPA2/EAP Authenticators, RADIUS client, EAP server, and RADIUS
1757 authentication server.")
1759 ;; Same license as wpa_supplicant.
1760 (license license:bsd-3)))
1762 (define-public wakelan
1769 "ftp://ftp.gwdg.de/pub/linux/metalab/system/network/misc/wakelan-"
1773 "0vydqpf44146ir6k87gmqaq6xy66xhc1gkr3nsd7jj3nhy7ypx9x"))))
1774 (build-system gnu-build-system)
1777 (modify-phases %standard-phases
1779 (lambda* (#:key outputs #:allow-other-keys)
1780 (let ((out (assoc-ref outputs "out")))
1781 (mkdir-p (string-append out "/bin"))
1782 (mkdir-p (string-append out "/share/man/man1"))
1784 ;; It's an old configure script that doesn't understand
1785 ;; the extra options we pass.
1786 (setenv "CONFIG_SHELL" (which "bash"))
1787 (invoke "./configure"
1788 (string-append "--prefix=" out)
1789 (string-append "--mandir=" out
1792 (home-page "https://www.kernel.org") ; really, no home page
1793 (synopsis "Send a wake-on-LAN packet")
1795 "WakeLan broadcasts a properly formatted UDP packet across the local area
1796 network, which causes enabled computers to power on.")
1797 (license license:gpl2+)))
1799 (define-public dmidecode
1806 "mirror://savannah/dmidecode/dmidecode-"
1810 "1pcfhcgs2ifdjwp7amnsr3lq95pgxpr150bjhdinvl505px0cw07"))))
1811 (build-system gnu-build-system)
1813 '(#:phases (modify-phases %standard-phases (delete 'configure))
1814 #:tests? #f ; no 'check' target
1815 #:make-flags (list (string-append "prefix="
1816 (assoc-ref %outputs "out")))))
1817 (home-page "https://www.nongnu.org/dmidecode/")
1818 (synopsis "Read hardware information from the BIOS")
1820 "Dmidecode reports information about your system's hardware as described
1821 in your system BIOS according to the SMBIOS/DMI standard. This typically
1822 includes system manufacturer, model name, serial number, BIOS version, asset
1823 tag as well as a lot of other details of varying level of interest and
1824 reliability depending on the manufacturer. This will often include usage
1825 status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory
1826 module slots, and the list of I/O ports (e.g. serial, parallel, USB).")
1827 (license license:gpl2+)))
1829 (define-public acpica
1832 (version "20200528")
1836 "https://acpica.org/sites/acpica/files/acpica-unix2-"
1840 "01ajxnz9dpnvdbib7yv20dw21a1yyfgwiw3whg0xi57cf4app2md"))))
1841 (build-system gnu-build-system)
1842 (native-inputs `(("flex" ,flex)
1845 '(#:make-flags (list (string-append "PREFIX=" %output)
1848 "OPT_CFLAGS=-Wall -fno-strict-aliasing")
1849 #:tests? #f ; no 'check' target
1850 #:phases (modify-phases %standard-phases (delete 'configure))))
1851 (home-page "https://acpica.org/")
1852 (synopsis "Tools for the development and debugging of ACPI tables")
1854 "The @acronym{ACPICA, ACPI Component Architecture} project provides an
1855 OS-independent reference implementation of the @acronym{ACPI, Advanced
1856 Configuration and Power Interface} specification. ACPICA code contains those
1857 portions of ACPI meant to be directly integrated into the host OS as a
1858 kernel-resident subsystem, and a small set of tools to assist in developing and
1859 debugging ACPI tables.
1861 This package contains only the user-space tools needed for ACPI table
1862 development, not the kernel implementation of ACPI.")
1863 (license license:gpl2))) ; dual GPLv2/ACPICA Licence
1865 (define-public s-tui
1872 (uri (pypi-uri "s-tui" version))
1874 (base32 "1gqrb2xxii43j7kszy7kvv4f6hr8ac4p0m9q8i1xs5fhsqcx186i"))))
1875 (build-system python-build-system)
1877 `(("python-psutil" ,python-psutil)
1878 ("python-urwid" ,python-urwid)))
1879 (home-page "https://github.com/amanusk/s-tui")
1880 (synopsis "Interactive terminal stress test and monitoring tool")
1882 "The Stress Terminal UI displays graphs of the CPU frequency,
1883 utilization, temperature and power.")
1884 (license license:gpl2+)))
1886 (define-public stress
1892 (uri (string-append "mirror://debian/pool/main/s/stress/stress_"
1893 version ".orig.tar.gz"))
1896 "0nw210jajk38m3y7h8s130ps2qsbz7j75wab07hi2r3hlz14yzh5"))))
1897 (build-system gnu-build-system)
1898 (home-page "https://packages.debian.org/sid/stress")
1899 (synopsis "Impose load on and stress test a computer system")
1901 "Stress is a tool that imposes a configurable amount of CPU, memory, I/O,
1902 or disk stress on a POSIX-compliant operating system and reports any errors it
1905 Stress is not a benchmark. It is a tool used by system administrators to
1906 evaluate how well their systems will scale, by kernel programmers to evaluate
1907 perceived performance characteristics, and by systems programmers to expose
1908 the classes of bugs which only or more frequently manifest themselves when the
1909 system is under heavy load.")
1910 (license license:gpl2+)))
1912 (define-public detox
1919 (url "https://github.com/dharple/detox")
1920 (commit (string-append "v" version))))
1921 (file-name (git-file-name name version))
1924 "1dd608c7g65s5lj02cddvani3q9kzirddgkjqa22ap9d4f8b9xgr"))))
1925 (build-system gnu-build-system)
1927 `(("autoconf" ,autoconf)
1928 ("automake" ,automake)
1931 `(#:tests? #f ;no 'check' target
1932 #:phases (modify-phases %standard-phases
1933 (add-after 'unpack 'delete-configure
1934 ;; The "configure" script is present, but otherwise the
1935 ;; project is not bootstrapped: missing install-sh and
1936 ;; Makefile.in, so delete it so the bootstrap phase will
1938 (lambda _ (delete-file "configure") #t)))))
1939 (home-page "https://github.com/dharple/detox")
1940 (synopsis "Clean up file names")
1942 "Detox is a program that renames files to make them easier to work with
1943 under Unix and related operating systems. Spaces and various other unsafe
1944 characters (such as \"$\") get replaced with \"_\". ISO 8859-1 (Latin-1)
1945 characters can be replaced as well, as can UTF-8 characters.")
1946 (license license:bsd-3)))
1948 (define-public testdisk
1954 (uri (string-append "https://www.cgsecurity.org/testdisk-"
1955 version ".tar.bz2"))
1958 "1zlh44w67py416hkvw6nrfmjickc2d43v51vcli5p374d5sw84ql"))))
1959 (build-system gnu-build-system)
1961 `(("ntfs-3g" ,ntfs-3g)
1962 ("util-linux" ,util-linux "lib")
1963 ("openssl" ,openssl)
1964 ;; FIXME: add reiserfs.
1966 ("e2fsprogs" ,e2fsprogs)
1967 ("libjpeg" ,libjpeg-turbo)
1968 ("ncurses" ,ncurses)))
1969 (home-page "https://www.cgsecurity.org/wiki/TestDisk")
1970 (synopsis "Data recovery tool")
1972 "TestDisk is a program for data recovery, primarily designed to help
1973 recover lost partitions and/or make non-booting disks bootable again.")
1974 (license license:gpl2+)))
1983 "http://mama.indstate.edu/users/ice/tree/src/tree-"
1986 (base32 "1hmpz6k0mr6salv0nprvm1g0rdjva1kx03bdf1scw8a38d5mspbi"))))
1987 (build-system gnu-build-system)
1989 '(#:phases (modify-phases %standard-phases (delete 'configure))
1990 #:tests? #f ; no check target
1991 #:make-flags (let ((out (assoc-ref %outputs "out")))
1992 (list (string-append "prefix=" out)))))
1993 (synopsis "Recursively list the contents of a directory")
1995 "Tree is a recursive directory listing command that produces a depth
1996 indented listing of files, which is colorized ala dircolors if the LS_COLORS
1997 environment variable is set and output is to tty.")
1998 (home-page "http://mama.indstate.edu/users/ice/tree/")
1999 (license license:gpl2+)))
2001 (define-public direvent
2007 (uri (string-append "mirror://gnu/direvent/direvent-"
2011 "0m9vi01b1km0cpknflyzsjnknbava0s1n6393b2bpjwyvb6j5613"))
2012 (modules '((guix build utils)))
2014 (substitute* "tests/testsuite"
2015 (("#![[:blank:]]?/bin/sh")
2018 (build-system gnu-build-system)
2021 (modify-phases %standard-phases
2022 (add-before 'build 'patch-/bin/sh
2023 (lambda* (#:key inputs #:allow-other-keys)
2024 ;; Use the right shell when executing the watcher and
2025 ;; user-provided shell commands.
2026 (let ((bash (assoc-ref inputs "bash")))
2027 (substitute* '("src/direvent.c" "src/progman.c")
2029 (string-append "\"" bash "/bin/sh\"")))
2031 ;; Adjust the 'shell.at' test accordingly.
2032 (substitute* "tests/testsuite"
2034 (string-append "SHELL=" bash "/bin/sh")))
2037 (home-page "https://www.gnu.org.ua/software/direvent/")
2038 (synopsis "Daemon to monitor directories for events such as file removal")
2040 "A daemon that monitors directories for events, such as creating,
2041 deleting or modifying files. It can monitor different sets of directories for
2042 different events. When an event is detected, direvent calls a specified
2043 external program with information about the event, such as the location
2044 within the file system where it occurred. Thus, \"direvent\" provides an
2045 easy way to react immediately if given files undergo changes, for example, to
2046 track changes in important system configuration files.")
2047 (license license:gpl3+)))
2049 (define-public libcap-ng
2056 "https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-"
2060 "1gzzy12agfa9ddipdf72h9y68zqqnvsjjylv4vnq6hj4w2safk58"))))
2061 (build-system gnu-build-system)
2064 (list "--without-python")))
2065 (home-page "https://people.redhat.com/sgrubb/libcap-ng/")
2066 (synopsis "Library for more easily working with POSIX capabilities")
2068 "The libcap-ng library is intended to make programming with POSIX
2069 capabilities easier than the traditional libcap library. It includes
2070 utilities that can analyse all currently running applications and print out
2071 any capabilities and whether or not it has an open ended bounding set. The
2072 included utilities are designed to let admins and developers spot apps from
2073 various ways that may be running with too much privilege.")
2074 ;; The library is lgpl2.1+, but also ships some utils which are gpl2+.
2075 (license (list license:lgpl2.1+ license:gpl2+))))
2077 (define-public smartmontools
2079 (name "smartmontools")
2084 "mirror://sourceforge/smartmontools/smartmontools/"
2085 version "/smartmontools-" version ".tar.gz"))
2088 "0imqb7ka4ia5573w8rnpck571pjjc9698pdjcapy9cfyk4n4swrz"))))
2089 (build-system gnu-build-system)
2090 (inputs `(("libcap-ng" ,libcap-ng)))
2091 (home-page "https://www.smartmontools.org/")
2092 (synopsis "S.M.A.R.T. harddisk control and monitoring tools")
2094 "The smartmontools package contains utility programs to control and
2095 monitor storage systems using the Self-Monitoring, Analysis and Reporting
2096 Technology System (@dfn{S.M.A.R.T.}) built into most modern ATA and SCSI hard
2097 disks. In many cases, these utilities will provide advanced warning of disk
2098 degradation and failure.")
2099 (license license:gpl2+)))
2101 (define-public fdupes
2109 (url "https://github.com/adrianlopezroche/fdupes")
2110 (commit (string-append "v" version))))
2111 (file-name (git-file-name name version))
2113 (base32 "19b6vqblddaw8ccw4sn0qsqzbswlhrz8ia6n4m3hymvcxn8skpz9"))))
2114 (build-system gnu-build-system)
2116 '(#:phases (modify-phases %standard-phases
2117 (delete 'configure))
2118 #:tests? #f ; no 'check' target
2119 #:make-flags (list "CC=gcc"
2120 (string-append "PREFIX="
2121 (assoc-ref %outputs "out")))))
2122 (home-page "https://github.com/adrianlopezroche/fdupes")
2123 (synopsis "Identify duplicate files")
2125 "fdupes is a program for identifying duplicate files residing within
2126 specified directories.")
2127 (license license:expat)))
2129 (define-public graphios
2136 (uri (pypi-uri "graphios" version))
2139 "1h87hvc315wg6lklbf4l7csd3n5pgljwrfli1p3nasdi0izgn66i"))))
2140 (build-system python-build-system)
2142 ;; Be warned: Building with Python 3 succeeds, but the build process
2143 ;; throws a syntax error that is ignored.
2144 `(#:python ,python-2
2146 (modify-phases %standard-phases
2147 (add-before 'build 'fix-setup.py
2148 (lambda* (#:key outputs #:allow-other-keys)
2149 ;; Fix hardcoded, unprefixed file names.
2150 (let ((out (assoc-ref outputs "out")))
2151 (substitute* '("setup.py")
2152 (("/etc") (string-append out "/etc"))
2154 (("distro_ver = .*") "distro_ver = ''"))
2156 (home-page "https://github.com/shawn-sterling/graphios")
2157 (synopsis "Emit Nagios metrics to Graphite, Statsd, and Librato")
2159 "Graphios is a script to emit nagios perfdata to various upstream metrics
2160 processing and time-series systems. It's currently compatible with Graphite,
2161 Statsd, Librato and InfluxDB. Graphios can emit Nagios metrics to any number
2162 of supported upstream metrics systems simultaneously.")
2163 (license license:gpl2+)))
2165 (define-public ansible
2172 (uri (pypi-uri "ansible" version))
2174 (base32 "1kfaxd7w8qiis2vv96kgrhiqh158qb0z4lspr9c8fsdi5m1z2rh8"))))
2175 (build-system python-build-system)
2177 `(("python-bcrypt" ,python-bcrypt)
2178 ("python-pynacl" ,python-pynacl)
2179 ("python-httplib2" ,python-httplib2)
2180 ("python-passlib" ,python-passlib)
2181 ("python-nose" ,python-nose)
2182 ("python-mock" ,python-mock)
2183 ("python-jinja2" ,python-jinja2)
2184 ("python-pyyaml" ,python-pyyaml)
2185 ("python-paramiko" ,python-paramiko)))
2187 `(("python-cryptography" ,python-cryptography)
2188 ("python-jinja2" ,python-jinja2)
2189 ("python-pyyaml" ,python-pyyaml)
2190 ("python-paramiko" ,python-paramiko)))
2193 (modify-phases %standard-phases
2194 ;; Several ansible commands (ansible-config, ansible-console, etc.)
2195 ;; are just symlinks to a single ansible executable. The ansible
2196 ;; executable behaves differently based on the value of
2197 ;; sys.argv[0]. This does not work well with our wrap phase, and
2198 ;; therefore the following two phases are required as a workaround.
2199 (add-after 'unpack 'hide-wrapping
2201 ;; Overwrite sys.argv[0] to hide the wrapper script from it.
2202 (substitute* "bin/ansible"
2203 (("import traceback" all)
2204 (string-append all "
2206 sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
2209 (add-after 'install 'replace-symlinks
2210 (lambda* (#:key outputs #:allow-other-keys)
2211 ;; Replace symlinks with duplicate copies of the ansible
2213 (let ((out (assoc-ref outputs "out")))
2215 (lambda (subprogram)
2216 (delete-file (string-append out "/bin/ansible-" subprogram))
2217 (copy-file (string-append out "/bin/ansible")
2218 (string-append out "/bin/ansible-" subprogram)))
2219 (list "config" "console" "doc" "galaxy"
2220 "inventory" "playbook" "pull" "vault")))
2222 (home-page "https://www.ansible.com/")
2223 (synopsis "Radically simple IT automation")
2224 (description "Ansible is a radically simple IT automation system. It
2225 handles configuration management, application deployment, cloud provisioning,
2226 ad hoc task execution, and multinode orchestration---including trivializing
2227 things like zero-downtime rolling updates with load balancers.")
2228 (license license:gpl3+)))
2230 (define-public debops
2238 (url "https://github.com/debops/debops")
2239 (commit (string-append "v" version))))
2240 (file-name (git-file-name name version))
2242 (base32 "052b2dykdn35pdpn9s4prawl6nl6yzih8nyf54hpvhpisvjrm1v5"))
2244 (search-patches "debops-constants-for-external-program-names.patch"
2245 "debops-debops-defaults-fall-back-to-less.patch"))))
2246 (build-system python-build-system)
2250 `(("ansible" ,ansible)
2253 ("util-linux" ,util-linux) ;; for umount
2254 ("findutils" ,findutils)
2258 `(("python-future" ,python-future)
2259 ("python-distro" ,python-distro)))
2263 (modify-phases %standard-phases
2264 (add-after 'unpack 'nuke-debops-update
2266 (chmod "bin/debops-update" #o755) ; FIXME work-around git-fetch issue
2267 (with-output-to-file "bin/debops-update"
2269 (format #t "#!/bin/sh
2270 echo 'debops is installed via guix. guix-update is useless in this case.
2271 Please use `guix package -u debops` instead.'")))
2273 ;; patch shebangs only in actuall scripts, not in files included in
2274 ;; roles (which are to be delivered to the targte systems)
2275 (delete `patch-generated-file-shebangs)
2276 (replace 'patch-source-shebangs
2278 (for-each patch-shebang
2281 ;; Filter out symlinks.
2282 (eq? 'regular (stat:type stat)))
2284 (add-after 'unpack 'fix-paths
2286 (define (substitute-program-names file)
2287 ;; e.g. ANSIBLE_PLAYBOOK = '/gnu/store/…/bin/ansible-playbook'
2290 (let ((varname (string-upcase
2292 (lambda (c) (if (char=? c #\-) #\_ c))
2295 (((string-append "^(" varname " = )'.*'") line prefix)
2296 (string-append prefix "'" (which name) "'")))))
2297 '("ansible-playbook" "encfs" "find" "fusermount"
2298 "umount" "gpg" "ansible" "which")))
2299 (for-each substitute-program-names
2301 "bin/debops-padlock"
2303 "debops/__init__.py"
2304 "debops/cmds/__init__.py"))
2306 (home-page "https://www.debops.org/")
2307 (synopsis "Collection of general-purpose Ansible roles")
2308 (description "The Ansible roles provided by that can be used to manage
2309 Debian or Ubuntu hosts. In addition, a default set of Ansible playbooks can
2310 be used to apply the provided roles in a controlled way, using Ansible
2313 The roles are written with a high customization in mind, which can be done
2314 using Ansible inventory. This way the role and playbook code can be shared
2315 between multiple environments, with different configuration in to each one.
2317 Services can be managed on a single host, or spread between multiple hosts.
2318 DebOps provides support for different SQL and NoSQL databases, web servers,
2319 programming languages and specialized applications useful in a data center
2320 environment or in a cluster. The project can also be used to deploy
2321 virtualization environments using KVM/libvirt, Docker or LXC technologies to
2322 manage virtual machines and/or containers.")
2323 (license license:gpl3+)))
2325 (define-public emacs-ansible-doc
2326 (let ((commit "86083a7bb2ed0468ca64e52076b06441a2f8e9e0"))
2328 (name "emacs-ansible-doc")
2329 (version (git-version "0.4" "1" commit))
2334 (url "https://github.com/lunaryorn/ansible-doc.el")
2336 (file-name (git-file-name name version))
2339 "0lap404ch74w99n3xip176jr42b38xhyzkfnkyqg0g3wk2cd3aq8"))))
2340 (build-system emacs-build-system)
2341 ;; Unmaintained by upstream.
2342 (home-page "https://github.com/lunaryorn/ansible-doc.el")
2343 (synopsis "Ansible documentation for Emacs")
2345 "This package provides an Ansible documentation for GNU Emacs.
2347 @code{ansible-doc} allows you to view the documentation of an Ansible
2348 module and @code{ansible-doc-mode} minor mode adds documentation
2349 lookup to YAML Mode. You could enable the mode with @code{(add-hook
2350 'yaml-mode-hook #'ansible-doc-mode)}.")
2351 (license license:gpl3+))))
2353 (define-public cpulimit
2361 (url "https://github.com/opsengine/cpulimit")
2362 (commit (string-append "v" version))))
2363 (file-name (git-file-name name version))
2365 (base32 "1dz045yhcsw1rdamzpz4bk8mw888in7fyqk1q1b3m1yk4pd1ahkh"))))
2366 (build-system gnu-build-system)
2368 `(#:phases (modify-phases %standard-phases
2372 (invoke "make" "CC=gcc" "-Csrc")))
2375 (invoke "make" "CC=gcc" "-Ctests")))
2377 (lambda* (#:key outputs #:allow-other-keys)
2378 (let* ((out (assoc-ref outputs "out"))
2379 (bin (string-append out "/bin")))
2380 (install-file "src/cpulimit" bin))
2382 (home-page "https://github.com/opsengine/cpulimit")
2383 (synopsis "Limit CPU usage")
2385 "Cpulimit limits the CPU usage of a process. It does not change the nice
2386 value or other scheduling priority settings, but the real CPU usage, and is
2387 able to adapt itself dynamically to the overall system load. Children
2388 processes and threads of the specified process may optionally share the same
2390 (license license:gpl2+)))
2392 (define-public autojump
2400 (url "https://github.com/wting/autojump")
2401 (commit (string-append "release-v" version))))
2402 (file-name (git-file-name name version))
2404 (base32 "1rgpsh70manr2dydna9da4x7p8ahii7dgdgwir5fka340n1wrcws"))))
2405 (build-system gnu-build-system)
2406 (native-inputs ; for tests
2407 `(("python-mock" ,python-mock)
2408 ("python-pytest" ,python-pytest)))
2410 `(("python" ,python-wrapper)))
2413 (modify-phases %standard-phases
2414 (add-after 'unpack 'make-git-checkout-writable
2415 ;; ‘install.py’ modifies files before installing them.
2417 (for-each make-file-writable (find-files "."))
2423 (invoke "python" "tests/unit/autojump_utils_test.py")))
2425 (lambda* (#:key outputs #:allow-other-keys)
2426 (setenv "SHELL" (which "bash"))
2427 (invoke "python" "install.py"
2428 (string-append "--destdir="
2429 (assoc-ref outputs "out"))))))))
2430 (home-page "https://github.com/wting/autojump")
2431 (synopsis "Shell extension for file system navigation")
2433 "Autojump provides a faster way to navigate your file system, with a \"cd
2434 command that learns\". It works by maintaining a database of the directories
2435 you use the most from the command line and allows you to \"jump\" to
2436 frequently used directories by typing only a small pattern.")
2437 (license license:gpl3+)))
2446 (url "https://github.com/clvv/fasd")
2448 (file-name (git-file-name name version))
2451 "1awi71jdv3mhjrmar2d4z1i90kn7apd7aq1w31sh6w4yibz9kiyj"))))
2452 (build-system gnu-build-system)
2454 `(#:phases (modify-phases %standard-phases
2455 (delete 'configure)) ;no configuration
2456 #:tests? #f ;no tests
2457 #:make-flags (list (string-append "PREFIX=" %output))))
2458 (home-page "https://github.com/clvv/fasd")
2459 (synopsis "Quick access to files and directories for shells")
2461 "Fasd (pronounced similar to \"fast\") is a command-line productivity
2462 booster. Fasd offers quick access to files and directories for POSIX shells.
2463 It is inspired by tools like autojump, z, and v. Fasd keeps track of files
2464 and directories you have accessed so that you can quickly reference them in
2466 (license license:x11)))
2468 (define-public iftop
2474 (uri (string-append "http://www.ex-parrot.com/~pdw/iftop/download"
2475 "/iftop-" version ".tar.gz"))
2478 "15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp"))))
2479 (build-system gnu-build-system)
2481 `(("libpcap" ,libpcap)
2482 ("ncurses" ,ncurses)))
2483 (synopsis "Monitor network usage")
2484 (description "Iftop does for network usage what @command{top} does
2485 for CPU usage. It listens to network traffic on a named interface and
2486 displays a table of current bandwidth usage by pairs of hosts.")
2487 (home-page "http://www.ex-parrot.com/~pdw/iftop/")
2488 (license license:gpl2+)))
2490 (define-public munge
2496 (uri (string-append "https://github.com/dun/munge/releases/"
2497 "download/munge-" version "/munge-"
2501 "0h06sghb4rqvv1ywyd6mzsmbcgh712v6ygrff0gzm440y4ca41k6"))
2502 (modules '((guix build utils)))
2505 ;; Don't insist on write access to /var.
2506 (substitute* "src/etc/Makefile.in"
2507 (("\\$\\(INSTALL\\)(.*)localstatedir" _ middle)
2508 (string-append "-$(INSTALL)" middle "localstatedir"))
2509 (("\\$\\(MKDIR_P\\) .*(local|run)statedir.*")
2513 `(("openssl" ,openssl)
2514 ("libgcrypt" ,libgcrypt)))
2515 (build-system gnu-build-system)
2518 (list "--localstatedir=/var"
2519 (string-append "--with-pkgconfigdir="
2520 (assoc-ref %outputs "out") "/lib/pkgconfig"))
2522 (modify-phases %standard-phases
2523 ;; XXX Many test series fail. Some might be fixable, others do no-no
2524 ;; things like invoking ‘sudo’.
2525 (add-after 'unpack 'skip-failing-tests
2527 (for-each (lambda (test)
2528 (substitute* "t/Makefile.in"
2529 (((string-append test "\\.t ")) "")))
2530 (list "0100-munged-lock"
2532 "0011-munged-cmdline"
2533 "0012-munge-cmdline"
2534 "0013-unmunge-cmdline"
2535 "0101-munged-security-socket"
2536 "0102-munged-security-keyfile"
2537 "0103-munged-security-logfile"
2538 "0110-munged-origin-addr"))
2540 (home-page "https://dun.github.io/munge/")
2541 (synopsis "Cluster computing authentication service")
2543 "Munge is an authentication service for creating and validating
2544 credentials. It allows a process to authenticate the UID and GID of another
2545 local or remote process within a group of hosts having common users and
2546 groups. These hosts form a security realm that is defined by a shared
2547 cryptographic key. Clients within this security realm can create and validate
2548 credentials without the use of root privileges, reserved ports, or
2549 platform-specific methods.")
2550 (license license:gpl3+)))
2552 (define-public audit
2555 (home-page "https://people.redhat.com/sgrubb/audit/")
2559 (uri (string-append home-page "audit-" version ".tar.gz"))
2562 "1dzcwb2q78q7x41shcachn7f4aksxbxd470yk38zh03fch1l2p8f"))))
2563 (build-system gnu-build-system)
2565 `(#:configure-flags (list "--with-python=no"
2566 "--disable-static")))
2568 `(("openldap" ,openldap)
2570 ("sasl" ,cyrus-sasl)))
2571 (synopsis "User-space component to the Linux auditing system")
2573 "auditd is the user-space component to the Linux auditing system, which
2574 allows logging of system calls made by user-land processes. It's responsible
2575 for writing audit records to the disk. Viewing the logs is done with the
2576 @code{ausearch} or @code{aureport} utilities. Configuring the audit rules is
2577 done with the @code{auditctl} utility.")
2578 (license license:gpl2+)))
2586 (uri (string-append "https://nmap.org/dist/nmap-" version
2590 "1aizfys6l9f9grm82bk878w56mg0zpkfns3spzj157h98875mypw"))
2591 (modules '((guix build utils)))
2594 (for-each delete-file-recursively
2595 ;; Remove bundled lua, pcap, and pcre libraries.
2596 ;; FIXME: Remove bundled liblinear once packaged.
2600 ;; Remove pre-compiled binares.
2603 (build-system gnu-build-system)
2605 `(("openssl" ,openssl)
2606 ("libpcap" ,libpcap)
2609 ("zlib" ,zlib) ;for NSE compression support
2612 ("python" ,python-2)))
2614 ;; TODO Add zenmap output.
2615 (outputs '("out" "ndiff"))
2617 `(#:configure-flags '("--without-zenmap")
2619 (modify-phases %standard-phases
2620 (add-after 'configure 'patch-Makefile
2622 (substitute* "Makefile"
2623 ;; Do not attempt to build lua.
2624 (("build-dnet build-lua") "build-dnet"))
2627 (lambda* (#:key outputs #:allow-other-keys)
2628 (define (make out . args)
2629 (apply invoke "make"
2630 (string-append "prefix=" out)
2632 (define (python-path dir)
2633 (string-append dir "/lib/python"
2634 ,(version-major+minor
2635 (package-version python))
2637 (let ((out (assoc-ref outputs "out"))
2638 (ndiff (assoc-ref outputs "ndiff")))
2639 (for-each mkdir-p (list out ndiff))
2645 (make ndiff "install-ndiff")
2646 (wrap-program (string-append ndiff "/bin/ndiff")
2647 `("PYTHONPATH" prefix
2648 (,(python-path ndiff)))))
2650 ;; These are the tests that do not require network access.
2652 (lambda _ (invoke "make"
2656 ;; Nmap can't cope with out-of-source building.
2657 #:out-of-source? #f))
2658 (home-page "https://nmap.org/")
2659 (synopsis "Network discovery and security auditing tool")
2661 "Nmap (\"Network Mapper\") is a network discovery and security auditing
2662 tool. It is also useful for tasks such as network inventory, managing service
2663 upgrade schedules, and monitoring host or service uptime. It also provides an
2664 advanced netcat implementation (ncat), a utility for comparing scan
2665 results (ndiff), and a packet generation and response analysis tool (nping).")
2666 ;; This package uses nmap's bundled versions of libdnet and liblinear, which
2667 ;; both use a 3-clause BSD license.
2668 (license (list license:nmap license:bsd-3))))
2670 (define-public dstat
2678 (url "https://github.com/dagwieers/dstat")
2679 (commit (string-append "v" version))))
2680 (file-name (git-file-name "dstat" version))
2682 (base32 "1qnmkhqmjd1m3if05jj29dvr5hn6kayq9bkkkh881w472c0zhp8v"))
2683 (patches (search-patches "dstat-fix-crash-when-specifying-delay.patch"
2684 "dstat-skip-devices-without-io.patch"))))
2685 (build-system gnu-build-system)
2687 `(#:tests? #f ; no make check
2688 #:make-flags (let ((out (assoc-ref %outputs "out")))
2689 (list (string-append "DESTDIR=" out)
2692 (modify-phases %standard-phases
2693 (add-after 'unpack 'fix-python3-DeprecationWarning
2695 (substitute* "dstat"
2696 (("collections") "collections.abc"))
2698 (delete 'configure) ; no configure script
2699 (add-after 'install 'wrap
2700 (lambda* (#:key outputs #:allow-other-keys)
2701 (let ((out (assoc-ref outputs "out")))
2702 (wrap-program (string-append out "/bin/dstat")
2703 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2706 `(("python" ,python-wrapper)
2707 ("python-six" ,python-six)))
2708 (synopsis "Versatile resource statistics tool")
2709 (description "Dstat is a versatile replacement for @command{vmstat},
2710 @command{iostat}, @command{netstat}, and @command{ifstat}. Dstat overcomes
2711 some of their limitations and adds some extra features, more counters and
2712 flexibility. Dstat is handy for monitoring systems during performance tuning
2713 tests, benchmarks or troubleshooting.
2715 Dstat allows you to view all of your system resources in real-time, you can,
2716 e.g., compare disk utilization in combination with interrupts from your IDE
2717 controller, or compare the network bandwidth numbers directly with the disk
2718 throughput (in the same interval).")
2719 (home-page "http://dag.wiee.rs/home-made/dstat/")
2720 (license license:gpl2+)))
2722 (define-public thefuck
2730 (url "https://github.com/nvbn/thefuck")
2732 (file-name (git-file-name name version))
2734 (base32 "0fnf78956pwhb9cgv1jmgypnkma5xzflkivfrkfiadbgin848yfg"))
2735 (patches (search-patches "thefuck-test-environ.patch"))))
2736 (build-system python-build-system)
2739 (modify-phases %standard-phases
2741 (add-after 'install 'check
2742 (lambda* (#:key inputs outputs #:allow-other-keys)
2743 ;; Tests look for installed package
2744 (add-installed-pythonpath inputs outputs)
2745 ;; Some tests need write access to $HOME.
2746 (setenv "HOME" "/tmp")
2747 (invoke "py.test" "-v")
2750 `(("python-colorama" ,python-colorama)
2751 ("python-decorator" ,python-decorator)
2752 ("python-psutil" ,python-psutil)
2753 ("python-pyte" ,python-pyte)
2754 ("python-six" ,python-six)))
2757 ("python-mock" ,python-mock)
2758 ("python-pytest" ,python-pytest)
2759 ("python-pytest-mock" ,python-pytest-mock)))
2760 (home-page "https://github.com/nvbn/thefuck")
2761 (synopsis "Correct mistyped console command")
2763 "The Fuck tries to match a rule for a previous, mistyped command, creates
2764 a new command using the matched rule, and runs it.")
2765 (license license:x11)))
2774 (uri (string-append "https://gentoo.com/di/di-" version ".tar.gz"))
2776 (base32 "0crvvfsxh8ryc0j19a2x52i9zacvggm8zi6j3kzygkcwnpz4km8r"))))
2777 (build-system gnu-build-system)
2779 `(#:tests? #f ; obscure test failures
2781 (modify-phases %standard-phases
2782 (delete 'configure) ; no configure script
2783 (add-before 'build 'setup-environment
2784 (lambda* (#:key outputs #:allow-other-keys)
2785 (setenv "CC" ,(cc-for-target))
2786 (setenv "prefix" (assoc-ref outputs "out"))
2788 #:make-flags (list "--environment-overrides")))
2789 (home-page "https://gentoo.com/di/")
2790 (synopsis "Advanced df like disk information utility")
2792 "@code{di} is a disk information utility, displaying everything that your
2793 @code{df} command does and more. It features the ability to display your disk
2794 usage in whatever format you prefer. It is designed to be highly portable and
2795 produce uniform output across heterogeneous networks.")
2796 (license license:zlib)))
2798 (define-public cbatticon
2806 (url "https://github.com/valr/cbatticon")
2809 (base32 "0ivm2dzhsa9ir25ry418r2qg2llby9j7a6m3arbvq5c3kaj8m9jr"))
2810 (file-name (git-file-name name version))))
2811 (build-system gnu-build-system)
2813 `(#:tests? #f ; no tests
2815 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2818 (modify-phases %standard-phases
2819 (delete 'configure)))) ; no configure script
2822 ("gettext" ,gettext-minimal)
2823 ("libnotify" ,libnotify)))
2825 `(("pkg-config" ,pkg-config)))
2826 (synopsis "Lightweight battery icon for the system tray")
2827 (description "cbatticon is a lightweight battery icon that displays
2828 the status of your battery in the system tray.")
2829 (home-page "https://github.com/valr/cbatticon")
2830 (license license:gpl2+)))
2832 (define-public interrobang
2833 (let ((revision "1")
2834 (commit "896543735e1c99144765fdbd7b6e6b5afbd8b881"))
2836 (name "interrobang")
2837 (version (git-version "0.0.0" revision commit))
2842 (url "https://github.com/TrilbyWhite/interrobang")
2844 (file-name (git-file-name name version))
2846 (base32 "1n13m70p1hfba5dy3i8hfclbr6k9q3d9dai3dg4jvhdhmxcpjzdf"))))
2847 (build-system gnu-build-system)
2849 `(#:tests? #f ; no tests
2851 (modify-phases %standard-phases
2852 (delete 'configure)) ; no configure script
2853 #:make-flags (list (string-append "PREFIX="
2854 (assoc-ref %outputs "out")))))
2856 `(("libx11" ,libx11)))
2858 `(("pkg-config" ,pkg-config)))
2859 (synopsis "Scriptable launcher menu")
2860 (description "Interrobang is a scriptable launcher menu with a customizable
2861 shortcut syntax and completion options.")
2862 (home-page "https://github.com/TrilbyWhite/interrobang")
2863 (license license:gpl3+))))
2865 (define-public pam-krb5
2872 "https://archives.eyrie.org/software/kerberos/"
2873 "pam-krb5-" version ".tar.xz"))
2874 (patches (search-patches "pam-krb5-CVE-2020-10595.patch"))
2877 "1qjp8i1s9bz7g6kiqrkzzkxn5pfspa4sy53b6z40fqmdf9przdfb"))))
2878 (build-system gnu-build-system)
2881 (modify-phases %standard-phases
2882 (add-before 'configure 'disable-tests
2884 ;; The build container seems to interfere with some tests.
2885 (substitute* "tests/TESTS"
2886 (("module/basic\n") ""))
2887 (substitute* "tests/TESTS"
2888 (("pam-util/vector\n") ""))
2891 `(("linux-pam" ,linux-pam)
2892 ("mit-krb5" ,mit-krb5)))
2895 ("perl-test-pod" ,perl-test-pod))) ; required for tests
2896 (synopsis "Kerberos PAM module")
2898 "Pam-krb5 is a Kerberos PAM module for either MIT Kerberos or Heimdal.
2899 It supports ticket refreshing by screen savers, configurable
2900 authorization handling, authentication of non-local accounts for network
2901 services, password changing, and password expiration, as well as all the
2902 standard expected PAM features. It works correctly with OpenSSH, even
2903 with @code{ChallengeResponseAuthentication} and @code{PrivilegeSeparation}
2904 enabled, and supports extensive configuration either by PAM options or in
2905 krb5.conf or both. PKINIT is supported with recent versions of both MIT
2906 Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.")
2907 (home-page "https://www.eyrie.org/~eagle/software/pam-krb5")
2908 ;; Dual licenced under a homebrew non-copyleft OR GPL (any version)
2909 ;; However, the tarball does not contain a copy of the GPL, so unless
2910 ;; we put one in, we cannot distribute it under GPL without violating
2911 ;; clause requiring us to give all recipients a copy.
2912 (license license:gpl1+)))
2914 (define (sunxi-tools-source version)
2918 (url "https://github.com/linux-sunxi/sunxi-tools")
2919 (commit (string-append "v" version))))
2921 (base32 "04f3jqg8ww4jxsf9c6ddcdgy2xbhkyp0b3l5f1hvvbv94p81rjxd"))
2922 (modules '((guix build utils)))
2924 ;; Remove binaries contained in the tarball which are only for the
2925 ;; target and can be regenerated anyway.
2927 (delete-file-recursively "bin")
2929 (file-name (git-file-name "sunxi-tools" version))))
2931 (define sunxi-target-tools
2933 (name "sunxi-target-tools")
2935 (build-system gnu-build-system)
2937 (sunxi-tools-source version))
2939 `(#:system "armhf-linux"
2941 #:make-flags (list (string-append "PREFIX="
2942 (assoc-ref %outputs "out"))
2943 (string-append "CROSS_COMPILE=")
2946 (modify-phases %standard-phases
2949 (lambda* (#:key make-flags #:allow-other-keys)
2950 (apply invoke "make" "target-tools" make-flags)))
2952 (lambda* (#:key make-flags #:allow-other-keys)
2953 (apply invoke "make" "install-target-tools"
2955 (home-page "https://github.com/linux-sunxi/sunxi-tools")
2956 (synopsis "Hardware management tools for Allwinner computers")
2957 (description "This package contains tools for Allwinner devices:
2959 @item @command{sunxi-meminfo}: Prints memory bus settings.
2961 (license license:gpl2+)))
2963 (define-public sunxi-tools
2965 (name "sunxi-tools")
2968 (sunxi-tools-source version))
2970 `(("sunxi-target-tools" ,sunxi-target-tools)
2971 ("pkg-config" ,pkg-config)))
2973 `(("libusb" ,libusb)))
2974 (build-system gnu-build-system)
2976 `(#:tests? #f ; no tests exist
2977 #:make-flags (list (string-append "PREFIX="
2978 (assoc-ref %outputs "out"))
2979 (string-append "CROSS_COMPILE=disabled")
2982 (modify-phases %standard-phases
2985 (lambda* (#:key make-flags #:allow-other-keys)
2986 (apply invoke "make" "tools" "misc" make-flags)))
2988 (lambda* (#:key inputs outputs make-flags #:allow-other-keys)
2989 ;; Those tools have been built for armhf but are part of the
2990 ;; installation in the upstream package. So do the same
2992 (copy-recursively (assoc-ref inputs "sunxi-target-tools")
2993 (assoc-ref outputs "out"))
2994 (apply invoke "make" "install-tools" "install-misc"
2996 (home-page "https://github.com/linux-sunxi/sunxi-tools")
2997 (synopsis "Hardware management tools for Allwinner computers")
2998 (description "This package contains tools for Allwinner devices:
3000 @item @command{sunxi-fexc}, @command{bin2fex}, @command{fex2bin}: Compile
3001 a textual description of a board (.fex) to a binary representation (.bin).
3002 @item @command{sunxi-fel}: Puts an Allwinner device into FEL mode which
3003 makes it register as a special USB device (rather than USB host).
3004 You can then connect it to another computer and flash it from there.
3005 @item @command{sunxi-nand-part}: Partitions NAND flash.
3006 @item @command{sunxi-bootinfo}: Reads out boot0 and boot1 (Allwinner
3007 bootloader) parameters.
3008 @item @command{sunxi-pio}: Sets GPIO parameters and oscillates a GPIO
3009 in order to be able to find it.
3010 @item @command{sunxi-meminfo}: Prints memory bus settings.
3011 @item @command{sunxi-nand-image-builder}: Prepares raw NAND images.
3013 (license license:gpl2+)))
3015 (define-public sedsed
3023 (url "https://github.com/aureliojargas/sedsed")
3024 (commit (string-append "v" version))))
3025 (file-name (git-file-name name version))
3027 (base32 "05cl35mwljdb9ynbbsfa8zx6ig8r0xncbg2cir9vwn5manndjj18"))))
3028 (build-system python-build-system)
3030 `(#:tests? #f ; no tests
3032 (modify-phases %standard-phases
3033 (add-after 'unpack 'patch-sed-in
3035 (substitute* "sedsed.py"
3037 (string-append "sedbin = '" (which "sed") "'")))
3041 (lambda* (#:key outputs #:allow-other-keys)
3042 (let* ((out (assoc-ref outputs "out"))
3043 (bin (string-append out "/bin")))
3044 ;; Just one file to copy around
3045 (install-file "sedsed.py" bin)
3047 (add-after 'wrap 'symlink
3048 ;; Create 'sedsed' symlink to "sedsed.py".
3049 (lambda* (#:key outputs #:allow-other-keys)
3050 (let* ((out (assoc-ref outputs "out"))
3051 (bin (string-append out "/bin"))
3052 (sed (string-append bin "/sedsed"))
3053 (sedpy (string-append bin "/sedsed.py")))
3056 (home-page "https://aurelio.net/projects/sedsed")
3057 (synopsis "Sed sed scripts")
3059 "@code{sedsed} can debug, indent, tokenize and HTMLize your @command{sed}
3062 In debug mode, it reads your script and adds extra commands to it. When
3063 executed you can see the data flow between the commands, revealing all the
3064 magic sed performs on its internal buffers.
3066 In indent mode, your script is reformatted with standard spacing.
3068 In tokenize mode, you can see the elements of every command you use.
3070 In HTMLize mode, your script is converted to a beautiful colored HTML file,
3071 with all the commands and parameters identified for your viewing pleasure.
3073 With sedsed you can master any sed script. No more secrets, no more hidden
3075 (license license:expat)))
3077 (define-public igt-gpu-tools
3079 (name "igt-gpu-tools")
3085 (url "https://gitlab.freedesktop.org/drm/igt-gpu-tools.git")
3086 (commit (string-append "igt-gpu-tools-" version))))
3087 (file-name (git-file-name name version))
3089 (base32 "1gpdjs5aj6vsnzwcjvw5bb120lgffvvshi4202phr0bzw3b92ky8"))))
3090 (build-system gnu-build-system)
3092 `(#:tests? #f)) ; many of the tests try to load kernel modules
3095 ("elfutils" ,elfutils) ; libdw
3100 ("libpciaccess" ,libpciaccess)
3101 ("libunwind" ,libunwind)
3102 ("libxrandr" ,libxrandr)
3103 ("openssl" ,openssl)
3105 ("util-macros" ,util-macros)))
3107 `(("autoconf" ,autoconf)
3108 ("automake" ,automake)
3109 ("libtool" ,libtool)
3110 ("pkg-config" ,pkg-config)))
3111 (home-page "https://gitlab.freedesktop.org/drm/igt-gpu-tools")
3112 (synopsis "Tools for development and testing of the Intel DRM driver")
3113 (description "IGT GPU Tools is a collection of tools for development and
3114 testing of the Intel DRM driver. There are many macro-level test suites that
3115 get used against the driver, including xtest, rendercheck, piglit, and
3116 oglconform, but failures from those can be difficult to track down to kernel
3117 changes, and many require complicated build procedures or specific testing
3118 environments to get useful results. Therefore, IGT GPU Tools includes
3119 low-level tools and tests specifically for development and testing of the
3121 (supported-systems '("i686-linux" "x86_64-linux"))
3122 (license license:expat)))
3124 (define-public fabric
3131 (uri (pypi-uri "Fabric" version))
3134 "1a3ndlpdw6bhn8fcw1jgznl117a8pnr84az9rb5fwnrypf1ph2b6"))))
3135 (build-system python-build-system)
3137 `(#:python ,python-2 ; Python 2 only
3139 (modify-phases %standard-phases
3143 "nosetests" "-v" "tests/"
3144 ;; This test hangs indefinitely when run on a single core VM
3145 ;; (see GNU bug #26647 and Debian bug #850230).
3146 "--exclude=test_nested_execution_with_explicit_ports"
3147 ;; This test randomly fails in certain environments causing too
3148 ;; much noise to be useful (see Debian bug #854686).
3149 "--exclude=test_should_use_sentinel_for_tasks_that_errored"))))))
3151 `(("python2-fudge" ,python2-fudge) ; Requires < 1.0
3152 ("python2-jinja2" ,python2-jinja2) ; Requires < 3.0
3153 ("python2-nose" ,python2-nose) ; Requires < 2.0
3154 ("python2-pynacl" ,python2-pynacl)
3155 ("python2-bcrypt" ,python2-bcrypt)))
3157 `(("python2-paramiko" ,python2-paramiko)))
3158 (home-page "https://www.fabfile.org/")
3159 (synopsis "Simple Pythonic remote execution and deployment tool")
3161 "Fabric is designed to upload files and run shell commands on a number of
3162 servers in parallel or serially. These commands are grouped in tasks (which
3163 are regular Python functions) and specified in a @dfn{fabfile}.
3165 It is similar to Capistrano, except it's implemented in Python and doesn't
3166 expect you to be deploying Rails applications. Fabric is a simple, Pythonic
3167 tool for remote execution and deployment.")
3168 (license license:bsd-2)))
3170 (define-public neofetch
3177 (url "https://github.com/dylanaraps/neofetch")
3179 (file-name (git-file-name name version))
3182 "0xc0fdc7n5bhqirh83agqiy8r14l14zwca07czvj8vgnsnfybslr"))))
3183 (build-system gnu-build-system)
3185 `(#:tests? #f ; there are no tests
3187 (list (string-append "PREFIX=" %output))
3189 (modify-phases %standard-phases
3190 (delete 'configure)))) ; no configure script
3191 (home-page "https://github.com/dylanaraps/neofetch")
3192 (synopsis "System information script")
3193 (description "Neofetch is a command-line system information tool written in
3194 Bash. Neofetch displays information about your system next to an image, your OS
3195 logo, or any ASCII file of your choice. The main purpose of Neofetch is to be
3196 used in screenshots to show other users what operating system or distribution
3197 you are running, what theme or icon set you are using, etc.")
3198 (license license:expat)))
3200 (define-public screenfetch
3202 (name "screenfetch")
3207 (url "https://github.com/KittyKatt/screenFetch")
3208 (commit (string-append "v" version))))
3209 (file-name (git-file-name name version))
3212 "04l8aqr474pb115nagn9f6y48jw92n1qfszgw7dbhgl4mpn95lcr"))))
3213 (build-system trivial-build-system)
3215 `(#:modules ((guix build utils))
3218 (use-modules (guix build utils))
3219 (let ((source (assoc-ref %build-inputs "source"))
3220 (out (assoc-ref %outputs "out")))
3221 (mkdir-p (string-append out "/bin/"))
3222 (copy-file (string-append source "/screenfetch-dev")
3223 (string-append out "/bin/screenfetch"))
3224 (install-file (string-append source "/screenfetch.1")
3225 (string-append out "/man/man1/"))
3226 (install-file (string-append source "/COPYING")
3227 (string-append out "/share/doc/" ,name "-" ,version))
3228 (substitute* (string-append out "/bin/screenfetch")
3229 (("/usr/bin/env bash")
3230 (string-append (assoc-ref %build-inputs "bash")
3233 (string-append out "/bin/screenfetch")
3235 (,(string-append (assoc-ref %build-inputs "bc") "/bin:"
3236 (assoc-ref %build-inputs "scrot") "/bin:"
3237 (assoc-ref %build-inputs "xdpyinfo") "/bin"
3238 (assoc-ref %build-inputs "xprop") "/bin"))))
3239 (substitute* (string-append out "/bin/screenfetch")
3241 (string-append "#!" (assoc-ref %build-inputs "bash")
3247 ("xdpyinfo" ,xdpyinfo)
3249 (home-page "https://github.com/KittyKatt/screenFetch")
3250 (synopsis "System information script")
3251 (description "Bash screenshot information tool which can be used to
3252 generate those nifty terminal theme information and ASCII distribution logos in
3253 everyone's screenshots nowadays.")
3254 (license license:gpl3)))
3256 (define-public ufetch
3257 (let ((commit "98b622023e03fe24dbc137e9a68104dfe1fbd04a")
3261 (version (git-version "0.2" revision commit))
3265 (url "https://gitlab.com/jschx/ufetch.git")
3267 (file-name (git-file-name name version))
3270 "09c4zmikza16xpydinnqbi3hmcibfrrn10wij7j0j1wv1pj2sl2l"))))
3271 (build-system trivial-build-system)
3276 `(#:modules ((guix build utils))
3279 (use-modules (guix build utils))
3280 (let* ((source (assoc-ref %build-inputs "source"))
3281 (output (assoc-ref %outputs "out"))
3282 (bindir (string-append output "/bin"))
3283 (docdir (string-append output "/share/doc/ufetch-" ,version))
3284 (tput (string-append (assoc-ref %build-inputs "tput") "/bin/tput")))
3285 (install-file (string-append source "/LICENSE") docdir)
3286 (setenv "PATH" (string-append (assoc-ref %build-inputs "bash") "/bin"))
3288 (for-each (lambda (src)
3289 (let ((dst (string-append bindir "/" (basename src))))
3292 (substitute* dst (("tput") tput))))
3293 (find-files source "ufetch-[[:alpha:]]*$"))
3294 ;; Note: the `ufetch` we create below will only work if run under
3295 ;; the Guix System. I.e. a user trying to run `ufetch` on a
3296 ;; foreign distro will not get great results. The `screenfetch`
3297 ;; program does actual runtime detection of the operating system,
3298 ;; and would be a better choice in such a situation.
3299 (symlink "ufetch-guix" (string-append bindir "/ufetch"))))))
3300 (home-page "https://gitlab.com/jschx/ufetch")
3301 (synopsis "Tiny system info")
3302 (description "This package provides a tiny system info utility.")
3303 (license license:isc))))
3305 (define-public pfetch
3306 (let ((commit "e18a0959ab98b963744755ec4687e59dc11db3c5")
3310 (version (git-version "0.7.0" revision commit))
3314 (url "https://github.com/dylanaraps/pfetch")
3316 (file-name (git-file-name name version))
3319 "1md40av6i3xvvwig5jzhy4kf3s5sgxxk35r0vcyrjd8qyndk927l"))))
3320 (build-system trivial-build-system)
3321 (inputs `(("bash" ,bash)))
3323 `(#:modules ((guix build utils))
3326 (use-modules (guix build utils))
3327 (let* ((source (lambda (f)
3328 (string-append (assoc-ref %build-inputs "source") "/" f)))
3329 (output (assoc-ref %outputs "out"))
3330 (docdir (string-append output "/share/doc/pfetch-" ,version)))
3331 (install-file (source "LICENSE.md") docdir)
3332 (install-file (source "README.md") docdir)
3333 (install-file (source "pfetch") (string-append output "/bin"))
3335 (string-append output "/bin/pfetch")
3336 (list (string-append (assoc-ref %build-inputs "bash") "/bin")))
3338 (home-page "https://github.com/dylanaraps/pfetch")
3339 (synopsis "System information tool")
3340 (description "This package provides a simple, configurable system
3342 (license license:expat))))
3351 (uri (string-append "https://github.com/jarun/nnn/releases/download/v"
3352 version "/nnn-v" version ".tar.gz"))
3354 (base32 "1zflz7yj5wzdnl0728g8qrld2z6dqn7sblbmkjvyqlv1fwjd1fsf"))))
3355 (build-system gnu-build-system)
3357 `(("ncurses" ,ncurses)
3358 ("readline" ,readline)))
3360 `(("pkg-config" ,pkg-config)))
3362 '(#:tests? #f ; no tests
3364 (modify-phases %standard-phases
3365 (delete 'configure)) ; no configure script
3368 (string-append "PREFIX="
3369 (assoc-ref %outputs "out"))
3371 (home-page "https://github.com/jarun/nnn")
3372 (synopsis "Terminal file browser")
3373 (description "@command{nnn} is a fork of @command{noice}, a blazing-fast
3374 lightweight terminal file browser with easy keyboard shortcuts for
3375 navigation, opening files and running tasks. There is no config file and
3376 mime associations are hard-coded. The incredible user-friendliness and speed
3377 make it a perfect utility on modern distros.")
3378 (license license:bsd-2)))
3380 (define-public thermald
3388 (url "https://github.com/01org/thermal_daemon")
3389 (commit (string-append "v" version))))
3390 (file-name (git-file-name name version))
3392 (base32 "0iagc3jqpnh6q2fa1gx4wx6r8qg0556j60xr159zqg95djr4dv99"))))
3393 (build-system gnu-build-system)
3396 (let ((out (assoc-ref %outputs "out")))
3397 (list (string-append "--sysconfdir="
3399 (string-append "--with-dbus-sys-dir="
3400 out "/etc/dbus-1/system.d")
3401 "--localstatedir=/var"))))
3403 `(("autoconf" ,autoconf)
3404 ("automake" ,automake)
3405 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
3406 ("pkg-config" ,pkg-config)))
3408 `(("dbus-glib" ,dbus-glib)
3409 ("libxml2" ,libxml2)))
3410 (home-page "https://01.org/linux-thermal-daemon/")
3411 (synopsis "CPU scaling for thermal management")
3412 (description "The Linux Thermal Daemon helps monitor and control temperature
3413 on systems running the Linux kernel.")
3414 ;; arm and aarch64 don't have cpuid.h.
3415 (supported-systems '("i686-linux" "x86_64-linux"))
3416 (license license:gpl2+)))
3418 (define-public masscan
3426 (url "https://github.com/robertdavidgraham/masscan")
3428 (file-name (git-file-name name version))
3430 (base32 "0q0c7bsf0pbl8napry1qyg0gl4pd8wn872h4mz9b56dx4rx90vqg"))))
3431 (build-system gnu-build-system)
3433 `(("libpcap" ,libpcap)))
3435 '(#:test-target "regress"
3438 (string-append "PREFIX=" (assoc-ref %outputs "out")))
3440 (modify-phases %standard-phases
3441 (delete 'configure) ; no ./configure script
3442 (add-after 'unpack 'patch-path
3443 (lambda* (#:key outputs inputs #:allow-other-keys)
3444 (let* ((out (assoc-ref outputs "out"))
3445 (pcap (assoc-ref inputs "libpcap")))
3446 (substitute* "src/rawsock-pcap.c"
3447 (("libpcap.so") (string-append pcap "/lib/libpcap.so")))
3449 (synopsis "TCP port scanner")
3450 (description "MASSCAN is an asynchronous TCP port scanner. It can detect
3451 open ports, and also complete the TCP connection and interact with the remote
3452 application, collecting the information received.")
3453 (home-page "https://github.com/robertdavidgraham/masscan")
3454 ;; 'src/siphash24.c' is the SipHash reference implementation, which
3455 ;; bears a CC0 Public Domain Dedication.
3456 (license license:agpl3+)))
3458 (define-public hungrycat
3464 (uri (string-append "https://github.com/jwilk/hungrycat/"
3465 "releases/download/" version "/"
3466 "hungrycat-" version ".tar.gz"))
3469 "03fc1zsrf99lvxa7b4ps6pbi43304wbxh1f6ci4q0vkal370yfwh"))))
3470 (build-system gnu-build-system)
3473 `(("python" ,python-wrapper)
3474 ("python-nose" ,python-nose)))
3476 `(#:test-target "test"))
3477 (synopsis "A single tool that combines @command{cat} & @command{rm}")
3479 "hungrycat prints the contents of a file to standard output, while
3480 simultaneously freeing the disk space it occupied. It is useful if you need
3481 to process a large file, don't have enough space to store both the input and
3482 output files, and don't need the input file afterwards.
3483 While similar in principle to running @command{cat} immediately followed by
3484 @command{rm}, @command{hungrycat} actually frees blocks as soon as they are
3485 printed instead of after the entire file has been read, which is often too
3487 (home-page "https://jwilk.net/software/hungrycat")
3488 (license license:expat)))
3490 (define-public launchmon
3497 "https://github.com/LLNL/LaunchMON/releases/download/v"
3498 version "/launchmon-v" version ".tar.gz"))
3501 "0fm3nd9mydm9v2bf7bh01dbgrfnpwkapxa3dsvy3x1z0rz61qc0x"))
3502 (modules '((guix build utils)))
3505 ;; Fix build failure with GCC 7 due to a conversion error.
3506 ;; Remove for versions > 1.0.2.
3507 (substitute* "launchmon/src/linux/lmon_api/lmon_coloc_spawner.cxx"
3508 ((" lmonpl = '\\\\0'")
3509 " *lmonpl = '\\0'"))
3511 (build-system gnu-build-system)
3517 ("libgcrypt" ,libgcrypt)
3518 ("libgpg-error" ,libgpg-error)))
3519 (synopsis "Infrastructue for large scale tool daemon launching")
3521 "LaunchMON is a software infrastructure that enables HPC run-time
3522 tools to co-locate tool daemons with a parallel job. Its API allows a
3523 tool to identify all the remote processes of a job and to scalably
3524 launch daemons into the relevant nodes.")
3525 (home-page "https://github.com/LLNL/LaunchMON")
3526 (supported-systems '("i686-linux" "x86_64-linux"))
3527 (license license:lgpl2.1)))
3529 (define-public spindle
3534 ;; We use git checkout to avoid github auto-generated tarballs
3537 (url "https://github.com/hpc/Spindle")
3538 (commit (string-append "v" version))))
3539 (file-name (git-file-name name version))
3542 "15n3ay0qq81r5v7fif61q1vdjcq44pp2nynkh3fvbzc9fj3c39wd"))))
3543 (build-system gnu-build-system)
3544 (arguments '(#:configure-flags '("--enable-sec-launchmon"
3545 "--enable-sec-munge"
3546 "--enable-sec-none")))
3550 ("launchmon" ,launchmon)
3551 ("libgcrypt" ,libgcrypt)))
3552 (synopsis "Scalable library loading in HPC environments")
3554 "Spindle is a tool for improving the performance of dynamic library and
3555 Python loading in HPC environments.")
3556 (home-page "https://github.com/hpc/Spindle")
3557 ;; This package supports x86_64 and PowerPC64
3558 (supported-systems '("x86_64-linux"))
3559 (license license:lgpl2.1)))
3561 (define-public inxi-minimal
3562 (let ((real-name "inxi"))
3564 (name "inxi-minimal")
3565 (version "3.1.04-1")
3570 (url "https://github.com/smxi/inxi")
3572 (file-name (git-file-name real-name version))
3574 (base32 "1mirnrrqfjyl2r7fwnpjlk37i5hf8f7lxv2yxcbdfjf2b3dfbpvl"))))
3575 (build-system trivial-build-system)
3577 `(("bash" ,bash-minimal)
3579 ("procps" ,procps)))
3589 (use-modules (guix build utils)
3592 (setenv "PATH" (string-append
3593 (assoc-ref %build-inputs "bash") "/bin" ":"
3594 (assoc-ref %build-inputs "gzip") "/bin" ":"
3595 (assoc-ref %build-inputs "perl") "/bin" ":"))
3596 (copy-recursively (assoc-ref %build-inputs "source")
3597 ,(string-append real-name "-" version))
3598 (with-directory-excursion ,(string-append real-name "-" version)
3599 (with-fluids ((%default-port-encoding #f))
3600 (substitute* "inxi" (("/usr/bin/env perl") (which "perl"))))
3601 (let ((bin (string-append %output "/bin")))
3602 (install-file "inxi" bin)
3603 (wrap-program (string-append bin "/inxi")
3606 ,@(map (lambda (input)
3610 (cut string-append store <>)))
3612 ((member name '("util-linux"))
3613 (string-append (store-append "/bin") ":"
3614 (store-append "/sbin")))
3615 ((member name '("dmidecode" "iproute2"))
3616 (store-append "/sbin"))
3617 (else (store-append "/bin")))))))
3623 (((? (cut string-prefix? "perl-" <>) name) . dir)
3624 (string-append dir "/lib/perl5/site_perl"))
3627 (invoke "gzip" "inxi.1")
3628 (install-file "inxi.1.gz"
3629 (string-append %output "/share/man/man1")))
3631 (home-page "https://smxi.org/docs/inxi.htm")
3632 (synopsis "Full-featured system information script")
3633 (description "Inxi is a system information script that can display
3634 various things about your hardware and software to users in an IRC chatroom or
3635 support forum. It runs with the @code{/exec} command in most IRC clients.")
3636 (license license:gpl3+))))
3640 (inherit inxi-minimal)
3643 `(("dmidecode" ,dmidecode)
3645 ("bind:utils" ,isc-bind "utils") ; dig
3647 ("iproute2" ,iproute) ; ip
3648 ("kmod" ,kmod) ; modinfo
3649 ("lm-sensors" ,lm-sensors)
3650 ("mesa-utils" ,mesa-utils)
3651 ("pciutils" ,pciutils)
3654 ("util-linux" ,util-linux) ; lsblk
3655 ("usbutils" ,usbutils) ; lsusb
3657 ("xdpyinfo" ,xdpyinfo)
3660 ("coreutils" ,coreutils) ; uptime
3661 ("inetutils" ,inetutils) ; ifconfig
3662 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
3663 ("perl-http-tiny" ,perl-http-tiny)
3664 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
3665 ("perl-json-xs" ,perl-json-xs)
3666 ("perl-time-hires" ,perl-time-hires)
3667 ;; TODO: Add more inputs:
3672 ,@(package-inputs inxi-minimal)))))
3674 (define-public pscircle
3682 (url "https://gitlab.com/mildlyparallel/pscircle.git")
3683 (commit (string-append "v" version))))
3684 (file-name (git-file-name name version))
3686 (base32 "1sm99423hh90kr4wdjqi9sdrrpk65j2vz2hzj65zcxfxyr6khjci"))))
3687 (build-system meson-build-system)
3689 `(("pkg-config" ,pkg-config)))
3693 ("libx11" ,libx11)))
3694 (home-page "https://gitlab.com/mildlyparallel/pscircle")
3695 (synopsis "Visualize Linux processes in a form of radial tree")
3697 "@code{pscircle} visualizes Linux processes in the form of a radial tree.")
3698 (license license:gpl2+)))
3700 (define-public python-pyudev
3702 (name "python-pyudev")
3707 (uri (pypi-uri "pyudev" version))
3710 "0xmj6l08iih2js9skjqpv4w7y0dhxyg91zmrs6v5aa65gbmipfv9"))))
3711 (build-system python-build-system)
3713 `(#:tests? #f ; Tests require /sys
3715 (modify-phases %standard-phases
3716 (add-after 'unpack 'patch-ctypes-udev
3717 (lambda* (#:key inputs outputs #:allow-other-keys)
3718 (let ((eudev (assoc-ref inputs "eudev")))
3719 (substitute* "src/pyudev/core.py"
3721 (string-append "'" eudev "/lib/libudev.so'")))
3722 (substitute* "src/pyudev/_ctypeslib/utils.py"
3723 ;; Use absolute paths instead of keys.
3724 (("= find_library") "= "))
3727 `(("eudev" ,eudev)))
3729 `(("python-six" ,python-six)))
3731 `(("python-docutils" ,python-docutils)
3732 ("python-hypothesis" ,python-hypothesis)
3733 ("python-mock" ,python-mock)
3734 ("python-pytest" ,python-pytest)
3735 ("python-sphinx" ,python-sphinx)))
3736 (home-page "https://pyudev.readthedocs.io/")
3737 (synopsis "Python udev binding")
3738 (description "This package provides @code{udev} bindings for Python.")
3739 (license license:lgpl2.1)))
3741 (define-public solaar
3748 (url "https://github.com/pwr/Solaar")
3750 (file-name (git-file-name name version))
3753 "085mfa13dap3wqik1dqlad0d7kff4rv7j4ljh99c7l8nhczkqgwm"))))
3754 (build-system python-build-system)
3757 (modify-phases %standard-phases
3758 (add-after 'unpack 'fix-prefix-detection
3760 (substitute* "setup.py"
3761 (("'--prefix' in sys\\.argv")
3762 "len([x.startswith('--prefix=') for x in sys.argv]) > 0"))
3764 (add-before 'build 'setenv-PATH
3766 (setenv "PYTHONPATH" (string-append "lib:" (getenv "PYTHONPATH")))
3769 `(("python-pygobject" ,python-pygobject)
3770 ("python-pyudev" ,python-pyudev)))
3771 (home-page "https://smxi.org/docs/inxi.htm")
3772 (synopsis "Linux devices manager for the Logitech Unifying Receiver")
3773 (description "This package provides tools to manage clients of the
3774 Logitech Unifying Receiver.")
3775 (license license:gpl2)))
3777 (define-public lynis
3780 ;; Also update the ‘lynis-sdk’ input to the commit matching this release.
3786 (url "https://github.com/CISOfy/lynis")
3788 (file-name (git-file-name name version))
3790 (base32 "1lkkbvxm0rgrrlx0szaxmf8ghc3d26wal96sgqk84m37mvs1f7p0"))
3791 (modules '((guix build utils)))
3794 ;; Remove proprietary plugins. As of now, all plugins supplied with
3795 ;; lynis are proprietary. In the future, if free plugins are
3796 ;; provided, whitelist them from deletion.
3797 (for-each delete-file (find-files "plugins"))
3799 (build-system gnu-build-system)
3806 (url "https://github.com/CISOfy/lynis-sdk")
3807 (commit "bf1c1d95121da9ca79a9eac5a15ed8d81e34094d")))
3808 (file-name (git-file-name "lynis-sdk" version))
3810 (base32 "1ndz5v0039dqa87cva2dk55a8hkw0fibsw8hh2ddmny9qkr4l3dp"))))))
3813 (modify-phases %standard-phases
3815 (lambda* (#:key inputs outputs #:allow-other-keys)
3816 (substitute* "lynis"
3817 (("/usr/share/lynis")
3818 (string-append (assoc-ref outputs "out") "/share/lynis")))
3819 (substitute* "include/functions"
3820 (("/usr/local/etc/lynis")
3821 (string-append (assoc-ref outputs "out") "/etc/lynis")))
3825 (lambda* (#:key outputs #:allow-other-keys)
3826 (let ((out (assoc-ref outputs "out")))
3827 (install-file "lynis" (string-append out "/bin/"))
3828 (install-file "default.prf" (string-append out "/etc/lynis"))
3831 (copy-recursively dir (string-append out "/share/lynis/" dir)))
3832 (list "db" "include" "plugins"))
3833 (install-file "lynis.8" (string-append out "/share/man/man8"))
3836 (lambda* (#:key inputs #:allow-other-keys)
3837 (copy-recursively (assoc-ref inputs "lynis-sdk") "../lynis-sdk")
3838 (setenv "LANG" "en_US.UTF-8")
3839 (let ((lynis-dir (getcwd)))
3840 (with-directory-excursion "../lynis-sdk"
3841 (substitute* "config"
3842 (("\\.\\./lynis") lynis-dir))
3843 (substitute* "unit-tests/tests-language-translations.sh"
3844 (("\\.\\./lynis") lynis-dir))
3845 (invoke "sh" "lynis-devkit" "run" "unit-tests"))))))))
3846 (home-page "https://cisofy.com/lynis/")
3847 (synopsis "Security auditing tool")
3848 (description "Lynis is a security auditing tool. It performs an in-depth
3849 security scan and runs on the system itself. The primary goal is to test
3850 security defenses and provide tips for further system hardening. It will also
3851 scan for general system information, vulnerable software packages, and
3852 possible configuration issues.")
3853 (license license:gpl3+)))
3855 (define-public ngrep
3863 (url "https://github.com/jpr5/ngrep/")
3864 (commit (string-append "V" (string-replace-substring version "." "_")))))
3865 (file-name (git-file-name name version))
3868 "1x2fyd7wdqlj1r76ilal06cl2wmbz0ws6i3ys204sbjh1cj6dcl7"))))
3869 (build-system gnu-build-system)
3871 `(("libpcap" ,libpcap)))
3873 `(#:tests? #f ;; No tests.
3874 #:configure-flags (list (string-append "--with-pcap-includes="
3875 (assoc-ref %build-inputs "libpcap")
3877 (home-page "https://github.com/jpr5/ngrep/")
3878 (synopsis "Grep-like utility to search for network packets on an interface")
3879 (description "@command{ngrep} is like GNU grep applied to the network
3880 layer. It's a PCAP-based tool that allows you to specify an extended regular
3881 or hexadecimal expression to match against data payloads of packets. It
3882 understands many kinds of protocols, including IPv4/6, TCP, UDP, ICMPv4/6,
3883 IGMP and Raw, across a wide variety of interface types, and understands BPF
3884 filter logic in the same fashion as more common packet sniffing tools, such as
3885 tcpdump and snoop.")
3886 (license license:bsd-3)))
3888 (define-public pam-mount
3895 (uri (string-append "mirror://sourceforge/pam-mount/pam_mount/"
3896 version "/pam_mount-" version ".tar.xz"))
3899 "1rvi4irb7ylsbhvx1cr6islm2xxw1a4b19q6z4a9864ndkm0f0mf"))
3901 ;; Patch adding support for encrypted volumes in LUKS2 format.
3902 ;; It comes from the Gentoo package definition for sys-auth/pam_mount.
3903 (search-patches "pam-mount-luks2-support.patch"))))
3904 (build-system gnu-build-system)
3907 ("pkg-config" ,pkg-config)))
3909 `(("cryptsetup" ,cryptsetup)
3911 ("libxml2" ,libxml2)
3912 ("linux-pam" ,linux-pam)
3914 ("openssl" ,openssl)
3916 ("libmount" ,util-linux "lib")
3917 ("util-linux" ,util-linux)))
3920 (list (string-append "--with-slibdir=" %output "/lib")
3921 (string-append "--with-ssbindir=" %output "/sbin"))
3923 (modify-phases %standard-phases
3924 (add-after 'unpack 'fix-program-paths
3925 (lambda* (#:key inputs outputs #:allow-other-keys)
3926 (let ((util-linux (assoc-ref inputs "util-linux"))
3927 (out (assoc-ref outputs "out")))
3928 (substitute* "src/mtcrypt.c"
3930 (string-append "\"" util-linux "/bin/mount\";"))
3932 (string-append "\"" util-linux "/bin/umount\";"))
3934 (string-append "\"" util-linux "/sbin/fsck\",")))
3935 (substitute* "src/rdconf1.c"
3937 (string-append "\"" util-linux "/bin/mount\", \""))
3939 (string-append "\"" util-linux "/bin/umount\", \""))
3941 (string-append "\"" util-linux "/sbin/fsck\", \""))
3942 (("\"pmvarrun\", \"")
3943 (string-append "\"" out "/sbin/pmvarrun\", \""))))
3945 (home-page "http://pam-mount.sourceforge.net")
3946 (synopsis "PAM module to mount volumes for a user session")
3948 "Pam-mount is a PAM module that can mount volumes when a user logs in.
3949 It supports mounting local filesystems of any kind the normal mount utility
3950 supports. It can also mount encrypted LUKS volumes using the password
3951 supplied by the user when logging in.")
3952 (license (list license:gpl2+ license:lgpl2.1+))))
3961 (url "https://github.com/kellyjonbrazil/jc")
3962 (commit (string-append "v" version))))
3963 (file-name (git-file-name name version))
3966 "0rkckbgm04ql4r48wjgljfiqvsz36n99yqcpcyna8lvlm8h4nmwa"))))
3967 (build-system python-build-system)
3969 `(("python-ruamel.yaml" ,python-ruamel.yaml)
3970 ("python-xmltodict" ,python-xmltodict)
3971 ("python-pygments" ,python-pygments)))
3972 (home-page "https://github.com/kellyjonbrazil/jc")
3973 (synopsis "Convert the output of command-line tools to JSON")
3974 (description "@code{jc} JSONifies the output of many CLI tools and
3975 file-types for easier parsing in scripts.")
3976 (license license:expat)))
3985 (url "https://github.com/kellyjonbrazil/jtbl")
3986 (commit (string-append "v" version))))
3987 (file-name (git-file-name name version))
3990 "1zzd7rd63xva50f22d1rfja4r302aizrafarhwm67vv181swvdya"))))
3991 (build-system python-build-system)
3993 `(("python-tabulate" ,python-tabulate)))
3994 (home-page "https://github.com/kellyjonbrazil/jtbl")
3995 (synopsis "Command-line tool to print JSON data as a table in the terminal")
3996 (description "@code{jtbl} accepts piped JSON data from stdin and outputs a
3997 text table representation to stdout.")
3998 (license license:expat)))
4000 (define-public hosts
4007 (url "https://github.com/xwmx/hosts")
4009 (file-name (git-file-name name version))
4012 "1ni4z89kxzgwm26hhx908g04f2h0fypy7lgfa0rvsz8d0wslgcsn"))))
4013 (build-system trivial-build-system)
4015 `(("bats" ,bats) ;for test
4018 ("coreutils" ,coreutils)
4019 ("diffutils" ,diffutils)
4021 ("ncurses" ,ncurses) ;tput
4024 `(#:modules ((guix build utils))
4027 (use-modules (guix build utils))
4029 (copy-recursively (assoc-ref %build-inputs "source") ".")
4030 ;; patch-shebang phase
4032 (string-append (assoc-ref %build-inputs "bash") "/bin"
4033 ":" (assoc-ref %build-inputs "awk") "/bin"
4034 ":" (assoc-ref %build-inputs "coreutils") "/bin"
4035 ":" (assoc-ref %build-inputs "diffutils") "/bin"
4036 ":" (assoc-ref %build-inputs "grep") "/bin"
4037 ":" (assoc-ref %build-inputs "ncurses") "/bin"
4038 ":" (assoc-ref %build-inputs "sed") "/bin"
4039 ":" "/run/setuid-programs"
4040 ":" (getenv "PATH")))
4041 (substitute* "hosts"
4042 (("#!/usr/bin/env bash")
4043 (string-append "#!" (which "bash")
4044 "\nPATH=" (getenv "PATH"))))
4046 (setenv "TERM" "linux") ;set to tty for test
4047 (invoke (string-append (assoc-ref %build-inputs "bats") "/bin/bats")
4050 (install-file "hosts" (string-append %output "/bin"))
4051 (let ((bash-completion
4052 (string-append %output "/etc/bash_completion.d")))
4053 (mkdir-p bash-completion)
4054 (copy-file "etc/hosts-completion.bash"
4055 (string-append bash-completion "/hosts")))
4056 (let ((zsh-completion
4057 (string-append %output "/share/zsh/site-functions")))
4058 (mkdir-p zsh-completion)
4059 (copy-file "etc/hosts-completion.zsh"
4060 (string-append zsh-completion "/_hosts")))
4061 (let ((doc (string-append %output "/share/doc/" ,name "-" ,version)))
4063 (install-file "LICENSE" doc)
4064 (install-file "README.md" doc))
4066 (home-page "https://github.com/xwmx/hosts/")
4067 (synopsis "Script for editing a foreign distro's @file{/etc/hosts} file")
4068 (description "Hosts is a command line program for managing
4069 @file{/etc/hosts} entries. On Guix System, @file{/etc/hosts} is managed from
4070 the system configuration; hosts only works when using the Guix package manager
4071 on a foreign distro. @command{hosts} works with existing hosts files and
4072 entries, providing commands to add, remove, comment, and search.")
4073 (license license:expat)))