1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
4 ;;; Copyright © 2014, 2015, 2016, 2018, 2019, 2020 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2020 Eric Bavier <bavier@posteo.net>
6 ;;; Copyright © 2015, 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
7 ;;; Copyright © 2015 Alex Sassmannshausen <alex.sassmannshausen@gmail.com>
8 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
9 ;;; Copyright © 2016, 2017 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")
452 (file-name (git-file-name name version))
455 "1f203g2hp96cp8w4x1myhqdj5j09z9s23kylwkrxr69fjhn0vhnb"))))
456 (build-system ruby-build-system)
459 (modify-phases %standard-phases
460 (add-after 'unpack 'delete-facter-ng-gemspec
462 ;; XXX: ruby-build-system incorrectly finds
463 ;; facter-ng.gemspec from this directory and tries to
464 ;; build that instead of the proper facter.gemspec.
465 ;; Just delete it as a workaround, as it appears to
466 ;; only exist for backwards-compatibility after the
467 ;; facter-ng->facter rename.
468 (delete-file "agent/facter-ng.gemspec")
470 (add-after 'unpack 'embed-absolute-references
471 ;; Refer to absolute executable file names to avoid propagation.
472 (lambda* (#:key inputs #:allow-other-keys)
473 (substitute* (find-files "lib/facter/resolvers" "\\.rb$")
474 (("execute\\('(which |)([^ ']+)" _ _ name)
475 (string-append "execute('" (or (which name)
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 `(("ruby-hocon" ,ruby-hocon)
496 ("ruby-sys-filesystem" ,ruby-sys-filesystem)
497 ("ruby-thor" ,ruby-thor)
499 ;; For ‘embed-absolute-references’.
500 ("dmidecode" ,dmidecode)
501 ("inetutils" ,inetutils) ; for ‘hostname’
503 ("pciutils" ,pciutils)
504 ("util-linux" ,util-linux)))
505 (synopsis "Collect and display system facts")
507 "Facter is a tool that gathers basic facts about nodes (systems) such
508 as hardware details, network settings, OS type and version, and more. These
509 facts can be collected on the command line with the @command{facter} command
510 or via the @code{facter} Ruby library.")
511 (home-page "https://github.com/puppetlabs/facter-ng")
512 (license license:expat)))
522 (url "https://github.com/htop-dev/htop")
525 (base32 "0kjlphdvwwbj91kk91s4ksc954d3c2bznddzx2223jmb1bn9rcsa"))
526 (file-name (git-file-name name version))))
527 (build-system gnu-build-system)
529 `(("ncurses" ,ncurses)))
531 `(("autoconf" ,autoconf)
532 ("automake" ,automake)
533 ("python" ,python-wrapper))) ; for scripts/MakeHeader.py
534 (home-page "https://htop.dev")
535 (synopsis "Interactive process viewer")
537 "This is htop, an interactive process viewer. It is a text-mode
538 application (for console or X terminals) and requires ncurses.")
539 (license license:gpl2)))
541 (define-public bashtop
548 (url "https://github.com/aristocratos/bashtop")
549 (commit (string-append "v" version))))
550 (file-name (git-file-name name version))
553 "07nlr6vmyb7yihaxj1fp424lmhwkdjl6mls92v90f6gsvikpa13v"))))
554 (build-system gnu-build-system)
556 '(#:make-flags (list (string-append "PREFIX=" %output))
557 #:tests? #f ; bats test fails with loading load.bash
558 #:phases (modify-phases %standard-phases (delete 'configure))))
559 (home-page "https://github.com/aristocratos/bashtop")
560 (synopsis "Linux/OSX/FreeBSD resource monitor")
561 (description "Resource monitor that shows usage and stats for processor,
562 memory, disks, network and processes.")
563 (license license:asl2.0)))
572 (uri (string-append "mirror://gnu/pies/pies-"
576 "14jb4pa4zs26d5j2skxbaypnwhsx2lw8jgj1irrgs03c2dnf7gp6"))))
577 (build-system gnu-build-system)
579 '(#:phases (modify-phases %standard-phases
580 (add-before 'build 'patch-/bin/sh
581 (lambda* (#:key inputs #:allow-other-keys)
582 ;; Use the right shell when executing user-provided
584 (let ((bash (assoc-ref inputs "bash")))
585 (substitute* '("src/progman.c" "src/comp.c")
587 (string-append "\"" bash "/bin/sh\"")))
589 (home-page "https://www.gnu.org.ua/software/pies/")
590 (synopsis "Program invocation and execution supervisor")
592 "GNU pies is a program that supervises the invocation and execution of
593 other programs. It reads the list of programs to be started from its
594 configuration file, executes them, and then monitors their status,
595 re-executing them as necessary.")
596 (license license:gpl3+)))
598 (define-public inetutils
604 (uri (string-append "mirror://gnu/inetutils/inetutils-"
606 (patches (search-patches "inetutils-hurd.patch"))
609 "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy"))))
610 (build-system gnu-build-system)
612 `(#:configure-flags '("--localstatedir=/var"
614 ;; Make sure 'PATH_PROCNET_DEV' gets defined when
615 ;; cross-compiling (by default it does not.)
616 ,@(if (%current-target-system)
617 '("--with-path-procnet-dev=/proc/net/dev")
630 ;; On some systems, 'libls.sh' may fail with an error such as:
631 ;; "Failed to tell switch -a apart from -A".
632 #:parallel-tests? #f))
633 (inputs `(("ncurses" ,ncurses)
634 ("readline" ,readline))) ;for 'ftp'
635 (native-inputs (if (member (%current-system)
636 (package-supported-systems net-tools))
637 `(("netstat" ,net-tools)) ;for tests
639 (home-page "https://www.gnu.org/software/inetutils/")
640 (synopsis "Basic networking utilities")
642 "Inetutils is a collection of common network programs, such as an ftp
643 client and server, a telnet client and server, an rsh client and server, and
645 (license license:gpl3+)))
647 (define-public shadow
654 "https://github.com/shadow-maint/shadow/releases/"
655 "download/" version "/shadow-" version ".tar.xz"))
656 (patches (search-patches "shadow-hurd-pctrl.patch"))
659 "0qmfq50sdhz6xilgxvinblll8j2iqfl7hwk45bq744y4plq4dbd3"))))
660 (build-system gnu-build-system)
662 `(;; Assume System V `setpgrp (void)', which is the default on GNU
663 ;; variants (`AC_FUNC_SETPGRP' is not cross-compilation capable.)
665 '("--with-libpam" "ac_cv_func_setpgrp_void=yes")
668 (modify-phases %standard-phases
669 (add-before 'build 'set-nscd-file-name
670 (lambda* (#:key inputs #:allow-other-keys)
671 ;; Use the right file name for nscd.
672 (let ((libc (assoc-ref inputs
673 ,(if (%current-target-system)
676 (substitute* "lib/nscd.c"
678 (string-append libc "/sbin/nscd")))
680 (add-after 'install 'remove-groups
681 (lambda* (#:key outputs #:allow-other-keys)
682 ;; Remove `groups', which is already provided by Coreutils.
683 (let* ((out (assoc-ref outputs "out"))
684 (bin (string-append out "/bin"))
685 (man (string-append out "/share/man")))
686 (delete-file (string-append bin "/groups"))
687 (for-each delete-file (find-files man "^groups\\."))
690 (inputs `(("linux-pam" ,linux-pam)))
691 (home-page "https://github.com/shadow-maint/shadow")
692 (synopsis "Authentication-related tools such as passwd, su, and login")
694 "Shadow provides a number of authentication-related tools, including:
695 login, passwd, su, groupadd, and useradd.")
697 ;; The `vipw' program is GPLv2+.
698 ;; libmisc/salt.c is public domain.
699 (license license:bsd-3)))
701 (define-public mingetty
707 (uri (string-append "mirror://sourceforge/mingetty/mingetty/"
708 version "/mingetty-" version ".tar.gz"))
711 "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"))))
712 (build-system gnu-build-system)
715 (modify-phases %standard-phases
717 (lambda* (#:key inputs outputs target #:allow-other-keys)
718 (let* ((out (assoc-ref outputs "out"))
719 (man8 (string-append out "/share/man/man8"))
720 (sbin (string-append out "/sbin"))
721 (shadow (assoc-ref inputs "shadow"))
722 (login (string-append shadow "/bin/login")))
723 (substitute* "Makefile"
724 ,@(if (%current-target-system)
726 (string-append "CC=" target "-gcc\n")))
729 (string-append "SBINDIR = " out
732 (string-append "MANDIR = " out
733 "/share/man/man8\n")))
735 ;; Pick the right 'login' by default.
736 (substitute* "mingetty.c"
738 (string-append "\"" login "\"")))
743 #:tests? #f)) ; no tests
744 (inputs `(("shadow" ,shadow)))
746 (home-page "https://sourceforge.net/projects/mingetty")
747 (synopsis "Getty for the text console")
749 "Small console getty that is started on the Linux text console,
750 asks for a login name and then transfers over to @code{login}. It is extended
751 to allow automatic login and starting any app.")
752 (license license:gpl2+)))
754 (define-public net-base
761 "mirror://debian/pool/main/n/netbase/netbase_"
765 "12xqjwg3p4rzmmh2iib6sigm9l29y3dgk74mmnw64k84jnbwdxl1"))))
766 (build-system trivial-build-system)
768 `(#:modules ((guix build utils))
770 (use-modules (guix build utils)
773 (let* ((source (assoc-ref %build-inputs "source"))
774 (tar (assoc-ref %build-inputs "tar"))
775 (xz (assoc-ref %build-inputs "xz"))
776 (output (assoc-ref %outputs "out"))
777 (etc (string-append output "/etc")))
778 (setenv "PATH" (string-append xz "/bin"))
779 (invoke (string-append tar "/bin/tar") "xvf"
781 (chdir ,(string-append "netbase-" version))
784 '("etc-services" "etc-protocols" "etc-rpc")
785 (map (cut string-append etc "/" <>)
786 '("services" "protocols" "rpc")))
788 (native-inputs `(("tar" ,tar)
790 (synopsis "IANA protocol, port, and RPC number assignments")
792 "This package provides the /etc/services, /etc/protocols, and /etc/rpc
793 files, which contain information about the IANA-assigned port, protocol, and
795 (home-page "https://packages.debian.org/sid/netbase")
796 (license license:gpl2)))
798 (define-public netcat
804 (uri (string-append "mirror://sourceforge/netcat/netcat/" version
805 "/netcat-" version ".tar.bz2"))
808 "1frjcdkhkpzk0f84hx6hmw5l0ynpmji8vcbaxg8h5k2svyxz0nmm"))))
809 (build-system gnu-build-system)
812 ;; By default, man and info pages are put in PREFIX/{man,info},
813 ;; but we want them in PREFIX/share/{man,info}.
814 (let ((out (assoc-ref %outputs "out")))
815 (list (string-append "--mandir=" out "/share/man")
816 (string-append "--infodir=" out "/share/info")))))
817 (home-page "http://netcat.sourceforge.net")
818 (synopsis "Read and write data over TCP/IP")
820 "Netcat is a featured networking utility which reads and writes data
821 across network connections, using the TCP/IP protocol. It is designed to be a
822 reliable \"back-end\" tool that can be used directly or easily driven by other
823 programs and scripts. At the same time, it is a feature-rich network debugging
824 and exploration tool, since it can create almost any kind of connection you
825 would need and has several interesting built-in capabilities.")
826 (license license:gpl2+)))
828 (define-public netcat-openbsd
830 (name "netcat-openbsd")
835 (url "https://salsa.debian.org/debian/netcat-openbsd.git")
836 (commit (string-append "debian/" version))))
837 (file-name (git-file-name name version))
840 "0kcvi3pav2fdx5c22psjv5dggk4cmrqiaq2cklhqngsk4a7vrjan"))))
841 (build-system gnu-build-system)
843 `(#:tests? #f ; no test suite
847 (modify-phases %standard-phases
849 (add-before 'build 'patch
851 (setenv "QUILT_PATCHES" "debian/patches")
852 (invoke "quilt" "push" "-a")
855 (lambda* (#:key outputs #:allow-other-keys)
856 (let* ((out (assoc-ref outputs "out"))
857 (bin (string-append out "/bin"))
858 (man (string-append out "/share/man/man1"))
859 (doc (string-append out "/share/doc/netcat-openbsd-" ,version))
860 (examples (string-append doc "/examples")))
861 (install-file "nc" bin)
862 (install-file "nc.1" man)
863 (install-file "debian/copyright" doc)
864 (copy-recursively "debian/examples" examples)
866 (inputs `(("libbsd" ,libbsd)))
867 (native-inputs `(("pkg-config" ,pkg-config)
869 (home-page "https://packages.debian.org/sid/netcat-openbsd")
870 (synopsis "Read and write data over TCP/IP")
872 "Netcat is a simple Unix utility which reads and writes data across
873 network connections using TCP or UDP protocol. It is designed to be a reliable
874 \"back-end\" tool that can be used directly or easily driven by other programs
875 and scripts. At the same time it is a feature-rich network debugging and
876 exploration tool, since it can create almost any kind of connection you would
877 need and has several interesting built-in capabilities.
879 This package contains the OpenBSD rewrite of netcat, including support for
880 IPv6, proxies, and Unix sockets.")
881 (license (list license:bsd-3
882 license:bsd-2)))) ; atomicio.*, socks.c
884 (define-public sipcalc
891 (uri (string-append "http://www.routemeister.net/projects"
892 "/sipcalc/files/sipcalc" "-" version ".tar.gz"))
895 "0mv3wndj4z2bsshh2k8d5sy3j8wxzgf8mzmmkvj1k8gpcz37dm6g"))))
896 (build-system gnu-build-system)
897 (home-page "https://www.routemeister.net/projects/sipcalc/")
898 (synopsis "Command-line IP subnet calculator")
900 "Sipcalc is an advanced command-line IP subnet calculator. It can take
901 multiple forms of input (IPv4/IPv6/interface/hostname) and output a multitude
902 of information about a given subnet.
909 @item Retrieving of address information from interfaces.
910 @item Classfull and CIDR output.
911 @item Multiple address and netmask input and output formats (dotted quad, hex,
913 @item Output of broadcast address, network class, Cisco wildcard,
914 hosts/range, network range.
915 @item The ability to split a network based on a smaller netmask, now also with
916 recursive runs on the generated subnets. (also IPv6)
920 @item Compressed and expanded input and output addresses.
921 @item Standard IPv6 network output.
922 @item v4 in v6 output.
923 @item Reverse DNS address generation.
926 (license license:bsd-3)))
934 (uri (string-append "mirror://gnu/alive/alive-"
938 "1vrzg51ai68x9yld7vbgl58sxaw5qpx8rbakwcxn4cqq6vpxj38j"))))
939 (build-system gnu-build-system)
940 (arguments '(#:configure-flags '("alive_cv_nice_ping=yes")))
941 (inputs `(("guile" ,guile-2.0)
942 ("inetutils" ,inetutils)))
943 (home-page "https://www.gnu.org/software/alive/")
944 (synopsis "Autologin and keep-alive daemon")
946 "GNU Alive sends periodic pings to a server, generally to keep a
948 (license license:gpl3+)))
950 (define-public isc-dhcp
951 (let* ((bind-major-version "9")
952 (bind-minor-version "11")
953 (bind-patch-version "22")
954 (bind-release-type "") ; for patch release, use "-P"
955 (bind-release-version "") ; for patch release, e.g. "6"
956 (bind-version (string-append bind-major-version
962 bind-release-version)))
968 (uri (string-append "https://ftp.isc.org/isc/dhcp/"
969 version "/dhcp-" version ".tar.gz"))
972 "08a5003zdxgl41b29zjkxa92h2i40zyjgxg0npvnhpkfl5jcsz0s"))))
973 (build-system gnu-build-system)
975 `(#:parallel-build? #f
976 #:configure-flags '("--with-randomdev=/dev/random")
978 (modify-phases %standard-phases
979 (add-after 'unpack 'replace-bundled-bind
980 (lambda* (#:key inputs native-inputs #:allow-other-keys)
981 (delete-file "bind/bind.tar.gz")
982 (copy-file (assoc-ref inputs "bind-source-tarball")
984 (chmod "bind/bind.tar.gz" #o644)
985 (substitute* "bind/version.tmp"
987 (format #f "MAJORVER=~a\n" ,bind-major-version))
989 (format #f "MINORVER=~a\n" ,bind-minor-version))
991 (format #f "PATCHVER=~a\n" ,bind-patch-version))
993 (format #f "RELEASETYPE=~a\n" ,bind-release-type))
995 (format #f "RELEASEVER=~a\n" ,bind-release-version)))
997 ,@(if (%current-target-system)
998 '((add-before 'configure 'fix-bind-cross-compilation
1000 (substitute* "configure"
1002 "--host=$host_alias"))
1003 ;; BIND needs a native compiler because the DHCP
1004 ;; build system uses the built 'gen' executable.
1005 (setenv "BUILD_CC" "gcc")
1008 (add-after 'configure 'post-configure
1009 (lambda* (#:key outputs #:allow-other-keys)
1010 ;; Point to the right client script, which will be
1011 ;; installed in a later phase.
1012 (substitute* "includes/dhcpd.h"
1013 (("#define[[:blank:]]+_PATH_DHCLIENT_SCRIPT.*")
1014 (let ((out (assoc-ref outputs "out")))
1015 (string-append "#define _PATH_DHCLIENT_SCRIPT \""
1016 out "/libexec/dhclient-script"
1019 ;; During the 'build' phase, 'bind.tar.gz' is extracted, so
1020 ;; we must patch shebangs in there and make sure the right
1022 (with-directory-excursion "bind"
1023 (substitute* "Makefile"
1025 (let ((sh (which "sh")))
1026 (string-append "./configure CONFIG_SHELL="
1027 sh " SHELL=" sh " "))))
1029 (let ((bind-directory (string-append "bind-" ,bind-version)))
1030 (invoke "tar" "xf" "bind.tar.gz")
1031 (for-each patch-shebang
1032 (find-files bind-directory ".*"))
1033 (substitute* (string-append bind-directory "/configure")
1036 (invoke "tar" "cf" "bind.tar.gz"
1038 ;; avoid non-determinism in the archive
1042 "--group=root:0")))))
1043 (add-after 'install 'post-install
1044 (lambda* (#:key inputs outputs #:allow-other-keys)
1045 ;; Install the dhclient script for GNU/Linux and make sure
1046 ;; if finds all the programs it needs.
1047 (let* ((out (assoc-ref outputs "out"))
1048 (libexec (string-append out "/libexec"))
1049 (coreutils (assoc-ref inputs "coreutils*"))
1050 (inetutils (assoc-ref inputs "inetutils"))
1051 (net-tools (assoc-ref inputs "net-tools"))
1052 (sed (assoc-ref inputs "sed*")))
1053 (substitute* "client/scripts/linux"
1055 (string-append (assoc-ref inputs "iproute")
1059 (copy-file "client/scripts/linux"
1060 (string-append libexec "/dhclient-script"))
1063 (string-append libexec "/dhclient-script")
1066 (string-append dir "/bin:"
1068 (list inetutils net-tools coreutils sed))))
1075 (inputs `(("inetutils" ,inetutils)
1076 ,@(if (hurd-target?) '()
1077 `(("net-tools" ,net-tools)
1078 ("iproute" ,iproute)))
1080 ;; isc-dhcp bundles a copy of BIND, which has proved vulnerable
1081 ;; in the past. Use a BIND-VERSION of our choosing instead.
1082 ("bind-source-tarball"
1085 (uri (string-append "https://ftp.isc.org/isc/bind9/"
1087 "/bind-" bind-version ".tar.gz"))
1090 "1j9a4r83a77mp8k1y8z524c9rzdqgd8rzwczd6zwmw86a00xiimg"))))
1092 ("coreutils*" ,coreutils)
1095 (home-page "https://www.isc.org/products/DHCP/")
1096 (synopsis "Dynamic Host Configuration Protocol (DHCP) tools")
1098 "ISC's Dynamic Host Configuration Protocol (DHCP) distribution provides a
1099 reference implementation of all aspects of DHCP, through a suite of DHCP
1100 tools: server, client, and relay agent.")
1101 (license license:mpl2.0)
1102 (properties '((cpe-name . "dhcp"))))))
1104 (define-public libpcap
1110 (uri (string-append "https://www.tcpdump.org/release/libpcap-"
1114 "153h1378diqyc27jjgz6gg5nxmb4ddk006d9xg69nqavgiikflk3"))))
1115 (build-system gnu-build-system)
1120 ;; There are some tests in testprogs/, but no automated test suite.
1122 (home-page "https://www.tcpdump.org")
1123 (synopsis "Network packet capture library")
1125 "libpcap is an interface for user-level packet capture. It provides a
1126 portable framework for low-level network monitoring. Applications include
1127 network statistics collection, security monitoring, network debugging, etc.")
1128 (license (list license:bsd-4 ; fad-*.c and several other source files
1129 license:bsd-3 ; pcap/, sockutils.* & others
1130 license:bsd-2)))) ; the rest
1132 (define-public tcpdump
1138 (uri (string-append "https://www.tcpdump.org/release/tcpdump-"
1142 "0434vdcnbqaia672rggjzdn4bb8p8dchz559yiszzdk0sjrprm1c"))))
1143 (build-system gnu-build-system)
1144 (inputs `(("libpcap" ,libpcap)
1145 ("openssl" ,openssl)))
1146 (native-inputs `(("perl" ,perl))) ; for tests
1147 (home-page "https://www.tcpdump.org/")
1148 (synopsis "Network packet analyzer")
1150 "Tcpdump is a command-line tool to analyze network traffic passing
1151 through the network interface controller.")
1152 (license license:bsd-3)))
1154 (define-public jnettop
1161 (string-append "https://web.archive.org/web/20161221100811/"
1162 "http://jnettop.kubs.info/dist/jnettop-"
1166 "1855np7c4b0bqzhf1l1dyzxb90fpnvrirdisajhci5am6als31z9"))))
1167 (build-system gnu-build-system)
1169 `(("pkg-config" ,pkg-config)))
1172 ("ncurses" ,ncurses)
1173 ("libpcap" ,libpcap)))
1175 "https://web.archive.org/web/20160703195221/http://jnettop.kubs.info/wiki/")
1176 (synopsis "Visualize network traffic by bandwidth use")
1178 "Jnettop is a traffic visualiser, which captures traffic going
1179 through the host it is running from and displays streams sorted
1180 by bandwidth they use.")
1181 (license license:gpl2+)))
1183 (define-public clusterssh
1189 (uri (string-append "mirror://sourceforge/clusterssh/"
1190 "2.%20ClusterSSH%20Series%204/"
1191 "App-ClusterSSH-v" version ".tar.gz"))
1194 "0rmk2p3f2wz1h092anidjclh212rv3gxyk0c641qk3frlrjnw6mp"))))
1195 (build-system perl-build-system)
1198 (modify-phases %standard-phases
1199 (add-after 'unpack 'refer-to-inputs
1200 (lambda* (#:key inputs #:allow-other-keys)
1201 (substitute* (list "lib/App/ClusterSSH/Config.pm"
1206 (add-before 'check 'delete-failing-tests
1208 ;; This checks whether all code is nicely formatted. The above
1209 ;; ‘refer-to-inputs’ phase breaks this pedantry, so disable it.
1210 (delete-file "t/perltidy.t")
1211 ;; Update the manifest so t/manifest.t happily passes.
1212 (substitute* "MANIFEST"
1213 (("t/perltidy.t\n") ""))
1215 (add-after 'install 'augment-library-path
1216 (lambda* (#:key inputs outputs #:allow-other-keys)
1217 (let* ((out (assoc-ref outputs "out"))
1218 (bin (string-append out "/bin")))
1219 (with-directory-excursion bin
1222 (wrap-program program
1223 `("PERL5LIB" ":" prefix
1224 ,(map (lambda (file-name)
1225 (string-append file-name
1226 "/lib/perl5/site_perl"))
1228 (map (lambda (input)
1229 (assoc-ref inputs input))
1230 ;; These may be propagated and hence
1231 ;; not explicitly listed as inputs.
1232 (list "perl-class-data-inheritable"
1233 "perl-devel-stacktrace"
1234 "perl-exception-class"
1238 "perl-x11-protocol-other")))))))
1239 (find-files "." ".*")))
1242 `(("perl-cpan-changes" ,perl-cpan-changes)
1243 ("perl-file-slurp" ,perl-file-slurp)
1244 ("perl-file-which" ,perl-file-which)
1245 ("perl-module-build" ,perl-module-build)
1246 ("perl-readonly" ,perl-readonly)
1247 ("perl-test-differences" ,perl-test-differences)
1248 ("perl-test-distmanifest" ,perl-test-distmanifest)
1249 ("perl-test-perltidy" ,perl-test-perltidy)
1250 ("perl-test-pod" ,perl-test-pod)
1251 ("perl-test-pod-coverage" ,perl-test-pod-coverage)
1252 ("perl-test-trap" ,perl-test-trap)
1253 ("perltidy" ,perltidy)))
1255 `(("perl-exception-class" ,perl-exception-class)
1256 ("perl-sort-naturally" ,perl-sort-naturally)
1257 ("perl-tk" ,perl-tk)
1258 ("perl-try-tiny" ,perl-try-tiny)
1259 ("perl-x11-protocol" ,perl-x11-protocol)
1260 ("perl-x11-protocol-other" ,perl-x11-protocol-other)
1262 ;; The clusterssh.sourceforge.net address requires login to view
1263 (home-page "https://sourceforge.net/projects/clusterssh/")
1264 (synopsis "Secure concurrent multi-server terminal control")
1266 "ClusterSSH controls a number of xterm windows via a single graphical
1267 console window to allow commands to be interactively run on multiple servers
1268 over ssh connections.")
1269 (license license:gpl2+)))
1271 (define-public rename
1278 "mirror://cpan/authors/id/R/RM/RMBARKER/File-Rename-"
1282 "137m8s06r4n038ivlr5r1d9a7q9l7shmwpvnyx053r9ndhvbnkh5"))))
1283 (build-system perl-build-system)
1286 (modify-phases %standard-phases
1287 (add-after 'install 'find-itself
1288 ;; Fix run-time 'Can't locate File/Rename.pm in @INC' failure.
1289 (lambda* (#:key outputs #:allow-other-keys)
1290 (let* ((out (assoc-ref outputs "out"))
1291 (bin (string-append out "/bin")))
1292 (with-directory-excursion bin
1295 (wrap-program program
1296 `("PERL5LIB" ":" prefix
1297 (,(string-append out "/lib/perl5/site_perl")))))
1298 (find-files "." ".*")))
1301 `(("perl-module-build" ,perl-module-build)
1302 ("perl-test-pod" ,perl-test-pod)
1303 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1304 (home-page "https://metacpan.org/pod/distribution/File-Rename/rename.PL")
1305 (synopsis "Perl extension for renaming multiple files")
1307 "This package provides a Perl interface (@code{Perl::Rename}) as well
1308 as a command-line utility (@command{rename}) that can rename multiple files
1309 at once based on a Perl regular expression.")
1310 (license license:perl-license)))
1312 (define-public rottlog
1318 (uri (string-append "mirror://gnu/rottlog/rottlog-"
1322 "0751mb9l2f0jrk3vj6q8ilanifd121dliwk0c34g8k0dlzsv3kd7"))
1323 (modules '((guix build utils)))
1326 (substitute* "Makefile.in"
1327 (("-o \\$\\{LOG_OWN\\} -g \\$\\{LOG_GROUP\\}")
1328 ;; Don't try to chown root.
1330 (("mkdir -p \\$\\(ROTT_STATDIR\\)")
1331 ;; Don't attempt to create /var/lib/rottlog.
1334 (build-system gnu-build-system)
1336 `(#:configure-flags (list "ROTT_ETCDIR=/etc/rottlog" ;rc file location
1337 "--localstatedir=/var")
1339 ;; Install example config files in OUT/etc.
1340 #:make-flags (list (string-append "ROTT_ETCDIR="
1341 (assoc-ref %outputs "out")
1344 #:phases (modify-phases %standard-phases
1345 (add-after 'unpack 'patch-paths
1347 (substitute* "rc/rc"
1348 (("/usr/sbin/sendmail") "sendmail"))
1350 (add-after 'unpack 'fix-configure
1351 (lambda* (#:key inputs native-inputs #:allow-other-keys)
1352 ;; Replace outdated config.sub and config.guess:
1353 (for-each (lambda (file)
1357 (or native-inputs inputs) "automake")
1359 ,(version-major+minor
1360 (package-version automake))
1362 '("config.sub" "config.guess"))
1364 (add-after 'build 'set-packdir
1366 ;; Set a default location for archived logs.
1367 (substitute* "rc/rc"
1369 "packdir=\"/var/log\""))
1371 (add-before 'install 'tweak-rc-weekly
1372 (lambda* (#:key inputs #:allow-other-keys)
1373 (substitute* "rc/weekly"
1375 (string-append (assoc-ref inputs "coreutils*")
1378 ;; The file is called 'syslog.pid' (no 'd').
1381 (add-after 'install 'install-info
1383 (invoke "make" "install-info"))))))
1384 (native-inputs `(("texinfo" ,texinfo)
1385 ("automake" ,automake)
1386 ("util-linux" ,util-linux))) ; for 'cal'
1387 (inputs `(("coreutils*" ,coreutils)))
1388 (home-page "https://www.gnu.org/software/rottlog/")
1389 (synopsis "Log rotation and management")
1391 "GNU Rot[t]log is a program for managing log files. It is used to
1392 automatically rotate out log files when they have reached a given size or
1393 according to a given schedule. It can also be used to automatically compress
1394 and archive such logs. Rot[t]log will mail reports of its activity to the
1395 system administrator.")
1396 (license license:gpl3+)))
1405 (list (string-append "https://www.sudo.ws/sudo/dist/sudo-"
1407 (string-append "ftp://ftp.sudo.ws/pub/sudo/OLD/sudo-"
1408 version ".tar.gz")))
1411 "05432672iilb7s52j9l9xzrlambb1wg3k7qvf5973i41y40x563w"))
1412 (modules '((guix build utils)))
1415 (delete-file-recursively "lib/zlib")
1417 (build-system gnu-build-system)
1418 (outputs (list "out" "python"))
1421 (list (string-append "--docdir=" (assoc-ref %outputs "out")
1422 "/share/doc/" ,name "-" ,version)
1424 ;; XXX: Disable Python support when cross-compiling because
1425 ;; 'configure' tries to run 'python', which fails.
1426 ,(if (%current-target-system)
1428 "--enable-python") ; for plug-ins written in ~
1430 "--with-logpath=/var/log/sudo.log"
1431 "--with-rundir=/var/run/sudo" ; must be cleaned up at boot time
1432 "--with-vardir=/var/db/sudo"
1433 "--with-iologdir=/var/log/sudo-io"
1435 ;; 'visudo.c' expects _PATH_MV to be defined, but glibc doesn't
1437 (string-append "CPPFLAGS=-D_PATH_MV='\""
1438 (assoc-ref %build-inputs "coreutils")
1441 ;; Avoid non-determinism; see <http://bugs.gnu.org/21918>.
1442 #:parallel-build? #f
1445 (modify-phases %standard-phases
1446 (add-before 'configure 'pre-configure
1448 (substitute* "src/sudo_usage.h.in"
1449 ;; Do not capture 'configure' arguments since we would
1450 ;; unduly retain references, and also because the
1451 ;; CPPFLAGS above would close the string literal
1453 (("@CONFIGURE_ARGS@") "\"\""))
1454 (substitute* (find-files "." "Makefile\\.in")
1455 ;; Allow installation as non-root.
1456 (("-o [[:graph:]]+ -g [[:graph:]]+")
1458 ;; Don't try to create /etc/sudoers.
1459 (("^install: (.*)install-sudoers(.*)" _ before after)
1460 (string-append "install: " before after "\n"))
1461 ;; Don't try to create /run/sudo.
1462 (("\\$\\(DESTDIR\\)\\$\\(rundir\\)")
1464 ;; Install example sudo{,_logsrvd}.conf to the right place.
1465 (("\\$\\(DESTDIR\\)\\$\\(sysconfdir\\)")
1466 "$(DESTDIR)/$(docdir)/examples")
1467 ;; Don't try to create /var/db/sudo.
1468 (("\\$\\(DESTDIR\\)\\$\\(vardir\\)")
1471 ;; ‘Checking existing [/etc/]sudoers file for syntax errors’ is
1472 ;; not the task of the build system, and fails.
1473 (substitute* "plugins/sudoers/Makefile.in"
1474 (("^pre-install:" match)
1475 (string-append match "\ndisabled-" match)))
1477 (add-after 'install 'separate-python-output
1478 (lambda* (#:key target outputs #:allow-other-keys)
1479 (let ((out (assoc-ref outputs "out"))
1480 (out:python (assoc-ref outputs "python")))
1482 (mkdir-p (string-append out:python "/empty"))
1485 (let ((old (string-append out "/" file))
1486 (new (string-append out:python "/" file)))
1487 (mkdir-p (dirname new))
1488 (rename-file old new)))
1489 (list "libexec/sudo/python_plugin.so"
1490 "libexec/sudo/python_plugin.la")))
1493 ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
1494 ;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
1497 `(("groff" ,groff)))
1499 `(("coreutils" ,coreutils)
1500 ("linux-pam" ,linux-pam)
1501 ,@(if (%current-target-system)
1503 `(("python" ,python)))
1505 (home-page "https://www.sudo.ws/")
1506 (synopsis "Run commands as root")
1508 "Sudo (su \"do\") allows a system administrator to delegate authority to
1509 give certain users (or groups of users) the ability to run some (or all)
1510 commands as root or another user while providing an audit trail of the
1511 commands and their arguments.")
1513 ;; See <http://www.sudo.ws/sudo/license.html>.
1514 (license license:x11)))
1516 (define-public opendoas
1523 (url "https://github.com/Duncaen/OpenDoas")
1524 (commit (string-append "v" version))))
1525 (file-name (git-file-name name version))
1528 "07kkc5729p654jrgfsc8zyhiwicgmq38yacmwfvay2b3gmy728zn"))))
1529 (build-system gnu-build-system)
1532 (modify-phases %standard-phases
1534 ;; The configure script doesn't accept most of the default flags.
1535 (lambda* (#:key configure-flags #:allow-other-keys)
1536 ;; The configure script can only be told which compiler to use
1537 ;; through environment variables.
1538 (setenv "CC" ,(cc-for-target))
1539 (apply invoke "./configure" configure-flags)))
1540 (add-before 'install 'fix-makefile
1541 (lambda* (#:key outputs #:allow-other-keys)
1542 (substitute* "bsd.prog.mk"
1543 (("^\tchown.*$") ""))
1546 (list (string-append "--prefix=" (assoc-ref %outputs "out"))
1547 ;; Nothing is done with this value (yet?) but it's supported.
1548 ;; (string-append "--target=" (or ,(%current-target-system) ""))
1550 ;; Compiler choice is not carried over from the configure script.
1552 (list (string-append "CC=" ,(cc-for-target)))
1553 #:tests? #f)) ; no test suite
1555 `(("bison" ,bison)))
1556 (home-page "https://github.com/Duncaen/OpenDoas")
1557 (synopsis "Portable version of OpenBSD's doas command")
1558 (description "Doas is a minimal replacement for the venerable sudo. It was
1559 initially written by Ted Unangst of the OpenBSD project to provide 95% of the
1560 features of sudo with a fraction of the codebase.")
1561 (license (list license:bsd-3 ; libbsd/*
1562 license:isc)))) ; everything else
1564 (define-public wpa-supplicant-minimal
1566 (name "wpa-supplicant-minimal")
1571 "https://w1.fi/releases/wpa_supplicant-"
1575 "05qzak1mssnxcgdrafifxh9w86a4ha69qabkg4bsigk499xyxggw"))
1576 (modules '((guix build utils)))
1579 (substitute* "wpa_supplicant/defconfig"
1580 ;; Disable D-Bus to save ~14MiB on the closure size.
1581 (("^CONFIG_CTRL_IFACE_DBUS" line _)
1582 (string-append "#" line)))
1584 (build-system gnu-build-system)
1587 (modify-phases %standard-phases
1589 (lambda* (#:key outputs #:allow-other-keys)
1590 (chdir "wpa_supplicant")
1591 (copy-file "defconfig" ".config")
1592 (let ((port (open-file ".config" "al")))
1594 CONFIG_DEBUG_SYSLOG=y
1598 CONFIG_DRIVER_NL80211=y
1599 CFLAGS += $(shell pkg-config libnl-3.0 --cflags)
1601 CONFIG_READLINE=y\n" port)
1604 (add-after 'install 'install-documentation
1605 (lambda* (#:key outputs #:allow-other-keys)
1606 (let* ((out (assoc-ref outputs "out"))
1607 (doc (string-append out "/share/doc/wpa-supplicant"))
1608 (man (string-append out "/share/man"))
1609 (man5 (string-append man "/man5"))
1610 (man8 (string-append man "/man8")))
1611 (define (copy-man-page target)
1613 (install-file file target)))
1615 (mkdir-p man5) (mkdir man8)
1616 (for-each (copy-man-page man5)
1617 (find-files "doc/docbook" "\\.5"))
1618 (for-each (copy-man-page man8)
1619 (find-files "doc/docbook" "\\.8"))
1621 ;; wpa_supplicant.conf(5) does not explain all configuration
1622 ;; options but refers to the example config file, so install it
1623 ;; along with READMEs.
1624 (for-each (lambda (file)
1625 (install-file file doc))
1626 '("README" "README-DPP" "README-HS20"
1627 "README-P2P" "README-WPS"
1628 "wpa_supplicant.conf"))
1631 #:make-flags (list "CC=gcc"
1632 (string-append "BINDIR=" (assoc-ref %outputs "out")
1634 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1638 `(("readline" ,readline)
1640 ("openssl" ,openssl)))
1642 `(("pkg-config" ,pkg-config)))
1643 (home-page "https://w1.fi/wpa_supplicant/")
1644 (synopsis "Connecting to WPA and WPA2-protected wireless networks")
1646 "wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
1647 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in
1648 the client stations. It implements key negotiation with a WPA Authenticator
1649 and it controls the roaming and IEEE 802.11 authentication/association of the
1652 This package provides the @code{wpa_supplicant} daemon and the @code{wpa_cli}
1655 ;; In practice, this is linked against Readline, which makes it GPLv3+.
1656 (license license:bsd-3)
1658 (properties `((cpe-name . "wpa_supplicant")))))
1660 (define-public wpa-supplicant
1661 (package (inherit wpa-supplicant-minimal)
1662 (name "wpa-supplicant")
1663 (inputs `(("dbus" ,dbus)
1664 ,@(package-inputs wpa-supplicant-minimal)))
1666 (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
1668 `(modify-phases ,phases
1669 (add-after 'configure 'configure-for-dbus
1671 (let ((port (open-file ".config" "al")))
1673 CONFIG_CTRL_IFACE_DBUS_NEW=y
1674 CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
1677 (add-after 'install-documentation 'install-dbus-conf
1678 (lambda* (#:key outputs #:allow-other-keys)
1679 (let* ((out (assoc-ref outputs "out"))
1680 (dir (string-append out "/etc/dbus-1/system.d")))
1682 (copy-file "dbus/dbus-wpa_supplicant.conf"
1683 (string-append dir "/wpa_supplicant.conf")))
1686 (define-public wpa-supplicant-gui
1688 (inherit wpa-supplicant)
1689 (name "wpa-supplicant-gui")
1690 (inputs `(("qtbase" ,qtbase)
1692 ,@(package-inputs wpa-supplicant)))
1695 `(("imagemagick" ,imagemagick)
1696 ("inkscape" ,inkscape)
1697 ,@(package-native-inputs wpa-supplicant)))
1699 `(#:phases (modify-phases %standard-phases
1700 (add-after 'unpack 'chdir
1702 (chdir "wpa_supplicant/wpa_gui-qt4")
1707 (invoke "qmake" "wpa_gui.pro")
1708 (invoke "make" "-j" (number->string (parallel-job-count)))
1709 (invoke "make" "-C" "icons")))
1711 (lambda* (#:key inputs outputs #:allow-other-keys)
1712 (let ((out (assoc-ref outputs "out"))
1713 (qt '("qtbase" "qtsvg")))
1714 (install-file "wpa_gui" (string-append out "/bin"))
1715 (install-file "wpa_gui.desktop"
1716 (string-append out "/share/applications"))
1717 (copy-recursively "icons/hicolor"
1718 (string-append out "/share/icons/hicolor"))
1719 (wrap-program (string-append out "/bin/wpa_gui")
1720 `("QT_PLUGIN_PATH" ":" prefix
1721 ,(map (lambda (label)
1722 (string-append (assoc-ref inputs label)
1723 "/lib/qt5/plugins/"))
1726 (synopsis "Graphical user interface for WPA supplicant")))
1728 (define-public hostapd
1734 (uri (string-append "https://w1.fi/releases/hostapd-" version
1738 "1mrbvg4v7vm7mknf0n29mf88k3s4a4qj6r4d51wq8hmjj1m7s7c8"))))
1739 (build-system gnu-build-system)
1742 (modify-phases %standard-phases
1744 (lambda* (#:key outputs #:allow-other-keys)
1745 ;; This is mostly copied from 'wpa-supplicant' above.
1747 (copy-file "defconfig" ".config")
1748 (let ((port (open-file ".config" "al")))
1753 CONFIG_IEEE80211AC=y\n" port)
1756 (add-after 'install 'install-man-pages
1757 (lambda* (#:key outputs #:allow-other-keys)
1758 (let* ((out (assoc-ref outputs "out"))
1759 (man (string-append out "/share/man"))
1760 (man1 (string-append man "/man1"))
1761 (man8 (string-append man "/man8")))
1762 (define (copy-man-page target)
1764 (install-file file target)))
1766 (for-each (copy-man-page man1)
1767 (find-files "." "\\.1"))
1768 (for-each (copy-man-page man8)
1769 (find-files "." "\\.8"))
1772 #:make-flags (list "CC=gcc"
1773 (string-append "BINDIR=" (assoc-ref %outputs "out")
1775 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1778 (native-inputs `(("pkg-config" ,pkg-config)))
1780 ;; There's an optional dependency on SQLite.
1781 (inputs `(("openssl" ,openssl)
1783 (home-page "https://w1.fi/hostapd/")
1784 (synopsis "Daemon for Wi-Fi access points and authentication servers")
1786 "hostapd is a user-space daemon for WiFi access points and authentication
1787 servers. It implements IEEE 802.11 access point management, IEEE
1788 802.1X/WPA/WPA2/EAP Authenticators, RADIUS client, EAP server, and RADIUS
1789 authentication server.")
1791 ;; Same license as wpa_supplicant.
1792 (license license:bsd-3)))
1794 (define-public wakelan
1801 "ftp://ftp.gwdg.de/pub/linux/metalab/system/network/misc/wakelan-"
1805 "0vydqpf44146ir6k87gmqaq6xy66xhc1gkr3nsd7jj3nhy7ypx9x"))))
1806 (build-system gnu-build-system)
1809 (modify-phases %standard-phases
1811 (lambda* (#:key outputs #:allow-other-keys)
1812 (let ((out (assoc-ref outputs "out")))
1813 (mkdir-p (string-append out "/bin"))
1814 (mkdir-p (string-append out "/share/man/man1"))
1816 ;; It's an old configure script that doesn't understand
1817 ;; the extra options we pass.
1818 (setenv "CONFIG_SHELL" (which "bash"))
1819 (invoke "./configure"
1820 (string-append "--prefix=" out)
1821 (string-append "--mandir=" out
1824 (home-page "https://www.kernel.org") ; really, no home page
1825 (synopsis "Send a wake-on-LAN packet")
1827 "WakeLan broadcasts a properly formatted UDP packet across the local area
1828 network, which causes enabled computers to power on.")
1829 (license license:gpl2+)))
1831 (define-public dmidecode
1838 "mirror://savannah/dmidecode/dmidecode-"
1842 "1pcfhcgs2ifdjwp7amnsr3lq95pgxpr150bjhdinvl505px0cw07"))))
1843 (build-system gnu-build-system)
1845 '(#:phases (modify-phases %standard-phases (delete 'configure))
1846 #:tests? #f ; no 'check' target
1847 #:make-flags (list (string-append "prefix="
1848 (assoc-ref %outputs "out")))))
1849 (home-page "https://www.nongnu.org/dmidecode/")
1850 (synopsis "Read hardware information from the BIOS")
1852 "Dmidecode reports information about your system's hardware as described
1853 in your system BIOS according to the SMBIOS/DMI standard. This typically
1854 includes system manufacturer, model name, serial number, BIOS version, asset
1855 tag as well as a lot of other details of varying level of interest and
1856 reliability depending on the manufacturer. This will often include usage
1857 status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory
1858 module slots, and the list of I/O ports (e.g. serial, parallel, USB).")
1859 (license license:gpl2+)))
1861 (define-public acpica
1864 (version "20200717")
1868 "https://acpica.org/sites/acpica/files/acpica-unix2-"
1872 "0jyy71szjr40c8v40qqw6yh3gfk8d6sl3nay69zrn5d88i3r0jca"))))
1873 (build-system gnu-build-system)
1874 (native-inputs `(("flex" ,flex)
1877 '(#:make-flags (list (string-append "PREFIX=" %output)
1880 "OPT_CFLAGS=-Wall -fno-strict-aliasing")
1881 #:tests? #f ; no 'check' target
1882 #:phases (modify-phases %standard-phases (delete 'configure))))
1883 (home-page "https://acpica.org/")
1884 (synopsis "Tools for the development and debugging of ACPI tables")
1886 "The @acronym{ACPICA, ACPI Component Architecture} project provides an
1887 OS-independent reference implementation of the @acronym{ACPI, Advanced
1888 Configuration and Power Interface} specification. ACPICA code contains those
1889 portions of ACPI meant to be directly integrated into the host OS as a
1890 kernel-resident subsystem, and a small set of tools to assist in developing and
1891 debugging ACPI tables.
1893 This package contains only the user-space tools needed for ACPI table
1894 development, not the kernel implementation of ACPI.")
1895 (license license:gpl2))) ; dual GPLv2/ACPICA Licence
1897 (define-public s-tui
1904 (uri (pypi-uri "s-tui" version))
1906 (base32 "0xkfdaz5np21311ffdvhks58155qby8j8scbcixhvjd913pj66qx"))))
1907 (build-system python-build-system)
1909 `(("python-psutil" ,python-psutil)
1910 ("python-urwid" ,python-urwid)))
1911 (home-page "https://github.com/amanusk/s-tui")
1912 (synopsis "Interactive terminal stress test and monitoring tool")
1914 "The Stress Terminal UI displays graphs of the CPU frequency,
1915 utilization, temperature and power.")
1916 (license license:gpl2+)))
1918 (define-public stress
1924 (uri (string-append "mirror://debian/pool/main/s/stress/stress_"
1925 version ".orig.tar.gz"))
1928 "0nw210jajk38m3y7h8s130ps2qsbz7j75wab07hi2r3hlz14yzh5"))))
1929 (build-system gnu-build-system)
1930 (home-page "https://packages.debian.org/sid/stress")
1931 (synopsis "Impose load on and stress test a computer system")
1933 "Stress is a tool that imposes a configurable amount of CPU, memory, I/O,
1934 or disk stress on a POSIX-compliant operating system and reports any errors it
1937 Stress is not a benchmark. It is a tool used by system administrators to
1938 evaluate how well their systems will scale, by kernel programmers to evaluate
1939 perceived performance characteristics, and by systems programmers to expose
1940 the classes of bugs which only or more frequently manifest themselves when the
1941 system is under heavy load.")
1942 (license license:gpl2+)))
1944 (define-public detox
1951 (url "https://github.com/dharple/detox")
1952 (commit (string-append "v" version))))
1953 (file-name (git-file-name name version))
1956 "1dd608c7g65s5lj02cddvani3q9kzirddgkjqa22ap9d4f8b9xgr"))))
1957 (build-system gnu-build-system)
1959 `(("autoconf" ,autoconf)
1960 ("automake" ,automake)
1963 `(#:tests? #f ;no 'check' target
1964 #:phases (modify-phases %standard-phases
1965 (add-after 'unpack 'delete-configure
1966 ;; The "configure" script is present, but otherwise the
1967 ;; project is not bootstrapped: missing install-sh and
1968 ;; Makefile.in, so delete it so the bootstrap phase will
1970 (lambda _ (delete-file "configure") #t)))))
1971 (home-page "https://github.com/dharple/detox")
1972 (synopsis "Clean up file names")
1974 "Detox is a program that renames files to make them easier to work with
1975 under Unix and related operating systems. Spaces and various other unsafe
1976 characters (such as \"$\") get replaced with \"_\". ISO 8859-1 (Latin-1)
1977 characters can be replaced as well, as can UTF-8 characters.")
1978 (license license:bsd-3)))
1980 (define-public testdisk
1986 (uri (string-append "https://www.cgsecurity.org/testdisk-"
1987 version ".tar.bz2"))
1990 "1zlh44w67py416hkvw6nrfmjickc2d43v51vcli5p374d5sw84ql"))))
1991 (build-system gnu-build-system)
1993 `(("ntfs-3g" ,ntfs-3g)
1994 ("util-linux" ,util-linux "lib")
1995 ("openssl" ,openssl)
1996 ;; FIXME: add reiserfs.
1998 ("e2fsprogs" ,e2fsprogs)
1999 ("libjpeg" ,libjpeg-turbo)
2000 ("ncurses" ,ncurses)))
2001 (home-page "https://www.cgsecurity.org/wiki/TestDisk")
2002 (synopsis "Data recovery tool")
2004 "TestDisk is a program for data recovery, primarily designed to help
2005 recover lost partitions and/or make non-booting disks bootable again.")
2006 (license license:gpl2+)))
2015 "http://mama.indstate.edu/users/ice/tree/src/tree-"
2018 (base32 "1hmpz6k0mr6salv0nprvm1g0rdjva1kx03bdf1scw8a38d5mspbi"))))
2019 (build-system gnu-build-system)
2021 '(#:phases (modify-phases %standard-phases (delete 'configure))
2022 #:tests? #f ; no check target
2023 #:make-flags (let ((out (assoc-ref %outputs "out")))
2024 (list (string-append "prefix=" out)))))
2025 (synopsis "Recursively list the contents of a directory")
2027 "Tree is a recursive directory listing command that produces a depth
2028 indented listing of files, which is colorized ala dircolors if the LS_COLORS
2029 environment variable is set and output is to tty.")
2030 (home-page "http://mama.indstate.edu/users/ice/tree/")
2031 (license license:gpl2+)))
2033 (define-public direvent
2039 (uri (string-append "mirror://gnu/direvent/direvent-"
2043 "0m9vi01b1km0cpknflyzsjnknbava0s1n6393b2bpjwyvb6j5613"))
2044 (modules '((guix build utils)))
2046 (substitute* "tests/testsuite"
2047 (("#![[:blank:]]?/bin/sh")
2050 (build-system gnu-build-system)
2053 (modify-phases %standard-phases
2054 (add-before 'build 'patch-/bin/sh
2055 (lambda* (#:key inputs #:allow-other-keys)
2056 ;; Use the right shell when executing the watcher and
2057 ;; user-provided shell commands.
2058 (let ((bash (assoc-ref inputs "bash")))
2059 (substitute* '("src/direvent.c" "src/progman.c")
2061 (string-append "\"" bash "/bin/sh\"")))
2063 ;; Adjust the 'shell.at' test accordingly.
2064 (substitute* "tests/testsuite"
2066 (string-append "SHELL=" bash "/bin/sh")))
2069 (home-page "https://www.gnu.org.ua/software/direvent/")
2070 (synopsis "Daemon to monitor directories for events such as file removal")
2072 "A daemon that monitors directories for events, such as creating,
2073 deleting or modifying files. It can monitor different sets of directories for
2074 different events. When an event is detected, direvent calls a specified
2075 external program with information about the event, such as the location
2076 within the file system where it occurred. Thus, \"direvent\" provides an
2077 easy way to react immediately if given files undergo changes, for example, to
2078 track changes in important system configuration files.")
2079 (license license:gpl3+)))
2081 (define-public libcap-ng
2088 "https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-"
2092 "08cy59iassiwbmfxa5v0kb374r80290vv32f5q1mnip11av26kgi"))))
2093 (build-system gnu-build-system)
2096 (list "--without-python")))
2097 (home-page "https://people.redhat.com/sgrubb/libcap-ng/")
2098 (synopsis "Library for more easily working with POSIX capabilities")
2100 "The libcap-ng library is intended to make programming with POSIX
2101 capabilities easier than the traditional libcap library. It includes
2102 utilities that can analyse all currently running applications and print out
2103 any capabilities and whether or not it has an open ended bounding set. The
2104 included utilities are designed to let admins and developers spot apps from
2105 various ways that may be running with too much privilege.")
2106 ;; The library is lgpl2.1+, but also ships some utils which are gpl2+.
2107 (license (list license:lgpl2.1+ license:gpl2+))))
2109 (define-public smartmontools
2111 (name "smartmontools")
2116 "mirror://sourceforge/smartmontools/smartmontools/"
2117 version "/smartmontools-" version ".tar.gz"))
2120 "0imqb7ka4ia5573w8rnpck571pjjc9698pdjcapy9cfyk4n4swrz"))))
2121 (build-system gnu-build-system)
2122 (inputs `(("libcap-ng" ,libcap-ng)))
2123 (home-page "https://www.smartmontools.org/")
2124 (synopsis "S.M.A.R.T. harddisk control and monitoring tools")
2126 "The smartmontools package contains utility programs to control and
2127 monitor storage systems using the Self-Monitoring, Analysis and Reporting
2128 Technology System (@dfn{S.M.A.R.T.}) built into most modern ATA and SCSI hard
2129 disks. In many cases, these utilities will provide advanced warning of disk
2130 degradation and failure.")
2131 (license license:gpl2+)))
2133 (define-public fdupes
2140 (uri (string-append "https://github.com/adrianlopezroche/fdupes/"
2141 "releases/download/v" version "/"
2142 "fdupes-" version ".tar.gz"))
2144 (base32 "1g9p50xhi2sp0hqxml4w2k0kq9jv988q2yxm347z5349dlxvap6d"))))
2145 (build-system gnu-build-system)
2147 `(("ncurses" ,ncurses)
2149 (home-page "https://github.com/adrianlopezroche/fdupes")
2150 (synopsis "Identify duplicate files")
2152 "fdupes is a program for identifying duplicate files residing within
2153 specified directories.")
2154 (license license:expat)))
2156 (define-public graphios
2163 (uri (pypi-uri "graphios" version))
2166 "1h87hvc315wg6lklbf4l7csd3n5pgljwrfli1p3nasdi0izgn66i"))))
2167 (build-system python-build-system)
2169 ;; Be warned: Building with Python 3 succeeds, but the build process
2170 ;; throws a syntax error that is ignored.
2171 `(#:python ,python-2
2173 (modify-phases %standard-phases
2174 (add-before 'build 'fix-setup.py
2175 (lambda* (#:key outputs #:allow-other-keys)
2176 ;; Fix hardcoded, unprefixed file names.
2177 (let ((out (assoc-ref outputs "out")))
2178 (substitute* '("setup.py")
2179 (("/etc") (string-append out "/etc"))
2181 (("distro_ver = .*") "distro_ver = ''"))
2183 (home-page "https://github.com/shawn-sterling/graphios")
2184 (synopsis "Emit Nagios metrics to Graphite, Statsd, and Librato")
2186 "Graphios is a script to emit nagios perfdata to various upstream metrics
2187 processing and time-series systems. It's currently compatible with Graphite,
2188 Statsd, Librato and InfluxDB. Graphios can emit Nagios metrics to any number
2189 of supported upstream metrics systems simultaneously.")
2190 (license license:gpl2+)))
2192 (define-public ansible
2199 (uri (pypi-uri "ansible" version))
2201 (base32 "1c9ayh61qwasgncmlw7rjx5r4g5n2cpg1d5blgn53zg7xhrx1yc8"))))
2202 (build-system python-build-system)
2204 `(("python-bcrypt" ,python-bcrypt)
2205 ("python-pynacl" ,python-pynacl)
2206 ("python-httplib2" ,python-httplib2)
2207 ("python-passlib" ,python-passlib)
2208 ("python-nose" ,python-nose)
2209 ("python-mock" ,python-mock)
2210 ("python-jinja2" ,python-jinja2)
2211 ("python-pyyaml" ,python-pyyaml)
2212 ("python-paramiko" ,python-paramiko)))
2214 `(("python-cryptography" ,python-cryptography)
2215 ("python-jinja2" ,python-jinja2)
2216 ("python-pyyaml" ,python-pyyaml)
2217 ("python-paramiko" ,python-paramiko)))
2220 (modify-phases %standard-phases
2221 ;; Several ansible commands (ansible-config, ansible-console, etc.)
2222 ;; are just symlinks to a single ansible executable. The ansible
2223 ;; executable behaves differently based on the value of
2224 ;; sys.argv[0]. This does not work well with our wrap phase, and
2225 ;; therefore the following two phases are required as a workaround.
2226 (add-after 'unpack 'hide-wrapping
2228 ;; Overwrite sys.argv[0] to hide the wrapper script from it.
2229 (substitute* "bin/ansible"
2230 (("import traceback" all)
2231 (string-append all "
2233 sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
2236 (add-after 'install 'replace-symlinks
2237 (lambda* (#:key outputs #:allow-other-keys)
2238 ;; Replace symlinks with duplicate copies of the ansible
2240 (let ((out (assoc-ref outputs "out")))
2242 (lambda (subprogram)
2243 (delete-file (string-append out "/bin/ansible-" subprogram))
2244 (copy-file (string-append out "/bin/ansible")
2245 (string-append out "/bin/ansible-" subprogram)))
2246 (list "config" "console" "doc" "galaxy"
2247 "inventory" "playbook" "pull" "vault")))
2249 (home-page "https://www.ansible.com/")
2250 (synopsis "Radically simple IT automation")
2251 (description "Ansible is a radically simple IT automation system. It
2252 handles configuration management, application deployment, cloud provisioning,
2253 ad hoc task execution, and multinode orchestration---including trivializing
2254 things like zero-downtime rolling updates with load balancers.")
2255 (license license:gpl3+)))
2257 (define-public debops
2265 (url "https://github.com/debops/debops")
2266 (commit (string-append "v" version))))
2267 (file-name (git-file-name name version))
2269 (base32 "052b2dykdn35pdpn9s4prawl6nl6yzih8nyf54hpvhpisvjrm1v5"))
2271 (search-patches "debops-constants-for-external-program-names.patch"
2272 "debops-debops-defaults-fall-back-to-less.patch"))))
2273 (build-system python-build-system)
2277 `(("ansible" ,ansible)
2280 ("util-linux" ,util-linux) ;; for umount
2281 ("findutils" ,findutils)
2285 `(("python-future" ,python-future)
2286 ("python-distro" ,python-distro)))
2290 (modify-phases %standard-phases
2291 (add-after 'unpack 'nuke-debops-update
2293 (chmod "bin/debops-update" #o755) ; FIXME work-around git-fetch issue
2294 (with-output-to-file "bin/debops-update"
2296 (format #t "#!/bin/sh
2297 echo 'debops is installed via guix. guix-update is useless in this case.
2298 Please use `guix package -u debops` instead.'")))
2300 ;; patch shebangs only in actuall scripts, not in files included in
2301 ;; roles (which are to be delivered to the targte systems)
2302 (delete `patch-generated-file-shebangs)
2303 (replace 'patch-source-shebangs
2305 (for-each patch-shebang
2308 ;; Filter out symlinks.
2309 (eq? 'regular (stat:type stat)))
2311 (add-after 'unpack 'fix-paths
2313 (define (substitute-program-names file)
2314 ;; e.g. ANSIBLE_PLAYBOOK = '/gnu/store/…/bin/ansible-playbook'
2317 (let ((varname (string-upcase
2319 (lambda (c) (if (char=? c #\-) #\_ c))
2322 (((string-append "^(" varname " = )'.*'") line prefix)
2323 (string-append prefix "'" (which name) "'")))))
2324 '("ansible-playbook" "encfs" "find" "fusermount"
2325 "umount" "gpg" "ansible" "which")))
2326 (for-each substitute-program-names
2328 "bin/debops-padlock"
2330 "debops/__init__.py"
2331 "debops/cmds/__init__.py"))
2333 (home-page "https://www.debops.org/")
2334 (synopsis "Collection of general-purpose Ansible roles")
2335 (description "The Ansible roles provided by that can be used to manage
2336 Debian or Ubuntu hosts. In addition, a default set of Ansible playbooks can
2337 be used to apply the provided roles in a controlled way, using Ansible
2340 The roles are written with a high customization in mind, which can be done
2341 using Ansible inventory. This way the role and playbook code can be shared
2342 between multiple environments, with different configuration in to each one.
2344 Services can be managed on a single host, or spread between multiple hosts.
2345 DebOps provides support for different SQL and NoSQL databases, web servers,
2346 programming languages and specialized applications useful in a data center
2347 environment or in a cluster. The project can also be used to deploy
2348 virtualization environments using KVM/libvirt, Docker or LXC technologies to
2349 manage virtual machines and/or containers.")
2350 (license license:gpl3+)))
2352 (define-public emacs-ansible-doc
2353 (let ((commit "86083a7bb2ed0468ca64e52076b06441a2f8e9e0"))
2355 (name "emacs-ansible-doc")
2356 (version (git-version "0.4" "1" commit))
2361 (url "https://github.com/lunaryorn/ansible-doc.el")
2363 (file-name (git-file-name name version))
2366 "0lap404ch74w99n3xip176jr42b38xhyzkfnkyqg0g3wk2cd3aq8"))))
2367 (build-system emacs-build-system)
2368 ;; Unmaintained by upstream.
2369 (home-page "https://github.com/lunaryorn/ansible-doc.el")
2370 (synopsis "Ansible documentation for Emacs")
2372 "This package provides an Ansible documentation for GNU Emacs.
2374 @code{ansible-doc} allows you to view the documentation of an Ansible
2375 module and @code{ansible-doc-mode} minor mode adds documentation
2376 lookup to YAML Mode. You could enable the mode with @code{(add-hook
2377 'yaml-mode-hook #'ansible-doc-mode)}.")
2378 (license license:gpl3+))))
2380 (define-public cpulimit
2388 (url "https://github.com/opsengine/cpulimit")
2389 (commit (string-append "v" version))))
2390 (file-name (git-file-name name version))
2392 (base32 "1dz045yhcsw1rdamzpz4bk8mw888in7fyqk1q1b3m1yk4pd1ahkh"))))
2393 (build-system gnu-build-system)
2395 `(#:phases (modify-phases %standard-phases
2399 (invoke "make" "CC=gcc" "-Csrc")))
2402 (invoke "make" "CC=gcc" "-Ctests")))
2404 (lambda* (#:key outputs #:allow-other-keys)
2405 (let* ((out (assoc-ref outputs "out"))
2406 (bin (string-append out "/bin")))
2407 (install-file "src/cpulimit" bin))
2409 (home-page "https://github.com/opsengine/cpulimit")
2410 (synopsis "Limit CPU usage")
2412 "Cpulimit limits the CPU usage of a process. It does not change the nice
2413 value or other scheduling priority settings, but the real CPU usage, and is
2414 able to adapt itself dynamically to the overall system load. Children
2415 processes and threads of the specified process may optionally share the same
2417 (license license:gpl2+)))
2419 (define-public autojump
2427 (url "https://github.com/wting/autojump")
2428 (commit (string-append "release-v" version))))
2429 (file-name (git-file-name name version))
2431 (base32 "1rgpsh70manr2dydna9da4x7p8ahii7dgdgwir5fka340n1wrcws"))))
2432 (build-system gnu-build-system)
2433 (native-inputs ; for tests
2434 `(("python-mock" ,python-mock)
2435 ("python-pytest" ,python-pytest)))
2437 `(("python" ,python-wrapper)))
2440 (modify-phases %standard-phases
2441 (add-after 'unpack 'make-git-checkout-writable
2442 ;; ‘install.py’ modifies files before installing them.
2444 (for-each make-file-writable (find-files "."))
2450 (invoke "python" "tests/unit/autojump_utils_test.py")))
2452 (lambda* (#:key outputs #:allow-other-keys)
2453 (setenv "SHELL" (which "bash"))
2454 (invoke "python" "install.py"
2455 (string-append "--destdir="
2456 (assoc-ref outputs "out"))))))))
2457 (home-page "https://github.com/wting/autojump")
2458 (synopsis "Shell extension for file system navigation")
2460 "Autojump provides a faster way to navigate your file system, with a \"cd
2461 command that learns\". It works by maintaining a database of the directories
2462 you use the most from the command line and allows you to \"jump\" to
2463 frequently used directories by typing only a small pattern.")
2464 (license license:gpl3+)))
2473 (url "https://github.com/clvv/fasd")
2475 (file-name (git-file-name name version))
2478 "1awi71jdv3mhjrmar2d4z1i90kn7apd7aq1w31sh6w4yibz9kiyj"))))
2479 (build-system gnu-build-system)
2481 `(#:phases (modify-phases %standard-phases
2482 (delete 'configure)) ;no configuration
2483 #:tests? #f ;no tests
2484 #:make-flags (list (string-append "PREFIX=" %output))))
2485 (home-page "https://github.com/clvv/fasd")
2486 (synopsis "Quick access to files and directories for shells")
2488 "Fasd (pronounced similar to \"fast\") is a command-line productivity
2489 booster. Fasd offers quick access to files and directories for POSIX shells.
2490 It is inspired by tools like autojump, z, and v. Fasd keeps track of files
2491 and directories you have accessed so that you can quickly reference them in
2493 (license license:x11)))
2495 (define-public iftop
2501 (uri (string-append "http://www.ex-parrot.com/~pdw/iftop/download"
2502 "/iftop-" version ".tar.gz"))
2505 "15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp"))))
2506 (build-system gnu-build-system)
2508 `(("libpcap" ,libpcap)
2509 ("ncurses" ,ncurses)))
2510 (synopsis "Monitor network usage")
2511 (description "Iftop does for network usage what @command{top} does
2512 for CPU usage. It listens to network traffic on a named interface and
2513 displays a table of current bandwidth usage by pairs of hosts.")
2514 (home-page "http://www.ex-parrot.com/~pdw/iftop/")
2515 (license license:gpl2+)))
2517 (define-public munge
2523 (uri (string-append "https://github.com/dun/munge/releases/"
2524 "download/munge-" version "/munge-"
2528 "0h06sghb4rqvv1ywyd6mzsmbcgh712v6ygrff0gzm440y4ca41k6"))
2529 (modules '((guix build utils)))
2532 ;; Don't insist on write access to /var.
2533 (substitute* "src/etc/Makefile.in"
2534 (("\\$\\(INSTALL\\)(.*)localstatedir" _ middle)
2535 (string-append "-$(INSTALL)" middle "localstatedir"))
2536 (("\\$\\(MKDIR_P\\) .*(local|run)statedir.*")
2540 `(("openssl" ,openssl)
2541 ("libgcrypt" ,libgcrypt)))
2542 (build-system gnu-build-system)
2545 (list "--localstatedir=/var"
2546 (string-append "--with-pkgconfigdir="
2547 (assoc-ref %outputs "out") "/lib/pkgconfig"))
2549 (modify-phases %standard-phases
2550 ;; XXX Many test series fail. Some might be fixable, others do no-no
2551 ;; things like invoking ‘sudo’.
2552 (add-after 'unpack 'skip-failing-tests
2554 (for-each (lambda (test)
2555 (substitute* "t/Makefile.in"
2556 (((string-append test "\\.t ")) "")))
2557 (list "0100-munged-lock"
2559 "0011-munged-cmdline"
2560 "0012-munge-cmdline"
2561 "0013-unmunge-cmdline"
2562 "0101-munged-security-socket"
2563 "0102-munged-security-keyfile"
2564 "0103-munged-security-logfile"
2565 "0110-munged-origin-addr"))
2567 (home-page "https://dun.github.io/munge/")
2568 (synopsis "Cluster computing authentication service")
2570 "Munge is an authentication service for creating and validating
2571 credentials. It allows a process to authenticate the UID and GID of another
2572 local or remote process within a group of hosts having common users and
2573 groups. These hosts form a security realm that is defined by a shared
2574 cryptographic key. Clients within this security realm can create and validate
2575 credentials without the use of root privileges, reserved ports, or
2576 platform-specific methods.")
2577 (license license:gpl3+)))
2579 (define-public audit
2582 (home-page "https://people.redhat.com/sgrubb/audit/")
2586 (uri (string-append home-page "audit-" version ".tar.gz"))
2589 "1dzcwb2q78q7x41shcachn7f4aksxbxd470yk38zh03fch1l2p8f"))))
2590 (build-system gnu-build-system)
2592 `(#:configure-flags (list "--with-python=no"
2593 "--disable-static")))
2595 `(("openldap" ,openldap)
2597 ("sasl" ,cyrus-sasl)))
2598 (synopsis "User-space component to the Linux auditing system")
2600 "auditd is the user-space component to the Linux auditing system, which
2601 allows logging of system calls made by user-land processes. It's responsible
2602 for writing audit records to the disk. Viewing the logs is done with the
2603 @code{ausearch} or @code{aureport} utilities. Configuring the audit rules is
2604 done with the @code{auditctl} utility.")
2605 (license license:gpl2+)))
2613 (uri (string-append "https://nmap.org/dist/nmap-" version
2617 "1aizfys6l9f9grm82bk878w56mg0zpkfns3spzj157h98875mypw"))
2618 (modules '((guix build utils)))
2621 (for-each delete-file-recursively
2622 ;; Remove bundled lua, pcap, and pcre libraries.
2623 ;; FIXME: Remove bundled liblinear once packaged.
2627 ;; Remove pre-compiled binares.
2630 (build-system gnu-build-system)
2632 `(("openssl" ,openssl)
2633 ("libpcap" ,libpcap)
2636 ("zlib" ,zlib) ;for NSE compression support
2639 ("python" ,python-2)))
2641 ;; TODO Add zenmap output.
2642 (outputs '("out" "ndiff"))
2644 `(#:configure-flags '("--without-zenmap")
2646 (modify-phases %standard-phases
2647 (add-after 'configure 'patch-Makefile
2649 (substitute* "Makefile"
2650 ;; Do not attempt to build lua.
2651 (("build-dnet build-lua") "build-dnet"))
2654 (lambda* (#:key outputs #:allow-other-keys)
2655 (define (make out . args)
2656 (apply invoke "make"
2657 (string-append "prefix=" out)
2659 (define (python-path dir)
2660 (string-append dir "/lib/python"
2661 ,(version-major+minor
2662 (package-version python))
2664 (let ((out (assoc-ref outputs "out"))
2665 (ndiff (assoc-ref outputs "ndiff")))
2666 (for-each mkdir-p (list out ndiff))
2672 (make ndiff "install-ndiff")
2673 (wrap-program (string-append ndiff "/bin/ndiff")
2674 `("PYTHONPATH" prefix
2675 (,(python-path ndiff)))))
2677 ;; These are the tests that do not require network access.
2679 (lambda _ (invoke "make"
2683 ;; Nmap can't cope with out-of-source building.
2684 #:out-of-source? #f))
2685 (home-page "https://nmap.org/")
2686 (synopsis "Network discovery and security auditing tool")
2688 "Nmap (\"Network Mapper\") is a network discovery and security auditing
2689 tool. It is also useful for tasks such as network inventory, managing service
2690 upgrade schedules, and monitoring host or service uptime. It also provides an
2691 advanced netcat implementation (ncat), a utility for comparing scan
2692 results (ndiff), and a packet generation and response analysis tool (nping).")
2693 ;; This package uses nmap's bundled versions of libdnet and liblinear, which
2694 ;; both use a 3-clause BSD license.
2695 (license (list license:nmap license:bsd-3))))
2697 (define-public dstat
2705 (url "https://github.com/dagwieers/dstat")
2706 (commit (string-append "v" version))))
2707 (file-name (git-file-name "dstat" version))
2709 (base32 "1qnmkhqmjd1m3if05jj29dvr5hn6kayq9bkkkh881w472c0zhp8v"))
2710 (patches (search-patches "dstat-fix-crash-when-specifying-delay.patch"
2711 "dstat-skip-devices-without-io.patch"))))
2712 (build-system gnu-build-system)
2714 `(#:tests? #f ; no make check
2715 #:make-flags (let ((out (assoc-ref %outputs "out")))
2716 (list (string-append "DESTDIR=" out)
2719 (modify-phases %standard-phases
2720 (add-after 'unpack 'fix-python3-DeprecationWarning
2722 (substitute* "dstat"
2723 (("collections") "collections.abc"))
2725 (delete 'configure) ; no configure script
2726 (add-after 'install 'wrap
2727 (lambda* (#:key outputs #:allow-other-keys)
2728 (let ((out (assoc-ref outputs "out")))
2729 (wrap-program (string-append out "/bin/dstat")
2730 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2733 `(("python" ,python-wrapper)
2734 ("python-six" ,python-six)))
2735 (synopsis "Versatile resource statistics tool")
2736 (description "Dstat is a versatile replacement for @command{vmstat},
2737 @command{iostat}, @command{netstat}, and @command{ifstat}. Dstat overcomes
2738 some of their limitations and adds some extra features, more counters and
2739 flexibility. Dstat is handy for monitoring systems during performance tuning
2740 tests, benchmarks or troubleshooting.
2742 Dstat allows you to view all of your system resources in real-time, you can,
2743 e.g., compare disk utilization in combination with interrupts from your IDE
2744 controller, or compare the network bandwidth numbers directly with the disk
2745 throughput (in the same interval).")
2746 (home-page "http://dag.wiee.rs/home-made/dstat/")
2747 (license license:gpl2+)))
2749 (define-public thefuck
2757 (url "https://github.com/nvbn/thefuck")
2759 (file-name (git-file-name name version))
2761 (base32 "0fnf78956pwhb9cgv1jmgypnkma5xzflkivfrkfiadbgin848yfg"))
2762 (patches (search-patches "thefuck-test-environ.patch"))))
2763 (build-system python-build-system)
2766 (modify-phases %standard-phases
2768 (add-after 'install 'check
2769 (lambda* (#:key inputs outputs #:allow-other-keys)
2770 ;; Tests look for installed package
2771 (add-installed-pythonpath inputs outputs)
2772 ;; Some tests need write access to $HOME.
2773 (setenv "HOME" "/tmp")
2774 (invoke "py.test" "-v")
2777 `(("python-colorama" ,python-colorama)
2778 ("python-decorator" ,python-decorator)
2779 ("python-psutil" ,python-psutil)
2780 ("python-pyte" ,python-pyte)
2781 ("python-six" ,python-six)))
2784 ("python-mock" ,python-mock)
2785 ("python-pytest" ,python-pytest)
2786 ("python-pytest-mock" ,python-pytest-mock)))
2787 (home-page "https://github.com/nvbn/thefuck")
2788 (synopsis "Correct mistyped console command")
2790 "The Fuck tries to match a rule for a previous, mistyped command, creates
2791 a new command using the matched rule, and runs it.")
2792 (license license:x11)))
2801 (uri (string-append "https://gentoo.com/di/di-" version ".tar.gz"))
2803 (base32 "0crvvfsxh8ryc0j19a2x52i9zacvggm8zi6j3kzygkcwnpz4km8r"))))
2804 (build-system gnu-build-system)
2806 `(#:tests? #f ; obscure test failures
2808 (modify-phases %standard-phases
2809 (delete 'configure) ; no configure script
2810 (add-before 'build 'setup-environment
2811 (lambda* (#:key outputs #:allow-other-keys)
2812 (setenv "CC" ,(cc-for-target))
2813 (setenv "prefix" (assoc-ref outputs "out"))
2815 #:make-flags (list "--environment-overrides")))
2816 (home-page "https://gentoo.com/di/")
2817 (synopsis "Advanced df like disk information utility")
2819 "@code{di} is a disk information utility, displaying everything that your
2820 @code{df} command does and more. It features the ability to display your disk
2821 usage in whatever format you prefer. It is designed to be highly portable and
2822 produce uniform output across heterogeneous networks.")
2823 (license license:zlib)))
2825 (define-public cbatticon
2833 (url "https://github.com/valr/cbatticon")
2836 (base32 "0ivm2dzhsa9ir25ry418r2qg2llby9j7a6m3arbvq5c3kaj8m9jr"))
2837 (file-name (git-file-name name version))))
2838 (build-system gnu-build-system)
2840 `(#:tests? #f ; no tests
2842 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2845 (modify-phases %standard-phases
2846 (delete 'configure)))) ; no configure script
2849 ("gettext" ,gettext-minimal)
2850 ("libnotify" ,libnotify)))
2852 `(("pkg-config" ,pkg-config)))
2853 (synopsis "Lightweight battery icon for the system tray")
2854 (description "cbatticon is a lightweight battery icon that displays
2855 the status of your battery in the system tray.")
2856 (home-page "https://github.com/valr/cbatticon")
2857 (license license:gpl2+)))
2859 (define-public interrobang
2860 (let ((revision "1")
2861 (commit "896543735e1c99144765fdbd7b6e6b5afbd8b881"))
2863 (name "interrobang")
2864 (version (git-version "0.0.0" revision commit))
2869 (url "https://github.com/TrilbyWhite/interrobang")
2871 (file-name (git-file-name name version))
2873 (base32 "1n13m70p1hfba5dy3i8hfclbr6k9q3d9dai3dg4jvhdhmxcpjzdf"))))
2874 (build-system gnu-build-system)
2876 `(#:tests? #f ; no tests
2878 (modify-phases %standard-phases
2879 (delete 'configure)) ; no configure script
2880 #:make-flags (list (string-append "PREFIX="
2881 (assoc-ref %outputs "out")))))
2883 `(("libx11" ,libx11)))
2885 `(("pkg-config" ,pkg-config)))
2886 (synopsis "Scriptable launcher menu")
2887 (description "Interrobang is a scriptable launcher menu with a customizable
2888 shortcut syntax and completion options.")
2889 (home-page "https://github.com/TrilbyWhite/interrobang")
2890 (license license:gpl3+))))
2892 (define-public pam-krb5
2899 "https://archives.eyrie.org/software/kerberos/"
2900 "pam-krb5-" version ".tar.xz"))
2901 (patches (search-patches "pam-krb5-CVE-2020-10595.patch"))
2904 "1qjp8i1s9bz7g6kiqrkzzkxn5pfspa4sy53b6z40fqmdf9przdfb"))))
2905 (build-system gnu-build-system)
2908 (modify-phases %standard-phases
2909 (add-before 'configure 'disable-tests
2911 ;; The build container seems to interfere with some tests.
2912 (substitute* "tests/TESTS"
2913 (("module/basic\n") ""))
2914 (substitute* "tests/TESTS"
2915 (("pam-util/vector\n") ""))
2918 `(("linux-pam" ,linux-pam)
2919 ("mit-krb5" ,mit-krb5)))
2922 ("perl-test-pod" ,perl-test-pod))) ; required for tests
2923 (synopsis "Kerberos PAM module")
2925 "Pam-krb5 is a Kerberos PAM module for either MIT Kerberos or Heimdal.
2926 It supports ticket refreshing by screen savers, configurable
2927 authorization handling, authentication of non-local accounts for network
2928 services, password changing, and password expiration, as well as all the
2929 standard expected PAM features. It works correctly with OpenSSH, even
2930 with @code{ChallengeResponseAuthentication} and @code{PrivilegeSeparation}
2931 enabled, and supports extensive configuration either by PAM options or in
2932 krb5.conf or both. PKINIT is supported with recent versions of both MIT
2933 Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.")
2934 (home-page "https://www.eyrie.org/~eagle/software/pam-krb5")
2935 ;; Dual licenced under a homebrew non-copyleft OR GPL (any version)
2936 ;; However, the tarball does not contain a copy of the GPL, so unless
2937 ;; we put one in, we cannot distribute it under GPL without violating
2938 ;; clause requiring us to give all recipients a copy.
2939 (license license:gpl1+)))
2941 (define (sunxi-tools-source version)
2945 (url "https://github.com/linux-sunxi/sunxi-tools")
2946 (commit (string-append "v" version))))
2948 (base32 "04f3jqg8ww4jxsf9c6ddcdgy2xbhkyp0b3l5f1hvvbv94p81rjxd"))
2949 (modules '((guix build utils)))
2951 ;; Remove binaries contained in the tarball which are only for the
2952 ;; target and can be regenerated anyway.
2954 (delete-file-recursively "bin")
2956 (file-name (git-file-name "sunxi-tools" version))))
2958 (define sunxi-target-tools
2960 (name "sunxi-target-tools")
2962 (build-system gnu-build-system)
2964 (sunxi-tools-source version))
2966 `(#:system "armhf-linux"
2968 #:make-flags (list (string-append "PREFIX="
2969 (assoc-ref %outputs "out"))
2970 (string-append "CROSS_COMPILE=")
2973 (modify-phases %standard-phases
2976 (lambda* (#:key make-flags #:allow-other-keys)
2977 (apply invoke "make" "target-tools" make-flags)))
2979 (lambda* (#:key make-flags #:allow-other-keys)
2980 (apply invoke "make" "install-target-tools"
2982 (home-page "https://github.com/linux-sunxi/sunxi-tools")
2983 (synopsis "Hardware management tools for Allwinner computers")
2984 (description "This package contains tools for Allwinner devices:
2986 @item @command{sunxi-meminfo}: Prints memory bus settings.
2988 (license license:gpl2+)))
2990 (define-public sunxi-tools
2992 (name "sunxi-tools")
2995 (sunxi-tools-source version))
2997 `(("sunxi-target-tools" ,sunxi-target-tools)
2998 ("pkg-config" ,pkg-config)))
3000 `(("libusb" ,libusb)))
3001 (build-system gnu-build-system)
3003 `(#:tests? #f ; no tests exist
3004 #:make-flags (list (string-append "PREFIX="
3005 (assoc-ref %outputs "out"))
3006 (string-append "CROSS_COMPILE=disabled")
3009 (modify-phases %standard-phases
3012 (lambda* (#:key make-flags #:allow-other-keys)
3013 (apply invoke "make" "tools" "misc" make-flags)))
3015 (lambda* (#:key inputs outputs make-flags #:allow-other-keys)
3016 ;; Those tools have been built for armhf but are part of the
3017 ;; installation in the upstream package. So do the same
3019 (copy-recursively (assoc-ref inputs "sunxi-target-tools")
3020 (assoc-ref outputs "out"))
3021 (apply invoke "make" "install-tools" "install-misc"
3023 (home-page "https://github.com/linux-sunxi/sunxi-tools")
3024 (synopsis "Hardware management tools for Allwinner computers")
3025 (description "This package contains tools for Allwinner devices:
3027 @item @command{sunxi-fexc}, @command{bin2fex}, @command{fex2bin}: Compile
3028 a textual description of a board (.fex) to a binary representation (.bin).
3029 @item @command{sunxi-fel}: Puts an Allwinner device into FEL mode which
3030 makes it register as a special USB device (rather than USB host).
3031 You can then connect it to another computer and flash it from there.
3032 @item @command{sunxi-nand-part}: Partitions NAND flash.
3033 @item @command{sunxi-bootinfo}: Reads out boot0 and boot1 (Allwinner
3034 bootloader) parameters.
3035 @item @command{sunxi-pio}: Sets GPIO parameters and oscillates a GPIO
3036 in order to be able to find it.
3037 @item @command{sunxi-meminfo}: Prints memory bus settings.
3038 @item @command{sunxi-nand-image-builder}: Prepares raw NAND images.
3040 (license license:gpl2+)))
3042 (define-public sedsed
3050 (url "https://github.com/aureliojargas/sedsed")
3051 (commit (string-append "v" version))))
3052 (file-name (git-file-name name version))
3054 (base32 "05cl35mwljdb9ynbbsfa8zx6ig8r0xncbg2cir9vwn5manndjj18"))))
3055 (build-system python-build-system)
3057 `(#:tests? #f ; no tests
3059 (modify-phases %standard-phases
3060 (add-after 'unpack 'patch-sed-in
3062 (substitute* "sedsed.py"
3064 (string-append "sedbin = '" (which "sed") "'")))
3068 (lambda* (#:key outputs #:allow-other-keys)
3069 (let* ((out (assoc-ref outputs "out"))
3070 (bin (string-append out "/bin")))
3071 ;; Just one file to copy around
3072 (install-file "sedsed.py" bin)
3074 (add-after 'wrap 'symlink
3075 ;; Create 'sedsed' symlink to "sedsed.py".
3076 (lambda* (#:key outputs #:allow-other-keys)
3077 (let* ((out (assoc-ref outputs "out"))
3078 (bin (string-append out "/bin"))
3079 (sed (string-append bin "/sedsed"))
3080 (sedpy (string-append bin "/sedsed.py")))
3083 (home-page "https://aurelio.net/projects/sedsed")
3084 (synopsis "Sed sed scripts")
3086 "@code{sedsed} can debug, indent, tokenize and HTMLize your @command{sed}
3089 In debug mode, it reads your script and adds extra commands to it. When
3090 executed you can see the data flow between the commands, revealing all the
3091 magic sed performs on its internal buffers.
3093 In indent mode, your script is reformatted with standard spacing.
3095 In tokenize mode, you can see the elements of every command you use.
3097 In HTMLize mode, your script is converted to a beautiful colored HTML file,
3098 with all the commands and parameters identified for your viewing pleasure.
3100 With sedsed you can master any sed script. No more secrets, no more hidden
3102 (license license:expat)))
3104 (define-public igt-gpu-tools
3106 (name "igt-gpu-tools")
3112 (url "https://gitlab.freedesktop.org/drm/igt-gpu-tools.git")
3113 (commit (string-append "igt-gpu-tools-" version))))
3114 (file-name (git-file-name name version))
3116 (base32 "1gpdjs5aj6vsnzwcjvw5bb120lgffvvshi4202phr0bzw3b92ky8"))))
3117 (build-system gnu-build-system)
3119 `(#:tests? #f)) ; many of the tests try to load kernel modules
3122 ("elfutils" ,elfutils) ; libdw
3127 ("libpciaccess" ,libpciaccess)
3128 ("libunwind" ,libunwind)
3129 ("libxrandr" ,libxrandr)
3130 ("openssl" ,openssl)
3132 ("util-macros" ,util-macros)))
3134 `(("autoconf" ,autoconf)
3135 ("automake" ,automake)
3136 ("libtool" ,libtool)
3137 ("pkg-config" ,pkg-config)))
3138 (home-page "https://gitlab.freedesktop.org/drm/igt-gpu-tools")
3139 (synopsis "Tools for development and testing of the Intel DRM driver")
3140 (description "IGT GPU Tools is a collection of tools for development and
3141 testing of the Intel DRM driver. There are many macro-level test suites that
3142 get used against the driver, including xtest, rendercheck, piglit, and
3143 oglconform, but failures from those can be difficult to track down to kernel
3144 changes, and many require complicated build procedures or specific testing
3145 environments to get useful results. Therefore, IGT GPU Tools includes
3146 low-level tools and tests specifically for development and testing of the
3148 (supported-systems '("i686-linux" "x86_64-linux"))
3149 (license license:expat)))
3151 (define-public fabric
3158 (uri (pypi-uri "Fabric" version))
3161 "1a3ndlpdw6bhn8fcw1jgznl117a8pnr84az9rb5fwnrypf1ph2b6"))))
3162 (build-system python-build-system)
3164 `(#:python ,python-2 ; Python 2 only
3166 (modify-phases %standard-phases
3170 "nosetests" "-v" "tests/"
3171 ;; This test hangs indefinitely when run on a single core VM
3172 ;; (see GNU bug #26647 and Debian bug #850230).
3173 "--exclude=test_nested_execution_with_explicit_ports"
3174 ;; This test randomly fails in certain environments causing too
3175 ;; much noise to be useful (see Debian bug #854686).
3176 "--exclude=test_should_use_sentinel_for_tasks_that_errored"))))))
3178 `(("python2-fudge" ,python2-fudge) ; Requires < 1.0
3179 ("python2-jinja2" ,python2-jinja2) ; Requires < 3.0
3180 ("python2-nose" ,python2-nose) ; Requires < 2.0
3181 ("python2-pynacl" ,python2-pynacl)
3182 ("python2-bcrypt" ,python2-bcrypt)))
3184 `(("python2-paramiko" ,python2-paramiko)))
3185 (home-page "https://www.fabfile.org/")
3186 (synopsis "Simple Pythonic remote execution and deployment tool")
3188 "Fabric is designed to upload files and run shell commands on a number of
3189 servers in parallel or serially. These commands are grouped in tasks (which
3190 are regular Python functions) and specified in a @dfn{fabfile}.
3192 It is similar to Capistrano, except it's implemented in Python and doesn't
3193 expect you to be deploying Rails applications. Fabric is a simple, Pythonic
3194 tool for remote execution and deployment.")
3195 (license license:bsd-2)))
3197 (define-public neofetch
3204 (url "https://github.com/dylanaraps/neofetch")
3206 (file-name (git-file-name name version))
3209 "0i7wpisipwzk0j62pzaigbiq42y1mn4sbraz4my2jlz6ahwf00kv"))))
3210 (build-system gnu-build-system)
3212 `(#:tests? #f ; there are no tests
3214 (list (string-append "PREFIX=" %output))
3216 (modify-phases %standard-phases
3217 (delete 'configure)))) ; no configure script
3218 (home-page "https://github.com/dylanaraps/neofetch")
3219 (synopsis "System information script")
3220 (description "Neofetch is a command-line system information tool written in
3221 Bash. Neofetch displays information about your system next to an image, your OS
3222 logo, or any ASCII file of your choice. The main purpose of Neofetch is to be
3223 used in screenshots to show other users what operating system or distribution
3224 you are running, what theme or icon set you are using, etc.")
3225 (license license:expat)))
3227 (define-public screenfetch
3229 (name "screenfetch")
3234 (url "https://github.com/KittyKatt/screenFetch")
3235 (commit (string-append "v" version))))
3236 (file-name (git-file-name name version))
3239 "04l8aqr474pb115nagn9f6y48jw92n1qfszgw7dbhgl4mpn95lcr"))))
3240 (build-system trivial-build-system)
3242 `(#:modules ((guix build utils))
3245 (use-modules (guix build utils))
3246 (let ((source (assoc-ref %build-inputs "source"))
3247 (out (assoc-ref %outputs "out")))
3248 (mkdir-p (string-append out "/bin/"))
3249 (copy-file (string-append source "/screenfetch-dev")
3250 (string-append out "/bin/screenfetch"))
3251 (install-file (string-append source "/screenfetch.1")
3252 (string-append out "/man/man1/"))
3253 (install-file (string-append source "/COPYING")
3254 (string-append out "/share/doc/" ,name "-" ,version))
3255 (substitute* (string-append out "/bin/screenfetch")
3256 (("/usr/bin/env bash")
3257 (string-append (assoc-ref %build-inputs "bash")
3260 (string-append out "/bin/screenfetch")
3262 (,(string-append (assoc-ref %build-inputs "bc") "/bin:"
3263 (assoc-ref %build-inputs "scrot") "/bin:"
3264 (assoc-ref %build-inputs "xdpyinfo") "/bin"
3265 (assoc-ref %build-inputs "xprop") "/bin"))))
3266 (substitute* (string-append out "/bin/screenfetch")
3268 (string-append "#!" (assoc-ref %build-inputs "bash")
3274 ("xdpyinfo" ,xdpyinfo)
3276 (home-page "https://github.com/KittyKatt/screenFetch")
3277 (synopsis "System information script")
3278 (description "Bash screenshot information tool which can be used to
3279 generate those nifty terminal theme information and ASCII distribution logos in
3280 everyone's screenshots nowadays.")
3281 (license license:gpl3)))
3283 (define-public ufetch
3284 (let ((commit "98b622023e03fe24dbc137e9a68104dfe1fbd04a")
3288 (version (git-version "0.2" revision commit))
3292 (url "https://gitlab.com/jschx/ufetch.git")
3294 (file-name (git-file-name name version))
3297 "09c4zmikza16xpydinnqbi3hmcibfrrn10wij7j0j1wv1pj2sl2l"))))
3298 (build-system trivial-build-system)
3303 `(#:modules ((guix build utils))
3306 (use-modules (guix build utils))
3307 (let* ((source (assoc-ref %build-inputs "source"))
3308 (output (assoc-ref %outputs "out"))
3309 (bindir (string-append output "/bin"))
3310 (docdir (string-append output "/share/doc/ufetch-" ,version))
3311 (tput (string-append (assoc-ref %build-inputs "tput") "/bin/tput")))
3312 (install-file (string-append source "/LICENSE") docdir)
3313 (setenv "PATH" (string-append (assoc-ref %build-inputs "bash") "/bin"))
3315 (for-each (lambda (src)
3316 (let ((dst (string-append bindir "/" (basename src))))
3319 (substitute* dst (("tput") tput))))
3320 (find-files source "ufetch-[[:alpha:]]*$"))
3321 ;; Note: the `ufetch` we create below will only work if run under
3322 ;; the Guix System. I.e. a user trying to run `ufetch` on a
3323 ;; foreign distro will not get great results. The `screenfetch`
3324 ;; program does actual runtime detection of the operating system,
3325 ;; and would be a better choice in such a situation.
3326 (symlink "ufetch-guix" (string-append bindir "/ufetch"))))))
3327 (home-page "https://gitlab.com/jschx/ufetch")
3328 (synopsis "Tiny system info")
3329 (description "This package provides a tiny system info utility.")
3330 (license license:isc))))
3332 (define-public pfetch
3333 (let ((commit "e18a0959ab98b963744755ec4687e59dc11db3c5")
3337 (version (git-version "0.7.0" revision commit))
3341 (url "https://github.com/dylanaraps/pfetch")
3343 (file-name (git-file-name name version))
3346 "1md40av6i3xvvwig5jzhy4kf3s5sgxxk35r0vcyrjd8qyndk927l"))))
3347 (build-system trivial-build-system)
3348 (inputs `(("bash" ,bash)))
3350 `(#:modules ((guix build utils))
3353 (use-modules (guix build utils))
3354 (let* ((source (lambda (f)
3355 (string-append (assoc-ref %build-inputs "source") "/" f)))
3356 (output (assoc-ref %outputs "out"))
3357 (docdir (string-append output "/share/doc/pfetch-" ,version)))
3358 (install-file (source "LICENSE.md") docdir)
3359 (install-file (source "README.md") docdir)
3360 (install-file (source "pfetch") (string-append output "/bin"))
3362 (string-append output "/bin/pfetch")
3363 (list (string-append (assoc-ref %build-inputs "bash") "/bin")))
3365 (home-page "https://github.com/dylanaraps/pfetch")
3366 (synopsis "System information tool")
3367 (description "This package provides a simple, configurable system
3369 (license license:expat))))
3378 (uri (string-append "https://github.com/jarun/nnn/releases/download/v"
3379 version "/nnn-v" version ".tar.gz"))
3381 (base32 "189h950m1jjrnhvgcvzk6nj89l58rkxim7bxa0441ssajxpaw0vq"))))
3382 (build-system gnu-build-system)
3384 `(("ncurses" ,ncurses)
3385 ("readline" ,readline)))
3387 `(("pkg-config" ,pkg-config)))
3389 '(#:tests? #f ; no tests
3391 (modify-phases %standard-phases
3392 (delete 'configure)) ; no configure script
3395 (string-append "PREFIX="
3396 (assoc-ref %outputs "out"))
3398 (home-page "https://github.com/jarun/nnn")
3399 (synopsis "Terminal file browser")
3400 (description "@command{nnn} is a fork of @command{noice}, a blazing-fast
3401 lightweight terminal file browser with easy keyboard shortcuts for
3402 navigation, opening files and running tasks. There is no config file and
3403 mime associations are hard-coded. The incredible user-friendliness and speed
3404 make it a perfect utility on modern distros.")
3405 (license license:bsd-2)))
3407 (define-public thermald
3415 (url "https://github.com/01org/thermal_daemon")
3416 (commit (string-append "v" version))))
3417 (file-name (git-file-name name version))
3419 (base32 "0iagc3jqpnh6q2fa1gx4wx6r8qg0556j60xr159zqg95djr4dv99"))))
3420 (build-system gnu-build-system)
3423 (let ((out (assoc-ref %outputs "out")))
3424 (list (string-append "--sysconfdir="
3426 (string-append "--with-dbus-sys-dir="
3427 out "/etc/dbus-1/system.d")
3428 "--localstatedir=/var"))))
3430 `(("autoconf" ,autoconf)
3431 ("automake" ,automake)
3432 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
3433 ("pkg-config" ,pkg-config)))
3435 `(("dbus-glib" ,dbus-glib)
3436 ("libxml2" ,libxml2)))
3437 (home-page "https://01.org/linux-thermal-daemon/")
3438 (synopsis "CPU scaling for thermal management")
3439 (description "The Linux Thermal Daemon helps monitor and control temperature
3440 on systems running the Linux kernel.")
3441 ;; arm and aarch64 don't have cpuid.h.
3442 (supported-systems '("i686-linux" "x86_64-linux"))
3443 (license license:gpl2+)))
3445 (define-public masscan
3453 (url "https://github.com/robertdavidgraham/masscan")
3455 (file-name (git-file-name name version))
3457 (base32 "0q0c7bsf0pbl8napry1qyg0gl4pd8wn872h4mz9b56dx4rx90vqg"))))
3458 (build-system gnu-build-system)
3460 `(("libpcap" ,libpcap)))
3462 '(#:test-target "regress"
3465 (string-append "PREFIX=" (assoc-ref %outputs "out")))
3467 (modify-phases %standard-phases
3468 (delete 'configure) ; no ./configure script
3469 (add-after 'unpack 'patch-path
3470 (lambda* (#:key outputs inputs #:allow-other-keys)
3471 (let* ((out (assoc-ref outputs "out"))
3472 (pcap (assoc-ref inputs "libpcap")))
3473 (substitute* "src/rawsock-pcap.c"
3474 (("libpcap.so") (string-append pcap "/lib/libpcap.so")))
3476 (synopsis "TCP port scanner")
3477 (description "MASSCAN is an asynchronous TCP port scanner. It can detect
3478 open ports, and also complete the TCP connection and interact with the remote
3479 application, collecting the information received.")
3480 (home-page "https://github.com/robertdavidgraham/masscan")
3481 ;; 'src/siphash24.c' is the SipHash reference implementation, which
3482 ;; bears a CC0 Public Domain Dedication.
3483 (license license:agpl3+)))
3485 (define-public hungrycat
3491 (uri (string-append "https://github.com/jwilk/hungrycat/"
3492 "releases/download/" version "/"
3493 "hungrycat-" version ".tar.gz"))
3496 "03fc1zsrf99lvxa7b4ps6pbi43304wbxh1f6ci4q0vkal370yfwh"))))
3497 (build-system gnu-build-system)
3500 `(("python" ,python-wrapper)
3501 ("python-nose" ,python-nose)))
3503 `(#:test-target "test"))
3504 (synopsis "A single tool that combines @command{cat} & @command{rm}")
3506 "hungrycat prints the contents of a file to standard output, while
3507 simultaneously freeing the disk space it occupied. It is useful if you need
3508 to process a large file, don't have enough space to store both the input and
3509 output files, and don't need the input file afterwards.
3510 While similar in principle to running @command{cat} immediately followed by
3511 @command{rm}, @command{hungrycat} actually frees blocks as soon as they are
3512 printed instead of after the entire file has been read, which is often too
3514 (home-page "https://jwilk.net/software/hungrycat")
3515 (license license:expat)))
3517 (define-public launchmon
3524 "https://github.com/LLNL/LaunchMON/releases/download/v"
3525 version "/launchmon-v" version ".tar.gz"))
3528 "0fm3nd9mydm9v2bf7bh01dbgrfnpwkapxa3dsvy3x1z0rz61qc0x"))
3529 (modules '((guix build utils)))
3532 ;; Fix build failure with GCC 7 due to a conversion error.
3533 ;; Remove for versions > 1.0.2.
3534 (substitute* "launchmon/src/linux/lmon_api/lmon_coloc_spawner.cxx"
3535 ((" lmonpl = '\\\\0'")
3536 " *lmonpl = '\\0'"))
3538 (build-system gnu-build-system)
3544 ("libgcrypt" ,libgcrypt)
3545 ("libgpg-error" ,libgpg-error)))
3546 (synopsis "Infrastructue for large scale tool daemon launching")
3548 "LaunchMON is a software infrastructure that enables HPC run-time
3549 tools to co-locate tool daemons with a parallel job. Its API allows a
3550 tool to identify all the remote processes of a job and to scalably
3551 launch daemons into the relevant nodes.")
3552 (home-page "https://github.com/LLNL/LaunchMON")
3553 (supported-systems '("i686-linux" "x86_64-linux"))
3554 (license license:lgpl2.1)))
3556 (define-public spindle
3561 ;; We use git checkout to avoid github auto-generated tarballs
3564 (url "https://github.com/hpc/Spindle")
3565 (commit (string-append "v" version))))
3566 (file-name (git-file-name name version))
3569 "15n3ay0qq81r5v7fif61q1vdjcq44pp2nynkh3fvbzc9fj3c39wd"))))
3570 (build-system gnu-build-system)
3571 (arguments '(#:configure-flags '("--enable-sec-launchmon"
3572 "--enable-sec-munge"
3573 "--enable-sec-none")))
3577 ("launchmon" ,launchmon)
3578 ("libgcrypt" ,libgcrypt)))
3579 (synopsis "Scalable library loading in HPC environments")
3581 "Spindle is a tool for improving the performance of dynamic library and
3582 Python loading in HPC environments.")
3583 (home-page "https://github.com/hpc/Spindle")
3584 ;; This package supports x86_64 and PowerPC64
3585 (supported-systems '("x86_64-linux"))
3586 (license license:lgpl2.1)))
3588 (define-public inxi-minimal
3589 (let ((real-name "inxi"))
3591 (name "inxi-minimal")
3592 (version "3.1.06-1")
3597 (url "https://github.com/smxi/inxi")
3599 (file-name (git-file-name real-name version))
3601 (base32 "0h65n03q9kdsv0i1q5f88i11iv79ca7fqq97rdkzkmiqb4whhnm2"))))
3602 (build-system trivial-build-system)
3604 `(("bash" ,bash-minimal)
3606 ("procps" ,procps)))
3616 (use-modules (guix build utils)
3619 (setenv "PATH" (string-append
3620 (assoc-ref %build-inputs "bash") "/bin" ":"
3621 (assoc-ref %build-inputs "gzip") "/bin" ":"
3622 (assoc-ref %build-inputs "perl") "/bin" ":"))
3623 (copy-recursively (assoc-ref %build-inputs "source")
3624 ,(string-append real-name "-" version))
3625 (with-directory-excursion ,(string-append real-name "-" version)
3626 (with-fluids ((%default-port-encoding #f))
3627 (substitute* "inxi" (("/usr/bin/env perl") (which "perl"))))
3628 (let ((bin (string-append %output "/bin")))
3629 (install-file "inxi" bin)
3630 (wrap-program (string-append bin "/inxi")
3633 ,@(map (lambda (input)
3637 (cut string-append store <>)))
3639 ((member name '("util-linux"))
3640 (string-append (store-append "/bin") ":"
3641 (store-append "/sbin")))
3642 ((member name '("dmidecode" "iproute2"))
3643 (store-append "/sbin"))
3644 (else (store-append "/bin")))))))
3650 (((? (cut string-prefix? "perl-" <>) name) . dir)
3651 (string-append dir "/lib/perl5/site_perl"))
3654 (invoke "gzip" "inxi.1")
3655 (install-file "inxi.1.gz"
3656 (string-append %output "/share/man/man1")))
3658 (home-page "https://smxi.org/docs/inxi.htm")
3659 (synopsis "Full-featured system information script")
3660 (description "Inxi is a system information script that can display
3661 various things about your hardware and software to users in an IRC chatroom or
3662 support forum. It runs with the @code{/exec} command in most IRC clients.")
3663 (license license:gpl3+))))
3667 (inherit inxi-minimal)
3670 `(("dmidecode" ,dmidecode)
3672 ("bind:utils" ,isc-bind "utils") ; dig
3674 ("iproute2" ,iproute) ; ip
3675 ("kmod" ,kmod) ; modinfo
3676 ("lm-sensors" ,lm-sensors)
3677 ("mesa-utils" ,mesa-utils)
3678 ("pciutils" ,pciutils)
3681 ("util-linux" ,util-linux) ; lsblk
3682 ("usbutils" ,usbutils) ; lsusb
3684 ("xdpyinfo" ,xdpyinfo)
3687 ("coreutils" ,coreutils) ; uptime
3688 ("inetutils" ,inetutils) ; ifconfig
3689 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
3690 ("perl-http-tiny" ,perl-http-tiny)
3691 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
3692 ("perl-json-xs" ,perl-json-xs)
3693 ("perl-time-hires" ,perl-time-hires)
3694 ;; TODO: Add more inputs:
3699 ,@(package-inputs inxi-minimal)))))
3701 (define-public pscircle
3709 (url "https://gitlab.com/mildlyparallel/pscircle.git")
3710 (commit (string-append "v" version))))
3711 (file-name (git-file-name name version))
3713 (base32 "1sm99423hh90kr4wdjqi9sdrrpk65j2vz2hzj65zcxfxyr6khjci"))))
3714 (build-system meson-build-system)
3716 `(("pkg-config" ,pkg-config)))
3720 ("libx11" ,libx11)))
3721 (home-page "https://gitlab.com/mildlyparallel/pscircle")
3722 (synopsis "Visualize Linux processes in a form of radial tree")
3724 "@code{pscircle} visualizes Linux processes in the form of a radial tree.")
3725 (license license:gpl2+)))
3727 (define-public python-pyudev
3729 (name "python-pyudev")
3734 (uri (pypi-uri "pyudev" version))
3737 "0xmj6l08iih2js9skjqpv4w7y0dhxyg91zmrs6v5aa65gbmipfv9"))))
3738 (build-system python-build-system)
3740 `(#:tests? #f ; Tests require /sys
3742 (modify-phases %standard-phases
3743 (add-after 'unpack 'patch-ctypes-udev
3744 (lambda* (#:key inputs outputs #:allow-other-keys)
3745 (let ((eudev (assoc-ref inputs "eudev")))
3746 (substitute* "src/pyudev/core.py"
3748 (string-append "'" eudev "/lib/libudev.so'")))
3749 (substitute* "src/pyudev/_ctypeslib/utils.py"
3750 ;; Use absolute paths instead of keys.
3751 (("= find_library") "= "))
3754 `(("eudev" ,eudev)))
3756 `(("python-six" ,python-six)))
3758 `(("python-docutils" ,python-docutils)
3759 ("python-hypothesis" ,python-hypothesis)
3760 ("python-mock" ,python-mock)
3761 ("python-pytest" ,python-pytest)
3762 ("python-sphinx" ,python-sphinx)))
3763 (home-page "https://pyudev.readthedocs.io/")
3764 (synopsis "Python udev binding")
3765 (description "This package provides @code{udev} bindings for Python.")
3766 (license license:lgpl2.1)))
3768 (define-public solaar
3775 (url "https://github.com/pwr/Solaar")
3777 (file-name (git-file-name name version))
3780 "085mfa13dap3wqik1dqlad0d7kff4rv7j4ljh99c7l8nhczkqgwm"))))
3781 (build-system python-build-system)
3784 (modify-phases %standard-phases
3785 (add-after 'unpack 'fix-prefix-detection
3787 (substitute* "setup.py"
3788 (("'--prefix' in sys\\.argv")
3789 "len([x.startswith('--prefix=') for x in sys.argv]) > 0"))
3791 (add-before 'build 'setenv-PATH
3793 (setenv "PYTHONPATH" (string-append "lib:" (getenv "PYTHONPATH")))
3796 `(("python-pygobject" ,python-pygobject)
3797 ("python-pyudev" ,python-pyudev)))
3798 (home-page "https://smxi.org/docs/inxi.htm")
3799 (synopsis "Linux devices manager for the Logitech Unifying Receiver")
3800 (description "This package provides tools to manage clients of the
3801 Logitech Unifying Receiver.")
3802 (license license:gpl2)))
3804 (define-public lynis
3807 ;; Also update the ‘lynis-sdk’ input to the commit matching this release.
3813 (url "https://github.com/CISOfy/lynis")
3815 (file-name (git-file-name name version))
3817 (base32 "1lkkbvxm0rgrrlx0szaxmf8ghc3d26wal96sgqk84m37mvs1f7p0"))
3818 (modules '((guix build utils)))
3821 ;; Remove proprietary plugins. As of now, all plugins supplied with
3822 ;; lynis are proprietary. In the future, if free plugins are
3823 ;; provided, whitelist them from deletion.
3824 (for-each delete-file (find-files "plugins"))
3826 (build-system gnu-build-system)
3833 (url "https://github.com/CISOfy/lynis-sdk")
3834 (commit "bf1c1d95121da9ca79a9eac5a15ed8d81e34094d")))
3835 (file-name (git-file-name "lynis-sdk" version))
3837 (base32 "1ndz5v0039dqa87cva2dk55a8hkw0fibsw8hh2ddmny9qkr4l3dp"))))))
3840 (modify-phases %standard-phases
3842 (lambda* (#:key inputs outputs #:allow-other-keys)
3843 (substitute* "lynis"
3844 (("/usr/share/lynis")
3845 (string-append (assoc-ref outputs "out") "/share/lynis")))
3846 (substitute* "include/functions"
3847 (("/usr/local/etc/lynis")
3848 (string-append (assoc-ref outputs "out") "/etc/lynis")))
3852 (lambda* (#:key outputs #:allow-other-keys)
3853 (let ((out (assoc-ref outputs "out")))
3854 (install-file "lynis" (string-append out "/bin/"))
3855 (install-file "default.prf" (string-append out "/etc/lynis"))
3858 (copy-recursively dir (string-append out "/share/lynis/" dir)))
3859 (list "db" "include" "plugins"))
3860 (install-file "lynis.8" (string-append out "/share/man/man8"))
3863 (lambda* (#:key inputs #:allow-other-keys)
3864 (copy-recursively (assoc-ref inputs "lynis-sdk") "../lynis-sdk")
3865 (setenv "LANG" "en_US.UTF-8")
3866 (let ((lynis-dir (getcwd)))
3867 (with-directory-excursion "../lynis-sdk"
3868 (substitute* "config"
3869 (("\\.\\./lynis") lynis-dir))
3870 (substitute* "unit-tests/tests-language-translations.sh"
3871 (("\\.\\./lynis") lynis-dir))
3872 (invoke "sh" "lynis-devkit" "run" "unit-tests"))))))))
3873 (home-page "https://cisofy.com/lynis/")
3874 (synopsis "Security auditing tool")
3875 (description "Lynis is a security auditing tool. It performs an in-depth
3876 security scan and runs on the system itself. The primary goal is to test
3877 security defenses and provide tips for further system hardening. It will also
3878 scan for general system information, vulnerable software packages, and
3879 possible configuration issues.")
3880 (license license:gpl3+)))
3882 (define-public ngrep
3890 (url "https://github.com/jpr5/ngrep/")
3891 (commit (string-append "V" (string-replace-substring version "." "_")))))
3892 (file-name (git-file-name name version))
3895 "1x2fyd7wdqlj1r76ilal06cl2wmbz0ws6i3ys204sbjh1cj6dcl7"))))
3896 (build-system gnu-build-system)
3898 `(("libpcap" ,libpcap)))
3900 `(#:tests? #f ;; No tests.
3901 #:configure-flags (list (string-append "--with-pcap-includes="
3902 (assoc-ref %build-inputs "libpcap")
3904 (home-page "https://github.com/jpr5/ngrep/")
3905 (synopsis "Grep-like utility to search for network packets on an interface")
3906 (description "@command{ngrep} is like GNU grep applied to the network
3907 layer. It's a PCAP-based tool that allows you to specify an extended regular
3908 or hexadecimal expression to match against data payloads of packets. It
3909 understands many kinds of protocols, including IPv4/6, TCP, UDP, ICMPv4/6,
3910 IGMP and Raw, across a wide variety of interface types, and understands BPF
3911 filter logic in the same fashion as more common packet sniffing tools, such as
3912 tcpdump and snoop.")
3913 (license license:bsd-3)))
3915 (define-public pam-mount
3922 (uri (string-append "mirror://sourceforge/pam-mount/pam_mount/"
3923 version "/pam_mount-" version ".tar.xz"))
3926 "1rvi4irb7ylsbhvx1cr6islm2xxw1a4b19q6z4a9864ndkm0f0mf"))
3928 ;; Patch adding support for encrypted volumes in LUKS2 format.
3929 ;; It comes from the Gentoo package definition for sys-auth/pam_mount.
3930 (search-patches "pam-mount-luks2-support.patch"))))
3931 (build-system gnu-build-system)
3934 ("pkg-config" ,pkg-config)))
3936 `(("cryptsetup" ,cryptsetup)
3938 ("libxml2" ,libxml2)
3939 ("linux-pam" ,linux-pam)
3941 ("openssl" ,openssl)
3943 ("libmount" ,util-linux "lib")
3944 ("util-linux" ,util-linux)))
3947 (list (string-append "--with-slibdir=" %output "/lib")
3948 (string-append "--with-ssbindir=" %output "/sbin"))
3950 (modify-phases %standard-phases
3951 (add-after 'unpack 'fix-program-paths
3952 (lambda* (#:key inputs outputs #:allow-other-keys)
3953 (let ((util-linux (assoc-ref inputs "util-linux"))
3954 (out (assoc-ref outputs "out")))
3955 (substitute* "src/mtcrypt.c"
3957 (string-append "\"" util-linux "/bin/mount\";"))
3959 (string-append "\"" util-linux "/bin/umount\";"))
3961 (string-append "\"" util-linux "/sbin/fsck\",")))
3962 (substitute* "src/rdconf1.c"
3964 (string-append "\"" util-linux "/bin/mount\", \""))
3966 (string-append "\"" util-linux "/bin/umount\", \""))
3968 (string-append "\"" util-linux "/sbin/fsck\", \""))
3969 (("\"pmvarrun\", \"")
3970 (string-append "\"" out "/sbin/pmvarrun\", \""))))
3972 (home-page "http://pam-mount.sourceforge.net")
3973 (synopsis "PAM module to mount volumes for a user session")
3975 "Pam-mount is a PAM module that can mount volumes when a user logs in.
3976 It supports mounting local filesystems of any kind the normal mount utility
3977 supports. It can also mount encrypted LUKS volumes using the password
3978 supplied by the user when logging in.")
3979 (license (list license:gpl2+ license:lgpl2.1+))))
3987 ;; The PyPI tarball lacks the test suite.
3990 (url "https://github.com/kellyjonbrazil/jc")
3991 (commit (string-append "v" version))))
3992 (file-name (git-file-name name version))
3994 (base32 "0rwvyyrdnw43pixp8h51rncq2inc9pbbj1j2191y5si00pjw34zr"))))
3995 (build-system python-build-system)
3997 `(("python-pygments" ,python-pygments)
3998 ("python-ruamel.yaml" ,python-ruamel.yaml)
3999 ("python-xmltodict" ,python-xmltodict)))
4000 (home-page "https://github.com/kellyjonbrazil/jc")
4001 (synopsis "Convert the output of command-line tools to JSON")
4002 (description "@code{jc} JSONifies the output of many CLI tools and
4003 file-types for easier parsing in scripts.")
4004 (license license:expat)))
4013 (url "https://github.com/kellyjonbrazil/jtbl")
4014 (commit (string-append "v" version))))
4015 (file-name (git-file-name name version))
4018 "1zzd7rd63xva50f22d1rfja4r302aizrafarhwm67vv181swvdya"))))
4019 (build-system python-build-system)
4021 `(("python-tabulate" ,python-tabulate)))
4022 (home-page "https://github.com/kellyjonbrazil/jtbl")
4023 (synopsis "Command-line tool to print JSON data as a table in the terminal")
4024 (description "@code{jtbl} accepts piped JSON data from stdin and outputs a
4025 text table representation to stdout.")
4026 (license license:expat)))
4028 (define-public hosts
4035 (url "https://github.com/xwmx/hosts")
4037 (file-name (git-file-name name version))
4040 "1ni4z89kxzgwm26hhx908g04f2h0fypy7lgfa0rvsz8d0wslgcsn"))))
4041 (build-system trivial-build-system)
4043 `(("bats" ,bats) ;for test
4046 ("coreutils" ,coreutils)
4047 ("diffutils" ,diffutils)
4049 ("ncurses" ,ncurses) ;tput
4052 `(#:modules ((guix build utils))
4055 (use-modules (guix build utils))
4057 (copy-recursively (assoc-ref %build-inputs "source") ".")
4058 ;; patch-shebang phase
4060 (string-append (assoc-ref %build-inputs "bash") "/bin"
4061 ":" (assoc-ref %build-inputs "awk") "/bin"
4062 ":" (assoc-ref %build-inputs "coreutils") "/bin"
4063 ":" (assoc-ref %build-inputs "diffutils") "/bin"
4064 ":" (assoc-ref %build-inputs "grep") "/bin"
4065 ":" (assoc-ref %build-inputs "ncurses") "/bin"
4066 ":" (assoc-ref %build-inputs "sed") "/bin"
4067 ":" "/run/setuid-programs"
4068 ":" (getenv "PATH")))
4069 (substitute* "hosts"
4070 (("#!/usr/bin/env bash")
4071 (string-append "#!" (which "bash")
4072 "\nPATH=" (getenv "PATH"))))
4074 (setenv "TERM" "linux") ;set to tty for test
4075 (invoke (string-append (assoc-ref %build-inputs "bats") "/bin/bats")
4078 (install-file "hosts" (string-append %output "/bin"))
4079 (let ((bash-completion
4080 (string-append %output "/etc/bash_completion.d")))
4081 (mkdir-p bash-completion)
4082 (copy-file "etc/hosts-completion.bash"
4083 (string-append bash-completion "/hosts")))
4084 (let ((zsh-completion
4085 (string-append %output "/share/zsh/site-functions")))
4086 (mkdir-p zsh-completion)
4087 (copy-file "etc/hosts-completion.zsh"
4088 (string-append zsh-completion "/_hosts")))
4089 (let ((doc (string-append %output "/share/doc/" ,name "-" ,version)))
4091 (install-file "LICENSE" doc)
4092 (install-file "README.md" doc))
4094 (home-page "https://github.com/xwmx/hosts/")
4095 (synopsis "Script for editing a foreign distro's @file{/etc/hosts} file")
4096 (description "Hosts is a command line program for managing
4097 @file{/etc/hosts} entries. On Guix System, @file{/etc/hosts} is managed from
4098 the system configuration; hosts only works when using the Guix package manager
4099 on a foreign distro. @command{hosts} works with existing hosts files and
4100 entries, providing commands to add, remove, comment, and search.")
4101 (license license:expat)))