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, 2020 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, 2020, 2021 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–2021 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 go)
60 #:use-module (guix build-system meson)
61 #:use-module (guix build-system perl)
62 #:use-module (guix build-system python)
63 #:use-module (guix build-system ruby)
64 #:use-module (guix build-system trivial)
65 #:use-module (guix download)
66 #:use-module (guix git-download)
67 #:use-module ((guix licenses) #:prefix license:)
68 #:use-module (guix packages)
69 #:use-module (guix utils)
70 #:use-module (gnu packages)
71 #:use-module (gnu packages algebra)
72 #:use-module (gnu packages autogen)
73 #:use-module (gnu packages autotools)
74 #:use-module (gnu packages base)
75 #:use-module (gnu packages bash)
76 #:use-module (gnu packages bison)
77 #:use-module (gnu packages boost)
78 #:use-module (gnu packages c)
79 #:use-module (gnu packages check)
80 #:use-module (gnu packages compression)
81 #:use-module (gnu packages cross-base)
82 #:use-module (gnu packages crypto)
83 #:use-module (gnu packages cryptsetup)
84 #:use-module (gnu packages cyrus-sasl)
85 #:use-module (gnu packages dns)
86 #:use-module (gnu packages elf)
87 #:use-module (gnu packages file)
88 #:use-module (gnu packages flex)
89 #:use-module (gnu packages gawk)
90 #:use-module (gnu packages gettext)
91 #:use-module (gnu packages gl)
92 #:use-module (gnu packages glib)
93 #:use-module (gnu packages gnome)
94 #:use-module (gnu packages gnupg)
95 #:use-module (gnu packages golang)
96 #:use-module (gnu packages groff)
97 #:use-module (gnu packages gtk)
98 #:use-module (gnu packages guile)
99 #:use-module (gnu packages hurd)
100 #:use-module (gnu packages image)
101 #:use-module (gnu packages imagemagick)
102 #:use-module (gnu packages inkscape)
103 #:use-module (gnu packages kerberos)
104 #:use-module (gnu packages libbsd)
105 #:use-module (gnu packages libftdi)
106 #:use-module (gnu packages libunwind)
107 #:use-module (gnu packages libusb)
108 #:use-module (gnu packages linux)
109 #:use-module (gnu packages lua)
110 #:use-module (gnu packages mail)
111 #:use-module (gnu packages man)
112 #:use-module (gnu packages mcrypt)
113 #:use-module (gnu packages mpi)
114 #:use-module (gnu packages ncurses)
115 #:use-module (gnu packages openldap)
116 #:use-module (gnu packages patchutils)
117 #:use-module (gnu packages pciutils)
118 #:use-module (gnu packages pcre)
119 #:use-module (gnu packages perl)
120 #:use-module (gnu packages perl-check)
121 #:use-module (gnu packages pkg-config)
122 #:use-module (gnu packages popt)
123 #:use-module (gnu packages python)
124 #:use-module (gnu packages python-crypto)
125 #:use-module (gnu packages python-web)
126 #:use-module (gnu packages python-xyz)
127 #:use-module (gnu packages qt)
128 #:use-module (gnu packages readline)
129 #:use-module (gnu packages ruby)
130 #:use-module (gnu packages serialization)
131 #:use-module (gnu packages sphinx)
132 #:use-module (gnu packages tcl)
133 #:use-module (gnu packages terminals)
134 #:use-module (gnu packages texinfo)
135 #:use-module (gnu packages tls)
136 #:use-module (gnu packages version-control)
137 #:use-module (gnu packages web)
138 #:use-module (gnu packages xdisorg)
139 #:use-module (gnu packages xml)
140 #:use-module (gnu packages xorg))
142 ;; This package uses su instead of sudo (because of SpaceFM).
143 (define-public ktsuss
152 (url "https://github.com/nomius/ktsuss")
155 (base32 "0q9931f9hp47v1n8scli4bdg2rkjpf5jf8v7jj2gdn83aia1r2hz"))
156 (file-name (git-file-name name version))))
157 (build-system glib-or-gtk-build-system)
160 (modify-phases %standard-phases
161 (add-after 'unpack 'patch-file-names
163 (substitute* "configure.ac"
164 (("supath=`which su 2>/dev/null`")
165 "supath=/run/setuid-programs/su"))
168 `(("autoconf" ,autoconf)
169 ("automake" ,automake)
171 ("pkg-config" ,pkg-config)))
175 (synopsis "Graphical front end for @command{su}")
177 "Ktsuss stands for ``Keep the @command{su} simple, stupid''.
178 It is a graphical version of @command{su} written in C and GTK+ 2, with
179 simplicity in mind.")
180 (home-page "https://github.com/nomius/ktsuss")
181 (license license:bsd-3)))
190 (uri (string-append "https://github.com/aide/aide/releases/download/v"
191 version "/aide-" version ".tar.gz"))
193 (base32 "15xp47sz7kk1ciffw3f5xw2jg2mb2lqrbr3q6p4bkbz5dap9iy8p"))))
194 (build-system gnu-build-system)
199 `(("libgcrypt" ,libgcrypt)
200 ("libgpg-error" ,libgpg-error)
201 ("libmhash" ,libmhash)
202 ("pcre:static" ,pcre "static")
204 ("zlib:static" ,zlib "static")
206 (synopsis "File and directory integrity checker")
208 "AIDE (Advanced Intrusion Detection Environment) is a file and directory
209 integrity checker. It creates a database from the regular expression rules
210 that it finds from its configuration files. Once this database is initialized
211 it can be used to verify the integrity of the files. It has several message
212 digest algorithms that are used to check the integrity of files. All of the
213 usual file attributes can be checked for inconsistencies.")
214 (home-page "https://aide.github.io/")
215 (license license:gpl2+)))
217 (define-public progress
225 (url "https://github.com/Xfennec/progress")
226 (commit (string-append "v" version))))
228 (base32 "1cnb4ixlhshn139mj5sr42k5m6gjjbyqvkn1324c47niwrgp7dqm"))
229 (file-name (git-file-name name version))))
230 (build-system gnu-build-system)
232 `(("pkg-config" ,pkg-config)
235 `(("ncurses" ,ncurses)))
237 `(#:tests? #f ; no test suite
239 (let ((target ,(%current-target-system)))
240 (list ,(string-append "CC=" (cc-for-target))
241 (string-append "PKG_CONFIG="
243 (string-append target "-pkg-config")
245 (string-append "PREFIX=" (assoc-ref %outputs "out"))))
247 (modify-phases %standard-phases
248 (delete 'configure)))) ; no configure script
249 (home-page "https://github.com/Xfennec/progress")
250 (synopsis "Program to view the progress of the coreutils commands")
251 (description "A program that looks for coreutils basic commands (cp, mv,
252 dd, tar, gzip/gunzip, cat, etc.) currently running on your system and displays
253 the percentage of copied data. It can also show estimated time and throughput,
254 and provides a \"top-like\" mode (monitoring).")
255 (license license:gpl3+)))
257 (define-public shepherd
263 (uri (string-append "mirror://gnu/shepherd/shepherd-"
267 "0x9zr0x3xvk4qkb6jnda451d5iyrl06cz1bjzjsm0lxvjj3fabyk"))))
268 (build-system gnu-build-system)
270 '(#:configure-flags '("--localstatedir=/var")))
272 `(("pkg-config" ,pkg-config)
274 ;; This is the Guile we use as a cross-compiler...
275 ("guile" ,guile-3.0)))
277 ;; ... and this is the one that appears in shebangs when cross-compiling.
278 `(("guile" ,guile-3.0)
280 ;; The 'shepherd' command uses Readline when used interactively. It's
281 ;; an unusual use case though, so we don't propagate it.
282 ("guile-readline" ,guile-readline)))
283 (synopsis "System service manager")
285 "The GNU Shepherd is a daemon-managing daemon, meaning that it supervises
286 the execution of system services, replacing similar functionality found in
287 typical init systems. It provides dependency-handling through a convenient
288 interface and is based on GNU Guile.")
289 (license license:gpl3+)
290 (home-page "https://www.gnu.org/software/shepherd/")))
292 (define-public guile2.2-shepherd
295 (name "guile2.2-shepherd")
297 `(("pkg-config" ,pkg-config)
298 ("guile" ,guile-2.2)))
300 `(("guile" ,guile-2.2)))))
302 (define-public guile3.0-shepherd
303 (deprecated-package "guile3.0-shepherd" shepherd))
305 (define-public guile2.0-shepherd
308 (name "guile2.0-shepherd")
310 `(("pkg-config" ,pkg-config)
311 ("guile" ,guile-2.0)))
313 `(("guile" ,guile-2.0)))))
315 (define-public cloud-utils
323 "https://launchpad.net/cloud-utils/trunk/"
324 version "/+download/cloud-utils-" version ".tar.gz"))
327 "0xxdi55lzw7j91zfajw7jhd2ilsqj2dy04i9brlk8j3pvb5ma8hk"))))
328 (build-system gnu-build-system)
331 (let ((out (assoc-ref %outputs "out")))
332 (list (string-append "BINDIR=" out "/bin")
333 (string-append "MANDIR=" out "/share/man/man1")
334 (string-append "DOCDIR=" out "/share/doc")))
336 (modify-phases %standard-phases
339 (add-after 'install 'wrap
340 (lambda* (#:key outputs inputs #:allow-other-keys)
341 (let ((growpart (string-append (assoc-ref outputs "out")
343 (wrap-program growpart
344 `("PATH" ":" prefix (,(dirname (which "sfdisk"))
345 ,(dirname (which "readlink"))))))
349 ("util-linux" ,util-linux))) ; contains sfdisk for growpart
350 (home-page "https://launchpad.net/cloud-utils")
351 (synopsis "Set of utilities for cloud computing environments")
353 "This package contains a set of utilities for cloud computing
357 @item @command{cloud-localds} Create a disk for cloud-init to utilize nocloud
358 @item @command{cloud-publish-image} Wrapper for cloud image publishing
359 @item @command{cloud-publish-tarball} Wrapper for publishing cloud tarballs
360 @item @command{cloud-publish-ubuntu} Import a Ubuntu cloud image
361 @item @command{ec2metadata} Query and display @acronym{EC2,Amazon Elastic
362 Compute Cloud} metadata
363 @item @command{growpart} Grow a partition to fill the device
364 @item @command{mount-image-callback} Mount a file and run a command
365 @item @command{resize-part-image} Resize a partition image to a new size
366 @item @command{ubuntu-cloudimg-query} Get the latest Ubuntu
367 @acronym{AMI,Amazon Machine Image}
368 @item @command{ubuntu-ec2-run} Run a @acronym{EC2,Amazon Elastic Compute
369 Cloud} instance using Ubuntu
370 @item @command{vcs-run} Obtain a repository, and run a command
371 @item @command{write-mime-multipart} Handle multipart
372 @acronym{MIME,Multipurpose Internet Mail Extensions} messages
374 (license license:gpl3)))
376 (define-public daemontools
383 "https://cr.yp.to/daemontools/"
384 "daemontools-" version ".tar.gz"))
387 "07scvw88faxkscxi91031pjkpccql6wspk4yrlnsbrrb5c0kamd5"))))
388 (build-system gnu-build-system)
390 `(#:tests? #f ;; No tests as far as I can tell.
392 (modify-phases %standard-phases
393 (add-after 'unpack 'chdir
395 (chdir ,(string-append "daemontools-" version))
398 (add-before 'build 'patch
400 (substitute* "src/error.h"
401 (("extern int errno;")
402 "#include <errno.h>"))
406 (invoke "package/compile")))
408 (lambda* (#:key outputs #:allow-other-keys)
409 (let* ((out (assoc-ref outputs "out"))
410 (bin (string-append out "/bin")))
411 (for-each (lambda (file)
412 (install-file file bin))
413 (find-files "command")))
415 (synopsis "Tools for managing UNIX style services")
417 "@code{daemontools} is a collection of tools for managing UNIX
419 (license license:public-domain)
420 (home-page "https://cr.yp.to/daemontools.html")))
430 "https://projects.gw-computing.net/attachments/download/615/dfc-"
434 "0m1fd7l85ckb7bq4c5c3g257bkjglm8gq7x42pkmpp87fkknc94n"))))
435 (build-system cmake-build-system)
436 (arguments '(#:tests? #f)) ; There are no tests.
437 (native-inputs `(("gettext" ,gettext-minimal)))
438 (home-page "https://projects.gw-computing.net/projects/dfc")
439 (synopsis "Display file system space usage using graphs and colors")
441 "dfc (df color) is a modern version of df. It uses colors, draws pretty
442 graphs and can export its output to different formats.")
443 (license license:bsd-3)))
445 (define-public facter
452 (url "https://github.com/puppetlabs/facter")
454 (file-name (git-file-name name version))
457 "10cbk56nbvqvpzq3h958iizvh0vh69zkhw31dxl1qx91zk5d8djx"))))
458 (build-system ruby-build-system)
461 (modify-phases %standard-phases
462 (add-after 'unpack 'delete-facter-ng-gemspec
464 ;; XXX: ruby-build-system incorrectly finds
465 ;; facter-ng.gemspec from this directory and tries to
466 ;; build that instead of the proper facter.gemspec.
467 ;; Just delete it as a workaround, as it appears to
468 ;; only exist for backwards-compatibility after the
469 ;; facter-ng->facter rename.
470 (delete-file "agent/facter-ng.gemspec")
472 (add-after 'unpack 'embed-absolute-references
473 ;; Refer to absolute executable file names to avoid propagation.
474 (lambda* (#:key inputs #:allow-other-keys)
475 (substitute* (find-files "lib/facter/resolvers" "\\.rb$")
476 (("execute\\('(which |)([^ ']+)" _ _ name)
477 (string-append "execute('" (or (which name)
481 (add-after 'wrap 'check
482 (lambda* (#:key tests? outputs #:allow-other-keys)
483 ;; XXX: The test suite wants to run Bundler and
484 ;; complains that the gemspec is invalid. For now
485 ;; just make sure that we can run the wrapped
486 ;; executable directly.
488 (invoke (string-append (assoc-ref outputs "out")
490 ;; Many facts depend on /sys, /etc/os-release,
491 ;; etc, so we only run a small sample.
492 "facterversion" "architecture"
493 "kernel" "kernelversion")
494 (format #t "tests disabled~%"))
497 `(("ruby-hocon" ,ruby-hocon)
498 ("ruby-sys-filesystem" ,ruby-sys-filesystem)
499 ("ruby-thor" ,ruby-thor)
501 ;; For ‘embed-absolute-references’.
502 ("dmidecode" ,dmidecode)
503 ("inetutils" ,inetutils) ; for ‘hostname’
505 ("pciutils" ,pciutils)
506 ("util-linux" ,util-linux)))
507 (synopsis "Collect and display system facts")
509 "Facter is a tool that gathers basic facts about nodes (systems) such
510 as hardware details, network settings, OS type and version, and more. These
511 facts can be collected on the command line with the @command{facter} command
512 or via the @code{facter} Ruby library.")
513 (home-page "https://github.com/puppetlabs/facter-ng")
514 (license license:expat)))
524 (url "https://github.com/htop-dev/htop")
527 (base32 "10lp6cbfvigzp6pq5nwj3s3l4vs7cv92krz2r08nwrz8vl6rqdzp"))
528 (file-name (git-file-name name version))))
529 (build-system gnu-build-system)
531 `(("ncurses" ,ncurses)))
533 `(("autoconf" ,autoconf)
534 ("automake" ,automake)))
535 (home-page "https://htop.dev")
536 (synopsis "Interactive process viewer")
538 "This is htop, an interactive process viewer. It is a text-mode
539 application (for console or X terminals) and requires ncurses.")
540 (license license:gpl2)))
542 (define-public bashtop
549 (url "https://github.com/aristocratos/bashtop")
550 (commit (string-append "v" version))))
551 (file-name (git-file-name name version))
554 "07nlr6vmyb7yihaxj1fp424lmhwkdjl6mls92v90f6gsvikpa13v"))))
555 (build-system gnu-build-system)
557 '(#:make-flags (list (string-append "PREFIX=" %output))
558 #:tests? #f ; bats test fails with loading load.bash
559 #:phases (modify-phases %standard-phases (delete 'configure))))
560 (home-page "https://github.com/aristocratos/bashtop")
561 (synopsis "Linux/OSX/FreeBSD resource monitor")
562 (description "Resource monitor that shows usage and stats for processor,
563 memory, disks, network and processes.")
564 (license license:asl2.0)))
573 (uri (string-append "mirror://gnu/pies/pies-"
577 "11j168qljsinaj5dwmg7nkm2z1aghi6gc3d0wf0pikflnh2q2wqf"))))
578 (build-system gnu-build-system)
580 '(#:phases (modify-phases %standard-phases
581 (add-before 'build 'patch-/bin/sh
582 (lambda* (#:key inputs #:allow-other-keys)
583 ;; Use the right shell when executing user-provided
585 (let ((bash (assoc-ref inputs "bash")))
586 (substitute* '("src/progman.c" "src/comp.c")
588 (string-append "\"" bash "/bin/sh\"")))
590 (home-page "https://www.gnu.org.ua/software/pies/")
591 (synopsis "Program invocation and execution supervisor")
593 "GNU pies is a program that supervises the invocation and execution of
594 other programs. It reads the list of programs to be started from its
595 configuration file, executes them, and then monitors their status,
596 re-executing them as necessary.")
597 (license license:gpl3+)))
599 (define-public inetutils
605 (uri (string-append "mirror://gnu/inetutils/inetutils-"
607 (patches (search-patches "inetutils-hurd.patch"))
610 "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy"))))
611 (build-system gnu-build-system)
613 `(#:configure-flags '("--localstatedir=/var"
615 ;; Make sure 'PATH_PROCNET_DEV' gets defined when
616 ;; cross-compiling (by default it does not.)
617 ,@(if (%current-target-system)
618 '("--with-path-procnet-dev=/proc/net/dev")
631 ;; On some systems, 'libls.sh' may fail with an error such as:
632 ;; "Failed to tell switch -a apart from -A".
633 #:parallel-tests? #f))
634 (inputs `(("ncurses" ,ncurses)
635 ("readline" ,readline))) ;for 'ftp'
636 (native-inputs (if (member (%current-system)
637 (package-supported-systems net-tools))
638 `(("netstat" ,net-tools)) ;for tests
640 (home-page "https://www.gnu.org/software/inetutils/")
641 (synopsis "Basic networking utilities")
643 "Inetutils is a collection of common network programs, such as an ftp
644 client and server, a telnet client and server, an rsh client and server, and
646 (license license:gpl3+)))
648 (define-public shadow
655 "https://github.com/shadow-maint/shadow/releases/"
656 "download/" version "/shadow-" version ".tar.xz"))
657 (patches (search-patches "shadow-hurd-pctrl.patch"))
660 "0qmfq50sdhz6xilgxvinblll8j2iqfl7hwk45bq744y4plq4dbd3"))))
661 (build-system gnu-build-system)
663 `(;; Assume System V `setpgrp (void)', which is the default on GNU
664 ;; variants (`AC_FUNC_SETPGRP' is not cross-compilation capable.)
666 '("--with-libpam" "ac_cv_func_setpgrp_void=yes")
669 (modify-phases %standard-phases
670 (add-before 'build 'set-nscd-file-name
671 (lambda* (#:key inputs #:allow-other-keys)
672 ;; Use the right file name for nscd.
673 (let ((libc (assoc-ref inputs
674 ,(if (%current-target-system)
677 (substitute* "lib/nscd.c"
679 (string-append libc "/sbin/nscd")))
681 (add-after 'install 'remove-groups
682 (lambda* (#:key outputs #:allow-other-keys)
683 ;; Remove `groups', which is already provided by Coreutils.
684 (let* ((out (assoc-ref outputs "out"))
685 (bin (string-append out "/bin"))
686 (man (string-append out "/share/man")))
687 (delete-file (string-append bin "/groups"))
688 (for-each delete-file (find-files man "^groups\\."))
691 (inputs `(("linux-pam" ,linux-pam)))
692 (home-page "https://github.com/shadow-maint/shadow")
693 (synopsis "Authentication-related tools such as passwd, su, and login")
695 "Shadow provides a number of authentication-related tools, including:
696 login, passwd, su, groupadd, and useradd.")
698 ;; The `vipw' program is GPLv2+.
699 ;; libmisc/salt.c is public domain.
700 (license license:bsd-3)))
702 (define-public mingetty
708 (uri (string-append "mirror://sourceforge/mingetty/mingetty/"
709 version "/mingetty-" version ".tar.gz"))
712 "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"))))
713 (build-system gnu-build-system)
716 (modify-phases %standard-phases
718 (lambda* (#:key inputs outputs target #:allow-other-keys)
719 (let* ((out (assoc-ref outputs "out"))
720 (man8 (string-append out "/share/man/man8"))
721 (sbin (string-append out "/sbin"))
722 (shadow (assoc-ref inputs "shadow"))
723 (login (string-append shadow "/bin/login")))
724 (substitute* "Makefile"
725 ,@(if (%current-target-system)
727 (string-append "CC=" target "-gcc\n")))
730 (string-append "SBINDIR = " out
733 (string-append "MANDIR = " out
734 "/share/man/man8\n")))
736 ;; Pick the right 'login' by default.
737 (substitute* "mingetty.c"
739 (string-append "\"" login "\"")))
744 #:tests? #f)) ; no tests
745 (inputs `(("shadow" ,shadow)))
747 (home-page "https://sourceforge.net/projects/mingetty")
748 (synopsis "Getty for the text console")
750 "Small console getty that is started on the Linux text console,
751 asks for a login name and then transfers over to @code{login}. It is extended
752 to allow automatic login and starting any app.")
753 (license license:gpl2+)))
755 (define-public net-base
762 "mirror://debian/pool/main/n/netbase/netbase_"
766 "12xqjwg3p4rzmmh2iib6sigm9l29y3dgk74mmnw64k84jnbwdxl1"))))
767 (build-system trivial-build-system)
769 `(#:modules ((guix build utils))
771 (use-modules (guix build utils)
774 (let* ((source (assoc-ref %build-inputs "source"))
775 (tar (assoc-ref %build-inputs "tar"))
776 (xz (assoc-ref %build-inputs "xz"))
777 (output (assoc-ref %outputs "out"))
778 (etc (string-append output "/etc")))
779 (setenv "PATH" (string-append xz "/bin"))
780 (invoke (string-append tar "/bin/tar") "xvf"
782 (chdir ,(string-append "netbase-" version))
785 '("etc-services" "etc-protocols" "etc-rpc")
786 (map (cut string-append etc "/" <>)
787 '("services" "protocols" "rpc")))
789 (native-inputs `(("tar" ,tar)
791 (synopsis "IANA protocol, port, and RPC number assignments")
793 "This package provides the /etc/services, /etc/protocols, and /etc/rpc
794 files, which contain information about the IANA-assigned port, protocol, and
796 (home-page "https://packages.debian.org/sid/netbase")
797 (license license:gpl2)))
799 (define-public netcat
805 (uri (string-append "mirror://sourceforge/netcat/netcat/" version
806 "/netcat-" version ".tar.bz2"))
809 "1frjcdkhkpzk0f84hx6hmw5l0ynpmji8vcbaxg8h5k2svyxz0nmm"))))
810 (build-system gnu-build-system)
813 ;; By default, man and info pages are put in PREFIX/{man,info},
814 ;; but we want them in PREFIX/share/{man,info}.
815 (let ((out (assoc-ref %outputs "out")))
816 (list (string-append "--mandir=" out "/share/man")
817 (string-append "--infodir=" out "/share/info")))))
818 (home-page "http://netcat.sourceforge.net")
819 (synopsis "Read and write data over TCP/IP")
821 "Netcat is a featured networking utility which reads and writes data
822 across network connections, using the TCP/IP protocol. It is designed to be a
823 reliable \"back-end\" tool that can be used directly or easily driven by other
824 programs and scripts. At the same time, it is a feature-rich network debugging
825 and exploration tool, since it can create almost any kind of connection you
826 would need and has several interesting built-in capabilities.")
827 (license license:gpl2+)))
829 (define-public netcat-openbsd
831 (name "netcat-openbsd")
836 (url "https://salsa.debian.org/debian/netcat-openbsd.git")
837 (commit (string-append "debian/" version))))
838 (file-name (git-file-name name version))
841 "19sr52ix14w344pv13ppb0c1wyg5dxhic1fw2q0s3qfmx57b9hhp"))))
842 (build-system gnu-build-system)
844 `(#:tests? #f ; no test suite
846 (list (string-append "CC=" ,(cc-for-target)))
848 (modify-phases %standard-phases
850 (add-before 'build 'patch
852 (setenv "QUILT_PATCHES" "debian/patches")
853 (invoke "quilt" "push" "-a")
856 (lambda* (#:key outputs #:allow-other-keys)
857 (let* ((out (assoc-ref outputs "out"))
858 (bin (string-append out "/bin"))
859 (man (string-append out "/share/man/man1"))
860 (doc (string-append out "/share/doc/netcat-openbsd-" ,version))
861 (examples (string-append doc "/examples")))
862 (install-file "nc" bin)
863 (install-file "nc.1" man)
864 (install-file "debian/copyright" doc)
865 (copy-recursively "debian/examples" examples)
867 (inputs `(("libbsd" ,libbsd)))
868 (native-inputs `(("pkg-config" ,pkg-config)
870 (home-page "https://packages.debian.org/sid/netcat-openbsd")
871 (synopsis "Read and write data over TCP/IP")
873 "Netcat is a simple Unix utility which reads and writes data across
874 network connections using TCP or UDP protocol. It is designed to be a reliable
875 \"back-end\" tool that can be used directly or easily driven by other programs
876 and scripts. At the same time it is a feature-rich network debugging and
877 exploration tool, since it can create almost any kind of connection you would
878 need and has several interesting built-in capabilities.
880 This package contains the OpenBSD rewrite of netcat, including support for
881 IPv6, proxies, and Unix sockets.")
882 (license (list license:bsd-3
883 license:bsd-2)))) ; atomicio.*, socks.c
885 (define-public sipcalc
892 (uri (string-append "http://www.routemeister.net/projects"
893 "/sipcalc/files/sipcalc" "-" version ".tar.gz"))
896 "0mv3wndj4z2bsshh2k8d5sy3j8wxzgf8mzmmkvj1k8gpcz37dm6g"))))
897 (build-system gnu-build-system)
898 (home-page "https://www.routemeister.net/projects/sipcalc/")
899 (synopsis "Command-line IP subnet calculator")
901 "Sipcalc is an advanced command-line IP subnet calculator. It can take
902 multiple forms of input (IPv4/IPv6/interface/hostname) and output a multitude
903 of information about a given subnet.
910 @item Retrieving of address information from interfaces.
911 @item Classfull and CIDR output.
912 @item Multiple address and netmask input and output formats (dotted quad, hex,
914 @item Output of broadcast address, network class, Cisco wildcard,
915 hosts/range, network range.
916 @item The ability to split a network based on a smaller netmask, now also with
917 recursive runs on the generated subnets. (also IPv6)
921 @item Compressed and expanded input and output addresses.
922 @item Standard IPv6 network output.
923 @item v4 in v6 output.
924 @item Reverse DNS address generation.
927 (license license:bsd-3)))
935 (uri (string-append "mirror://gnu/alive/alive-"
939 "053hfp7s66lnilm1ii4jrjmy44wpa2cwwh6f0sl8cyz0mm813x4b"))))
940 (build-system gnu-build-system)
941 (arguments '(#:configure-flags '("alive_cv_nice_ping=yes")))
942 (inputs `(("guile" ,guile-2.0)
943 ("inetutils" ,inetutils)))
944 (home-page "https://www.gnu.org/software/alive/")
945 (synopsis "Autologin and keep-alive daemon")
947 "GNU Alive sends periodic pings to a server, generally to keep a
949 (license license:gpl3+)))
951 (define-public isc-dhcp
952 (let* ((bind-major-version "9")
953 (bind-minor-version "11")
954 (bind-patch-version "22")
955 (bind-release-type "") ; for patch release, use "-P"
956 (bind-release-version "") ; for patch release, e.g. "6"
957 (bind-version (string-append bind-major-version
963 bind-release-version)))
969 (uri (string-append "https://ftp.isc.org/isc/dhcp/"
970 version "/dhcp-" version ".tar.gz"))
973 "08a5003zdxgl41b29zjkxa92h2i40zyjgxg0npvnhpkfl5jcsz0s"))))
974 (build-system gnu-build-system)
976 `(#:parallel-build? #f
977 #:configure-flags '("--with-randomdev=/dev/random")
979 (modify-phases %standard-phases
980 (add-after 'unpack 'replace-bundled-bind
981 (lambda* (#:key inputs native-inputs #:allow-other-keys)
982 (delete-file "bind/bind.tar.gz")
983 (copy-file (assoc-ref inputs "bind-source-tarball")
985 (chmod "bind/bind.tar.gz" #o644)
986 (substitute* "bind/version.tmp"
988 (format #f "MAJORVER=~a\n" ,bind-major-version))
990 (format #f "MINORVER=~a\n" ,bind-minor-version))
992 (format #f "PATCHVER=~a\n" ,bind-patch-version))
994 (format #f "RELEASETYPE=~a\n" ,bind-release-type))
996 (format #f "RELEASEVER=~a\n" ,bind-release-version)))
998 ,@(if (%current-target-system)
999 '((add-before 'configure 'fix-bind-cross-compilation
1001 (substitute* "configure"
1003 "--host=$host_alias"))
1004 ;; BIND needs a native compiler because the DHCP
1005 ;; build system uses the built 'gen' executable.
1006 (setenv "BUILD_CC" "gcc")
1009 (add-after 'configure 'post-configure
1010 (lambda* (#:key outputs #:allow-other-keys)
1011 ;; Point to the right client script, which will be
1012 ;; installed in a later phase.
1013 (substitute* "includes/dhcpd.h"
1014 (("#define[[:blank:]]+_PATH_DHCLIENT_SCRIPT.*")
1015 (let ((out (assoc-ref outputs "out")))
1016 (string-append "#define _PATH_DHCLIENT_SCRIPT \""
1017 out "/libexec/dhclient-script"
1020 ;; During the 'build' phase, 'bind.tar.gz' is extracted, so
1021 ;; we must patch shebangs in there and make sure the right
1023 (with-directory-excursion "bind"
1024 (substitute* "Makefile"
1026 (let ((sh (which "sh")))
1027 (string-append "./configure CONFIG_SHELL="
1028 sh " SHELL=" sh " "))))
1030 (let ((bind-directory (string-append "bind-" ,bind-version)))
1031 (invoke "tar" "xf" "bind.tar.gz")
1032 (for-each patch-shebang
1033 (find-files bind-directory ".*"))
1034 (substitute* (string-append bind-directory "/configure")
1037 (invoke "tar" "cf" "bind.tar.gz"
1039 ;; avoid non-determinism in the archive
1043 "--group=root:0")))))
1044 (add-after 'install 'post-install
1045 (lambda* (#:key inputs outputs #:allow-other-keys)
1046 ;; Install the dhclient script for GNU/Linux and make sure
1047 ;; if finds all the programs it needs.
1048 (let* ((out (assoc-ref outputs "out"))
1049 (libexec (string-append out "/libexec"))
1050 (coreutils (assoc-ref inputs "coreutils*"))
1051 (inetutils (assoc-ref inputs "inetutils"))
1052 (net-tools (assoc-ref inputs "net-tools"))
1053 (sed (assoc-ref inputs "sed*")))
1054 (substitute* "client/scripts/linux"
1056 (string-append (assoc-ref inputs "iproute")
1060 (copy-file "client/scripts/linux"
1061 (string-append libexec "/dhclient-script"))
1064 (string-append libexec "/dhclient-script")
1067 (string-append dir "/bin:"
1069 (list inetutils net-tools coreutils sed))))
1076 (inputs `(("inetutils" ,inetutils)
1077 ,@(if (hurd-target?) '()
1078 `(("net-tools" ,net-tools)
1079 ("iproute" ,iproute)))
1081 ;; isc-dhcp bundles a copy of BIND, which has proved vulnerable
1082 ;; in the past. Use a BIND-VERSION of our choosing instead.
1083 ("bind-source-tarball"
1086 (uri (string-append "https://ftp.isc.org/isc/bind9/"
1088 "/bind-" bind-version ".tar.gz"))
1091 "1j9a4r83a77mp8k1y8z524c9rzdqgd8rzwczd6zwmw86a00xiimg"))))
1093 ("coreutils*" ,coreutils)
1096 (home-page "https://www.isc.org/products/DHCP/")
1097 (synopsis "Dynamic Host Configuration Protocol (DHCP) tools")
1099 "ISC's Dynamic Host Configuration Protocol (DHCP) distribution provides a
1100 reference implementation of all aspects of DHCP, through a suite of DHCP
1101 tools: server, client, and relay agent.")
1102 (license license:mpl2.0)
1103 (properties '((cpe-name . "dhcp"))))))
1105 (define-public libpcap
1111 (uri (string-append "https://www.tcpdump.org/release/libpcap-"
1115 "153h1378diqyc27jjgz6gg5nxmb4ddk006d9xg69nqavgiikflk3"))))
1116 (build-system gnu-build-system)
1121 ;; There are some tests in testprogs/, but no automated test suite.
1123 (home-page "https://www.tcpdump.org")
1124 (synopsis "Network packet capture library")
1126 "libpcap is an interface for user-level packet capture. It provides a
1127 portable framework for low-level network monitoring. Applications include
1128 network statistics collection, security monitoring, network debugging, etc.")
1129 (license (list license:bsd-4 ; fad-*.c and several other source files
1130 license:bsd-3 ; pcap/, sockutils.* & others
1131 license:bsd-2)))) ; the rest
1133 (define-public tcpdump
1139 (uri (string-append "https://www.tcpdump.org/release/tcpdump-"
1143 "0434vdcnbqaia672rggjzdn4bb8p8dchz559yiszzdk0sjrprm1c"))))
1144 (build-system gnu-build-system)
1145 (inputs `(("libpcap" ,libpcap)
1146 ("openssl" ,openssl)))
1147 (native-inputs `(("perl" ,perl))) ; for tests
1148 (home-page "https://www.tcpdump.org/")
1149 (synopsis "Network packet analyzer")
1151 "Tcpdump is a command-line tool to analyze network traffic passing
1152 through the network interface controller.")
1153 (license license:bsd-3)))
1155 (define-public jnettop
1162 (string-append "https://web.archive.org/web/20161221100811/"
1163 "http://jnettop.kubs.info/dist/jnettop-"
1167 "1855np7c4b0bqzhf1l1dyzxb90fpnvrirdisajhci5am6als31z9"))))
1168 (build-system gnu-build-system)
1170 `(("pkg-config" ,pkg-config)))
1173 ("ncurses" ,ncurses)
1174 ("libpcap" ,libpcap)))
1176 "https://web.archive.org/web/20160703195221/http://jnettop.kubs.info/wiki/")
1177 (synopsis "Visualize network traffic by bandwidth use")
1179 "Jnettop is a traffic visualiser, which captures traffic going
1180 through the host it is running from and displays streams sorted
1181 by bandwidth they use.")
1182 (license license:gpl2+)))
1184 (define-public clusterssh
1190 (uri (string-append "mirror://sourceforge/clusterssh/"
1191 "2.%20ClusterSSH%20Series%204/"
1192 "App-ClusterSSH-v" version ".tar.gz"))
1195 "0rmk2p3f2wz1h092anidjclh212rv3gxyk0c641qk3frlrjnw6mp"))))
1196 (build-system perl-build-system)
1199 (modify-phases %standard-phases
1200 (add-after 'unpack 'refer-to-inputs
1201 (lambda* (#:key inputs #:allow-other-keys)
1202 (substitute* (list "lib/App/ClusterSSH/Config.pm"
1207 (add-before 'check 'delete-failing-tests
1209 ;; This checks whether all code is nicely formatted. The above
1210 ;; ‘refer-to-inputs’ phase breaks this pedantry, so disable it.
1211 (delete-file "t/perltidy.t")
1212 ;; Update the manifest so t/manifest.t happily passes.
1213 (substitute* "MANIFEST"
1214 (("t/perltidy.t\n") ""))
1216 (add-after 'install 'augment-library-path
1217 (lambda* (#:key inputs outputs #:allow-other-keys)
1218 (let* ((out (assoc-ref outputs "out"))
1219 (bin (string-append out "/bin")))
1220 (with-directory-excursion bin
1223 (wrap-program program
1224 `("PERL5LIB" ":" prefix
1225 ,(map (lambda (file-name)
1226 (string-append file-name
1227 "/lib/perl5/site_perl"))
1229 (map (lambda (input)
1230 (assoc-ref inputs input))
1231 ;; These may be propagated and hence
1232 ;; not explicitly listed as inputs.
1233 (list "perl-class-data-inheritable"
1234 "perl-devel-stacktrace"
1235 "perl-exception-class"
1239 "perl-x11-protocol-other")))))))
1240 (find-files "." ".*")))
1243 `(("perl-cpan-changes" ,perl-cpan-changes)
1244 ("perl-file-slurp" ,perl-file-slurp)
1245 ("perl-file-which" ,perl-file-which)
1246 ("perl-module-build" ,perl-module-build)
1247 ("perl-readonly" ,perl-readonly)
1248 ("perl-test-differences" ,perl-test-differences)
1249 ("perl-test-distmanifest" ,perl-test-distmanifest)
1250 ("perl-test-perltidy" ,perl-test-perltidy)
1251 ("perl-test-pod" ,perl-test-pod)
1252 ("perl-test-pod-coverage" ,perl-test-pod-coverage)
1253 ("perl-test-trap" ,perl-test-trap)
1254 ("perltidy" ,perltidy)))
1256 `(("perl-exception-class" ,perl-exception-class)
1257 ("perl-sort-naturally" ,perl-sort-naturally)
1258 ("perl-tk" ,perl-tk)
1259 ("perl-try-tiny" ,perl-try-tiny)
1260 ("perl-x11-protocol" ,perl-x11-protocol)
1261 ("perl-x11-protocol-other" ,perl-x11-protocol-other)
1263 ;; The clusterssh.sourceforge.net address requires login to view
1264 (home-page "https://sourceforge.net/projects/clusterssh/")
1265 (synopsis "Secure concurrent multi-server terminal control")
1267 "ClusterSSH controls a number of xterm windows via a single graphical
1268 console window to allow commands to be interactively run on multiple servers
1269 over ssh connections.")
1270 (license license:gpl2+)))
1272 (define-public rename
1279 "mirror://cpan/authors/id/R/RM/RMBARKER/File-Rename-"
1283 "137m8s06r4n038ivlr5r1d9a7q9l7shmwpvnyx053r9ndhvbnkh5"))))
1284 (build-system perl-build-system)
1287 (modify-phases %standard-phases
1288 (add-after 'install 'find-itself
1289 ;; Fix run-time 'Can't locate File/Rename.pm in @INC' failure.
1290 (lambda* (#:key outputs #:allow-other-keys)
1291 (let* ((out (assoc-ref outputs "out"))
1292 (bin (string-append out "/bin")))
1293 (with-directory-excursion bin
1296 (wrap-program program
1297 `("PERL5LIB" ":" prefix
1298 (,(string-append out "/lib/perl5/site_perl")))))
1299 (find-files "." ".*")))
1302 `(("perl-module-build" ,perl-module-build)
1303 ("perl-test-pod" ,perl-test-pod)
1304 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1305 (home-page "https://metacpan.org/pod/distribution/File-Rename/rename.PL")
1306 (synopsis "Perl extension for renaming multiple files")
1308 "This package provides a Perl interface (@code{Perl::Rename}) as well
1309 as a command-line utility (@command{rename}) that can rename multiple files
1310 at once based on a Perl regular expression.")
1311 (license license:perl-license)))
1313 (define-public rottlog
1319 (uri (string-append "mirror://gnu/rottlog/rottlog-"
1323 "0751mb9l2f0jrk3vj6q8ilanifd121dliwk0c34g8k0dlzsv3kd7"))
1324 (modules '((guix build utils)))
1327 (substitute* "Makefile.in"
1328 (("-o \\$\\{LOG_OWN\\} -g \\$\\{LOG_GROUP\\}")
1329 ;; Don't try to chown root.
1331 (("mkdir -p \\$\\(ROTT_STATDIR\\)")
1332 ;; Don't attempt to create /var/lib/rottlog.
1335 (build-system gnu-build-system)
1337 `(#:configure-flags (list "ROTT_ETCDIR=/etc/rottlog" ;rc file location
1338 "--localstatedir=/var")
1340 ;; Install example config files in OUT/etc.
1341 #:make-flags (list (string-append "ROTT_ETCDIR="
1342 (assoc-ref %outputs "out")
1345 #:phases (modify-phases %standard-phases
1346 (add-after 'unpack 'patch-paths
1347 (lambda* (#:key inputs #:allow-other-keys)
1348 (substitute* "rc/rc"
1349 (("/usr/sbin/sendmail")
1350 (string-append (assoc-ref inputs "mailutils")
1353 (add-after 'unpack 'fix-configure
1354 (lambda* (#:key inputs native-inputs #:allow-other-keys)
1355 ;; Replace outdated config.sub and config.guess:
1356 (for-each (lambda (file)
1360 (or native-inputs inputs) "automake")
1362 ,(version-major+minor
1363 (package-version automake))
1365 '("config.sub" "config.guess"))
1367 (add-after 'build 'set-packdir
1369 ;; Set a default location for archived logs.
1370 (substitute* "rc/rc"
1372 "packdir=\"/var/log\""))
1374 (add-before 'install 'tweak-rc-weekly
1375 (lambda* (#:key inputs #:allow-other-keys)
1376 (substitute* "rc/weekly"
1378 (string-append (assoc-ref inputs "coreutils*")
1381 ;; The file is called 'syslog.pid' (no 'd').
1384 (add-after 'install 'install-info
1386 (invoke "make" "install-info"))))))
1387 (native-inputs `(("texinfo" ,texinfo)
1388 ("automake" ,automake)
1389 ("util-linux" ,util-linux))) ; for 'cal'
1390 (inputs `(("coreutils*" ,coreutils)
1391 ("mailutils" ,mailutils)))
1392 (home-page "https://www.gnu.org/software/rottlog/")
1393 (synopsis "Log rotation and management")
1395 "GNU Rot[t]log is a program for managing log files. It is used to
1396 automatically rotate out log files when they have reached a given size or
1397 according to a given schedule. It can also be used to automatically compress
1398 and archive such logs. Rot[t]log will mail reports of its activity to the
1399 system administrator.")
1400 (license license:gpl3+)))
1409 (list (string-append "https://www.sudo.ws/sudo/dist/sudo-"
1411 (string-append "ftp://ftp.sudo.ws/pub/sudo/OLD/sudo-"
1412 version ".tar.gz")))
1415 "10kqdfbfpf3vk5ihz5gwynv4pxdf1lg6ircrlanyygb549yg7pad"))
1416 (modules '((guix build utils)))
1419 (delete-file-recursively "lib/zlib")
1421 (build-system gnu-build-system)
1422 (outputs (list "out"))
1425 (list (string-append "--docdir=" (assoc-ref %outputs "out")
1426 "/share/doc/" ,name "-" ,version)
1428 "--with-logpath=/var/log/sudo.log"
1429 "--with-rundir=/var/run/sudo" ; must be cleaned up at boot time
1430 "--with-vardir=/var/db/sudo"
1431 "--with-iologdir=/var/log/sudo-io"
1433 ;; 'visudo.c' expects _PATH_MV to be defined, but glibc doesn't
1435 (string-append "CPPFLAGS=-D_PATH_MV='\""
1436 (assoc-ref %build-inputs "coreutils")
1439 ;; Avoid non-determinism; see <http://bugs.gnu.org/21918>.
1440 #:parallel-build? #f
1443 (modify-phases %standard-phases
1444 (add-before 'configure 'pre-configure
1446 (substitute* "src/sudo_usage.h.in"
1447 ;; Do not capture 'configure' arguments since we would
1448 ;; unduly retain references, and also because the
1449 ;; CPPFLAGS above would close the string literal
1451 (("@CONFIGURE_ARGS@") "\"\""))
1452 (substitute* (find-files "." "Makefile\\.in")
1453 ;; Allow installation as non-root.
1454 (("-o [[:graph:]]+ -g [[:graph:]]+")
1456 ;; Don't try to create /etc/sudoers.
1457 (("^install: (.*)install-sudoers(.*)" _ before after)
1458 (string-append "install: " before after "\n"))
1459 ;; Don't try to create /run/sudo.
1460 (("\\$\\(DESTDIR\\)\\$\\(rundir\\)")
1462 ;; Install example sudo{,_logsrvd}.conf to the right place.
1463 (("\\$\\(DESTDIR\\)\\$\\(sysconfdir\\)")
1464 "$(DESTDIR)/$(docdir)/examples")
1465 ;; Don't try to create /var/db/sudo.
1466 (("\\$\\(DESTDIR\\)\\$\\(vardir\\)")
1469 ;; ‘Checking existing [/etc/]sudoers file for syntax errors’ is
1470 ;; not the task of the build system, and fails.
1471 (substitute* "plugins/sudoers/Makefile.in"
1472 (("^pre-install:" match)
1473 (string-append match "\ndisabled-" match)))
1476 ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
1477 ;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
1480 ;; XXX TODO: Remove on next rebuild cycle.
1483 `(("groff" ,groff))))
1485 `(("coreutils" ,coreutils)
1486 ("linux-pam" ,linux-pam)
1488 (home-page "https://www.sudo.ws/")
1489 (synopsis "Run commands as root")
1491 "Sudo (su \"do\") allows a system administrator to delegate authority to
1492 give certain users (or groups of users) the ability to run some (or all)
1493 commands as root or another user while providing an audit trail of the
1494 commands and their arguments.")
1496 ;; See <http://www.sudo.ws/sudo/license.html>.
1497 (license license:x11)))
1499 (define-public opendoas
1506 (url "https://github.com/Duncaen/OpenDoas")
1507 (commit (string-append "v" version))))
1508 (file-name (git-file-name name version))
1511 "1dlwnvy8r6slxcy260gfkximp1ms510wdslpfq9y6xvd2qi5izcb"))))
1512 (build-system gnu-build-system)
1515 (modify-phases %standard-phases
1517 ;; The configure script doesn't accept most of the default flags.
1518 (lambda* (#:key configure-flags #:allow-other-keys)
1519 ;; The configure script can be told which compiler to use only
1520 ;; through environment variables.
1521 (setenv "CC" ,(cc-for-target))
1522 (apply invoke "./configure" configure-flags)))
1523 (add-before 'install 'fix-makefile
1524 (lambda* (#:key outputs #:allow-other-keys)
1525 (substitute* "GNUmakefile"
1526 (("^\tchown.*$") ""))
1529 (list (string-append "--prefix=" (assoc-ref %outputs "out"))
1531 ;; Compiler choice is not carried over from the configure script.
1533 (list (string-append "CC=" ,(cc-for-target)))
1534 #:tests? #f)) ; no test suite
1536 `(("bison" ,bison)))
1537 (home-page "https://github.com/Duncaen/OpenDoas")
1538 (synopsis "Portable version of OpenBSD's doas command")
1539 (description "Doas is a minimal replacement for the venerable sudo. It was
1540 initially written by Ted Unangst of the OpenBSD project to provide 95% of the
1541 features of sudo with a fraction of the codebase.")
1542 (license (list license:bsd-3 ; libbsd/*
1543 license:isc)))) ; everything else
1545 (define-public wpa-supplicant-minimal
1547 (name "wpa-supplicant-minimal")
1552 "https://w1.fi/releases/wpa_supplicant-"
1556 "05qzak1mssnxcgdrafifxh9w86a4ha69qabkg4bsigk499xyxggw"))
1557 (modules '((guix build utils)))
1560 (substitute* "wpa_supplicant/defconfig"
1561 ;; Disable D-Bus to save ~14MiB on the closure size.
1562 (("^CONFIG_CTRL_IFACE_DBUS" line _)
1563 (string-append "#" line)))
1565 (build-system gnu-build-system)
1568 (modify-phases %standard-phases
1571 (chdir "wpa_supplicant")
1572 (copy-file "defconfig" ".config")
1573 (let ((port (open-file ".config" "al")))
1575 CONFIG_DEBUG_SYSLOG=y
1579 CONFIG_DRIVER_NL80211=y
1580 CFLAGS += $(shell pkg-config libnl-3.0 --cflags)
1582 CONFIG_READLINE=y\n" port)
1584 ;; Make sure we have a pkg-config when cross compiling
1585 (substitute* '(".config"
1590 (or (which "pkg-config")
1591 (which (string-append ,(%current-target-system)
1594 (add-after 'install 'install-documentation
1595 (lambda* (#:key outputs #:allow-other-keys)
1596 (let* ((out (assoc-ref outputs "out"))
1597 (doc (string-append out "/share/doc/wpa-supplicant"))
1598 (man (string-append out "/share/man"))
1599 (man5 (string-append man "/man5"))
1600 (man8 (string-append man "/man8")))
1601 (define (copy-man-page target)
1603 (install-file file target)))
1605 (mkdir-p man5) (mkdir man8)
1606 (for-each (copy-man-page man5)
1607 (find-files "doc/docbook" "\\.5"))
1608 (for-each (copy-man-page man8)
1609 (find-files "doc/docbook" "\\.8"))
1611 ;; wpa_supplicant.conf(5) does not explain all configuration
1612 ;; options but refers to the example config file, so install it
1613 ;; along with READMEs.
1614 (for-each (lambda (file)
1615 (install-file file doc))
1616 '("README" "README-DPP" "README-HS20"
1617 "README-P2P" "README-WPS"
1618 "wpa_supplicant.conf"))
1621 #:make-flags (list (string-append "CC=" ,(cc-for-target))
1622 (string-append "BINDIR=" (assoc-ref %outputs "out")
1624 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1628 `(("readline" ,readline)
1630 ("openssl" ,openssl)))
1632 `(("pkg-config" ,pkg-config)))
1633 (home-page "https://w1.fi/wpa_supplicant/")
1634 (synopsis "Connecting to WPA and WPA2-protected wireless networks")
1636 "wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
1637 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in
1638 the client stations. It implements key negotiation with a WPA Authenticator
1639 and it controls the roaming and IEEE 802.11 authentication/association of the
1642 This package provides the @code{wpa_supplicant} daemon and the @code{wpa_cli}
1645 ;; In practice, this is linked against Readline, which makes it GPLv3+.
1646 (license license:bsd-3)
1648 (properties `((cpe-name . "wpa_supplicant")))))
1650 (define-public wpa-supplicant
1651 (package (inherit wpa-supplicant-minimal)
1652 (name "wpa-supplicant")
1653 (inputs `(("dbus" ,dbus)
1654 ,@(package-inputs wpa-supplicant-minimal)))
1656 (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
1658 `(modify-phases ,phases
1659 (add-after 'configure 'configure-for-dbus
1661 (let ((port (open-file ".config" "al")))
1663 CONFIG_CTRL_IFACE_DBUS_NEW=y
1664 CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
1667 (add-after 'install-documentation 'install-dbus-conf
1668 (lambda* (#:key outputs #:allow-other-keys)
1669 (let* ((out (assoc-ref outputs "out"))
1670 (dir (string-append out "/etc/dbus-1/system.d")))
1672 (copy-file "dbus/dbus-wpa_supplicant.conf"
1673 (string-append dir "/wpa_supplicant.conf")))
1676 (define-public wpa-supplicant-gui
1678 (inherit wpa-supplicant)
1679 (name "wpa-supplicant-gui")
1680 (inputs `(("qtbase" ,qtbase)
1682 ,@(package-inputs wpa-supplicant)))
1685 `(("imagemagick" ,imagemagick)
1686 ("inkscape" ,inkscape)
1687 ,@(package-native-inputs wpa-supplicant)))
1689 `(#:phases (modify-phases %standard-phases
1690 (add-after 'unpack 'chdir
1692 (chdir "wpa_supplicant/wpa_gui-qt4")
1697 (invoke "qmake" "wpa_gui.pro")
1698 (invoke "make" "-j" (number->string (parallel-job-count)))
1699 (invoke "make" "-C" "icons")))
1701 (lambda* (#:key inputs outputs #:allow-other-keys)
1702 (let ((out (assoc-ref outputs "out"))
1703 (qt '("qtbase" "qtsvg")))
1704 (install-file "wpa_gui" (string-append out "/bin"))
1705 (install-file "wpa_gui.desktop"
1706 (string-append out "/share/applications"))
1707 (copy-recursively "icons/hicolor"
1708 (string-append out "/share/icons/hicolor"))
1709 (wrap-program (string-append out "/bin/wpa_gui")
1710 `("QT_PLUGIN_PATH" ":" prefix
1711 ,(map (lambda (label)
1712 (string-append (assoc-ref inputs label)
1713 "/lib/qt5/plugins/"))
1716 (synopsis "Graphical user interface for WPA supplicant")))
1718 (define-public hostapd
1724 (uri (string-append "https://w1.fi/releases/hostapd-" version
1728 "1mrbvg4v7vm7mknf0n29mf88k3s4a4qj6r4d51wq8hmjj1m7s7c8"))))
1729 (build-system gnu-build-system)
1732 (modify-phases %standard-phases
1735 ;; This is mostly copied from 'wpa-supplicant' above.
1737 (copy-file "defconfig" ".config")
1738 (let ((port (open-file ".config" "al")))
1743 CONFIG_IEEE80211AC=y\n" port)
1746 (add-after 'unpack 'patch-pkg-config
1748 (substitute* "src/drivers/drivers.mak"
1750 (or (which "pkg-config")
1751 (string-append ,(%current-target-system)
1754 (add-after 'install 'install-man-pages
1755 (lambda* (#:key outputs #:allow-other-keys)
1756 (let* ((out (assoc-ref outputs "out"))
1757 (man (string-append out "/share/man"))
1758 (man1 (string-append man "/man1"))
1759 (man8 (string-append man "/man8")))
1760 (define (copy-man-page target)
1762 (install-file file target)))
1764 (for-each (copy-man-page man1)
1765 (find-files "." "\\.1"))
1766 (for-each (copy-man-page man8)
1767 (find-files "." "\\.8"))
1770 #:make-flags (list (string-append "CC=" ,(cc-for-target))
1771 (string-append "BINDIR=" (assoc-ref %outputs "out")
1773 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1776 (native-inputs `(("pkg-config" ,pkg-config)))
1778 ;; There's an optional dependency on SQLite.
1779 (inputs `(("openssl" ,openssl)
1781 (home-page "https://w1.fi/hostapd/")
1782 (synopsis "Daemon for Wi-Fi access points and authentication servers")
1784 "hostapd is a user-space daemon for WiFi access points and authentication
1785 servers. It implements IEEE 802.11 access point management, IEEE
1786 802.1X/WPA/WPA2/EAP Authenticators, RADIUS client, EAP server, and RADIUS
1787 authentication server.")
1789 ;; Same license as wpa_supplicant.
1790 (license license:bsd-3)))
1792 (define-public wakelan
1799 "ftp://ftp.gwdg.de/pub/linux/metalab/system/network/misc/wakelan-"
1803 "0vydqpf44146ir6k87gmqaq6xy66xhc1gkr3nsd7jj3nhy7ypx9x"))))
1804 (build-system gnu-build-system)
1807 (modify-phases %standard-phases
1809 (lambda* (#:key outputs #:allow-other-keys)
1810 (let ((out (assoc-ref outputs "out")))
1811 (mkdir-p (string-append out "/bin"))
1812 (mkdir-p (string-append out "/share/man/man1"))
1814 ;; It's an old configure script that doesn't understand
1815 ;; the extra options we pass.
1816 (setenv "CONFIG_SHELL" (which "bash"))
1817 (invoke "./configure"
1818 (string-append "--prefix=" out)
1819 (string-append "--mandir=" out
1822 (home-page "https://www.kernel.org") ; really, no home page
1823 (synopsis "Send a wake-on-LAN packet")
1825 "WakeLan broadcasts a properly formatted UDP packet across the local area
1826 network, which causes enabled computers to power on.")
1827 (license license:gpl2+)))
1829 (define-public dmidecode
1836 (uri (string-append "mirror://savannah/dmidecode/dmidecode-"
1839 (base32 "0m8lzg9rf1qssasiix672bxk5qwms90561g8hfkkhk31h2kkgiw2"))))
1840 (build-system gnu-build-system)
1842 `(#:tests? #f ; no 'check' target
1844 (list (string-append "CC=" ,(cc-for-target))
1845 (string-append "prefix="
1846 (assoc-ref %outputs "out")))
1848 (modify-phases %standard-phases
1849 (delete 'configure)))) ; no configure script
1850 (home-page "https://www.nongnu.org/dmidecode/")
1851 (synopsis "Read hardware information from the BIOS")
1853 "Dmidecode reports information about your system's hardware as described
1854 in your system BIOS according to the SMBIOS/DMI standard. This typically
1855 includes system manufacturer, model name, serial number, BIOS version, asset
1856 tag as well as a lot of other details of varying level of interest and
1857 reliability depending on the manufacturer. This will often include usage
1858 status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory
1859 module slots, and the list of I/O ports (e.g. serial, parallel, USB).")
1860 (license license:gpl2+)))
1862 (define-public acpica
1865 (version "20210105")
1869 "https://acpica.org/sites/acpica/files/acpica-unix2-"
1873 "1gi7qzfywg118g5nlqn5lawxk25pg2sz01gmbz40vvmikks4ri9r"))))
1874 (build-system gnu-build-system)
1875 (native-inputs `(("flex" ,flex)
1878 `(#:make-flags (list (string-append "PREFIX=" %output)
1879 (string-append "CC=" ,(cc-for-target))
1881 "OPT_CFLAGS=-Wall -fno-strict-aliasing")
1882 #:tests? #f ; no 'check' target
1883 #:phases (modify-phases %standard-phases (delete 'configure))))
1884 (home-page "https://acpica.org/")
1885 (synopsis "Tools for the development and debugging of ACPI tables")
1887 "The @acronym{ACPICA, ACPI Component Architecture} project provides an
1888 OS-independent reference implementation of the @acronym{ACPI, Advanced
1889 Configuration and Power Interface} specification. ACPICA code contains those
1890 portions of ACPI meant to be directly integrated into the host OS as a
1891 kernel-resident subsystem, and a small set of tools to assist in developing and
1892 debugging ACPI tables.
1894 This package contains only the user-space tools needed for ACPI table
1895 development, not the kernel implementation of ACPI.")
1896 (license license:gpl2))) ; dual GPLv2/ACPICA Licence
1898 (define-public s-tui
1905 (uri (pypi-uri "s-tui" version))
1907 (base32 "0xkfdaz5np21311ffdvhks58155qby8j8scbcixhvjd913pj66qx"))))
1908 (build-system python-build-system)
1910 `(("python-psutil" ,python-psutil)
1911 ("python-urwid" ,python-urwid)))
1912 (home-page "https://github.com/amanusk/s-tui")
1913 (synopsis "Interactive terminal stress test and monitoring tool")
1915 "The Stress Terminal UI displays graphs of the CPU frequency,
1916 utilization, temperature and power.")
1917 (license license:gpl2+)))
1919 (define-public stress
1925 (uri (string-append "mirror://debian/pool/main/s/stress/stress_"
1926 version ".orig.tar.gz"))
1929 "0nw210jajk38m3y7h8s130ps2qsbz7j75wab07hi2r3hlz14yzh5"))))
1930 (build-system gnu-build-system)
1931 (home-page "https://packages.debian.org/sid/stress")
1932 (synopsis "Impose load on and stress test a computer system")
1934 "Stress is a tool that imposes a configurable amount of CPU, memory, I/O,
1935 or disk stress on a POSIX-compliant operating system and reports any errors it
1938 Stress is not a benchmark. It is a tool used by system administrators to
1939 evaluate how well their systems will scale, by kernel programmers to evaluate
1940 perceived performance characteristics, and by systems programmers to expose
1941 the classes of bugs which only or more frequently manifest themselves when the
1942 system is under heavy load.")
1943 (license license:gpl2+)))
1945 (define-public detox
1952 (url "https://github.com/dharple/detox")
1953 (commit (string-append "v" version))))
1954 (file-name (git-file-name name version))
1957 "1dd608c7g65s5lj02cddvani3q9kzirddgkjqa22ap9d4f8b9xgr"))))
1958 (build-system gnu-build-system)
1960 `(("autoconf" ,autoconf)
1961 ("automake" ,automake)
1964 `(#:tests? #f ;no 'check' target
1965 #:phases (modify-phases %standard-phases
1966 (add-after 'unpack 'delete-configure
1967 ;; The "configure" script is present, but otherwise the
1968 ;; project is not bootstrapped: missing install-sh and
1969 ;; Makefile.in, so delete it so the bootstrap phase will
1971 (lambda _ (delete-file "configure") #t)))))
1972 (home-page "https://github.com/dharple/detox")
1973 (synopsis "Clean up file names")
1975 "Detox is a program that renames files to make them easier to work with
1976 under Unix and related operating systems. Spaces and various other unsafe
1977 characters (such as \"$\") get replaced with \"_\". ISO 8859-1 (Latin-1)
1978 characters can be replaced as well, as can UTF-8 characters.")
1979 (license license:bsd-3)))
1981 (define-public testdisk
1987 (uri (string-append "https://www.cgsecurity.org/testdisk-"
1988 version ".tar.bz2"))
1991 "1zlh44w67py416hkvw6nrfmjickc2d43v51vcli5p374d5sw84ql"))))
1992 (build-system gnu-build-system)
1994 `(("ntfs-3g" ,ntfs-3g)
1995 ("util-linux" ,util-linux "lib")
1996 ("openssl" ,openssl)
1997 ;; FIXME: add reiserfs.
1999 ("e2fsprogs" ,e2fsprogs)
2000 ("libjpeg" ,libjpeg-turbo)
2001 ("ncurses" ,ncurses)))
2002 (home-page "https://www.cgsecurity.org/wiki/TestDisk")
2003 (synopsis "Data recovery tool")
2005 "TestDisk is a program for data recovery, primarily designed to help
2006 recover lost partitions and/or make non-booting disks bootable again.")
2007 (license license:gpl2+)))
2016 "http://mama.indstate.edu/users/ice/tree/src/tree-"
2019 (base32 "1hmpz6k0mr6salv0nprvm1g0rdjva1kx03bdf1scw8a38d5mspbi"))))
2020 (build-system gnu-build-system)
2022 '(#:phases (modify-phases %standard-phases (delete 'configure))
2023 #:tests? #f ; no check target
2024 #:make-flags (let ((out (assoc-ref %outputs "out")))
2025 (list (string-append "prefix=" out)))))
2026 (synopsis "Recursively list the contents of a directory")
2028 "Tree is a recursive directory listing command that produces a depth
2029 indented listing of files, which is colorized ala dircolors if the LS_COLORS
2030 environment variable is set and output is to tty.")
2031 (home-page "http://mama.indstate.edu/users/ice/tree/")
2032 (license license:gpl2+)))
2034 (define-public direvent
2040 (uri (string-append "mirror://gnu/direvent/direvent-"
2044 "0m9vi01b1km0cpknflyzsjnknbava0s1n6393b2bpjwyvb6j5613"))
2045 (modules '((guix build utils)))
2047 (substitute* "tests/testsuite"
2048 (("#![[:blank:]]?/bin/sh")
2051 (build-system gnu-build-system)
2054 (modify-phases %standard-phases
2055 (add-before 'build 'patch-/bin/sh
2056 (lambda* (#:key inputs #:allow-other-keys)
2057 ;; Use the right shell when executing the watcher and
2058 ;; user-provided shell commands.
2059 (let ((bash (assoc-ref inputs "bash")))
2060 (substitute* '("src/direvent.c" "src/progman.c")
2062 (string-append "\"" bash "/bin/sh\"")))
2064 ;; Adjust the 'shell.at' test accordingly.
2065 (substitute* "tests/testsuite"
2067 (string-append "SHELL=" bash "/bin/sh")))
2070 (home-page "https://www.gnu.org.ua/software/direvent/")
2071 (synopsis "Daemon to monitor directories for events such as file removal")
2073 "A daemon that monitors directories for events, such as creating,
2074 deleting or modifying files. It can monitor different sets of directories for
2075 different events. When an event is detected, direvent calls a specified
2076 external program with information about the event, such as the location
2077 within the file system where it occurred. Thus, \"direvent\" provides an
2078 easy way to react immediately if given files undergo changes, for example, to
2079 track changes in important system configuration files.")
2080 (license license:gpl3+)))
2082 (define-public libcap-ng
2089 "https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-"
2093 "08cy59iassiwbmfxa5v0kb374r80290vv32f5q1mnip11av26kgi"))))
2094 (build-system gnu-build-system)
2097 (list "--without-python")))
2098 (home-page "https://people.redhat.com/sgrubb/libcap-ng/")
2099 (synopsis "Library for more easily working with POSIX capabilities")
2101 "The libcap-ng library is intended to make programming with POSIX
2102 capabilities easier than the traditional libcap library. It includes
2103 utilities that can analyse all currently running applications and print out
2104 any capabilities and whether or not it has an open ended bounding set. The
2105 included utilities are designed to let admins and developers spot apps from
2106 various ways that may be running with too much privilege.")
2107 ;; The library is lgpl2.1+, but also ships some utils which are gpl2+.
2108 (license (list license:lgpl2.1+ license:gpl2+))))
2110 (define-public smartmontools
2112 (name "smartmontools")
2117 "mirror://sourceforge/smartmontools/smartmontools/"
2118 version "/smartmontools-" version ".tar.gz"))
2121 "1mlc25sd5rgj5xmzcllci47inmfdw7cp185fday6hc9rwqkqmnaw"))))
2122 (build-system gnu-build-system)
2123 (inputs `(("libcap-ng" ,libcap-ng)))
2124 (home-page "https://www.smartmontools.org/")
2125 (synopsis "S.M.A.R.T. harddisk control and monitoring tools")
2127 "The smartmontools package contains utility programs to control and
2128 monitor storage systems using the Self-Monitoring, Analysis and Reporting
2129 Technology System (@dfn{S.M.A.R.T.}) built into most modern ATA and SCSI hard
2130 disks. In many cases, these utilities will provide advanced warning of disk
2131 degradation and failure.")
2132 (license license:gpl2+)))
2134 (define-public fdupes
2141 (uri (string-append "https://github.com/adrianlopezroche/fdupes/"
2142 "releases/download/v" version "/"
2143 "fdupes-" version ".tar.gz"))
2145 (base32 "1g9p50xhi2sp0hqxml4w2k0kq9jv988q2yxm347z5349dlxvap6d"))))
2146 (build-system gnu-build-system)
2148 `(("ncurses" ,ncurses)
2150 (home-page "https://github.com/adrianlopezroche/fdupes")
2151 (synopsis "Identify duplicate files")
2153 "fdupes is a program for identifying duplicate files residing within
2154 specified directories.")
2155 (license license:expat)))
2157 (define-public graphios
2164 (uri (pypi-uri "graphios" version))
2167 "1h87hvc315wg6lklbf4l7csd3n5pgljwrfli1p3nasdi0izgn66i"))))
2168 (build-system python-build-system)
2170 ;; Be warned: Building with Python 3 succeeds, but the build process
2171 ;; throws a syntax error that is ignored.
2172 `(#:python ,python-2
2174 (modify-phases %standard-phases
2175 (add-before 'build 'fix-setup.py
2176 (lambda* (#:key outputs #:allow-other-keys)
2177 ;; Fix hardcoded, unprefixed file names.
2178 (let ((out (assoc-ref outputs "out")))
2179 (substitute* '("setup.py")
2180 (("/etc") (string-append out "/etc"))
2182 (("distro_ver = .*") "distro_ver = ''"))
2184 (home-page "https://github.com/shawn-sterling/graphios")
2185 (synopsis "Emit Nagios metrics to Graphite, Statsd, and Librato")
2187 "Graphios is a script to emit nagios perfdata to various upstream metrics
2188 processing and time-series systems. It's currently compatible with Graphite,
2189 Statsd, Librato and InfluxDB. Graphios can emit Nagios metrics to any number
2190 of supported upstream metrics systems simultaneously.")
2191 (license license:gpl2+)))
2193 (define-public ansible
2200 (uri (pypi-uri "ansible" version))
2202 (base32 "0j1icfqff25zm9sq6j41ipl6gcj3i67mb5bqbjf2f2q1yx6rm8sk"))))
2203 (build-system python-build-system)
2205 `(("python-bcrypt" ,python-bcrypt)
2206 ("python-pynacl" ,python-pynacl)
2207 ("python-httplib2" ,python-httplib2)
2208 ("python-passlib" ,python-passlib)
2209 ("python-nose" ,python-nose)
2210 ("python-mock" ,python-mock)
2211 ("python-jinja2" ,python-jinja2)
2212 ("python-pyyaml" ,python-pyyaml)
2213 ("python-paramiko" ,python-paramiko)))
2215 `(("python-cryptography" ,python-cryptography)
2216 ("python-jinja2" ,python-jinja2)
2217 ("python-pyyaml" ,python-pyyaml)
2218 ("python-paramiko" ,python-paramiko)))
2221 (modify-phases %standard-phases
2222 ;; Several ansible commands (ansible-config, ansible-console, etc.)
2223 ;; are just symlinks to a single ansible executable. The ansible
2224 ;; executable behaves differently based on the value of
2225 ;; sys.argv[0]. This does not work well with our wrap phase, and
2226 ;; therefore the following two phases are required as a workaround.
2227 (add-after 'unpack 'hide-wrapping
2229 ;; Overwrite sys.argv[0] to hide the wrapper script from it.
2230 (substitute* "bin/ansible"
2231 (("import traceback" all)
2232 (string-append all "
2234 sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
2237 (add-after 'install 'replace-symlinks
2238 (lambda* (#:key outputs #:allow-other-keys)
2239 ;; Replace symlinks with duplicate copies of the ansible
2241 (let ((out (assoc-ref outputs "out")))
2243 (lambda (subprogram)
2244 (delete-file (string-append out "/bin/ansible-" subprogram))
2245 (copy-file (string-append out "/bin/ansible")
2246 (string-append out "/bin/ansible-" subprogram)))
2247 (list "config" "console" "doc" "galaxy"
2248 "inventory" "playbook" "pull" "vault")))
2250 (home-page "https://www.ansible.com/")
2251 (synopsis "Radically simple IT automation")
2252 (description "Ansible is a radically simple IT automation system. It
2253 handles configuration management, application deployment, cloud provisioning,
2254 ad hoc task execution, and multinode orchestration---including trivializing
2255 things like zero-downtime rolling updates with load balancers.")
2256 (license license:gpl3+)))
2258 (define-public debops
2266 (url "https://github.com/debops/debops")
2267 (commit (string-append "v" version))))
2268 (file-name (git-file-name name version))
2270 (base32 "052b2dykdn35pdpn9s4prawl6nl6yzih8nyf54hpvhpisvjrm1v5"))
2272 (search-patches "debops-constants-for-external-program-names.patch"
2273 "debops-debops-defaults-fall-back-to-less.patch"))))
2274 (build-system python-build-system)
2278 `(("ansible" ,ansible)
2281 ("util-linux" ,util-linux) ;; for umount
2282 ("findutils" ,findutils)
2286 `(("python-future" ,python-future)
2287 ("python-distro" ,python-distro)))
2291 (modify-phases %standard-phases
2292 (add-after 'unpack 'nuke-debops-update
2294 (chmod "bin/debops-update" #o755) ; FIXME work-around git-fetch issue
2295 (with-output-to-file "bin/debops-update"
2297 (format #t "#!/bin/sh
2298 echo 'debops is installed via guix. guix-update is useless in this case.
2299 Please use `guix package -u debops` instead.'")))
2301 ;; patch shebangs only in actuall scripts, not in files included in
2302 ;; roles (which are to be delivered to the targte systems)
2303 (delete `patch-generated-file-shebangs)
2304 (replace 'patch-source-shebangs
2306 (for-each patch-shebang
2309 ;; Filter out symlinks.
2310 (eq? 'regular (stat:type stat)))
2312 (add-after 'unpack 'fix-paths
2314 (define (substitute-program-names file)
2315 ;; e.g. ANSIBLE_PLAYBOOK = '/gnu/store/…/bin/ansible-playbook'
2318 (let ((varname (string-upcase
2320 (lambda (c) (if (char=? c #\-) #\_ c))
2323 (((string-append "^(" varname " = )'.*'") line prefix)
2324 (string-append prefix "'" (which name) "'")))))
2325 '("ansible-playbook" "encfs" "find" "fusermount"
2326 "umount" "gpg" "ansible" "which")))
2327 (for-each substitute-program-names
2329 "bin/debops-padlock"
2331 "debops/__init__.py"
2332 "debops/cmds/__init__.py"))
2334 (home-page "https://www.debops.org/")
2335 (synopsis "Collection of general-purpose Ansible roles")
2336 (description "The Ansible roles provided by that can be used to manage
2337 Debian or Ubuntu hosts. In addition, a default set of Ansible playbooks can
2338 be used to apply the provided roles in a controlled way, using Ansible
2341 The roles are written with a high customization in mind, which can be done
2342 using Ansible inventory. This way the role and playbook code can be shared
2343 between multiple environments, with different configuration in to each one.
2345 Services can be managed on a single host, or spread between multiple hosts.
2346 DebOps provides support for different SQL and NoSQL databases, web servers,
2347 programming languages and specialized applications useful in a data center
2348 environment or in a cluster. The project can also be used to deploy
2349 virtualization environments using KVM/libvirt, Docker or LXC technologies to
2350 manage virtual machines and/or containers.")
2351 (license license:gpl3+)))
2353 (define-public emacs-ansible-doc
2354 (let ((commit "86083a7bb2ed0468ca64e52076b06441a2f8e9e0"))
2356 (name "emacs-ansible-doc")
2357 (version (git-version "0.4" "1" commit))
2362 (url "https://github.com/lunaryorn/ansible-doc.el")
2364 (file-name (git-file-name name version))
2367 "0lap404ch74w99n3xip176jr42b38xhyzkfnkyqg0g3wk2cd3aq8"))))
2368 (build-system emacs-build-system)
2369 ;; Unmaintained by upstream.
2370 (home-page "https://github.com/lunaryorn/ansible-doc.el")
2371 (synopsis "Ansible documentation for Emacs")
2373 "This package provides an Ansible documentation for GNU Emacs.
2375 @code{ansible-doc} allows you to view the documentation of an Ansible
2376 module and @code{ansible-doc-mode} minor mode adds documentation
2377 lookup to YAML Mode. You could enable the mode with @code{(add-hook
2378 'yaml-mode-hook #'ansible-doc-mode)}.")
2379 (license license:gpl3+))))
2381 (define-public cpulimit
2389 (url "https://github.com/opsengine/cpulimit")
2390 (commit (string-append "v" version))))
2391 (file-name (git-file-name name version))
2393 (base32 "1dz045yhcsw1rdamzpz4bk8mw888in7fyqk1q1b3m1yk4pd1ahkh"))))
2394 (build-system gnu-build-system)
2396 `(#:phases (modify-phases %standard-phases
2399 (lambda* (#:key make-flags #:allow-other-keys)
2400 (apply invoke "make" "-Csrc" make-flags)))
2402 (lambda* (#:key tests? make-flags #:allow-other-keys)
2404 (apply invoke "make" "-Ctests" make-flags))
2407 (lambda* (#:key outputs #:allow-other-keys)
2408 (let* ((out (assoc-ref outputs "out"))
2409 (bin (string-append out "/bin")))
2410 (install-file "src/cpulimit" bin))
2412 #:make-flags (list (string-append "CC=" ,(cc-for-target)))))
2413 (home-page "https://github.com/opsengine/cpulimit")
2414 (synopsis "Limit CPU usage")
2416 "Cpulimit limits the CPU usage of a process. It does not change the nice
2417 value or other scheduling priority settings, but the real CPU usage, and is
2418 able to adapt itself dynamically to the overall system load. Children
2419 processes and threads of the specified process may optionally share the same
2421 (license license:gpl2+)))
2423 (define-public autojump
2431 (url "https://github.com/wting/autojump")
2432 (commit (string-append "release-v" version))))
2433 (file-name (git-file-name name version))
2435 (base32 "1rgpsh70manr2dydna9da4x7p8ahii7dgdgwir5fka340n1wrcws"))))
2436 (build-system gnu-build-system)
2437 (native-inputs ; for tests
2438 `(("python-mock" ,python-mock)
2439 ("python-pytest" ,python-pytest)))
2441 `(("python" ,python-wrapper)))
2444 (modify-phases %standard-phases
2445 (add-after 'unpack 'make-git-checkout-writable
2446 ;; ‘install.py’ modifies files before installing them.
2448 (for-each make-file-writable (find-files "."))
2454 (invoke "python" "tests/unit/autojump_utils_test.py")))
2456 (lambda* (#:key outputs #:allow-other-keys)
2457 (setenv "SHELL" (which "bash"))
2458 (invoke "python" "install.py"
2459 (string-append "--destdir="
2460 (assoc-ref outputs "out"))))))))
2461 (home-page "https://github.com/wting/autojump")
2462 (synopsis "Shell extension for file system navigation")
2464 "Autojump provides a faster way to navigate your file system, with a \"cd
2465 command that learns\". It works by maintaining a database of the directories
2466 you use the most from the command line and allows you to \"jump\" to
2467 frequently used directories by typing only a small pattern.")
2468 (license license:gpl3+)))
2477 (url "https://github.com/clvv/fasd")
2479 (file-name (git-file-name name version))
2482 "1awi71jdv3mhjrmar2d4z1i90kn7apd7aq1w31sh6w4yibz9kiyj"))))
2483 (build-system gnu-build-system)
2485 `(#:phases (modify-phases %standard-phases
2486 (delete 'configure)) ;no configuration
2487 #:tests? #f ;no tests
2488 #:make-flags (list (string-append "PREFIX=" %output))))
2489 (home-page "https://github.com/clvv/fasd")
2490 (synopsis "Quick access to files and directories for shells")
2492 "Fasd (pronounced similar to \"fast\") is a command-line productivity
2493 booster. Fasd offers quick access to files and directories for POSIX shells.
2494 It is inspired by tools like autojump, z, and v. Fasd keeps track of files
2495 and directories you have accessed so that you can quickly reference them in
2497 (license license:x11)))
2499 (define-public iftop
2505 (uri (string-append "http://www.ex-parrot.com/~pdw/iftop/download"
2506 "/iftop-" version ".tar.gz"))
2509 "15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp"))))
2510 (build-system gnu-build-system)
2512 `(("libpcap" ,libpcap)
2513 ("ncurses" ,ncurses)))
2514 (synopsis "Monitor network usage")
2515 (description "Iftop does for network usage what @command{top} does
2516 for CPU usage. It listens to network traffic on a named interface and
2517 displays a table of current bandwidth usage by pairs of hosts.")
2518 (home-page "http://www.ex-parrot.com/~pdw/iftop/")
2519 (license license:gpl2+)))
2521 (define-public munge
2527 (uri (string-append "https://github.com/dun/munge/releases/"
2528 "download/munge-" version "/munge-"
2532 "0h06sghb4rqvv1ywyd6mzsmbcgh712v6ygrff0gzm440y4ca41k6"))
2533 (modules '((guix build utils)))
2536 ;; Don't insist on write access to /var.
2537 (substitute* "src/etc/Makefile.in"
2538 (("\\$\\(INSTALL\\)(.*)localstatedir" _ middle)
2539 (string-append "-$(INSTALL)" middle "localstatedir"))
2540 (("\\$\\(MKDIR_P\\) .*(local|run)statedir.*")
2544 `(("openssl" ,openssl)
2545 ("libgcrypt" ,libgcrypt)))
2546 (build-system gnu-build-system)
2549 (list "--localstatedir=/var"
2550 (string-append "--with-pkgconfigdir="
2551 (assoc-ref %outputs "out") "/lib/pkgconfig"))
2553 (modify-phases %standard-phases
2554 ;; XXX Many test series fail. Some might be fixable, others do no-no
2555 ;; things like invoking ‘sudo’.
2556 (add-after 'unpack 'skip-failing-tests
2558 (for-each (lambda (test)
2559 (substitute* "t/Makefile.in"
2560 (((string-append test "\\.t ")) "")))
2561 (list "0100-munged-lock"
2563 "0011-munged-cmdline"
2564 "0012-munge-cmdline"
2565 "0013-unmunge-cmdline"
2566 "0101-munged-security-socket"
2567 "0102-munged-security-keyfile"
2568 "0103-munged-security-logfile"
2569 "0110-munged-origin-addr"))
2571 (home-page "https://dun.github.io/munge/")
2572 (synopsis "Cluster computing authentication service")
2574 "Munge is an authentication service for creating and validating
2575 credentials. It allows a process to authenticate the UID and GID of another
2576 local or remote process within a group of hosts having common users and
2577 groups. These hosts form a security realm that is defined by a shared
2578 cryptographic key. Clients within this security realm can create and validate
2579 credentials without the use of root privileges, reserved ports, or
2580 platform-specific methods.")
2581 (license license:gpl3+)))
2583 (define-public audit
2586 (home-page "https://people.redhat.com/sgrubb/audit/")
2590 (uri (string-append home-page "audit-" version ".tar.gz"))
2593 "1dzcwb2q78q7x41shcachn7f4aksxbxd470yk38zh03fch1l2p8f"))))
2594 (build-system gnu-build-system)
2596 `(#:configure-flags (list "--with-python=no"
2597 "--disable-static")))
2599 `(("openldap" ,openldap)
2601 ("sasl" ,cyrus-sasl)))
2602 (synopsis "User-space component to the Linux auditing system")
2604 "auditd is the user-space component to the Linux auditing system, which
2605 allows logging of system calls made by user-land processes. It's responsible
2606 for writing audit records to the disk. Viewing the logs is done with the
2607 @code{ausearch} or @code{aureport} utilities. Configuring the audit rules is
2608 done with the @code{auditctl} utility.")
2609 (license license:gpl2+)))
2617 (uri (string-append "https://nmap.org/dist/nmap-" version
2621 "1aizfys6l9f9grm82bk878w56mg0zpkfns3spzj157h98875mypw"))
2622 (modules '((guix build utils)))
2625 (for-each delete-file-recursively
2626 ;; Remove bundled lua, pcap, and pcre libraries.
2627 ;; FIXME: Remove bundled liblinear once packaged.
2631 ;; Remove pre-compiled binares.
2634 (build-system gnu-build-system)
2636 `(("openssl" ,openssl)
2637 ("libpcap" ,libpcap)
2640 ("zlib" ,zlib) ;for NSE compression support
2643 ("python" ,python-2)))
2645 ;; TODO Add zenmap output.
2646 (outputs '("out" "ndiff"))
2648 `(#:configure-flags '("--without-zenmap")
2650 (modify-phases %standard-phases
2651 (add-after 'configure 'patch-Makefile
2653 (substitute* "Makefile"
2654 ;; Do not attempt to build lua.
2655 (("build-dnet build-lua") "build-dnet"))
2658 (lambda* (#:key outputs #:allow-other-keys)
2659 (define (make out . args)
2660 (apply invoke "make"
2661 (string-append "prefix=" out)
2663 (define (python-path dir)
2664 (string-append dir "/lib/python"
2665 ,(version-major+minor
2666 (package-version python))
2668 (let ((out (assoc-ref outputs "out"))
2669 (ndiff (assoc-ref outputs "ndiff")))
2670 (for-each mkdir-p (list out ndiff))
2676 (make ndiff "install-ndiff")
2677 (wrap-program (string-append ndiff "/bin/ndiff")
2678 `("PYTHONPATH" prefix
2679 (,(python-path ndiff)))))
2681 ;; These are the tests that do not require network access.
2683 (lambda _ (invoke "make"
2687 ;; Nmap can't cope with out-of-source building.
2688 #:out-of-source? #f))
2689 (home-page "https://nmap.org/")
2690 (synopsis "Network discovery and security auditing tool")
2692 "Nmap (\"Network Mapper\") is a network discovery and security auditing
2693 tool. It is also useful for tasks such as network inventory, managing service
2694 upgrade schedules, and monitoring host or service uptime. It also provides an
2695 advanced netcat implementation (ncat), a utility for comparing scan
2696 results (ndiff), and a packet generation and response analysis tool (nping).")
2697 ;; This package uses nmap's bundled versions of libdnet and liblinear, which
2698 ;; both use a 3-clause BSD license.
2699 (license (list license:nmap license:bsd-3))))
2701 (define-public dstat
2709 (url "https://github.com/dstat-real/dstat")
2710 (commit (string-append "v" version))))
2711 (file-name (git-file-name "dstat" version))
2713 (base32 "1qnmkhqmjd1m3if05jj29dvr5hn6kayq9bkkkh881w472c0zhp8v"))
2714 (patches (search-patches "dstat-fix-crash-when-specifying-delay.patch"
2715 "dstat-skip-devices-without-io.patch"))))
2716 (build-system gnu-build-system)
2718 `(#:tests? #f ; no make check
2720 (list (string-append "prefix=" (assoc-ref %outputs "out")))
2722 (modify-phases %standard-phases
2723 (add-after 'unpack 'fix-python3-DeprecationWarning
2725 (substitute* "dstat"
2726 (("collections") "collections.abc"))
2728 (delete 'configure) ; no configure script
2729 (add-after 'install 'wrap
2730 (lambda* (#:key outputs #:allow-other-keys)
2731 (let ((out (assoc-ref outputs "out")))
2732 (wrap-program (string-append out "/bin/dstat")
2733 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2736 `(("python" ,python-wrapper)
2737 ("python-six" ,python-six)))
2738 (synopsis "Versatile resource statistics tool")
2739 (description "Dstat is a versatile replacement for @command{vmstat},
2740 @command{iostat}, @command{netstat}, and @command{ifstat}. Dstat overcomes
2741 some of their limitations and adds some extra features, more counters and
2742 flexibility. Dstat is handy for monitoring systems during performance tuning
2743 tests, benchmarks or troubleshooting.
2745 Dstat allows you to view all of your system resources in real-time, you can,
2746 e.g., compare disk utilization in combination with interrupts from your IDE
2747 controller, or compare the network bandwidth numbers directly with the disk
2748 throughput (in the same interval).")
2749 (home-page "http://dag.wiee.rs/home-made/dstat/")
2750 (license license:gpl2+)))
2752 (define-public thefuck
2760 (url "https://github.com/nvbn/thefuck")
2762 (file-name (git-file-name name version))
2764 (base32 "0fnf78956pwhb9cgv1jmgypnkma5xzflkivfrkfiadbgin848yfg"))
2765 (patches (search-patches "thefuck-test-environ.patch"))))
2766 (build-system python-build-system)
2769 (modify-phases %standard-phases
2771 (add-after 'install 'check
2772 (lambda* (#:key inputs outputs #:allow-other-keys)
2773 ;; Tests look for installed package
2774 (add-installed-pythonpath inputs outputs)
2775 ;; Some tests need write access to $HOME.
2776 (setenv "HOME" "/tmp")
2777 (invoke "py.test" "-v")
2780 `(("python-colorama" ,python-colorama)
2781 ("python-decorator" ,python-decorator)
2782 ("python-psutil" ,python-psutil)
2783 ("python-pyte" ,python-pyte)
2784 ("python-six" ,python-six)))
2787 ("python-mock" ,python-mock)
2788 ("python-pytest" ,python-pytest)
2789 ("python-pytest-mock" ,python-pytest-mock)))
2790 (home-page "https://github.com/nvbn/thefuck")
2791 (synopsis "Correct mistyped console command")
2793 "The Fuck tries to match a rule for a previous, mistyped command, creates
2794 a new command using the matched rule, and runs it.")
2795 (license license:x11)))
2804 (uri (string-append "https://gentoo.com/di/di-" version ".tar.gz"))
2806 (base32 "0crvvfsxh8ryc0j19a2x52i9zacvggm8zi6j3kzygkcwnpz4km8r"))))
2807 (build-system gnu-build-system)
2809 `(#:tests? #f ; obscure test failures
2811 (modify-phases %standard-phases
2812 (delete 'configure) ; no configure script
2813 (add-before 'build 'setup-environment
2814 (lambda* (#:key outputs #:allow-other-keys)
2815 (setenv "CC" ,(cc-for-target))
2816 (setenv "prefix" (assoc-ref outputs "out"))
2818 #:make-flags (list "--environment-overrides")))
2819 (home-page "https://gentoo.com/di/")
2820 (synopsis "Advanced df like disk information utility")
2822 "@code{di} is a disk information utility, displaying everything that your
2823 @code{df} command does and more. It features the ability to display your disk
2824 usage in whatever format you prefer. It is designed to be highly portable and
2825 produce uniform output across heterogeneous networks.")
2826 (license license:zlib)))
2828 (define-public cbatticon
2836 (url "https://github.com/valr/cbatticon")
2839 (base32 "0ivm2dzhsa9ir25ry418r2qg2llby9j7a6m3arbvq5c3kaj8m9jr"))
2840 (file-name (git-file-name name version))))
2841 (build-system gnu-build-system)
2843 `(#:tests? #f ; no tests
2845 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2848 (modify-phases %standard-phases
2849 (delete 'configure)))) ; no configure script
2852 ("gettext" ,gettext-minimal)
2853 ("libnotify" ,libnotify)))
2855 `(("pkg-config" ,pkg-config)))
2856 (synopsis "Lightweight battery icon for the system tray")
2857 (description "cbatticon is a lightweight battery icon that displays
2858 the status of your battery in the system tray.")
2859 (home-page "https://github.com/valr/cbatticon")
2860 (license license:gpl2+)))
2862 (define-public interrobang
2863 (let ((revision "1")
2864 (commit "896543735e1c99144765fdbd7b6e6b5afbd8b881"))
2866 (name "interrobang")
2867 (version (git-version "0.0.0" revision commit))
2872 (url "https://github.com/TrilbyWhite/interrobang")
2874 (file-name (git-file-name name version))
2876 (base32 "1n13m70p1hfba5dy3i8hfclbr6k9q3d9dai3dg4jvhdhmxcpjzdf"))))
2877 (build-system gnu-build-system)
2879 `(#:tests? #f ; no tests
2881 (modify-phases %standard-phases
2882 (delete 'configure)) ; no configure script
2883 #:make-flags (list (string-append "PREFIX="
2884 (assoc-ref %outputs "out")))))
2886 `(("libx11" ,libx11)))
2888 `(("pkg-config" ,pkg-config)))
2889 (synopsis "Scriptable launcher menu")
2890 (description "Interrobang is a scriptable launcher menu with a customizable
2891 shortcut syntax and completion options.")
2892 (home-page "https://github.com/TrilbyWhite/interrobang")
2893 (license license:gpl3+))))
2895 (define-public pam-krb5
2902 (list (string-append
2903 "https://archives.eyrie.org/software/kerberos/"
2904 "pam-krb5-" version ".tar.xz")
2906 "https://archives.eyrie.org/software/ARCHIVE/"
2907 "pam-krb5/pam-krb5-" version ".tar.xz")))
2908 (patches (search-patches "pam-krb5-CVE-2020-10595.patch"))
2911 "1qjp8i1s9bz7g6kiqrkzzkxn5pfspa4sy53b6z40fqmdf9przdfb"))))
2912 (build-system gnu-build-system)
2915 (modify-phases %standard-phases
2916 (add-before 'configure 'disable-tests
2918 ;; The build container seems to interfere with some tests.
2919 (substitute* "tests/TESTS"
2920 (("module/basic\n") ""))
2921 (substitute* "tests/TESTS"
2922 (("pam-util/vector\n") ""))
2925 `(("linux-pam" ,linux-pam)
2926 ("mit-krb5" ,mit-krb5)))
2929 ("perl-test-pod" ,perl-test-pod))) ; required for tests
2930 (synopsis "Kerberos PAM module")
2932 "Pam-krb5 is a Kerberos PAM module for either MIT Kerberos or Heimdal.
2933 It supports ticket refreshing by screen savers, configurable
2934 authorization handling, authentication of non-local accounts for network
2935 services, password changing, and password expiration, as well as all the
2936 standard expected PAM features. It works correctly with OpenSSH, even
2937 with @code{ChallengeResponseAuthentication} and @code{PrivilegeSeparation}
2938 enabled, and supports extensive configuration either by PAM options or in
2939 krb5.conf or both. PKINIT is supported with recent versions of both MIT
2940 Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.")
2941 (home-page "https://www.eyrie.org/~eagle/software/pam-krb5/")
2942 ;; Dual licenced under a homebrew non-copyleft OR GPL (any version)
2943 ;; However, the tarball does not contain a copy of the GPL, so unless
2944 ;; we put one in, we cannot distribute it under GPL without violating
2945 ;; clause requiring us to give all recipients a copy.
2946 (license license:gpl1+)))
2948 (define (sunxi-tools-source version)
2952 (url "https://github.com/linux-sunxi/sunxi-tools")
2953 (commit (string-append "v" version))))
2955 (base32 "04f3jqg8ww4jxsf9c6ddcdgy2xbhkyp0b3l5f1hvvbv94p81rjxd"))
2957 (search-patches "sunxi-tools-remove-sys-io.patch"))
2958 (modules '((guix build utils)))
2960 ;; Remove binaries contained in the tarball which are only for the
2961 ;; target and can be regenerated anyway.
2963 (delete-file-recursively "bin")
2965 (file-name (git-file-name "sunxi-tools" version))))
2967 (define sunxi-target-tools
2969 (name "sunxi-target-tools")
2971 (build-system gnu-build-system)
2973 (sunxi-tools-source version))
2975 `(#:system "armhf-linux"
2977 #:make-flags (list (string-append "PREFIX="
2978 (assoc-ref %outputs "out"))
2979 (string-append "CROSS_COMPILE=")
2982 (modify-phases %standard-phases
2985 (lambda* (#:key make-flags #:allow-other-keys)
2986 (apply invoke "make" "target-tools" make-flags)))
2988 (lambda* (#:key make-flags #:allow-other-keys)
2989 (apply invoke "make" "install-target-tools"
2991 (home-page "https://github.com/linux-sunxi/sunxi-tools")
2992 (synopsis "Hardware management tools for Allwinner computers")
2993 (description "This package contains tools for Allwinner devices:
2995 @item @command{sunxi-meminfo}: Prints memory bus settings.
2997 (license license:gpl2+)))
2999 (define-public sunxi-tools
3001 (name "sunxi-tools")
3004 (sunxi-tools-source version))
3006 `(("sunxi-target-tools" ,sunxi-target-tools)
3007 ("pkg-config" ,pkg-config)))
3009 `(("libusb" ,libusb)))
3010 (build-system gnu-build-system)
3012 `(#:tests? #f ; no tests exist
3013 #:make-flags (list (string-append "PREFIX="
3014 (assoc-ref %outputs "out"))
3015 (string-append "CROSS_COMPILE=disabled")
3018 (modify-phases %standard-phases
3021 (lambda* (#:key make-flags #:allow-other-keys)
3022 (apply invoke "make" "tools" "misc" make-flags)))
3024 (lambda* (#:key inputs outputs make-flags #:allow-other-keys)
3025 ;; Those tools have been built for armhf but are part of the
3026 ;; installation in the upstream package. So do the same
3028 (copy-recursively (assoc-ref inputs "sunxi-target-tools")
3029 (assoc-ref outputs "out"))
3030 (apply invoke "make" "install-tools" "install-misc"
3032 (home-page "https://github.com/linux-sunxi/sunxi-tools")
3033 (synopsis "Hardware management tools for Allwinner computers")
3034 (description "This package contains tools for Allwinner devices:
3036 @item @command{sunxi-fexc}, @command{bin2fex}, @command{fex2bin}: Compile
3037 a textual description of a board (.fex) to a binary representation (.bin).
3038 @item @command{sunxi-fel}: Puts an Allwinner device into FEL mode which
3039 makes it register as a special USB device (rather than USB host).
3040 You can then connect it to another computer and flash it from there.
3041 @item @command{sunxi-nand-part}: Partitions NAND flash.
3042 @item @command{sunxi-bootinfo}: Reads out boot0 and boot1 (Allwinner
3043 bootloader) parameters.
3044 @item @command{sunxi-pio}: Sets GPIO parameters and oscillates a GPIO
3045 in order to be able to find it.
3046 @item @command{sunxi-meminfo}: Prints memory bus settings.
3047 @item @command{sunxi-nand-image-builder}: Prepares raw NAND images.
3049 (license license:gpl2+)))
3051 (define-public sedsed
3059 (url "https://github.com/aureliojargas/sedsed")
3060 (commit (string-append "v" version))))
3061 (file-name (git-file-name name version))
3063 (base32 "05cl35mwljdb9ynbbsfa8zx6ig8r0xncbg2cir9vwn5manndjj18"))))
3064 (build-system python-build-system)
3066 `(#:tests? #f ; no tests
3068 (modify-phases %standard-phases
3069 (add-after 'unpack 'patch-sed-in
3071 (substitute* "sedsed.py"
3073 (string-append "sedbin = '" (which "sed") "'")))
3077 (lambda* (#:key outputs #:allow-other-keys)
3078 (let* ((out (assoc-ref outputs "out"))
3079 (bin (string-append out "/bin")))
3080 ;; Just one file to copy around
3081 (install-file "sedsed.py" bin)
3083 (add-after 'wrap 'symlink
3084 ;; Create 'sedsed' symlink to "sedsed.py".
3085 (lambda* (#:key outputs #:allow-other-keys)
3086 (let* ((out (assoc-ref outputs "out"))
3087 (bin (string-append out "/bin"))
3088 (sed (string-append bin "/sedsed"))
3089 (sedpy (string-append bin "/sedsed.py")))
3092 (home-page "https://aurelio.net/projects/sedsed")
3093 (synopsis "Sed sed scripts")
3095 "@code{sedsed} can debug, indent, tokenize and HTMLize your @command{sed}
3098 In debug mode, it reads your script and adds extra commands to it. When
3099 executed you can see the data flow between the commands, revealing all the
3100 magic sed performs on its internal buffers.
3102 In indent mode, your script is reformatted with standard spacing.
3104 In tokenize mode, you can see the elements of every command you use.
3106 In HTMLize mode, your script is converted to a beautiful colored HTML file,
3107 with all the commands and parameters identified for your viewing pleasure.
3109 With sedsed you can master any sed script. No more secrets, no more hidden
3111 (license license:expat)))
3113 (define-public igt-gpu-tools
3115 (name "igt-gpu-tools")
3121 (url "https://gitlab.freedesktop.org/drm/igt-gpu-tools.git")
3122 (commit (string-append "igt-gpu-tools-" version))))
3123 (file-name (git-file-name name version))
3125 (base32 "1lvhkdhilw0fn4nzkpfwvrhiv8d92h811qs2v6ac3p5w7v86a9zm"))))
3126 (build-system meson-build-system)
3128 `(#:tests? #f)) ; many of the tests try to load kernel modules
3131 ("elfutils" ,elfutils) ; libdw
3135 ("libpciaccess" ,libpciaccess)
3136 ("libunwind" ,libunwind)
3137 ("procps" ,procps)))
3141 ("pkg-config" ,pkg-config)))
3142 (home-page "https://gitlab.freedesktop.org/drm/igt-gpu-tools")
3143 (synopsis "Tools for development and testing of the Intel DRM driver")
3144 (description "IGT GPU Tools is a collection of tools for development and
3145 testing of the Intel DRM driver. There are many macro-level test suites that
3146 get used against the driver, including xtest, rendercheck, piglit, and
3147 oglconform, but failures from those can be difficult to track down to kernel
3148 changes, and many require complicated build procedures or specific testing
3149 environments to get useful results. Therefore, IGT GPU Tools includes
3150 low-level tools and tests specifically for development and testing of the
3152 (supported-systems '("i686-linux" "x86_64-linux"))
3153 (license license:expat)))
3155 (define-public fabric
3162 (uri (pypi-uri "Fabric" version))
3165 "1a3ndlpdw6bhn8fcw1jgznl117a8pnr84az9rb5fwnrypf1ph2b6"))))
3166 (build-system python-build-system)
3168 `(#:python ,python-2 ; Python 2 only
3170 (modify-phases %standard-phases
3174 "nosetests" "-v" "tests/"
3175 ;; This test hangs indefinitely when run on a single core VM
3176 ;; (see GNU bug #26647 and Debian bug #850230).
3177 "--exclude=test_nested_execution_with_explicit_ports"
3178 ;; This test randomly fails in certain environments causing too
3179 ;; much noise to be useful (see Debian bug #854686).
3180 "--exclude=test_should_use_sentinel_for_tasks_that_errored"))))))
3182 `(("python2-fudge" ,python2-fudge) ; Requires < 1.0
3183 ("python2-jinja2" ,python2-jinja2) ; Requires < 3.0
3184 ("python2-nose" ,python2-nose) ; Requires < 2.0
3185 ("python2-pynacl" ,python2-pynacl)
3186 ("python2-bcrypt" ,python2-bcrypt)))
3188 `(("python2-paramiko" ,python2-paramiko)))
3189 (home-page "https://www.fabfile.org/")
3190 (synopsis "Simple Pythonic remote execution and deployment tool")
3192 "Fabric is designed to upload files and run shell commands on a number of
3193 servers in parallel or serially. These commands are grouped in tasks (which
3194 are regular Python functions) and specified in a @dfn{fabfile}.
3196 It is similar to Capistrano, except it's implemented in Python and doesn't
3197 expect you to be deploying Rails applications. Fabric is a simple, Pythonic
3198 tool for remote execution and deployment.")
3199 (license license:bsd-2)))
3201 (define-public neofetch
3208 (url "https://github.com/dylanaraps/neofetch")
3210 (file-name (git-file-name name version))
3213 "0i7wpisipwzk0j62pzaigbiq42y1mn4sbraz4my2jlz6ahwf00kv"))))
3214 (build-system gnu-build-system)
3216 `(#:tests? #f ; there are no tests
3218 (list (string-append "PREFIX=" %output))
3220 (modify-phases %standard-phases
3221 (delete 'configure)))) ; no configure script
3222 (home-page "https://github.com/dylanaraps/neofetch")
3223 (synopsis "System information script")
3224 (description "Neofetch is a command-line system information tool written in
3225 Bash. Neofetch displays information about your system next to an image, your OS
3226 logo, or any ASCII file of your choice. The main purpose of Neofetch is to be
3227 used in screenshots to show other users what operating system or distribution
3228 you are running, what theme or icon set you are using, etc.")
3229 (license license:expat)))
3231 (define-public screenfetch
3233 (name "screenfetch")
3238 (url "https://github.com/KittyKatt/screenFetch")
3239 (commit (string-append "v" version))))
3240 (file-name (git-file-name name version))
3243 "04l8aqr474pb115nagn9f6y48jw92n1qfszgw7dbhgl4mpn95lcr"))))
3244 (build-system trivial-build-system)
3246 `(#:modules ((guix build utils))
3249 (use-modules (guix build utils))
3250 (let ((source (assoc-ref %build-inputs "source"))
3251 (out (assoc-ref %outputs "out")))
3252 (mkdir-p (string-append out "/bin/"))
3253 (copy-file (string-append source "/screenfetch-dev")
3254 (string-append out "/bin/screenfetch"))
3255 (install-file (string-append source "/screenfetch.1")
3256 (string-append out "/man/man1/"))
3257 (install-file (string-append source "/COPYING")
3258 (string-append out "/share/doc/" ,name "-" ,version))
3259 (substitute* (string-append out "/bin/screenfetch")
3260 (("/usr/bin/env bash")
3261 (string-append (assoc-ref %build-inputs "bash")
3264 (string-append out "/bin/screenfetch")
3266 (,(string-append (assoc-ref %build-inputs "bc") "/bin:"
3267 (assoc-ref %build-inputs "scrot") "/bin:"
3268 (assoc-ref %build-inputs "xdpyinfo") "/bin"
3269 (assoc-ref %build-inputs "xprop") "/bin"))))
3270 (substitute* (string-append out "/bin/screenfetch")
3272 (string-append "#!" (assoc-ref %build-inputs "bash")
3278 ("xdpyinfo" ,xdpyinfo)
3280 (home-page "https://github.com/KittyKatt/screenFetch")
3281 (synopsis "System information script")
3282 (description "Bash screenshot information tool which can be used to
3283 generate those nifty terminal theme information and ASCII distribution logos in
3284 everyone's screenshots nowadays.")
3285 (license license:gpl3)))
3287 (define-public ufetch
3288 (let ((commit "98b622023e03fe24dbc137e9a68104dfe1fbd04a")
3292 (version (git-version "0.2" revision commit))
3296 (url "https://gitlab.com/jschx/ufetch.git")
3298 (file-name (git-file-name name version))
3301 "09c4zmikza16xpydinnqbi3hmcibfrrn10wij7j0j1wv1pj2sl2l"))))
3302 (build-system trivial-build-system)
3307 `(#:modules ((guix build utils))
3310 (use-modules (guix build utils))
3311 (let* ((source (assoc-ref %build-inputs "source"))
3312 (output (assoc-ref %outputs "out"))
3313 (bindir (string-append output "/bin"))
3314 (docdir (string-append output "/share/doc/ufetch-" ,version))
3315 (tput (string-append (assoc-ref %build-inputs "tput") "/bin/tput")))
3316 (install-file (string-append source "/LICENSE") docdir)
3317 (setenv "PATH" (string-append (assoc-ref %build-inputs "bash") "/bin"))
3319 (for-each (lambda (src)
3320 (let ((dst (string-append bindir "/" (basename src))))
3323 (substitute* dst (("tput") tput))))
3324 (find-files source "ufetch-[[:alpha:]]*$"))
3325 ;; Note: the `ufetch` we create below will only work if run under
3326 ;; the Guix System. I.e. a user trying to run `ufetch` on a
3327 ;; foreign distro will not get great results. The `screenfetch`
3328 ;; program does actual runtime detection of the operating system,
3329 ;; and would be a better choice in such a situation.
3330 (symlink "ufetch-guix" (string-append bindir "/ufetch"))))))
3331 (home-page "https://gitlab.com/jschx/ufetch")
3332 (synopsis "Tiny system info")
3333 (description "This package provides a tiny system info utility.")
3334 (license license:isc))))
3336 (define-public pfetch
3337 (let ((commit "e18a0959ab98b963744755ec4687e59dc11db3c5")
3341 (version (git-version "0.7.0" revision commit))
3345 (url "https://github.com/dylanaraps/pfetch")
3347 (file-name (git-file-name name version))
3350 "1md40av6i3xvvwig5jzhy4kf3s5sgxxk35r0vcyrjd8qyndk927l"))))
3351 (build-system trivial-build-system)
3352 (inputs `(("bash" ,bash)))
3354 `(#:modules ((guix build utils))
3357 (use-modules (guix build utils))
3358 (let* ((source (lambda (f)
3359 (string-append (assoc-ref %build-inputs "source") "/" f)))
3360 (output (assoc-ref %outputs "out"))
3361 (docdir (string-append output "/share/doc/pfetch-" ,version)))
3362 (install-file (source "LICENSE.md") docdir)
3363 (install-file (source "README.md") docdir)
3364 (install-file (source "pfetch") (string-append output "/bin"))
3366 (string-append output "/bin/pfetch")
3367 (list (string-append (assoc-ref %build-inputs "bash") "/bin")))
3369 (home-page "https://github.com/dylanaraps/pfetch")
3370 (synopsis "System information tool")
3371 (description "This package provides a simple, configurable system
3373 (license license:expat))))
3382 (uri (string-append "https://github.com/jarun/nnn/releases/download/v"
3383 version "/nnn-v" version ".tar.gz"))
3385 (base32 "1ww18vvfjkvi36rcamw8kpix4bhk71w5bw9kmnh158crah1x8dp6"))))
3386 (build-system gnu-build-system)
3388 `(("ncurses" ,ncurses)
3389 ("readline" ,readline)))
3391 `(("pkg-config" ,pkg-config)))
3393 `(#:tests? #f ; no tests
3395 (modify-phases %standard-phases
3396 (delete 'configure) ; no configure script
3397 (add-after 'unpack 'patch-pkg-config
3399 (substitute* "Makefile"
3401 (or (which "pkg-config")
3402 (string-append ,(%current-target-system)
3407 (string-append "PREFIX="
3408 (assoc-ref %outputs "out"))
3409 (string-append "CC=" ,(cc-for-target)))))
3410 (home-page "https://github.com/jarun/nnn")
3411 (synopsis "Terminal file browser")
3412 (description "@command{nnn} is a fork of @command{noice}, a blazing-fast
3413 lightweight terminal file browser with easy keyboard shortcuts for
3414 navigation, opening files and running tasks. There is no config file and
3415 mime associations are hard-coded. The incredible user-friendliness and speed
3416 make it a perfect utility on modern distros.")
3417 (license license:bsd-2)))
3419 (define-public thermald
3427 (url "https://github.com/intel/thermal_daemon")
3428 (commit (string-append "v" version))))
3429 (file-name (git-file-name name version))
3431 (base32 "0rlac7v1b59m7gh767hkd8a0r4p001nd24786fnmryygbxynd2s6"))))
3432 (build-system gnu-build-system)
3435 (let ((out (assoc-ref %outputs "out")))
3436 (list (string-append "--with-dbus-sys-dir="
3437 out "/etc/dbus-1/system.d")
3438 "--localstatedir=/var"))
3440 (list "V=1") ; log build commands
3442 (modify-phases %standard-phases
3443 (add-before 'bootstrap 'no-early-./configure
3445 (setenv "NO_CONFIGURE" "yet")
3446 ;; XXX thd_trip_point.h redefines "__STDC_LIMIT_MACROS" after
3447 ;; <xz>/include/lzma.h. ./configure forcibly appends -Werror
3448 ;; to CXXFLAGS, overriding any -Wno-error we'd add.
3449 (substitute* "configure.ac"
3453 `(("autoconf" ,autoconf)
3454 ("autoconf-archive" ,autoconf-archive)
3455 ("automake" ,automake)
3456 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
3457 ("gtk-doc" ,gtk-doc)
3458 ("pkg-config" ,pkg-config)))
3460 `(("dbus-glib" ,dbus-glib)
3461 ("libevdev" ,libevdev)
3462 ("libxml2" ,libxml2)
3465 (home-page "https://01.org/linux-thermal-daemon/")
3466 (synopsis "CPU scaling for thermal management")
3467 (description "The Linux Thermal Daemon helps monitor and control temperature
3468 on systems running the Linux kernel.")
3469 ;; arm and aarch64 don't have cpuid.h.
3470 (supported-systems '("i686-linux" "x86_64-linux"))
3471 (license license:gpl2)))
3473 (define-public masscan
3481 (url "https://github.com/robertdavidgraham/masscan")
3483 (file-name (git-file-name name version))
3485 (base32 "0q0c7bsf0pbl8napry1qyg0gl4pd8wn872h4mz9b56dx4rx90vqg"))))
3486 (build-system gnu-build-system)
3488 `(("libpcap" ,libpcap)))
3490 `(#:test-target "regress"
3492 (list (string-append "CC=" ,(cc-for-target))
3493 (string-append "PREFIX=" (assoc-ref %outputs "out")))
3495 (modify-phases %standard-phases
3496 (delete 'configure) ; no ./configure script
3497 (add-after 'unpack 'patch-path
3498 (lambda* (#:key outputs inputs #:allow-other-keys)
3499 (let* ((out (assoc-ref outputs "out"))
3500 (pcap (assoc-ref inputs "libpcap")))
3501 (substitute* "src/rawsock-pcap.c"
3502 (("libpcap.so") (string-append pcap "/lib/libpcap.so")))
3504 (synopsis "TCP port scanner")
3505 (description "MASSCAN is an asynchronous TCP port scanner. It can detect
3506 open ports, and also complete the TCP connection and interact with the remote
3507 application, collecting the information received.")
3508 (home-page "https://github.com/robertdavidgraham/masscan")
3509 ;; 'src/siphash24.c' is the SipHash reference implementation, which
3510 ;; bears a CC0 Public Domain Dedication.
3511 (license license:agpl3+)))
3513 (define-public hungrycat
3519 (uri (string-append "https://github.com/jwilk/hungrycat/"
3520 "releases/download/" version "/"
3521 "hungrycat-" version ".tar.gz"))
3524 "03fc1zsrf99lvxa7b4ps6pbi43304wbxh1f6ci4q0vkal370yfwh"))))
3525 (build-system gnu-build-system)
3528 `(("python" ,python-wrapper)
3529 ("python-nose" ,python-nose)))
3531 `(#:test-target "test"))
3532 (synopsis "A single tool that combines @command{cat} & @command{rm}")
3534 "hungrycat prints the contents of a file to standard output, while
3535 simultaneously freeing the disk space it occupied. It is useful if you need
3536 to process a large file, don't have enough space to store both the input and
3537 output files, and don't need the input file afterwards.
3538 While similar in principle to running @command{cat} immediately followed by
3539 @command{rm}, @command{hungrycat} actually frees blocks as soon as they are
3540 printed instead of after the entire file has been read, which is often too
3542 (home-page "https://jwilk.net/software/hungrycat")
3543 (license license:expat)))
3545 (define-public launchmon
3552 "https://github.com/LLNL/LaunchMON/releases/download/v"
3553 version "/launchmon-v" version ".tar.gz"))
3556 "0fm3nd9mydm9v2bf7bh01dbgrfnpwkapxa3dsvy3x1z0rz61qc0x"))
3557 (modules '((guix build utils)))
3560 ;; Fix build failure with GCC 7 due to a conversion error.
3561 ;; Remove for versions > 1.0.2.
3562 (substitute* "launchmon/src/linux/lmon_api/lmon_coloc_spawner.cxx"
3563 ((" lmonpl = '\\\\0'")
3564 " *lmonpl = '\\0'"))
3566 (build-system gnu-build-system)
3572 ("libgcrypt" ,libgcrypt)
3573 ("libgpg-error" ,libgpg-error)))
3574 (synopsis "Infrastructue for large scale tool daemon launching")
3576 "LaunchMON is a software infrastructure that enables HPC run-time
3577 tools to co-locate tool daemons with a parallel job. Its API allows a
3578 tool to identify all the remote processes of a job and to scalably
3579 launch daemons into the relevant nodes.")
3580 (home-page "https://github.com/LLNL/LaunchMON")
3581 (supported-systems '("i686-linux" "x86_64-linux"))
3582 (license license:lgpl2.1)))
3584 (define-public spindle
3589 ;; We use git checkout to avoid github auto-generated tarballs
3592 (url "https://github.com/hpc/Spindle")
3593 (commit (string-append "v" version))))
3594 (file-name (git-file-name name version))
3597 "15n3ay0qq81r5v7fif61q1vdjcq44pp2nynkh3fvbzc9fj3c39wd"))))
3598 (build-system gnu-build-system)
3599 (arguments '(#:configure-flags '("--enable-sec-launchmon"
3600 "--enable-sec-munge"
3601 "--enable-sec-none")))
3605 ("launchmon" ,launchmon)
3606 ("libgcrypt" ,libgcrypt)))
3607 (synopsis "Scalable library loading in HPC environments")
3609 "Spindle is a tool for improving the performance of dynamic library and
3610 Python loading in HPC environments.")
3611 (home-page "https://github.com/hpc/Spindle")
3612 ;; This package supports x86_64 and PowerPC64
3613 (supported-systems '("x86_64-linux"))
3614 (license license:lgpl2.1)))
3616 (define-public inxi-minimal
3617 (let ((real-name "inxi"))
3619 (name "inxi-minimal")
3620 (version "3.2.02-1")
3625 (url "https://github.com/smxi/inxi")
3627 (file-name (git-file-name real-name version))
3629 (base32 "1kh96093waji30ndka3i3dq9pq4f53gq8pgcbxw45mldlx2i98gv"))))
3630 (build-system trivial-build-system)
3632 `(("bash" ,bash-minimal)
3634 ("procps" ,procps)))
3644 (use-modules (guix build utils)
3647 (setenv "PATH" (string-append
3648 (assoc-ref %build-inputs "bash") "/bin" ":"
3649 (assoc-ref %build-inputs "gzip") "/bin" ":"
3650 (assoc-ref %build-inputs "perl") "/bin" ":"))
3651 (copy-recursively (assoc-ref %build-inputs "source")
3652 ,(string-append real-name "-" version))
3653 (with-directory-excursion ,(string-append real-name "-" version)
3654 (with-fluids ((%default-port-encoding #f))
3655 (substitute* "inxi" (("/usr/bin/env perl") (which "perl"))))
3656 (let ((bin (string-append %output "/bin")))
3657 (install-file "inxi" bin)
3658 (wrap-program (string-append bin "/inxi")
3661 ,@(map (lambda (input)
3665 (cut string-append store <>)))
3667 ((member name '("util-linux"))
3668 (string-append (store-append "/bin") ":"
3669 (store-append "/sbin")))
3670 ((member name '("dmidecode" "iproute2"))
3671 (store-append "/sbin"))
3672 (else (store-append "/bin")))))))
3678 (((? (cut string-prefix? "perl-" <>) name) . dir)
3679 (string-append dir "/lib/perl5/site_perl"))
3682 (invoke "gzip" "inxi.1")
3683 (install-file "inxi.1.gz"
3684 (string-append %output "/share/man/man1")))
3686 (home-page "https://smxi.org/docs/inxi.htm")
3687 (synopsis "Full-featured system information script")
3688 (description "Inxi is a system information script that can display
3689 various things about your hardware and software to users in an IRC chatroom or
3690 support forum. It runs with the @code{/exec} command in most IRC clients.")
3691 (license license:gpl3+))))
3695 (inherit inxi-minimal)
3698 `(("dmidecode" ,dmidecode)
3700 ("bind:utils" ,isc-bind "utils") ; dig
3702 ("iproute2" ,iproute) ; ip
3703 ("kmod" ,kmod) ; modinfo
3704 ("lm-sensors" ,lm-sensors)
3705 ("mesa-utils" ,mesa-utils)
3706 ("pciutils" ,pciutils)
3709 ("util-linux" ,util-linux) ; lsblk
3710 ("usbutils" ,usbutils) ; lsusb
3712 ("xdpyinfo" ,xdpyinfo)
3715 ("coreutils" ,coreutils) ; uptime
3716 ("inetutils" ,inetutils) ; ifconfig
3717 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
3718 ("perl-http-tiny" ,perl-http-tiny)
3719 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
3720 ("perl-json-xs" ,perl-json-xs)
3721 ("perl-time-hires" ,perl-time-hires)
3722 ("lvm2" ,lvm2) ; lvs
3724 ;; TODO: Add more inputs:
3729 ,@(package-inputs inxi-minimal)))))
3731 (define-public pscircle
3739 (url "https://gitlab.com/mildlyparallel/pscircle.git")
3740 (commit (string-append "v" version))))
3741 (file-name (git-file-name name version))
3743 (base32 "1sm99423hh90kr4wdjqi9sdrrpk65j2vz2hzj65zcxfxyr6khjci"))))
3744 (build-system meson-build-system)
3746 `(("pkg-config" ,pkg-config)))
3750 ("libx11" ,libx11)))
3751 (home-page "https://gitlab.com/mildlyparallel/pscircle")
3752 (synopsis "Visualize Linux processes in a form of radial tree")
3754 "@code{pscircle} visualizes Linux processes in the form of a radial tree.")
3755 (license license:gpl2+)))
3757 (define-public python-pyudev
3759 (name "python-pyudev")
3764 (uri (pypi-uri "pyudev" version))
3767 "0xmj6l08iih2js9skjqpv4w7y0dhxyg91zmrs6v5aa65gbmipfv9"))))
3768 (build-system python-build-system)
3770 `(#:tests? #f ; Tests require /sys
3772 (modify-phases %standard-phases
3773 (add-after 'unpack 'patch-ctypes-udev
3774 (lambda* (#:key inputs outputs #:allow-other-keys)
3775 (let ((eudev (assoc-ref inputs "eudev")))
3776 (substitute* "src/pyudev/core.py"
3778 (string-append "'" eudev "/lib/libudev.so'")))
3779 (substitute* "src/pyudev/_ctypeslib/utils.py"
3780 ;; Use absolute paths instead of keys.
3781 (("= find_library") "= "))
3784 `(("eudev" ,eudev)))
3786 `(("python-six" ,python-six)))
3788 `(("python-docutils" ,python-docutils)
3789 ("python-hypothesis" ,python-hypothesis)
3790 ("python-mock" ,python-mock)
3791 ("python-pytest" ,python-pytest)
3792 ("python-sphinx" ,python-sphinx)))
3793 (home-page "https://pyudev.readthedocs.io/")
3794 (synopsis "Python udev binding")
3795 (description "This package provides @code{udev} bindings for Python.")
3796 (license license:lgpl2.1)))
3798 (define-public solaar
3805 (url "https://github.com/pwr-Solaar/Solaar")
3807 (file-name (git-file-name name version))
3810 "15wzxxr2m5349kkvcs3k5clg1rsmvh6by2066qm4hlgvjwmigggy"))))
3811 (build-system python-build-system)
3814 (modify-phases %standard-phases
3815 (add-before 'build 'setenv-PATH
3817 (setenv "PYTHONPATH" (string-append "lib:" (getenv "PYTHONPATH")))
3820 `(("python-pygobject" ,python-pygobject)
3821 ("python-pyudev" ,python-pyudev)))
3822 (home-page "https://smxi.org/docs/inxi.htm")
3823 (synopsis "Linux devices manager for the Logitech Unifying Receiver")
3824 (description "This package provides tools to manage clients of the
3825 Logitech Unifying Receiver.")
3826 (license license:gpl2)))
3828 (define-public lynis
3831 ;; Also update the ‘lynis-sdk’ input to the commit matching this release.
3837 (url "https://github.com/CISOfy/lynis")
3839 (file-name (git-file-name name version))
3841 (base32 "1lkkbvxm0rgrrlx0szaxmf8ghc3d26wal96sgqk84m37mvs1f7p0"))
3842 (modules '((guix build utils)))
3845 ;; Remove proprietary plugins. As of now, all plugins supplied with
3846 ;; lynis are proprietary. In the future, if free plugins are
3847 ;; provided, whitelist them from deletion.
3848 (for-each delete-file (find-files "plugins"))
3850 (build-system gnu-build-system)
3857 (url "https://github.com/CISOfy/lynis-sdk")
3858 (commit "bf1c1d95121da9ca79a9eac5a15ed8d81e34094d")))
3859 (file-name (git-file-name "lynis-sdk" version))
3861 (base32 "1ndz5v0039dqa87cva2dk55a8hkw0fibsw8hh2ddmny9qkr4l3dp"))))))
3864 (modify-phases %standard-phases
3866 (lambda* (#:key inputs outputs #:allow-other-keys)
3867 (substitute* "lynis"
3868 (("/usr/share/lynis")
3869 (string-append (assoc-ref outputs "out") "/share/lynis")))
3870 (substitute* "include/functions"
3871 (("/usr/local/etc/lynis")
3872 (string-append (assoc-ref outputs "out") "/etc/lynis")))
3876 (lambda* (#:key outputs #:allow-other-keys)
3877 (let ((out (assoc-ref outputs "out")))
3878 (install-file "lynis" (string-append out "/bin/"))
3879 (install-file "default.prf" (string-append out "/etc/lynis"))
3882 (copy-recursively dir (string-append out "/share/lynis/" dir)))
3883 (list "db" "include" "plugins"))
3884 (install-file "lynis.8" (string-append out "/share/man/man8"))
3887 (lambda* (#:key inputs #:allow-other-keys)
3888 (copy-recursively (assoc-ref inputs "lynis-sdk") "../lynis-sdk")
3889 (setenv "LANG" "en_US.UTF-8")
3890 (let ((lynis-dir (getcwd)))
3891 (with-directory-excursion "../lynis-sdk"
3892 (substitute* "config"
3893 (("\\.\\./lynis") lynis-dir))
3894 (substitute* "unit-tests/tests-language-translations.sh"
3895 (("\\.\\./lynis") lynis-dir))
3896 (invoke "sh" "lynis-devkit" "run" "unit-tests"))))))))
3897 (home-page "https://cisofy.com/lynis/")
3898 (synopsis "Security auditing tool")
3899 (description "Lynis is a security auditing tool. It performs an in-depth
3900 security scan and runs on the system itself. The primary goal is to test
3901 security defenses and provide tips for further system hardening. It will also
3902 scan for general system information, vulnerable software packages, and
3903 possible configuration issues.")
3904 (license license:gpl3+)))
3906 (define-public ngrep
3914 (url "https://github.com/jpr5/ngrep/")
3915 (commit (string-append "V" (string-replace-substring version "." "_")))))
3916 (file-name (git-file-name name version))
3919 "1x2fyd7wdqlj1r76ilal06cl2wmbz0ws6i3ys204sbjh1cj6dcl7"))))
3920 (build-system gnu-build-system)
3922 `(("libpcap" ,libpcap)))
3924 `(#:tests? #f ;; No tests.
3925 #:configure-flags (list (string-append "--with-pcap-includes="
3926 (assoc-ref %build-inputs "libpcap")
3928 (home-page "https://github.com/jpr5/ngrep/")
3929 (synopsis "Grep-like utility to search for network packets on an interface")
3930 (description "@command{ngrep} is like GNU grep applied to the network
3931 layer. It's a PCAP-based tool that allows you to specify an extended regular
3932 or hexadecimal expression to match against data payloads of packets. It
3933 understands many kinds of protocols, including IPv4/6, TCP, UDP, ICMPv4/6,
3934 IGMP and Raw, across a wide variety of interface types, and understands BPF
3935 filter logic in the same fashion as more common packet sniffing tools, such as
3936 tcpdump and snoop.")
3937 (license license:bsd-3)))
3939 (define-public pam-mount
3946 (uri (string-append "mirror://sourceforge/pam-mount/pam_mount/"
3947 "pam_mount-" version ".tar.xz"))
3949 (base32 "1q2n6a2ah6nghdn8i6ad2wj247njwb5nx48cggxknaa6lqxylidy"))))
3950 (build-system gnu-build-system)
3953 ("pkg-config" ,pkg-config)))
3955 `(("cryptsetup" ,cryptsetup)
3957 ("libxml2" ,libxml2)
3958 ("linux-pam" ,linux-pam)
3960 ("openssl" ,openssl)
3962 ("libmount" ,util-linux "lib")
3963 ("util-linux" ,util-linux)))
3966 (list (string-append "--with-slibdir=" %output "/lib")
3967 (string-append "--with-ssbindir=" %output "/sbin"))
3969 (modify-phases %standard-phases
3970 (add-after 'unpack 'fix-program-paths
3971 (lambda* (#:key inputs outputs #:allow-other-keys)
3972 (let ((util-linux (assoc-ref inputs "util-linux"))
3973 (out (assoc-ref outputs "out")))
3974 (substitute* "src/mtcrypt.c"
3976 (string-append "\"" util-linux "/bin/mount\";"))
3978 (string-append "\"" util-linux "/bin/umount\";"))
3980 (string-append "\"" util-linux "/sbin/fsck\",")))
3981 (substitute* "src/rdconf1.c"
3983 (string-append "\"" util-linux "/bin/mount\", \""))
3985 (string-append "\"" util-linux "/bin/umount\", \""))
3987 (string-append "\"" util-linux "/sbin/fsck\", \""))
3988 (("\"pmvarrun\", \"")
3989 (string-append "\"" out "/sbin/pmvarrun\", \""))))
3991 (home-page "http://pam-mount.sourceforge.net")
3992 (synopsis "PAM module to mount volumes for a user session")
3994 "Pam-mount is a PAM module that can mount volumes when a user logs in.
3995 It supports mounting local filesystems of any kind the normal mount utility
3996 supports. It can also mount encrypted LUKS volumes using the password
3997 supplied by the user when logging in.")
3998 (license (list license:gpl2+ license:lgpl2.1+))))
4006 ;; The PyPI tarball lacks the test suite.
4009 (url "https://github.com/kellyjonbrazil/jc")
4010 (commit (string-append "v" version))))
4011 (file-name (git-file-name name version))
4013 (base32 "0rwvyyrdnw43pixp8h51rncq2inc9pbbj1j2191y5si00pjw34zr"))))
4014 (build-system python-build-system)
4016 `(("python-pygments" ,python-pygments)
4017 ("python-ruamel.yaml" ,python-ruamel.yaml)
4018 ("python-xmltodict" ,python-xmltodict)))
4019 (home-page "https://github.com/kellyjonbrazil/jc")
4020 (synopsis "Convert the output of command-line tools to JSON")
4021 (description "@code{jc} JSONifies the output of many CLI tools and
4022 file-types for easier parsing in scripts.")
4023 (license license:expat)))
4032 (url "https://github.com/kellyjonbrazil/jtbl")
4033 (commit (string-append "v" version))))
4034 (file-name (git-file-name name version))
4037 "1zzd7rd63xva50f22d1rfja4r302aizrafarhwm67vv181swvdya"))))
4038 (build-system python-build-system)
4040 `(("python-tabulate" ,python-tabulate)))
4041 (home-page "https://github.com/kellyjonbrazil/jtbl")
4042 (synopsis "Command-line tool to print JSON data as a table in the terminal")
4043 (description "@code{jtbl} accepts piped JSON data from stdin and outputs a
4044 text table representation to stdout.")
4045 (license license:expat)))
4047 (define-public hosts
4054 (url "https://github.com/xwmx/hosts")
4056 (file-name (git-file-name name version))
4059 "1ni4z89kxzgwm26hhx908g04f2h0fypy7lgfa0rvsz8d0wslgcsn"))))
4060 (build-system trivial-build-system)
4062 `(("bats" ,bats) ;for test
4065 ("coreutils" ,coreutils)
4066 ("diffutils" ,diffutils)
4068 ("ncurses" ,ncurses) ;tput
4071 `(#:modules ((guix build utils))
4074 (use-modules (guix build utils))
4076 (copy-recursively (assoc-ref %build-inputs "source") ".")
4077 ;; patch-shebang phase
4079 (string-append (assoc-ref %build-inputs "bash") "/bin"
4080 ":" (assoc-ref %build-inputs "awk") "/bin"
4081 ":" (assoc-ref %build-inputs "coreutils") "/bin"
4082 ":" (assoc-ref %build-inputs "diffutils") "/bin"
4083 ":" (assoc-ref %build-inputs "grep") "/bin"
4084 ":" (assoc-ref %build-inputs "ncurses") "/bin"
4085 ":" (assoc-ref %build-inputs "sed") "/bin"
4086 ":" "/run/setuid-programs"
4087 ":" (getenv "PATH")))
4088 (substitute* "hosts"
4089 (("#!/usr/bin/env bash")
4090 (string-append "#!" (which "bash")
4091 "\nPATH=" (getenv "PATH"))))
4093 (setenv "TERM" "linux") ;set to tty for test
4094 (invoke (string-append (assoc-ref %build-inputs "bats") "/bin/bats")
4097 (install-file "hosts" (string-append %output "/bin"))
4098 (let ((bash-completion
4099 (string-append %output "/etc/bash_completion.d")))
4100 (mkdir-p bash-completion)
4101 (copy-file "etc/hosts-completion.bash"
4102 (string-append bash-completion "/hosts")))
4103 (let ((zsh-completion
4104 (string-append %output "/share/zsh/site-functions")))
4105 (mkdir-p zsh-completion)
4106 (copy-file "etc/hosts-completion.zsh"
4107 (string-append zsh-completion "/_hosts")))
4108 (let ((doc (string-append %output "/share/doc/" ,name "-" ,version)))
4110 (install-file "LICENSE" doc)
4111 (install-file "README.md" doc))
4113 (home-page "https://github.com/xwmx/hosts/")
4114 (synopsis "Script for editing a foreign distro's @file{/etc/hosts} file")
4115 (description "Hosts is a command line program for managing
4116 @file{/etc/hosts} entries. On Guix System, @file{/etc/hosts} is managed from
4117 the system configuration; hosts only works when using the Guix package manager
4118 on a foreign distro. @command{hosts} works with existing hosts files and
4119 entries, providing commands to add, remove, comment, and search.")
4120 (license license:expat)))
4122 (define-public nmrpflash
4131 (url "https://github.com/jclehner/nmrpflash")
4132 (commit (string-append "v" version))))
4134 (base32 "1fdjrxhjs96rdclbkld57xarf592slhkp79h46z833npxpn12ck1"))
4135 (file-name (git-file-name name version))))
4136 (build-system gnu-build-system)
4138 `(("pkg-config" ,pkg-config)))
4141 ("libpcap" ,libpcap)))
4143 `(#:tests? #f ; None exist
4145 (list (string-append "CC=" ,(cc-for-target))
4146 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4148 (modify-phases %standard-phases
4150 (add-before 'install 'prepare-install
4151 (lambda* (#:key outputs #:allow-other-keys)
4152 (mkdir-p (string-append (assoc-ref outputs "out") "/bin"))
4154 (home-page "https://github.com/jclehner/nmrpflash")
4155 (synopsis "Netgear unbrick utility")
4156 (description "This package provides a utility to flash a new firmware
4157 image to a Netgear device. It has been tested on Netgear EX2700, EX6120,
4158 EX6150v2, DNG3700v2, R6100, R6220, R7000, D7000, WNR3500, R6400, R6800,
4159 R8000, R8500, WNDR3800, but is likely to be compatible with many other
4161 (license license:gpl3+)))
4169 (uri (string-append "https://www.atoptool.nl/download/atop-"
4173 "0crzz4i2nabyh7d6xg7fvl65qls87nbca5ihidp3nijhrrbi14ab"))))
4174 (build-system gnu-build-system)
4176 `(#:tests? #f ; no test suite
4178 (list (string-append "CC=" ,(cc-for-target))
4179 ;; The installer requires a choice between systemd or SysV.
4181 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
4182 (string-append "BINPATH=/bin")
4183 (string-append "SBINPATH=/sbin")
4184 (string-append "SYSDPATH=/etc/systemd/system")
4185 (string-append "PMPATHD=/etc/systemd/system-sleep")
4186 (string-append "MAN1PATH=/share/man/man1")
4187 (string-append "MAN5PATH=/share/man/man5")
4188 (string-append "MAN8PATH=/share/man/man8")
4189 ;; Or else it tries to create /var/log/atop...
4190 (string-append "LOGPATH="))
4192 (modify-phases %standard-phases
4193 (delete 'configure) ; No ./configure script
4194 (add-before 'build 'patch-build
4195 (lambda* (#:key outputs #:allow-other-keys)
4196 (substitute* "Makefile"
4197 ;; We don't need to chown things in the build environment.
4199 ;; We can't toggle the setuid bit in the build environment.
4200 (("chmod 04711") "chmod 0711")
4201 ;; Otherwise, it creates a blank configuration file as a "default".
4202 (("touch.*DEFPATH)/atop") "")
4203 (("chmod.*DEFPATH)/atop") ""))
4206 `(("ncurses" ,ncurses)
4207 ("python" ,python-wrapper) ; for `atopgpud`
4209 (home-page "https://www.atoptool.nl/")
4210 (synopsis "Linux performance monitoring console")
4211 (description "Atop is an ASCII full-screen performance monitor for Linux
4212 that is capable of reporting the activity of all processes (even processes have
4213 finished during the monitoring interval), daily logging of system and process
4214 activity for long-term analysis, highlighting overloaded system resources by
4215 using colors, etc. At regular intervals, it shows system-level activity related
4216 to the CPU, memory, swap, disks (including LVM) and network layers, and for
4217 every process (and thread) it shows e.g. the CPU utilization, memory growth,
4218 disk utilization, priority, username, state, and exit code.")
4219 (license license:gpl2+)))
4221 ;; TODO: Unvendor u-root (pkg: forth, golang, testutil).
4229 (url "https://github.com/linuxboot/fiano.git")
4230 (commit (string-append "v" version))))
4231 (file-name (string-append name "-" version "-checkout"))
4234 "03ihdwwhb7g6bihx141cn0924sjs5ps6q3ps58pk1cg0g0srrr9h"))
4235 (modules '((guix build utils)))
4238 (delete-file-recursively "vendor/golang.org")
4239 (delete-file-recursively "vendor/github.com")
4241 (build-system go-build-system)
4243 `(#:import-path "github.com/linuxboot/fiano"
4244 #:unpack-path "github.com/linuxboot/fiano"))
4248 `(("go-golang-org-x-text" ,go-golang-org-x-text)
4249 ("go-github.com-ulikunitz-xz" ,go-github.com-ulikunitz-xz)))
4250 (synopsis "UEFI image editor")
4251 (description "This package provides a command-line UEFI image editor.")
4252 (home-page "https://github.com/linuxboot/fiano")
4253 (license license:bsd-3)))
4255 (define-public fiano-utk
4260 `(#:import-path "github.com/linuxboot/fiano/cmds/utk"
4261 #:unpack-path "github.com/linuxboot/fiano"))))
4263 (define-public fiano-fmap
4268 `(#:import-path "github.com/linuxboot/fiano/cmds/fmap"
4269 #:unpack-path "github.com/linuxboot/fiano"))))
4271 (define-public novena-eeprom
4273 (name "novena-eeprom")
4278 (url "https://github.com/xobs/novena-eeprom.git")
4279 (commit (string-append "v" version))))
4280 (file-name (string-append name "-" version "-checkout"))
4283 "00pd71mg0g20v0820ggp3ghf9nyj5s4wavaz9mkmrmsr91hcnf7i"))))
4284 (build-system gnu-build-system)
4286 `(#:tests? #f ; No tests exist
4288 (list (string-append "CC=" ,(cc-for-target)))
4290 (modify-phases %standard-phases
4293 (lambda* (#:key outputs #:allow-other-keys)
4294 (let* ((out (assoc-ref outputs "out"))
4295 (out-bin (string-append out "/bin"))
4296 (out-share-man (string-append out "/share/man/man8")))
4297 (install-file "novena-eeprom" out-bin)
4298 (install-file "novena-eeprom.8" out-share-man)))))))
4300 `(("i2c-tools" ,i2c-tools)))
4301 (synopsis "Novena EEPROM editor")
4302 (description "This package provides an editor for the Novena EEPROM.
4303 Novena boards contain a device-dependent descriptive EEPROM that defines
4304 various parameters such as serial number, MAC address, and featureset.
4305 This program allows you to view and manipulate this EEPROM list.")
4306 (home-page "https://github.com/xobs/novena-eeprom/")
4307 (supported-systems '("armhf-linux"))
4308 (license license:bsd-3)))