1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012-2022 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, 2021, 2022 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, 2022 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–2022 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 Christine Lemmer-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, 2021, 2022 Guillaume Le Vaillant <glv@posteo.net>
32 ;;; Copyright © 2019, 2020, 2021 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, 2021, 2022 Michael Rohleder <mike@rohleder.de>
36 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
37 ;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
38 ;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
39 ;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
40 ;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
41 ;;; Copyright © 2021 qblade <qblade@protonmail.com>
42 ;;; Copyright © 2021 Hyunseok Kim <lasnesne@lagunposprasihopre.org>
43 ;;; Copyright © 2021 David Larsson <david.larsson@selfhosted.xyz>
44 ;;; Copyright © 2021 WinterHound <winterhound@yandex.com>
45 ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
46 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
47 ;;; Copyright © 2021 muradm <mail@muradm.net>
48 ;;; Copyright © 2021 pineapples <guixuser6392@protonmail.com>
49 ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
50 ;;; Copyright © 2021 Artyom V. Poptsov <poptsov.artyom@gmail.com>
51 ;;; Copyright © 2022 Wamm K. D. <jaft.r@outlook.com>
52 ;;; Copyright © 2022 Roman Riabenko <roman@riabenko.com>
53 ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
54 ;;; Copyright © 2022 Andreas Rammhold <andreas@rammhold.de>
55 ;;; Copyright © 2022 ( <paren@disroot.org>
56 ;;; Copyright © 2022 Matthew James Kraai <kraai@ftbfs.org>
58 ;;; This file is part of GNU Guix.
60 ;;; GNU Guix is free software; you can redistribute it and/or modify it
61 ;;; under the terms of the GNU General Public License as published by
62 ;;; the Free Software Foundation; either version 3 of the License, or (at
63 ;;; your option) any later version.
65 ;;; GNU Guix is distributed in the hope that it will be useful, but
66 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
67 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
68 ;;; GNU General Public License for more details.
70 ;;; You should have received a copy of the GNU General Public License
71 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
73 (define-module (gnu packages admin)
74 #:use-module (guix build-system cargo)
75 #:use-module (guix build-system cmake)
76 #:use-module (guix build-system emacs)
77 #:use-module (guix build-system glib-or-gtk)
78 #:use-module (guix build-system gnu)
79 #:use-module (guix build-system go)
80 #:use-module (guix build-system meson)
81 #:use-module (guix build-system perl)
82 #:use-module (guix build-system python)
83 #:use-module (guix build-system qt)
84 #:use-module (guix build-system ruby)
85 #:use-module (guix build-system trivial)
86 #:use-module (guix download)
87 #:use-module (guix git-download)
88 #:use-module (guix gexp)
89 #:use-module ((guix licenses) #:prefix license:)
90 #:use-module (guix packages)
91 #:use-module (guix utils)
92 #:use-module (gnu packages)
93 #:use-module (gnu packages algebra)
94 #:use-module (gnu packages autogen)
95 #:use-module (gnu packages autotools)
96 #:use-module (gnu packages base)
97 #:use-module (gnu packages bash)
98 #:use-module (gnu packages bison)
99 #:use-module (gnu packages boost)
100 #:use-module (gnu packages c)
101 #:use-module (gnu packages check)
102 #:use-module (gnu packages compression)
103 #:use-module (gnu packages crates-graphics)
104 #:use-module (gnu packages crates-io)
105 #:use-module (gnu packages cross-base)
106 #:use-module (gnu packages crypto)
107 #:use-module (gnu packages cryptsetup)
108 #:use-module (gnu packages curl)
109 #:use-module (gnu packages cyrus-sasl)
110 #:use-module (gnu packages dns)
111 #:use-module (gnu packages elf)
112 #:use-module (gnu packages file)
113 #:use-module (gnu packages flex)
114 #:use-module (gnu packages fonts)
115 #:use-module (gnu packages freedesktop)
116 #:use-module (gnu packages gawk)
117 #:use-module (gnu packages gettext)
118 #:use-module (gnu packages gl)
119 #:use-module (gnu packages glib)
120 #:use-module (gnu packages gnome)
121 #:use-module (gnu packages gnupg)
122 #:use-module (gnu packages golang)
123 #:use-module (gnu packages groff)
124 #:use-module (gnu packages gtk)
125 #:use-module (gnu packages guile)
126 #:use-module (gnu packages guile-xyz)
127 #:use-module (gnu packages hurd)
128 #:use-module (gnu packages image)
129 #:use-module (gnu packages imagemagick)
130 #:use-module (gnu packages inkscape)
131 #:use-module (gnu packages kerberos)
132 #:use-module (gnu packages libbsd)
133 #:use-module (gnu packages libftdi)
134 #:use-module (gnu packages libunwind)
135 #:use-module (gnu packages libusb)
136 #:use-module (gnu packages linux)
137 #:use-module (gnu packages lua)
138 #:use-module (gnu packages m4)
139 #:use-module (gnu packages mail)
140 #:use-module (gnu packages man)
141 #:use-module (gnu packages mcrypt)
142 #:use-module (gnu packages mpi)
143 #:use-module (gnu packages ncurses)
144 #:use-module (gnu packages networking)
145 #:use-module (gnu packages openldap)
146 #:use-module (gnu packages patchutils)
147 #:use-module (gnu packages pciutils)
148 #:use-module (gnu packages pcre)
149 #:use-module (gnu packages perl)
150 #:use-module (gnu packages perl-check)
151 #:use-module (gnu packages pkg-config)
152 #:use-module (gnu packages polkit)
153 #:use-module (gnu packages popt)
154 #:use-module (gnu packages python)
155 #:use-module (gnu packages python-crypto)
156 #:use-module (gnu packages python-web)
157 #:use-module (gnu packages python-xyz)
158 #:use-module (gnu packages qt)
159 #:use-module (gnu packages readline)
160 #:use-module (gnu packages ruby)
161 #:use-module (gnu packages selinux)
162 #:use-module (gnu packages serialization)
163 #:use-module (gnu packages sqlite)
164 #:use-module (gnu packages ssh)
165 #:use-module (gnu packages sphinx)
166 #:use-module (gnu packages tcl)
167 #:use-module (gnu packages terminals)
168 #:use-module (gnu packages texinfo)
169 #:use-module (gnu packages time)
170 #:use-module (gnu packages tls)
171 #:use-module (gnu packages version-control)
172 #:use-module (gnu packages web)
173 #:use-module (gnu packages xdisorg)
174 #:use-module (gnu packages xml)
175 #:use-module (gnu packages xorg))
177 ;; This package uses su instead of sudo (because of SpaceFM).
178 (define-public ktsuss
187 (url "https://github.com/nomius/ktsuss")
190 (base32 "0q9931f9hp47v1n8scli4bdg2rkjpf5jf8v7jj2gdn83aia1r2hz"))
191 (file-name (git-file-name name version))))
192 (build-system glib-or-gtk-build-system)
195 (modify-phases %standard-phases
196 (add-after 'unpack 'patch-file-names
198 (substitute* "configure.ac"
199 (("supath=`which su 2>/dev/null`")
200 "supath=/run/setuid-programs/su"))
203 (list autoconf automake libtool pkg-config))
206 (synopsis "Graphical front end for @command{su}")
208 "Ktsuss stands for ``Keep the @command{su} simple, stupid''.
209 It is a graphical version of @command{su} written in C and GTK+ 2, with
210 simplicity in mind.")
211 (home-page "https://github.com/nomius/ktsuss")
212 (license license:bsd-3)))
221 (uri (string-append "https://github.com/aide/aide/releases/download/v"
222 version "/aide-" version ".tar.gz"))
224 (base32 "15xp47sz7kk1ciffw3f5xw2jg2mb2lqrbr3q6p4bkbz5dap9iy8p"))))
225 (build-system gnu-build-system)
236 (synopsis "File and directory integrity checker")
238 "AIDE (Advanced Intrusion Detection Environment) is a file and directory
239 integrity checker. It creates a database from the regular expression rules
240 that it finds from its configuration files. Once this database is initialized
241 it can be used to verify the integrity of the files. It has several message
242 digest algorithms that are used to check the integrity of files. All of the
243 usual file attributes can be checked for inconsistencies.")
244 (home-page "https://aide.github.io/")
245 (license license:gpl2+)))
247 (define-public progress
255 (url "https://github.com/Xfennec/progress")
256 (commit (string-append "v" version))))
258 (base32 "0gf10j9zd8spain94b5kigknwbdqajiy6fjsa5hhwsc1biz34hcj"))
259 (file-name (git-file-name name version))))
260 (build-system gnu-build-system)
262 (list pkg-config which))
266 `(#:tests? #f ; no test suite
268 (let ((target ,(%current-target-system)))
269 (list ,(string-append "CC=" (cc-for-target))
270 (string-append "PKG_CONFIG="
272 (string-append target "-pkg-config")
274 (string-append "PREFIX=" (assoc-ref %outputs "out"))))
276 (modify-phases %standard-phases
277 (delete 'configure)))) ; no configure script
278 (home-page "https://github.com/Xfennec/progress")
279 (synopsis "Program to view the progress of the coreutils commands")
280 (description "A program that looks for coreutils basic commands (cp, mv,
281 dd, tar, gzip/gunzip, cat, etc.) currently running on your system and displays
282 the percentage of copied data. It can also show estimated time and throughput,
283 and provides a \"top-like\" mode (monitoring).")
284 (license license:gpl3+)))
286 (define-public shepherd-0.8
292 (uri (string-append "mirror://gnu/shepherd/shepherd-"
296 "0x9zr0x3xvk4qkb6jnda451d5iyrl06cz1bjzjsm0lxvjj3fabyk"))
297 (modules '((guix build utils)))
300 ;; Build with -O1 to work around <https://bugs.gnu.org/48368>.
301 (substitute* "Makefile.in"
302 (("compile --target")
303 "compile -O1 --target"))))))
304 (build-system gnu-build-system)
306 '(#:configure-flags '("--localstatedir=/var")
307 #:make-flags '("GUILE_AUTO_COMPILE=0")))
310 ;; This is the Guile we use as a cross-compiler...
313 ;; ... and this is the one that appears in shebangs when cross-compiling.
315 ;; The 'shepherd' command uses Readline when used interactively. It's
316 ;; an unusual use case though, so we don't propagate it.
318 (synopsis "System service manager")
320 "The GNU Shepherd is a daemon-managing daemon, meaning that it supervises
321 the execution of system services, replacing similar functionality found in
322 typical init systems. It provides dependency-handling through a convenient
323 interface and is based on GNU Guile.")
324 (license license:gpl3+)
325 (home-page "https://www.gnu.org/software/shepherd/")))
327 ;; Update on the next rebuild cycle.
328 (define-public shepherd shepherd-0.8)
330 (define-public shepherd-0.9
336 (uri (string-append "mirror://gnu/shepherd/shepherd-"
340 "0qy2yq13xhf05an5ilz7grighdxicx56211yaarqq5qigiiybc32"))))
342 (list #:configure-flags #~'("--localstatedir=/var")
343 #:make-flags #~'("GUILE_AUTO_COMPILE=0")
344 #:phases (if (%current-target-system)
345 #~(modify-phases %standard-phases
346 (add-before 'configure 'set-fibers-directory
348 ;; When cross-compiling, refer to the target
349 ;; Fibers, not the native one.
350 (substitute* '("herd.in" "shepherd.in")
351 (("%FIBERS_SOURCE_DIRECTORY%")
353 (this-package-input "guile-fibers")
354 "/share/guile/site/3.0"))
355 (("%FIBERS_OBJECT_DIRECTORY%")
357 (this-package-input "guile-fibers")
358 "/lib/guile/3.0/site-ccache"))))))
359 #~%standard-phases)))
361 ;; Note: Use 'guile-3.0-latest' to address the continuation-related memory
362 ;; leak reported at <https://issues.guix.gnu.org/58631>.
363 (native-inputs (list pkg-config guile-3.0-latest
364 guile-fibers-1.1)) ;for cross-compilation
365 (inputs (list guile-3.0-latest guile-fibers-1.1))))
367 (define-public guile2.2-shepherd
369 (inherit shepherd-0.9)
370 (name "guile2.2-shepherd")
371 (native-inputs (list pkg-config guile-2.2))
372 (inputs (list guile-2.2 guile2.2-fibers))))
374 (define-public guile2.0-shepherd
377 (name "guile2.0-shepherd")
379 (list help2man pkg-config guile-2.0))
384 (modify-phases %standard-phases
385 (add-after 'unpack 'patch-source
387 ;; (ice-9 threads) isn't available in guile-2.0
388 (substitute* "modules/shepherd.scm"
389 ((".*\\(ice-9 threads\\).*") ""))
391 ,@(package-arguments shepherd)))))
401 (url "https://github.com/WillEccles/cfm")
402 (commit (string-append "v" version))))
403 (file-name (git-file-name name version))
405 (base32 "14gapia902f29wa4dlrrj8jcwcff9bfvyhjccw9ddy2gxx2g8wmr"))))
406 (build-system gnu-build-system)
408 `(#:tests? #f ; no test suite
410 (list (string-append "CC=" ,(cc-for-target))
411 (string-append "PREFIX=" (assoc-ref %outputs "out")))
413 (modify-phases %standard-phases
414 ;; Keeping xdg-open optional avoids a size increase of 293%.
415 (delete 'configure)))) ; no configure script
416 (home-page "https://eccles.dev/cfm/")
418 "Simple terminal file manager with @command{vi}-inspired key bindings")
420 "The Cactus File Manager (@command{cfm}) helps you manage your files
421 visually from a text terminal. It aims to be simple and fast, with key bindings
422 inspired by @command{vi}.")
423 (license license:mpl2.0)))
425 (define-public cloud-utils
433 "https://launchpad.net/cloud-utils/trunk/"
434 version "/+download/cloud-utils-" version ".tar.gz"))
437 "0xxdi55lzw7j91zfajw7jhd2ilsqj2dy04i9brlk8j3pvb5ma8hk"))))
438 (build-system gnu-build-system)
441 ((guix build gnu-build-system)
445 (let ((out (assoc-ref %outputs "out")))
446 (list (string-append "BINDIR=" out "/bin")
447 (string-append "MANDIR=" out "/share/man/man1")
448 (string-append "DOCDIR=" out "/share/doc")))
450 (modify-phases %standard-phases
453 (add-after 'install 'wrap
454 (lambda* (#:key outputs inputs #:allow-other-keys)
455 (let ((growpart (string-append (assoc-ref outputs "out")
457 (wrap-program growpart
460 (map (cut search-input-file inputs <>)
462 "sbin/sfdisk")))))))))))
464 (list coreutils ; for readlink
466 util-linux)) ; sfdisk for growpart
467 (home-page "https://launchpad.net/cloud-utils")
468 (synopsis "Set of utilities for cloud computing environments")
470 "This package contains a set of utilities for cloud computing
474 @item @command{cloud-localds} Create a disk for cloud-init to utilize nocloud
475 @item @command{cloud-publish-image} Wrapper for cloud image publishing
476 @item @command{cloud-publish-tarball} Wrapper for publishing cloud tarballs
477 @item @command{cloud-publish-ubuntu} Import a Ubuntu cloud image
478 @item @command{ec2metadata} Query and display @acronym{EC2,Amazon Elastic
479 Compute Cloud} metadata
480 @item @command{growpart} Grow a partition to fill the device
481 @item @command{mount-image-callback} Mount a file and run a command
482 @item @command{resize-part-image} Resize a partition image to a new size
483 @item @command{ubuntu-cloudimg-query} Get the latest Ubuntu
484 @acronym{AMI,Amazon Machine Image}
485 @item @command{ubuntu-ec2-run} Run a @acronym{EC2,Amazon Elastic Compute
486 Cloud} instance using Ubuntu
487 @item @command{vcs-run} Obtain a repository, and run a command
488 @item @command{write-mime-multipart} Handle multipart
489 @acronym{MIME,Multipurpose Internet Mail Extensions} messages
491 (license license:gpl3)))
493 (define-public daemontools
500 "https://cr.yp.to/daemontools/"
501 "daemontools-" version ".tar.gz"))
504 "07scvw88faxkscxi91031pjkpccql6wspk4yrlnsbrrb5c0kamd5"))))
505 (build-system gnu-build-system)
507 `(#:tests? #f ;; No tests as far as I can tell.
509 (modify-phases %standard-phases
510 (add-after 'unpack 'chdir
512 (chdir ,(string-append "daemontools-" version))
515 (add-before 'build 'patch
517 (substitute* "src/error.h"
518 (("extern int errno;")
519 "#include <errno.h>"))
523 (invoke "package/compile")))
525 (lambda* (#:key outputs #:allow-other-keys)
526 (let* ((out (assoc-ref outputs "out"))
527 (bin (string-append out "/bin")))
528 (for-each (lambda (file)
529 (install-file file bin))
530 (find-files "command")))
532 (synopsis "Tools for managing UNIX style services")
534 "@code{daemontools} is a collection of tools for managing UNIX
536 (license license:public-domain)
537 (home-page "https://cr.yp.to/daemontools.html")))
539 (define-public daemonize
547 (url "https://github.com/bmc/daemonize")
548 (commit (string-append "release-" version))))
549 (file-name (git-file-name name version))
551 (base32 "0w4g0iyssyw7dd0061881z8s5czcl01mz6v00znax57zfxjqpvnm"))))
552 (build-system gnu-build-system)
553 (arguments '(#:tests? #f)) ; No tests available.
554 (home-page "https://software.clapper.org/daemonize/")
555 (synopsis "Command line utility to run a program as a daemon")
557 "daemonize runs a command as a Unix daemon. It will close all open file
558 descriptors, change working directory of the process to the root filesystem,
559 reset its umask, run in the background, ignore I/O signals, handle
560 @code{SIGCLD}, etc. Most programs that are designed to be run as daemons do
561 that work for themselves. However, you’ll occasionally run across one that
562 does not. When you must run a daemon program that does not properly make
563 itself into a true Unix daemon, you can use daemonize to force it to run as a
565 (license license:bsd-3)))
575 "https://projects.gw-computing.net/attachments/download/615/dfc-"
579 "0m1fd7l85ckb7bq4c5c3g257bkjglm8gq7x42pkmpp87fkknc94n"))))
580 (build-system cmake-build-system)
581 (arguments '(#:tests? #f)) ; There are no tests.
582 (native-inputs `(("gettext" ,gettext-minimal)))
583 (home-page "https://projects.gw-computing.net/projects/dfc")
584 (synopsis "Display file system space usage using graphs and colors")
586 "dfc (df color) is a modern version of df. It uses colors, draws pretty
587 graphs and can export its output to different formats.")
588 (license license:bsd-3)))
590 (define-public facter
597 (url "https://github.com/puppetlabs/facter")
599 (file-name (git-file-name name version))
602 "05j4q87sak1f1isj7ngzr59h3j3xskfwjjwfv0xd7lhwcaxg3a3c"))))
603 (build-system ruby-build-system)
606 (modify-phases %standard-phases
607 (add-after 'unpack 'delete-facter-ng-gemspec
609 ;; XXX: ruby-build-system incorrectly finds
610 ;; facter-ng.gemspec from this directory and tries to
611 ;; build that instead of the proper facter.gemspec.
612 ;; Just delete it as a workaround, as it appears to
613 ;; only exist for backwards-compatibility after the
614 ;; facter-ng->facter rename.
615 (delete-file "agent/facter-ng.gemspec")
617 (add-after 'unpack 'embed-absolute-references
618 ;; Refer to absolute executable file names to avoid propagation.
619 (lambda* (#:key inputs #:allow-other-keys)
620 (substitute* (find-files "lib/facter/resolvers" "\\.rb$")
621 (("execute\\('(which |)([^ ']+)" _ _ name)
622 (string-append "execute('" (or (which name)
626 (add-after 'wrap 'check
627 (lambda* (#:key tests? outputs #:allow-other-keys)
628 ;; XXX: The test suite wants to run Bundler and
629 ;; complains that the gemspec is invalid. For now
630 ;; just make sure that we can run the wrapped
631 ;; executable directly.
633 (invoke (string-append (assoc-ref outputs "out")
635 ;; Many facts depend on /sys, /etc/os-release,
636 ;; etc, so we only run a small sample.
637 "facterversion" "architecture"
638 "kernel" "kernelversion")
639 (format #t "tests disabled~%"))
642 `(("ruby-hocon" ,ruby-hocon)
643 ("ruby-sys-filesystem" ,ruby-sys-filesystem)
644 ("ruby-thor" ,ruby-thor)
646 ;; For ‘embed-absolute-references’.
647 ("dmidecode" ,dmidecode)
648 ("inetutils" ,inetutils) ; for ‘hostname’
650 ("pciutils" ,pciutils)
651 ("util-linux" ,util-linux)))
652 (synopsis "Collect and display system facts")
654 "Facter is a tool that gathers basic facts about nodes (systems) such
655 as hardware details, network settings, OS type and version, and more. These
656 facts can be collected on the command line with the @command{facter} command
657 or via the @code{facter} Ruby library.")
658 (home-page "https://github.com/puppetlabs/facter-ng")
659 (license license:expat)))
661 (define-public ttyload
663 (commit "f9495372801ce4b4dad98ad854203e694c31c1eb"))
666 (version (git-version "0.5.3" revision commit))
671 (url "https://github.com/lindes/ttyload")
673 (file-name (git-file-name name version))
675 (base32 "0ldb7a13b9v876c6cbrs78pkizj64drnqx95z5shfbwgpwfhr4im"))))
676 (build-system gnu-build-system)
678 `(#:tests? #f ; no tests
680 (list (string-append "CC=" ,(cc-for-target)))
682 (modify-phases %standard-phases
685 (lambda* (#:key outputs #:allow-other-keys)
686 (let* ((out (assoc-ref outputs "out"))
687 (bin (string-append out "/bin")))
688 (install-file "ttyload" bin)))))))
689 (home-page "https://www.daveltd.com/src/util/ttyload/")
690 (synopsis "Console based color-coded graphs of CPU load average")
692 "Show graphs for 1 minute, 5 minute, 15 minute load averages on the
694 ;; This package uses a modified version of the "ISC License".
695 (license (license:non-copyleft "file://LICENSE")))))
704 (url "https://github.com/aristocratos/btop")
705 (commit (string-append "v" version))))
706 (file-name (git-file-name name version))
709 "0aggzlxyfp213rknpbhkn8wbgzcnz181dyh9m2awz72w705axy8p"))))
710 (build-system gnu-build-system)
712 (list #:tests? #f ;no test suite
713 #:make-flags #~(list (string-append "PREFIX=" #$output))
714 #:phases #~(modify-phases %standard-phases
715 (delete 'configure))))
716 (home-page "https://github.com/aristocratos/btop")
717 (synopsis "Resource monitor")
718 (description "Btop++ provides unified monitoring of CPU, memory, network
720 (license license:asl2.0)))
730 (url "https://github.com/htop-dev/htop")
733 (base32 "0yfmkw3y4qyd42svhpiijif7krvmnb8z88y6h9g4fwf7sfynq2rk"))
734 (file-name (git-file-name name version))))
735 (build-system gnu-build-system)
739 (list autoconf automake python-minimal-wrapper)) ; for scripts/MakeHeader.py
740 (home-page "https://htop.dev")
741 (synopsis "Interactive process viewer")
743 "This is htop, an interactive process viewer. It is a text-mode
744 application (for console or X terminals) and requires ncurses.")
745 (license license:gpl2)))
747 (define-public bashtop
754 (url "https://github.com/aristocratos/bashtop")
755 (commit (string-append "v" version))))
756 (file-name (git-file-name name version))
759 "07nlr6vmyb7yihaxj1fp424lmhwkdjl6mls92v90f6gsvikpa13v"))))
760 (build-system gnu-build-system)
762 '(#:make-flags (list (string-append "PREFIX=" %output))
763 #:tests? #f ; bats test fails with loading load.bash
764 #:phases (modify-phases %standard-phases (delete 'configure))))
765 (home-page "https://github.com/aristocratos/bashtop")
766 (synopsis "Linux/OSX/FreeBSD resource monitor")
767 (description "Resource monitor that shows usage and stats for processor,
768 memory, disks, network and processes.")
769 (license license:asl2.0)))
771 (define-public bpytop
778 (uri (pypi-uri "bpytop" version))
780 (base32 "1clvajbv7pzlya9s1xs6dvjic8rv3kx7aqiwnjxapiypx246gdjk"))))
781 (build-system python-build-system)
783 (list python-psutil))
786 (modify-phases %standard-phases
787 ;; sanity-check phase fail, but the application seems to be working
788 (delete 'sanity-check)
789 (add-after 'install 'install-themes
790 (lambda* (#:key outputs #:allow-other-keys)
791 (let ((themes (string-append (assoc-ref outputs "out")
793 ,(version-major+minor
794 (package-version python))
795 "/site-packages/bpytop-themes")))
797 (copy-recursively "themes" themes)))))))
799 "https://github.com/aristocratos/bpytop")
800 (synopsis "Resource monitor")
801 (description "Resource monitor that shows usage and stats for processor,
802 memory, disks, network and processes. It's a Python port and continuation of
804 (license license:asl2.0)))
813 (uri (string-append "mirror://gnu/pies/pies-"
817 "0v0xcq0mfil440xq2pa5mjkyva5c9ahqda54z5w2ksl2d78v8a35"))
820 (use-modules (guix build utils))
821 (for-each delete-file
823 ;; Generated by flex.
824 (find-files "gres/src" "lex\\.c$")
825 ;; Generated by bison.
826 (find-files "gres/src" "-gram\\.[ch]$")))))))
827 (build-system gnu-build-system)
829 '(#:phases (modify-phases %standard-phases
830 (add-before 'build 'patch-/bin/sh
831 (lambda* (#:key inputs #:allow-other-keys)
832 ;; Use the right shell when executing user-provided
834 (let ((bash (assoc-ref inputs "bash")))
835 (substitute* '("src/progman.c" "src/comp.c")
837 (string-append "\"" bash "/bin/sh\"")))))))))
838 (native-inputs (list bison flex))
839 (home-page "https://www.gnu.org.ua/software/pies/")
840 (synopsis "Program invocation and execution supervisor")
842 "GNU pies is a program that supervises the invocation and execution of
843 other programs. It reads the list of programs to be started from its
844 configuration file, executes them, and then monitors their status,
845 re-executing them as necessary.")
846 (license license:gpl3+)))
848 (define-public inetutils
854 (uri (string-append "mirror://gnu/inetutils/inetutils-"
858 "0j1nb69bhg29cm4xkqqjh2ln1zqcj2lnpm92v638lpwrs11dypxl"))))
859 (build-system gnu-build-system)
861 `(#:configure-flags '("--localstatedir=/var"
863 ;; Make sure 'PATH_PROCNET_DEV' gets defined when
864 ;; cross-compiling (by default it does not.)
865 ,@(if (%current-target-system)
866 '("--with-path-procnet-dev=/proc/net/dev")
879 ;; Make sure that canonical "coreutils" package is not referred.
881 (list (string-append "CPPFLAGS=-DPATHDEF_CP=\\\""
882 (assoc-ref %build-inputs "coreutils*")
884 ;; On some systems, 'libls.sh' may fail with an error such as:
885 ;; "Failed to tell switch -a apart from -A".
886 #:parallel-tests? #f))
887 (inputs `(("coreutils*" ,coreutils)
888 ("shadow" ,shadow) ;for login (used in telnetd and rlogind)
890 ("readline" ,readline))) ;for 'ftp'
891 (native-inputs (if (member (%current-system)
892 (package-supported-systems net-tools))
893 `(("netstat" ,net-tools)) ;for tests
895 (home-page "https://www.gnu.org/software/inetutils/")
896 (synopsis "Basic networking utilities")
898 "Inetutils is a collection of common network programs, such as an ftp
899 client and server, a telnet client and server, an rsh client and server, and
901 (license license:gpl3+)))
903 (define-public shadow
910 "https://github.com/shadow-maint/shadow/releases/"
911 "download/v" version "/shadow-" version ".tar.xz"))
914 "0i4iijbshnwnsrskxzrh18xgmzff0hdpsnnkmyc2gdn1x4n1zv7y"))))
915 (build-system gnu-build-system)
917 `(;; Assume System V `setpgrp (void)', which is the default on GNU
918 ;; variants (`AC_FUNC_SETPGRP' is not cross-compilation capable.)
920 '(,@(if (hurd-target?)
923 "shadow_cv_logdir=/var/log"
924 "ac_cv_func_setpgrp_void=yes")
926 (modify-phases %standard-phases
927 (add-after 'unpack 'fix-linking-to-pam
929 ;; There's a build system problem in 4.9 that causes link
930 ;; failures with the pam libraries (see:
931 ;; https://github.com/shadow-maint/shadow/issues/407).
932 (substitute* "libsubid/Makefile.in"
933 (("\\$\\(LIBTCB\\)" all)
934 (string-append all " $(LIBPAM)")))))
935 ,@(if (%current-target-system)
936 '((add-before 'configure 'set-runtime-shell
937 (lambda* (#:key inputs #:allow-other-keys)
938 (let ((shell (string-append
939 (assoc-ref inputs "bash")
941 (setenv "RUNTIME_SHELL" shell)
942 (substitute* "configure.ac"
944 "$RUNTIME_SHELL"))))))
946 (add-before 'build 'set-nscd-file-name
947 (lambda* (#:key inputs #:allow-other-keys)
948 ;; Use the right file name for nscd.
949 (let ((libc (assoc-ref inputs
950 ,(if (%current-target-system)
953 (substitute* "lib/nscd.c"
955 (string-append libc "/sbin/nscd"))))))
956 (add-after 'install 'remove-groups
957 (lambda* (#:key outputs #:allow-other-keys)
958 ;; Remove `groups', which is already provided by Coreutils.
959 (let* ((out (assoc-ref outputs "out"))
960 (bin (string-append out "/bin"))
961 (man (string-append out "/share/man")))
962 (delete-file (string-append bin "/groups"))
963 (for-each delete-file (find-files man "^groups\\."))))))))
965 `(,@(if (hurd-target?)
967 `(("linux-pam" ,linux-pam)))
968 ,@(if (%current-target-system)
969 `(("bash" ,bash-minimal))
971 (home-page "https://github.com/shadow-maint/shadow")
972 (synopsis "Authentication-related tools such as passwd, su, and login")
974 "Shadow provides a number of authentication-related tools, including:
975 login, passwd, su, groupadd, and useradd.")
977 (properties '((hidden? . #t))) ;see below
979 ;; The `vipw' program is GPLv2+.
980 ;; libmisc/salt.c is public domain.
981 (license license:bsd-3)))
983 (define-public shadow-with-man-pages
984 ;; TODO: Merge with 'shadow' on the next core-updates cycle.
985 (package/inherit shadow
986 (properties '()) ;not hidden
988 (substitute-keyword-arguments (package-arguments shadow)
989 ((#:phases phases '%standard-phases)
990 `(modify-phases ,phases
991 (add-after 'install 'install-man-pages
993 ;; The top-level Makefile.am wrongfully has "SUBDIRS += man"
994 ;; under "if ENABLE_REGENERATE_MAN", even though prebuilt man
995 ;; pages are available. Thus, install them manually.
996 (invoke "make" "-C" "man" "install")))))))))
998 (define-public mingetty
1004 (uri (string-append "mirror://sourceforge/mingetty/mingetty/"
1005 version "/mingetty-" version ".tar.gz"))
1008 "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"))))
1009 (build-system gnu-build-system)
1012 (modify-phases %standard-phases
1014 (lambda* (#:key inputs outputs target #:allow-other-keys)
1015 (let* ((out (assoc-ref outputs "out"))
1016 (man8 (string-append out "/share/man/man8"))
1017 (sbin (string-append out "/sbin"))
1018 (shadow (assoc-ref inputs "shadow"))
1019 (login (string-append shadow "/bin/login")))
1020 (substitute* "Makefile"
1021 ,@(if (%current-target-system)
1023 (string-append "CC=" target "-gcc\n")))
1026 (string-append "SBINDIR = " out
1029 (string-append "MANDIR = " out
1030 "/share/man/man8\n")))
1032 ;; Pick the right 'login' by default.
1033 (substitute* "mingetty.c"
1035 (string-append "\"" login "\"")))
1040 #:tests? #f)) ; no tests
1041 (inputs (list shadow))
1043 (home-page "https://sourceforge.net/projects/mingetty")
1044 (synopsis "Getty for the text console")
1046 "Small console getty that is started on the Linux text console,
1047 asks for a login name and then transfers over to @code{login}. It is extended
1048 to allow automatic login and starting any app.")
1049 (license license:gpl2+)))
1051 (define-public net-base
1058 "mirror://debian/pool/main/n/netbase/netbase_"
1062 "12xqjwg3p4rzmmh2iib6sigm9l29y3dgk74mmnw64k84jnbwdxl1"))))
1063 (build-system trivial-build-system)
1065 `(#:modules ((guix build utils))
1066 ;; This package consists solely of architecture-independent
1067 ;; tables. Cross-compilation is pointless! Make sure we'll
1068 ;; always get the same derivation.
1070 #:allowed-references ()
1072 (use-modules (guix build utils)
1075 (let* ((source (assoc-ref %build-inputs "source"))
1076 (tar (assoc-ref %build-inputs "tar"))
1077 (xz (assoc-ref %build-inputs "xz"))
1078 (output (assoc-ref %outputs "out"))
1079 (etc (string-append output "/etc")))
1080 (setenv "PATH" (string-append xz "/bin"))
1081 (invoke (string-append tar "/bin/tar") "xvf"
1083 (chdir ,(string-append "netbase-" version))
1086 '("etc-services" "etc-protocols" "etc-rpc")
1087 (map (cut string-append etc "/" <>)
1088 '("services" "protocols" "rpc")))
1090 (native-inputs (list tar xz))
1091 (synopsis "IANA protocol, port, and RPC number assignments")
1093 "This package provides the /etc/services, /etc/protocols, and /etc/rpc
1094 files, which contain information about the IANA-assigned port, protocol, and
1096 (home-page "https://packages.debian.org/sid/netbase")
1097 (license license:gpl2)))
1099 (define-public netcat
1105 (uri (string-append "mirror://sourceforge/netcat/netcat/" version
1106 "/netcat-" version ".tar.bz2"))
1109 "1frjcdkhkpzk0f84hx6hmw5l0ynpmji8vcbaxg8h5k2svyxz0nmm"))))
1110 (build-system gnu-build-system)
1113 ;; By default, man and info pages are put in PREFIX/{man,info},
1114 ;; but we want them in PREFIX/share/{man,info}.
1115 (let ((out (assoc-ref %outputs "out")))
1116 (list (string-append "--mandir=" out "/share/man")
1117 (string-append "--infodir=" out "/share/info")))))
1118 (home-page "http://netcat.sourceforge.net")
1119 (synopsis "Read and write data over TCP/IP")
1121 "Netcat is a featured networking utility which reads and writes data
1122 across network connections, using the TCP/IP protocol. It is designed to be a
1123 reliable \"back-end\" tool that can be used directly or easily driven by other
1124 programs and scripts. At the same time, it is a feature-rich network debugging
1125 and exploration tool, since it can create almost any kind of connection you
1126 would need and has several interesting built-in capabilities.")
1127 (license license:gpl2+)))
1129 (define-public netcat-openbsd
1131 (name "netcat-openbsd")
1136 (url "https://salsa.debian.org/debian/netcat-openbsd.git")
1137 (commit (string-append "debian/" version))))
1138 (file-name (git-file-name name version))
1141 "0hpbmz9m2q22a6qgbn9590z2x96xgffim8g0m1v47mariz3pqhlc"))))
1142 (build-system gnu-build-system)
1144 `(#:tests? #f ; no test suite
1146 (list (string-append "CC=" ,(cc-for-target)))
1148 (modify-phases %standard-phases
1150 (add-before 'build 'patch
1152 (setenv "QUILT_PATCHES" "debian/patches")
1153 (invoke "quilt" "push" "-a")))
1155 (lambda* (#:key outputs #:allow-other-keys)
1156 (let* ((out (assoc-ref outputs "out"))
1157 (bin (string-append out "/bin"))
1158 (man (string-append out "/share/man/man1"))
1159 (doc (string-append out "/share/doc/netcat-openbsd-" ,version))
1160 (examples (string-append doc "/examples")))
1161 (install-file "nc" bin)
1162 (install-file "nc.1" man)
1163 (install-file "debian/copyright" doc)
1164 (copy-recursively "debian/examples" examples)))))))
1165 (inputs (list libbsd))
1166 (native-inputs (list pkg-config quilt))
1167 (home-page "https://packages.debian.org/sid/netcat-openbsd")
1168 (synopsis "Read and write data over TCP/IP")
1170 "Netcat is a simple Unix utility which reads and writes data across
1171 network connections using TCP or UDP protocol. It is designed to be a reliable
1172 \"back-end\" tool that can be used directly or easily driven by other programs
1173 and scripts. At the same time it is a feature-rich network debugging and
1174 exploration tool, since it can create almost any kind of connection you would
1175 need and has several interesting built-in capabilities.
1177 This package contains the OpenBSD rewrite of netcat, including support for
1178 IPv6, proxies, and Unix sockets.")
1179 (license (list license:bsd-3
1180 license:bsd-2)))) ; atomicio.*, socks.c
1189 (uri (string-append "mirror://sourceforge/nmon/lmon" version ".c"))
1191 (base32 "1wpm2f30414b87kpbr9hbidblr5cmfby5skwqd0fkpi5v712q0f0"))))
1192 (build-system gnu-build-system)
1194 (list #:tests? #f ; no test suite
1196 #~(modify-phases %standard-phases
1199 (copy-file #$(package-source this-package) "lmon.c")))
1200 (delete 'configure) ; no build system
1202 ;; There is an example ‘Makefile’ in the .c file.
1204 ;; These #defines aren't well-documented and, e.g., POWER was
1205 ;; not actually tested on every possible TARGET-POWERPC?.
1206 (let* ((system #$(cond ((target-x86?) "X86")
1207 ((target-arm?) "ARM")
1208 ((target-powerpc?) "POWER")
1209 (else "CROSS_FINGERS"))))
1210 (format #t "Building for ~a~%" system)
1211 (invoke #$(cc-for-target) "-o" "nmon" "lmon.c"
1212 "-g" "-Wall" "-D" system
1213 "-lncurses" "-lm"))))
1216 (let ((bin (string-append #$output "/bin"))
1217 (man1 (string-append #$output "/share/man/man1")))
1218 (install-file "nmon" bin)
1220 (copy-file #$(this-package-native-input "man-page")
1221 (string-append man1 "/nmon.1"))))))))
1225 ;; There is no man page upstream, so install Debian's.
1227 (uri (string-append "https://salsa.debian.org/carnil/nmon/"
1228 "-/raw/debian/" version "+debian-1/"
1232 "1gpvd2kjyhs18sh6sga5bk9wj8s78blfd4c0m38r0wl92jx2yv1b"))))))
1235 (home-page "http://nmon.sourceforge.net/")
1237 "Monitor system performance in a terminal or to a @file{.csv} log file")
1239 "@acronym{Nmon, Nigel's performance monitor} is yet another system monitor
1240 useful in systems administration, debugging, tuning, and benchmarking.
1242 The configurable ncurses interface displays all the classic resource usage
1243 statistics (CPU, memory, network, disk, ...) as real-time graphs or numbers.
1244 It can also list the processes responsible in a @command{top}-like table.
1246 A less common nmon feature is its ability to create highly detailed log files
1247 in @acronym{CSV, comma-separated values} format. These can be imported into
1248 spreadsheets or fed straight into an @acronym{RRD, round-robin database} using
1249 @command{rrdtool} for further analyisis, or to create colourful graphs.")
1250 (license license:gpl3+)))
1252 (define-public sipcalc
1259 (uri (string-append "http://www.routemeister.net/projects"
1260 "/sipcalc/files/sipcalc" "-" version ".tar.gz"))
1263 "0mv3wndj4z2bsshh2k8d5sy3j8wxzgf8mzmmkvj1k8gpcz37dm6g"))))
1264 (build-system gnu-build-system)
1265 (home-page "https://www.routemeister.net/projects/sipcalc/")
1266 (synopsis "Command-line IP subnet calculator")
1268 "Sipcalc is an advanced command-line IP subnet calculator. It can take
1269 multiple forms of input (IPv4/IPv6/interface/hostname) and output a multitude
1270 of information about a given subnet.
1277 @item Retrieving of address information from interfaces.
1278 @item Classfull and CIDR output.
1279 @item Multiple address and netmask input and output formats (dotted quad, hex,
1281 @item Output of broadcast address, network class, Cisco wildcard,
1282 hosts/range, network range.
1283 @item The ability to split a network based on a smaller netmask, now also with
1284 recursive runs on the generated subnets. (also IPv6)
1288 @item Compressed and expanded input and output addresses.
1289 @item Standard IPv6 network output.
1290 @item v4 in v6 output.
1291 @item Reverse DNS address generation.
1294 (license license:bsd-3)))
1296 (define-public prips
1303 (uri (string-append "https://devel.ringlet.net/files/sys/"
1304 name "/" name "-" version ".tar.xz"))
1306 (base32 "1a33vbl4w603mk6mm5r3vhk87fy3dfk5wdpch0yd3ncbkg3fmvqn"))))
1307 (build-system gnu-build-system)
1309 `(#:make-flags (list (string-append "CC=" ,(cc-for-target)))
1310 #:test-target "test"
1311 #:phases (modify-phases %standard-phases
1314 (lambda* (#:key outputs #:allow-other-keys)
1315 (let ((out (assoc-ref outputs "out")))
1316 (install-file "prips"
1317 (string-append out "/bin"))))))))
1318 (native-inputs (list perl-test-harness))
1319 (synopsis "Tool that prints the IP addresses in a given range")
1320 (description "Prips can be used to print all of the IP addresses in
1321 a given range. This allows the enhancement of tools only work
1322 on one host at a time (e.g. whois).")
1323 (home-page "https://devel.ringlet.net/sysutils/prips/")
1324 (license license:gpl2+)))
1326 (define-public alive
1332 (uri (string-append "mirror://gnu/alive/alive-"
1336 "12ahlxbbrynm6md8qc872qr795lqpfkr8kwlsig40i4nznzkvkwl"))))
1337 (build-system gnu-build-system)
1338 (arguments '(#:configure-flags '("alive_cv_nice_ping=yes")))
1344 (home-page "https://www.gnu.org/software/alive/")
1345 (synopsis "Autologin and keep-alive daemon")
1347 "GNU Alive sends periodic pings to a server, generally to keep a
1349 (license license:gpl3+)))
1351 (define-public isc-dhcp
1352 (let* ((bind-major-version "9")
1353 (bind-minor-version "11")
1354 (bind-patch-version "37")
1355 (bind-release-type "") ; for patch release, use "-P"
1356 (bind-release-version "") ; for patch release, e.g. "6"
1357 (bind-version (string-append bind-major-version
1363 bind-release-version)))
1369 (uri (string-append "https://ftp.isc.org/isc/dhcp/"
1370 version "/dhcp-" version ".tar.gz"))
1373 "062q2g8cj2zv0zv22x6pg21m21bdlscxkg3li0ac0pm0qasccghf"))))
1374 (build-system gnu-build-system)
1376 `(#:parallel-build? #f
1377 #:configure-flags '("--with-randomdev=/dev/random")
1379 (modify-phases %standard-phases
1380 (add-after 'unpack 'replace-bundled-bind
1381 (lambda* (#:key inputs native-inputs #:allow-other-keys)
1382 (delete-file "bind/bind.tar.gz")
1383 (copy-file (assoc-ref inputs "bind-source-tarball")
1385 (chmod "bind/bind.tar.gz" #o644)
1386 (substitute* "bind/version.tmp"
1388 (format #f "MAJORVER=~a\n" ,bind-major-version))
1390 (format #f "MINORVER=~a\n" ,bind-minor-version))
1392 (format #f "PATCHVER=~a\n" ,bind-patch-version))
1393 (("^RELEASETYPE=.*")
1394 (format #f "RELEASETYPE=~a\n" ,bind-release-type))
1396 (format #f "RELEASEVER=~a\n" ,bind-release-version)))))
1397 ,@(if (%current-target-system)
1398 '((add-before 'configure 'fix-bind-cross-compilation
1400 (substitute* "configure"
1402 "--host=$host_alias"))
1403 ;; BIND needs a native compiler because the DHCP
1404 ;; build system uses the built 'gen' executable.
1405 (setenv "BUILD_CC" "gcc"))))
1407 (add-before 'configure 'update-config-scripts
1408 (lambda* (#:key native-inputs inputs #:allow-other-keys)
1409 (for-each (lambda (file)
1412 (or native-inputs inputs)
1413 (string-append "/bin/" file)) "."))
1414 '("config.guess" "config.sub"))))
1415 (add-before 'build 'update-config-scripts-for-bind
1416 (lambda* (#:key native-inputs inputs #:allow-other-keys)
1417 (for-each (lambda (file)
1420 (or native-inputs inputs)
1421 (string-append "/bin/" file))
1422 (string-append "bind/bind-" ,bind-version)))
1423 '("config.guess" "config.sub"))))
1424 (add-after 'configure 'post-configure
1425 (lambda* (#:key outputs #:allow-other-keys)
1426 ;; Point to the right client script, which will be
1427 ;; installed in a later phase.
1428 (substitute* "includes/dhcpd.h"
1429 (("#define[[:blank:]]+_PATH_DHCLIENT_SCRIPT.*")
1430 (let ((out (assoc-ref outputs "out")))
1431 (string-append "#define _PATH_DHCLIENT_SCRIPT \""
1432 out "/libexec/dhclient-script"
1435 ;; During the 'build' phase, 'bind.tar.gz' is extracted, so
1436 ;; we must patch shebangs in there and make sure the right
1438 (with-directory-excursion "bind"
1439 (substitute* "Makefile"
1441 (let ((sh (which "sh")))
1442 (string-append "./configure CONFIG_SHELL="
1443 sh " SHELL=" sh " "))))
1445 (let ((bind-directory (string-append "bind-" ,bind-version)))
1446 (invoke "tar" "xf" "bind.tar.gz")
1447 (for-each patch-shebang
1448 (find-files bind-directory ".*"))
1449 (substitute* (string-append bind-directory "/configure")
1452 (invoke "tar" "cf" "bind.tar.gz"
1454 ;; avoid non-determinism in the archive
1458 "--group=root:0")))))
1459 (add-after 'install 'post-install
1460 (lambda* (#:key inputs outputs #:allow-other-keys)
1461 ;; Install the dhclient script for GNU/Linux and make sure
1462 ;; if finds all the programs it needs.
1463 (let* ((out (assoc-ref outputs "out"))
1464 (libexec (string-append out "/libexec"))
1465 (coreutils (assoc-ref inputs "coreutils*"))
1466 (inetutils (assoc-ref inputs "inetutils"))
1467 (grep (assoc-ref inputs "grep*"))
1468 (net-tools (assoc-ref inputs "net-tools"))
1469 (sed (assoc-ref inputs "sed*")))
1470 (substitute* "client/scripts/linux"
1472 (search-input-file inputs "/sbin/ip")))
1475 (copy-file "client/scripts/linux"
1476 (string-append libexec "/dhclient-script"))
1479 (string-append libexec "/dhclient-script")
1482 (string-append dir "/bin:"
1484 (list inetutils net-tools coreutils grep sed))))))))))
1487 (list config perl file))
1489 (inputs `(("inetutils" ,inetutils)
1490 ("bash" ,(canonical-package bash-minimal)) ;for wrap-program
1491 ,@(if (hurd-target?) '()
1492 `(("net-tools" ,net-tools)
1493 ("iproute" ,iproute)))
1495 ;; isc-dhcp bundles a copy of BIND, which has proved vulnerable
1496 ;; in the past. Use a BIND-VERSION of our choosing instead.
1497 ("bind-source-tarball"
1500 (uri (string-append "https://ftp.isc.org/isc/bind9/"
1502 "/bind-" bind-version ".tar.gz"))
1505 "1zsszgxs9043dfpxb6xs1iwk9jg7nxkl5pbawj8dlshnxkkzp3hd"))))
1507 ("coreutils*" ,coreutils)
1511 (home-page "https://www.isc.org/dhcp/")
1512 (synopsis "Dynamic Host Configuration Protocol (DHCP) tools")
1514 "ISC's Dynamic Host Configuration Protocol (DHCP) distribution provides a
1515 reference implementation of all aspects of DHCP, through a suite of DHCP
1516 tools: server, client, and relay agent.")
1517 (license license:mpl2.0)
1518 (properties '((cpe-name . "dhcp"))))))
1520 (define-public radvd
1528 (url "https://github.com/radvd-project/radvd")
1529 (commit (string-append "v" version))))
1530 (file-name (git-file-name name version))
1532 (base32 "1df827m3vkjq2bcs5y9wg2cygvpdwl8ppl446qqhyym584gz54nl"))))
1533 (build-system gnu-build-system)
1542 `(#:configure-flags '("--with-check")))
1543 (home-page "https://radvd.litech.org/")
1544 (synopsis "IPv6 Router Advertisement Daemon")
1546 "The Router Advertisement Daemon (radvd) is run on systems acting as IPv6
1547 routers. It sends Router Advertisement messages specified by RFC 2461
1548 periodically and when requested by a node sending a Router Solicitation
1549 message. These messages are required for IPv6 stateless autoconfiguration.")
1550 (license (license:non-copyleft "file://COPYRIGHT"))))
1552 (define-public ndppd
1560 (url "https://github.com/DanielAdolfsson/ndppd")
1562 (file-name (git-file-name name version))
1564 (base32 "0niri5q9qyyyw5lmjpxk19pv3v4srjvmvyd5k6ks99mvqczjx9c0"))))
1565 (build-system gnu-build-system)
1567 (list #:tests? #f ; There are no tests
1568 #:make-flags #~(list (string-append "PREFIX=" #$output))
1570 #~(modify-phases %standard-phases
1572 (add-after 'unpack 'fix-paths
1574 (substitute* "Makefile"
1575 (("/bin/gzip") "gzip")))))))
1576 (synopsis "NDP Proxy Daemon")
1578 "The Neighbor Discovery Protocol Proxy Daemon (ndppd) proxies some IPv6
1579 NDP messages between interfaces to allow IPv6 routing between machines that
1580 are in the same network but not on the same local link. It currently only
1581 supports Neighbor Solicitation and Neighbor Advertisement messages.")
1582 (home-page "https://github.com/DanielAdolfsson/ndppd")
1583 (license license:gpl3+)))
1585 (define-public libpcap
1591 (uri (string-append "https://www.tcpdump.org/release/libpcap-"
1595 "1m5x26vlbymp90k1qh0w3nj2nxzyvfrmfmwpj17k81dgri55ya7d"))))
1596 (build-system gnu-build-system)
1600 ;; There are some tests in testprogs/, but no automated test suite.
1603 (modify-phases %standard-phases
1604 (add-after 'unpack 'omit-static-library
1605 ;; Neither build nor install libpcap.a.
1607 (substitute* "Makefile.in"
1608 ((" libpcap\\.a") "")
1609 ((" install-archive ") " ")))))))
1610 (home-page "https://www.tcpdump.org")
1611 (synopsis "Network packet capture library")
1613 "libpcap is an interface for user-level packet capture. It provides a
1614 portable framework for low-level network monitoring. Applications include
1615 network statistics collection, security monitoring, network debugging, etc.")
1616 (license (list license:bsd-4 ; fad-*.c and several other source files
1617 license:bsd-3 ; pcap/, sockutils.* & others
1618 license:bsd-2)))) ; the rest
1620 (define-public tcpdump
1626 (uri (string-append "https://www.tcpdump.org/release/tcpdump-"
1630 "1ghfs5gifzrk3813zf9zalfbjs70wg6llz6q31k180r7zf2nkcvr"))))
1631 (build-system gnu-build-system)
1632 (inputs (list libpcap openssl))
1633 (native-inputs (list perl)) ; for tests
1634 (home-page "https://www.tcpdump.org/")
1635 (synopsis "Network packet analyzer")
1637 "Tcpdump is a command-line tool to analyze network traffic passing
1638 through the network interface controller.")
1639 (license license:bsd-3)))
1641 (define-public jnettop
1648 (string-append "https://web.archive.org/web/20161221100811/"
1649 "http://jnettop.kubs.info/dist/jnettop-"
1653 "1855np7c4b0bqzhf1l1dyzxb90fpnvrirdisajhci5am6als31z9"))))
1654 (build-system gnu-build-system)
1658 (list glib ncurses libpcap))
1660 "https://web.archive.org/web/20160703195221/http://jnettop.kubs.info/wiki/")
1661 (synopsis "Visualize network traffic by bandwidth use")
1663 "Jnettop is a traffic visualiser, which captures traffic going
1664 through the host it is running from and displays streams sorted
1665 by bandwidth they use.")
1666 (license license:gpl2+)))
1668 (define-public clusterssh
1674 (uri (string-append "mirror://sourceforge/clusterssh/"
1675 "2.%20ClusterSSH%20Series%204/"
1676 "App-ClusterSSH-v" version ".tar.gz"))
1679 "0rmk2p3f2wz1h092anidjclh212rv3gxyk0c641qk3frlrjnw6mp"))))
1680 (build-system perl-build-system)
1683 (modify-phases %standard-phases
1684 (add-after 'unpack 'refer-to-inputs
1685 (lambda* (#:key inputs #:allow-other-keys)
1686 (substitute* (list "lib/App/ClusterSSH/Config.pm"
1691 (add-before 'check 'delete-failing-tests
1693 ;; This checks whether all code is nicely formatted. The above
1694 ;; ‘refer-to-inputs’ phase breaks this pedantry, so disable it.
1695 (delete-file "t/perltidy.t")
1696 ;; Update the manifest so t/manifest.t happily passes.
1697 (substitute* "MANIFEST"
1698 (("t/perltidy.t\n") ""))
1700 (add-after 'install 'augment-library-path
1701 (lambda* (#:key inputs outputs #:allow-other-keys)
1702 (let* ((out (assoc-ref outputs "out"))
1703 (bin (string-append out "/bin")))
1704 (with-directory-excursion bin
1707 (wrap-program program
1708 `("PERL5LIB" ":" prefix
1709 ,(map (lambda (file-name)
1710 (string-append file-name
1711 "/lib/perl5/site_perl"))
1713 (map (lambda (input)
1714 (assoc-ref inputs input))
1715 ;; These may be propagated and hence
1716 ;; not explicitly listed as inputs.
1717 (list "perl-class-data-inheritable"
1718 "perl-devel-stacktrace"
1719 "perl-exception-class"
1723 "perl-x11-protocol-other")))))))
1724 (find-files "." ".*")))
1727 (list perl-cpan-changes
1732 perl-test-differences
1733 perl-test-distmanifest
1736 perl-test-pod-coverage
1740 (list perl-exception-class
1745 perl-x11-protocol-other
1747 ;; The clusterssh.sourceforge.net address requires login to view
1748 (home-page "https://sourceforge.net/projects/clusterssh/")
1749 (synopsis "Secure concurrent multi-server terminal control")
1751 "ClusterSSH controls a number of xterm windows via a single graphical
1752 console window to allow commands to be interactively run on multiple servers
1753 over ssh connections.")
1754 (license license:gpl2+)))
1756 (define-public realmd
1764 (url "https://github.com/freedesktop/realmd")
1766 (file-name (git-file-name name version))
1769 "1c6q2a86kk2f1akzc36nh52hfwsmmc0mbp6ayyjxj4zsyk9zx5bf"))))
1770 (build-system gnu-build-system)
1772 `(#:configure-flags '("--with-systemd-unit-dir=no"
1773 "--with-systemd-journal=no"
1774 "--with-distro=GNU guix"
1777 (modify-phases %standard-phases
1778 (add-before 'install 'fix-service
1779 (lambda* (#:key outputs #:allow-other-keys)
1780 ;; GNU Guix does not have service config file, therefore we remove
1781 ;; the line that copies the file.
1782 (substitute* "Makefile"
1783 ((".*/service/realmd-.*") "")))))))
1792 (list glib mit-krb5 openldap polkit))
1793 (synopsis "DBus service for network authentication")
1794 (description "This package provides an on demand system DBus service.
1795 It allows callers to configure network authentication and domain membership
1796 in a standard way. Realmd discovers information about the domain or realm
1797 automatically and does not require complicated configuration in order to join
1798 a domain or realm. Dbus system service that manages discovery and enrollment in
1799 realms/domains like Active Directory or IPA.")
1800 (home-page "https://www.freedesktop.org/software/realmd/")
1801 (license license:lgpl2.1+)))
1803 (define-public rename
1810 "mirror://cpan/authors/id/R/RM/RMBARKER/File-Rename-"
1814 "137m8s06r4n038ivlr5r1d9a7q9l7shmwpvnyx053r9ndhvbnkh5"))))
1815 (build-system perl-build-system)
1818 (modify-phases %standard-phases
1819 (add-after 'install 'find-itself
1820 ;; Fix run-time 'Can't locate File/Rename.pm in @INC' failure.
1821 (lambda* (#:key outputs #:allow-other-keys)
1822 (let* ((out (assoc-ref outputs "out"))
1823 (bin (string-append out "/bin")))
1824 (with-directory-excursion bin
1827 (wrap-program program
1828 `("PERL5LIB" ":" prefix
1829 (,(string-append out "/lib/perl5/site_perl")))))
1830 (find-files "." ".*")))
1833 (list perl-module-build perl-test-pod perl-test-pod-coverage))
1834 (home-page "https://metacpan.org/pod/distribution/File-Rename/rename.PL")
1835 (synopsis "Perl extension for renaming multiple files")
1837 "This package provides a Perl interface (@code{Perl::Rename}) as well
1838 as a command-line utility (@command{rename}) that can rename multiple files
1839 at once based on a Perl regular expression.")
1840 (license license:perl-license)))
1842 (define-public rottlog
1848 (uri (string-append "mirror://gnu/rottlog/rottlog-"
1852 "0751mb9l2f0jrk3vj6q8ilanifd121dliwk0c34g8k0dlzsv3kd7"))
1853 (modules '((guix build utils)))
1854 (patches (search-patches "rottlog-direntry.patch"))
1857 ;; Delete outdated Autotools build system files.
1858 (for-each delete-file
1869 (substitute* "Makefile.am"
1870 (("mkdir -p \\$\\(ROTT_STATDIR\\)")
1871 ;; Don't attempt to create /var/lib/rottlog.
1873 (build-system gnu-build-system)
1876 #:configure-flags #~(list "ROTT_ETCDIR=/etc/rottlog" ;rc file location
1877 "--localstatedir=/var")
1878 ;; Install example config files in OUT/etc.
1879 #:make-flags #~(list (string-append "ROTT_ETCDIR=" #$output "/etc")
1880 ;; Avoid the default -o root -g root arguments,
1881 ;; which fail due to not running as root.
1882 "INSTALL_RC=install"
1883 "INSTALL_SCRIPT=install")
1885 #~(modify-phases %standard-phases
1886 (add-after 'unpack 'patch-paths
1887 (lambda* (#:key inputs #:allow-other-keys)
1888 (substitute* "rc/rc"
1889 (("/usr/sbin/sendmail")
1890 (search-input-file inputs "/bin/mail")))))
1891 (add-after 'build 'set-packdir
1893 ;; Set a default location for archived logs.
1894 (substitute* "rc/rc"
1896 "packdir=\"/var/log\""))))
1897 (add-before 'install 'tweak-rc-weekly
1898 (lambda* (#:key inputs #:allow-other-keys)
1899 (substitute* "rc/weekly"
1901 (search-input-file inputs "/bin/kill"))
1903 ;; The file is called 'syslog.pid' (no 'd').
1905 (add-after 'install 'install-info
1907 (invoke "make" "install-info"))))))
1908 (native-inputs (list autoconf automake texinfo util-linux)) ; for 'cal'
1909 (inputs (list coreutils mailutils))
1910 (home-page "https://www.gnu.org/software/rottlog/")
1911 (synopsis "Log rotation and management")
1913 "GNU Rot[t]log is a program for managing log files. It is used to
1914 automatically rotate out log files when they have reached a given size or
1915 according to a given schedule. It can also be used to automatically compress
1916 and archive such logs. Rot[t]log will mail reports of its activity to the
1917 system administrator.")
1918 (license license:gpl3+)))
1923 (version "1.9.12p1")
1927 (list (string-append "https://www.sudo.ws/sudo/dist/sudo-"
1929 (string-append "ftp://ftp.sudo.ws/pub/sudo/OLD/sudo-"
1930 version ".tar.gz")))
1933 "1n5ppabp9ark1qz7xi63528s07pmpak67c7agj8v5a1xxfl1hnj7"))
1934 (modules '((guix build utils)))
1937 (delete-file-recursively "lib/zlib")))))
1938 (build-system gnu-build-system)
1939 (outputs (list "out"))
1942 (list (string-append "--docdir=" (assoc-ref %outputs "out")
1943 "/share/doc/" ,name "-" ,version)
1945 "--with-logpath=/var/log/sudo.log"
1946 "--with-rundir=/var/run/sudo" ; must be cleaned up at boot time
1947 "--with-vardir=/var/db/sudo"
1948 "--with-iologdir=/var/log/sudo-io"
1950 ;; 'visudo.c' expects _PATH_MV to be defined, but glibc doesn't
1952 (string-append "CPPFLAGS=-D_PATH_MV='\""
1953 (assoc-ref %build-inputs "coreutils")
1956 ;; Avoid non-determinism; see <http://bugs.gnu.org/21918>.
1957 #:parallel-build? #f
1960 (modify-phases %standard-phases
1961 (add-before 'configure 'pre-configure
1963 (substitute* "src/sudo_usage.h.in"
1964 ;; Do not capture 'configure' arguments since we would
1965 ;; unduly retain references, and also because the
1966 ;; CPPFLAGS above would close the string literal
1968 (("@CONFIGURE_ARGS@") "\"\""))
1969 (substitute* (find-files "." "Makefile\\.in")
1970 ;; Allow installation as non-root.
1971 (("-o [[:graph:]]+ -g [[:graph:]]+")
1973 ;; Don't try to create /etc/sudoers.
1974 (("^install: (.*)install-sudoers(.*)" _ before after)
1975 (string-append "install: " before after "\n"))
1976 ;; Don't try to create /run/sudo.
1977 (("\\$\\(DESTDIR\\)\\$\\(rundir\\)")
1979 ;; Install example sudo{,_logsrvd}.conf to the right place.
1980 (("\\$\\(DESTDIR\\)\\$\\(sysconfdir\\)")
1981 "$(DESTDIR)/$(docdir)/examples")
1982 ;; Don't try to create /var/db/sudo.
1983 (("\\$\\(DESTDIR\\)\\$\\(vardir\\)")
1986 ;; ‘Checking existing [/etc/]sudoers file for syntax errors’ is
1987 ;; not the task of the build system, and fails.
1988 (substitute* "plugins/sudoers/Makefile.in"
1989 (("^pre-install:" match)
1990 (string-append match "\ndisabled-" match))))))
1992 ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
1993 ;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
1998 `(("coreutils" ,coreutils)
1999 ,@(if (hurd-target?)
2001 `(("linux-pam" ,linux-pam)))
2003 (home-page "https://www.sudo.ws/")
2004 (synopsis "Run commands as root")
2006 "Sudo (su \"do\") allows a system administrator to delegate authority to
2007 give certain users (or groups of users) the ability to run some (or all)
2008 commands as root or another user while providing an audit trail of the
2009 commands and their arguments.")
2011 ;; See <http://www.sudo.ws/sudo/license.html>.
2012 (license license:x11)))
2014 (define-public opendoas
2021 (url "https://github.com/Duncaen/OpenDoas")
2022 (commit (string-append "v" version))))
2023 (file-name (git-file-name name version))
2026 "1qrin7x9vcprk5pwjbr3w8z2qj8hk6xbvxicdhlk27xr6vcr1qzn"))))
2027 (build-system gnu-build-system)
2030 (modify-phases %standard-phases
2031 (add-before 'configure 'pre-configure
2032 (lambda* (#:key outputs #:allow-other-keys)
2033 (substitute* "GNUmakefile"
2034 (("^\tchown.*$") ""))
2035 ;; OpenDoas looks for binaries in safepath when a rule specifies a
2036 ;; relative command, such as “permit keepenv :wheel cmd guix”.
2037 (substitute* "doas.c"
2038 (("safepath =" match)
2039 (string-append match " \""
2040 "/run/setuid-programs:"
2041 "/run/current-system/profile/bin:"
2042 "/run/current-system/profile/sbin:"
2045 ;; The configure script doesn't accept most of the default flags.
2046 (lambda* (#:key configure-flags #:allow-other-keys)
2047 ;; The configure script can be told which compiler to use only
2048 ;; through environment variables.
2049 (setenv "CC" ,(cc-for-target))
2050 (apply invoke "./configure" configure-flags))))
2052 (list (string-append "--prefix=" (assoc-ref %outputs "out"))
2054 ;; Compiler choice is not carried over from the configure script.
2056 (list (string-append "CC=" ,(cc-for-target)))
2057 #:tests? #f)) ; no test suite
2060 (home-page "https://github.com/Duncaen/OpenDoas")
2061 (synopsis "Portable version of OpenBSD's doas command")
2062 (description "Doas is a minimal replacement for the venerable sudo. It was
2063 initially written by Ted Unangst of the OpenBSD project to provide 95% of the
2064 features of sudo with a fraction of the codebase.")
2065 (license (list license:bsd-3 ; libbsd/*
2066 license:isc)))) ; everything else
2068 (define-public wpa-supplicant-minimal
2070 (name "wpa-supplicant-minimal")
2075 "https://w1.fi/releases/wpa_supplicant-"
2079 "0bvvw7bx149a57llzrwzlpggyym84f8jdd4abwsk0f2b2pjpmpr0"))
2080 (modules '((guix build utils)))
2083 (substitute* "wpa_supplicant/defconfig"
2084 ;; Disable D-Bus to save ~14MiB on the closure size.
2085 (("^CONFIG_CTRL_IFACE_DBUS" line _)
2086 (string-append "#" line)))
2088 (build-system gnu-build-system)
2091 (modify-phases %standard-phases
2094 (chdir "wpa_supplicant")
2095 (copy-file "defconfig" ".config")
2096 (let ((port (open-file ".config" "al")))
2098 CONFIG_DEBUG_SYSLOG=y
2102 CONFIG_DRIVER_NL80211=y
2103 CFLAGS += $(shell pkg-config libnl-3.0 --cflags)
2105 CONFIG_READLINE=y\n" port)
2107 ;; Make sure we have a pkg-config when cross compiling
2108 (substitute* '(".config"
2113 (or (which "pkg-config")
2114 (which (string-append ,(%current-target-system)
2117 (add-after 'install 'install-documentation
2118 (lambda* (#:key outputs #:allow-other-keys)
2119 (let* ((out (assoc-ref outputs "out"))
2120 (doc (string-append out "/share/doc/wpa-supplicant"))
2121 (man (string-append out "/share/man"))
2122 (man5 (string-append man "/man5"))
2123 (man8 (string-append man "/man8")))
2124 (define (copy-man-page target)
2126 (install-file file target)))
2128 (mkdir-p man5) (mkdir man8)
2129 (for-each (copy-man-page man5)
2130 (find-files "doc/docbook" "\\.5"))
2131 (for-each (copy-man-page man8)
2132 (find-files "doc/docbook" "\\.8"))
2134 ;; wpa_supplicant.conf(5) does not explain all configuration
2135 ;; options but refers to the example config file, so install it
2136 ;; along with READMEs.
2137 (for-each (lambda (file)
2138 (install-file file doc))
2139 '("README" "README-DPP" "README-HS20"
2140 "README-P2P" "README-WPS"
2141 "wpa_supplicant.conf"))
2144 #:make-flags (list (string-append "CC=" ,(cc-for-target))
2145 (string-append "BINDIR=" (assoc-ref %outputs "out")
2147 (string-append "LIBDIR=" (assoc-ref %outputs "out")
2151 (list readline libnl openssl))
2154 (home-page "https://w1.fi/wpa_supplicant/")
2155 (synopsis "Connecting to WPA and WPA2-protected wireless networks")
2157 "wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
2158 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in
2159 the client stations. It implements key negotiation with a WPA Authenticator
2160 and it controls the roaming and IEEE 802.11 authentication/association of the
2163 This package provides the @code{wpa_supplicant} daemon and the @code{wpa_cli}
2166 ;; In practice, this is linked against Readline, which makes it GPLv3+.
2167 (license license:bsd-3)
2169 (properties `((cpe-name . "wpa_supplicant")))))
2171 (define-public wpa-supplicant
2172 (package (inherit wpa-supplicant-minimal)
2173 (name "wpa-supplicant")
2174 (inputs (modify-inputs (package-inputs wpa-supplicant-minimal)
2177 (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
2179 `(modify-phases ,phases
2180 (add-after 'configure 'set-config-options
2182 (let ((port (open-file ".config" "al")))
2183 ;; Enable Opportunistic Wireless Encryption (OWE) and D-Bus
2187 CONFIG_CTRL_IFACE_DBUS_NEW=y
2188 CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
2189 (close-port port))))
2190 (add-after 'install-documentation 'install-dbus-conf
2191 (lambda* (#:key outputs #:allow-other-keys)
2192 (let* ((out (assoc-ref outputs "out"))
2193 (interfaces (string-append out "/etc/dbus-1/system.d"))
2194 (services (string-append out
2195 "/share/dbus-1/system-services")))
2196 (mkdir-p interfaces)
2197 (copy-file "dbus/dbus-wpa_supplicant.conf"
2198 (string-append interfaces "/wpa_supplicant.conf"))
2200 (copy-file "dbus/fi.w1.wpa_supplicant1.service"
2201 (string-append services
2202 "/fi.w1.wpa_supplicant1.service")))
2205 (define-public wpa-supplicant-gui
2207 (inherit wpa-supplicant)
2208 (name "wpa-supplicant-gui")
2209 (inputs (modify-inputs (package-inputs wpa-supplicant)
2210 (prepend qtbase-5 qtsvg-5)))
2213 (modify-inputs (package-native-inputs wpa-supplicant)
2214 (prepend imagemagick inkscape/stable)))
2215 (build-system qt-build-system)
2218 #:test-target "check"
2220 #~(modify-phases %standard-phases
2221 (add-after 'unpack 'chdir
2222 (lambda _ (chdir "wpa_supplicant/wpa_gui-qt4")))
2224 (lambda _ (invoke "qmake" "wpa_gui.pro")))
2225 (add-after 'build 'build-icons
2227 ;; Inkscape complains (but works) without a writable $HOME.
2228 (setenv "HOME" "/tmp")
2229 (invoke "make" "-C" "icons")))
2232 (install-file "wpa_gui" (string-append #$output "/bin"))
2233 (install-file "wpa_gui.desktop"
2234 (string-append #$output
2235 "/share/applications"))
2236 (copy-recursively "icons/hicolor"
2237 (string-append #$output
2238 "/share/icons/hicolor")))))))
2239 (synopsis "Graphical user interface for WPA supplicant")))
2241 (define-public hostapd
2247 (uri (string-append "https://w1.fi/releases/hostapd-" version
2251 "0pcik0a6yin9nib02frjhaglmg44hwik086iwg1751b7kdwpqvi0"))))
2252 (build-system gnu-build-system)
2255 #~(modify-phases %standard-phases
2258 ;; This is mostly copied from 'wpa-supplicant' above.
2260 (copy-file "defconfig" ".config")
2261 (let ((port (open-file ".config" "al")))
2262 (display "CONFIG_LIBNL32=y
2265 CONFIG_IEEE80211AC=y\n" port)
2266 (close-port port))))
2267 (add-after 'unpack 'patch-pkg-config
2269 (substitute* "src/drivers/drivers.mak"
2271 #$(pkg-config-for-target)))))
2272 (add-after 'install 'install-man-pages
2273 (lambda* (#:key outputs #:allow-other-keys)
2274 (let* ((man (string-append #$output "/share/man"))
2275 (man1 (string-append man "/man1"))
2276 (man8 (string-append man "/man8")))
2277 (define (copy-man-page target)
2279 (install-file file target)))
2280 (for-each (copy-man-page man1)
2281 (find-files "." "\\.1"))
2282 (for-each (copy-man-page man8)
2283 (find-files "." "\\.8"))))))
2285 #~(list (string-append "CC=" #$(cc-for-target))
2286 (string-append "BINDIR=" #$output "/sbin")
2287 (string-append "LIBDIR=" #$output "/lib"))
2289 (native-inputs (list pkg-config))
2291 ;; There's an optional dependency on SQLite.
2292 (inputs (list openssl libnl))
2293 (home-page "https://w1.fi/hostapd/")
2294 (synopsis "Daemon for Wi-Fi access points and authentication servers")
2296 "hostapd is a user-space daemon for WiFi access points and authentication
2297 servers. It implements IEEE 802.11 access point management, IEEE
2298 802.1X/WPA/WPA2/EAP Authenticators, RADIUS client, EAP server, and RADIUS
2299 authentication server.")
2301 ;; Same license as wpa_supplicant.
2302 (license license:bsd-3)))
2304 (define-public wakelan
2311 "ftp://ftp.gwdg.de/pub/linux/metalab/system/network/misc/wakelan-"
2315 "0vydqpf44146ir6k87gmqaq6xy66xhc1gkr3nsd7jj3nhy7ypx9x"))))
2316 (build-system gnu-build-system)
2319 (modify-phases %standard-phases
2321 (lambda* (#:key outputs #:allow-other-keys)
2322 (let ((out (assoc-ref outputs "out")))
2323 (mkdir-p (string-append out "/bin"))
2324 (mkdir-p (string-append out "/share/man/man1"))
2326 ;; It's an old configure script that doesn't understand
2327 ;; the extra options we pass.
2328 (setenv "CONFIG_SHELL" (which "bash"))
2329 (invoke "./configure"
2330 (string-append "--prefix=" out)
2331 (string-append "--mandir=" out
2334 (home-page "https://www.kernel.org") ; really, no home page
2335 (synopsis "Send a wake-on-LAN packet")
2337 "WakeLan broadcasts a properly formatted UDP packet across the local area
2338 network, which causes enabled computers to power on.")
2339 (license license:gpl2+)))
2341 (define-public dmidecode
2348 (uri (string-append "mirror://savannah/dmidecode/dmidecode-"
2351 (base32 "04i2ahvqinkrnzfsbswplv9wff36xf9b3snvriwrjz26v18sijs3"))))
2352 (build-system gnu-build-system)
2354 (list #:tests? #f ; no 'check' target
2356 #~(list (string-append "CC=" #$(cc-for-target))
2357 (string-append "prefix=" #$output))
2359 #~(modify-phases %standard-phases
2360 (delete 'configure)))) ; no configure script
2361 (home-page "https://www.nongnu.org/dmidecode/")
2362 (synopsis "Read hardware information from the BIOS")
2364 "Dmidecode reports information about your system's hardware as described
2365 in your system BIOS according to the SMBIOS/DMI standard. This typically
2366 includes system manufacturer, model name, serial number, BIOS version, asset
2367 tag as well as a lot of other details of varying level of interest and
2368 reliability depending on the manufacturer. This will often include usage
2369 status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory
2370 module slots, and the list of I/O ports (e.g. serial, parallel, USB).")
2371 (license license:gpl2+)))
2373 (define-public acpica
2376 (version "20220331")
2380 "https://acpica.org/sites/acpica/files/acpica-unix2-"
2384 "0yjcl00nnnlw01sz6a1i5d3v75gr17mkbxkxfx2v344al33abk8w"))))
2385 (build-system gnu-build-system)
2386 (native-inputs (list flex bison))
2388 `(#:make-flags (list (string-append "PREFIX=" %output)
2389 (string-append "CC=" ,(cc-for-target))
2391 "OPT_CFLAGS=-Wall -fno-strict-aliasing")
2392 #:tests? #f ; no 'check' target
2393 #:phases (modify-phases %standard-phases (delete 'configure))))
2394 (home-page "https://acpica.org/")
2395 (synopsis "Tools for the development and debugging of ACPI tables")
2397 "The @acronym{ACPICA, ACPI Component Architecture} project provides an
2398 OS-independent reference implementation of the @acronym{ACPI, Advanced
2399 Configuration and Power Interface} specification. ACPICA code contains those
2400 portions of ACPI meant to be directly integrated into the host OS as a
2401 kernel-resident subsystem, and a small set of tools to assist in developing and
2402 debugging ACPI tables.
2404 This package contains only the user-space tools needed for ACPI table
2405 development, not the kernel implementation of ACPI.")
2406 (license license:gpl2))) ; dual GPLv2/ACPICA Licence
2408 (define-public s-tui
2415 (uri (pypi-uri "s-tui" version))
2417 (base32 "1l2ik5iwmb8vxa2aqdy62zfy3zfzbpq5a0pgpka2vvlw9ivpqy5p"))))
2418 (build-system python-build-system)
2420 (list python-psutil python-urwid))
2421 (home-page "https://github.com/amanusk/s-tui")
2422 (synopsis "Interactive terminal stress test and monitoring tool")
2424 "The Stress Terminal UI displays graphs of the CPU frequency,
2425 utilization, temperature and power.")
2426 (license license:gpl2+)))
2428 (define-public stress
2434 (uri (string-append "mirror://debian/pool/main/s/stress/stress_"
2435 version ".orig.tar.gz"))
2438 "09shpd85g8dvpiw0mnwykss676g0s7lbi8ab37xjinb5lfff960p"))))
2439 (build-system gnu-build-system)
2441 (list autoconf automake))
2442 (home-page "https://packages.debian.org/sid/stress")
2443 (synopsis "Impose load on and stress test a computer system")
2445 "Stress is a tool that imposes a configurable amount of CPU, memory, I/O,
2446 or disk stress on a POSIX-compliant operating system and reports any errors it
2449 Stress is not a benchmark. It is a tool used by system administrators to
2450 evaluate how well their systems will scale, by kernel programmers to evaluate
2451 perceived performance characteristics, and by systems programmers to expose
2452 the classes of bugs which only or more frequently manifest themselves when the
2453 system is under heavy load.")
2454 (license license:gpl2+)))
2456 (define-public stress-ng
2464 (url "https://github.com/ColinIanKing/stress-ng")
2465 (commit (string-append "V" version))))
2466 (file-name (git-file-name name version))
2468 (base32 "1z9vjn2131iv3pwrh04z6r5ygi1qgad5bi3jhghcvc3v1b4k5ran"))))
2469 (build-system gnu-build-system)
2472 #~(list (string-append "CC=" #$(cc-for-target))
2473 (string-append "BINDIR=" #$output "/bin")
2474 ;; XXX Really: MAN1DIR, or man pages won't be found.
2475 (string-append "MANDIR=" #$output "/share/man/man1")
2476 (string-append "JOBDIR=" #$output
2477 "/share/stress-ng/example-jobs")
2478 (string-append "BASHDIR=" #$output
2479 "/share/bash-completion/completions"))
2480 #:test-target "lite-test"
2482 #~(modify-phases %standard-phases
2483 (delete 'configure) ; no configure script
2484 (add-after 'check 'check-a-little-harder
2485 ;; XXX Guix supports only one #:test-target. Run more tests.
2486 (lambda* (#:key tests? #:allow-other-keys #:rest args)
2488 (substitute* "debian/tests/fast-test-all"
2489 (("EXCLUDE=\"" exclude=)
2490 (string-append exclude=
2491 ;; Fails if host kernel denies ptracing.
2493 (apply (assoc-ref %standard-phases 'check)
2494 `(,@args #:test-target "fast-test-all"))))))))
2503 (home-page "https://github.com/ColinIanKing/stress-ng")
2504 (synopsis "Load and stress-test a computer system in various ways")
2506 "stress-ng stress-tests a computer system by exercising both physical
2507 subsystems as operating system kernel interfaces. It can stress the CPU, cache,
2508 disk, memory, socket and pipe I/O, scheduling, and much more, in various
2509 selectable ways. This can trip hardware issues such as thermal overruns as well
2510 as operating system bugs that occur only when a system is being thrashed hard.
2512 You can also measure test throughput rates, which can be useful to observe
2513 performance changes across different operating system releases or types of
2514 hardware. However, stress-ng is not a benchmark. Use it with caution: some of
2515 the tests can make poorly designed hardware run dangerously hot or make the
2516 whole system lock up.
2518 Compared to its inspiration, @command{stress}, @command{stress-ng} offers many
2519 additional options such as the number of bogo operations to run, execution
2520 metrics, verification of memory and computational operations, and considerably
2521 more stress mechanisms.")
2522 (license license:gpl2+)))
2524 (define-public detox
2531 (url "https://github.com/dharple/detox")
2532 (commit (string-append "v" version))))
2533 (file-name (git-file-name name version))
2536 "116bgpbkh3c96h6vq0880rmnpb5kbnnlvvkpsrcib6928bj8lfvi"))))
2537 (build-system gnu-build-system)
2539 (list autoconf automake flex))
2541 `(#:phases (modify-phases %standard-phases
2542 (add-after 'unpack 'delete-configure
2543 ;; The "configure" script is present, but otherwise the
2544 ;; project is not bootstrapped: missing install-sh and
2545 ;; Makefile.in, so delete it so the bootstrap phase will
2547 (lambda _ (delete-file "configure") #t))
2550 (invoke "./tests/test.sh" "src/detox"))))))
2551 (home-page "https://github.com/dharple/detox")
2552 (synopsis "Clean up file names")
2554 "Detox is a program that renames files to make them easier to work with
2555 under Unix and related operating systems. Spaces and various other unsafe
2556 characters (such as \"$\") get replaced with \"_\". ISO 8859-1 (Latin-1)
2557 characters can be replaced as well, as can UTF-8 characters.")
2558 (license license:bsd-3)))
2567 "https://mama.indstate.edu/users/ice/tree/src/tree-"
2570 (base32 "0x7s9wxvf83fw4qah16kapswl2277pybw3d514zrlms9g0cr5smh"))))
2571 (build-system gnu-build-system)
2575 #~(modify-phases %standard-phases
2576 (delete 'configure) ; No configure script.
2577 (add-after 'unpack 'fix-manpage-version
2579 (substitute* "doc/tree.1"
2580 (("Tree 2\\.0\\.0") (string-append "Tree " #$version))))))
2581 #:tests? #f ; No check target.
2583 #~(list (string-append "PREFIX=" #$output)
2584 (string-append "CC=" #$(cc-for-target)))))
2585 (synopsis "Recursively list the contents of a directory")
2587 "Tree is a recursive directory listing command that produces a depth
2588 indented listing of files, which is colorized ala dircolors if the LS_COLORS
2589 environment variable is set and output is to tty.")
2590 (home-page "https://mama.indstate.edu/users/ice/tree/")
2591 (license license:gpl2+)))
2601 (url "https://git.vuxu.org/lr/")
2602 (commit (string-append "v" version))))
2603 (file-name (git-file-name name version))
2605 (base32 "1wv2acm4r5y5gg6f64v2hiwpg1f3lnr4fy1a9zssw77fmdc7ys3j"))))
2606 (build-system gnu-build-system)
2609 #:make-flags (list (string-append "CC=" ,(cc-for-target))
2610 (string-append "PREFIX=" %output))
2611 #:phases (modify-phases %standard-phases
2612 (delete 'configure))))
2613 (synopsis "Tool to generate customized file listings")
2615 "lr is a tool for generating file listings, which includes the best
2616 features of ls(1), find(1), stat(1) and du(1).")
2617 (home-page "https://git.vuxu.org/lr/about")
2618 (license license:expat)))
2620 (define-public direvent
2626 (uri (string-append "mirror://gnu/direvent/direvent-"
2630 "15y4jk5vlcd003bvf42c6z9zd4gz4pwqpwaapqmyk7x4gnksh1cl"))))
2631 (build-system gnu-build-system)
2634 #~(modify-phases %standard-phases
2635 (add-before 'build 'substitute-file-names
2636 (lambda* (#:key inputs #:allow-other-keys)
2637 ;; Use the right shell when executing the watcher and
2638 ;; user-provided shell commands.
2639 (let ((bash (assoc-ref inputs "bash")))
2640 (substitute* '("src/direvent.c" "src/progman.c")
2642 (string-append "\"" bash "/bin/sh\""))))
2644 ;; Adjust the test suite similarly.
2645 (substitute* "tests/testsuite"
2646 (("(SHELL=|#![[:space:]]*)/bin/sh" _ prefix)
2647 (string-append prefix (which "sh")))
2649 (which "kill"))))))))
2650 (home-page "https://www.gnu.org.ua/software/direvent/")
2651 (synopsis "Daemon to monitor directories for events such as file removal")
2653 "A daemon that monitors directories for events, such as creating,
2654 deleting or modifying files. It can monitor different sets of directories for
2655 different events. When an event is detected, direvent calls a specified
2656 external program with information about the event, such as the location
2657 within the file system where it occurred. Thus, \"direvent\" provides an
2658 easy way to react immediately if given files undergo changes, for example, to
2659 track changes in important system configuration files.")
2660 (license license:gpl3+)))
2662 (define-public libcap-ng
2669 "https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-"
2673 "0ba9dfga7chwf6lf7a03x1a30fgdy2pb4r7pnn1jzfr2is2gdmmy"))))
2674 (build-system gnu-build-system)
2677 (list "--disable-static"
2678 "--without-python")))
2679 (home-page "https://people.redhat.com/sgrubb/libcap-ng/")
2680 (synopsis "Library for more easily working with POSIX capabilities")
2682 "The libcap-ng library is intended to make programming with POSIX
2683 capabilities easier than the traditional libcap library. It includes
2684 utilities that can analyse all currently running applications and print out
2685 any capabilities and whether or not it has an open ended bounding set. The
2686 included utilities are designed to let admins and developers spot apps from
2687 various ways that may be running with too much privilege.")
2688 ;; The library is lgpl2.1+, but also ships some utils which are gpl2+.
2689 (license (list license:lgpl2.1+ license:gpl2+))))
2691 (define-public smartmontools
2693 (name "smartmontools")
2698 "mirror://sourceforge/smartmontools/smartmontools/"
2699 version "/smartmontools-" version ".tar.gz"))
2702 "1mlc25sd5rgj5xmzcllci47inmfdw7cp185fday6hc9rwqkqmnaw"))))
2703 (build-system gnu-build-system)
2706 #~(list "BUILD_INFO=\"(Guix)\"")))
2707 (inputs (list libcap-ng))
2708 (home-page "https://www.smartmontools.org/")
2709 (synopsis "S.M.A.R.T. harddisk control and monitoring tools")
2711 "The smartmontools package contains utility programs to control and
2712 monitor storage systems using the Self-Monitoring, Analysis and Reporting
2713 Technology System (@dfn{S.M.A.R.T.}) built into most modern ATA and SCSI hard
2714 disks. In many cases, these utilities will provide advanced warning of disk
2715 degradation and failure.")
2716 (license license:gpl2+)))
2718 (define-public fdupes
2725 (uri (string-append "https://github.com/adrianlopezroche/fdupes/"
2726 "releases/download/v" version "/"
2727 "fdupes-" version ".tar.gz"))
2729 (base32 "1g9p50xhi2sp0hqxml4w2k0kq9jv988q2yxm347z5349dlxvap6d"))))
2730 (build-system gnu-build-system)
2732 (list ncurses pcre2))
2733 (home-page "https://github.com/adrianlopezroche/fdupes")
2734 (synopsis "Identify duplicate files")
2736 "fdupes is a program for identifying duplicate files residing within
2737 specified directories.")
2738 (license license:expat)))
2740 (define-public ansible-core
2742 (name "ansible-core")
2747 (uri (pypi-uri "ansible-core" version))
2749 (base32 "0fih7nxszni8imi5sywsifd976v77ydhip43pzg7dd65qy1h5mck"))))
2750 (build-system python-build-system)
2752 `(#:modules ((guix build python-build-system)
2756 (modify-phases %standard-phases
2757 ;; Several ansible commands (ansible-config, ansible-console, etc.)
2758 ;; are just symlinks to a single ansible executable. The ansible
2759 ;; executable behaves differently based on the value of sys.argv[0].
2760 ;; This does not work well with our wrap phase, and therefore the
2761 ;; following two phases are required as a workaround.
2762 (add-after 'unpack 'hide-wrapping
2764 ;; Overwrite sys.argv[0] to hide the wrapper script from it.
2765 (substitute* "bin/ansible"
2766 (("import traceback" all)
2767 (string-append all "
2769 sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
2771 (add-after 'install 'replace-symlinks
2772 (lambda* (#:key outputs #:allow-other-keys)
2773 ;; Replace symlinks with duplicate copies of the ansible
2774 ;; executable so that sys.argv[0] has the correct value.
2775 (define bin (string-append (assoc-ref outputs "out") "/bin"))
2776 (with-directory-excursion bin
2778 (lambda (ansible-symlink)
2779 (delete-file ansible-symlink)
2780 (copy-file "ansible" ansible-symlink))
2781 (scandir "." (lambda (x)
2782 (and (eq? 'symlink (stat:type (lstat x)))
2783 (string-prefix? "ansible-" x)
2784 (string=? "ansible" (readlink x)))))))))
2785 (add-after 'unpack 'preserve-pythonpath
2787 (substitute* "test/lib/ansible_test/_internal/ansible_util.py"
2788 (("PYTHONPATH=get_ansible_python_path\\(args\\)" all)
2789 (string-append all "+ ':' + os.environ['GUIX_PYTHONPATH']")))))
2790 (add-after 'unpack 'patch-paths
2791 (lambda* (#:key inputs outputs #:allow-other-keys)
2792 (substitute* "lib/ansible/module_utils/compat/selinux.py"
2793 (("libselinux.so.1" name)
2794 (string-append (assoc-ref inputs "libselinux")
2796 (substitute* "test/units/modules/test_async_wrapper.py"
2797 (("/usr/bin/python")
2798 (which "python")))))
2800 ;; The environment for the test suite can be tricky to get right.
2801 ;; The environment used for Ansible's CI defined in the following
2802 ;; Dockerfile can be used as a reference:
2803 ;; https://raw.githubusercontent.com/ansible/
2804 ;; default-test-container/master/Dockerfile.
2805 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
2807 ;; Otherwise Ansible fails to create its config directory.
2808 (setenv "HOME" "/tmp")
2809 (setenv "PATH" (string-append (getenv "PATH") ":"
2810 (assoc-ref outputs "out") "/bin"))
2811 (add-installed-pythonpath inputs outputs)
2812 ;; This test module messes up with sys.path and causes many
2814 (delete-file "test/units/_vendor/test_vendor.py")
2815 ;; The test fails when run in the container, for reasons
2817 (delete-file "test/units/utils/test_display.py")
2818 ;; This test fail for reasons unknown.
2819 (delete-file "test/units/cli/test_adhoc.py")
2820 ;; The test suite needs to be run with 'ansible-test', which
2821 ;; does some extra environment setup. Taken from
2822 ;; https://raw.githubusercontent.com/ansible/ansible/\
2823 ;; devel/test/utils/shippable/shippable.sh.
2824 (invoke "ansible-test" "units" "-v")))))))
2831 python-pytest-forked
2835 (inputs ;optional dependencies captured in wrap scripts
2836 (list libselinux python-paramiko python-passlib python-pexpect
2838 (propagated-inputs ;core dependencies listed in egg-info/requires.txt
2839 (list python-cryptography
2842 python-packaging ;for version number parsing
2843 python-resolvelib-0.5))
2844 (home-page "https://www.ansible.com/")
2845 (synopsis "Radically simple IT automation")
2846 (description "Ansible aims to be a radically simple IT automation system.
2847 It handles configuration management, application deployment, cloud
2848 provisioning, ad-hoc task execution, network automation, and multi-node
2849 orchestration. Ansible facilitates complex changes like zero-downtime rolling
2850 updates with load balancers. This package is the core of Ansible, which
2851 provides the following commands:
2854 @item ansible-config
2855 @item ansible-connection
2856 @item ansible-console
2858 @item ansible-galaxy
2859 @item ansible-inventory
2860 @item ansible-playbook
2865 (license license:gpl3+)))
2867 (define-public ansible
2874 (uri (pypi-uri "ansible" version))
2876 (base32 "0aab9id6dqfw2111r731c7y1p77dpzczynmgl4d989p3a7n54z0b"))))
2877 (build-system python-build-system)
2879 (list ansible-core))
2880 ;; The Ansible collections are found by ansible-core via the Python search
2881 ;; path; the following search path ensures that they are found even when
2882 ;; Python is not present in the profile.
2883 (native-search-paths
2884 ;; XXX: Attempting to use (package-native-search-paths python)
2885 ;; here would cause an error about python being an unbound
2886 ;; variable in the tests/cpan.scm test.
2887 (list (search-path-specification
2888 (variable "GUIX_PYTHONPATH")
2889 (files (list "lib/python3.9/site-packages")))))
2890 (home-page "https://www.ansible.com/")
2891 (synopsis "Radically simple IT automation")
2892 (description "Ansible aims to be a radically simple IT automation system.
2893 It handles configuration management, application deployment, cloud
2894 provisioning, ad-hoc task execution, network automation, and multi-node
2895 orchestration. Ansible facilitates complex changes like zero-downtime rolling
2896 updates with load balancers. This package provides a curated set of
2897 community-maintained Ansible collections, which contain playbooks, roles,
2898 modules and plugins that extend Ansible.")
2899 (license license:gpl3+)))
2901 (define-public debops
2909 (url "https://github.com/debops/debops")
2910 (commit (string-append "v" version))))
2911 (file-name (git-file-name name version))
2913 (base32 "052b2dykdn35pdpn9s4prawl6nl6yzih8nyf54hpvhpisvjrm1v5"))
2915 (search-patches "debops-constants-for-external-program-names.patch"
2916 "debops-debops-defaults-fall-back-to-less.patch"))))
2917 (build-system python-build-system)
2924 util-linux ;; for umount
2929 (list python-future python-distro))
2933 (modify-phases %standard-phases
2934 (add-after 'unpack 'nuke-debops-update
2936 (chmod "bin/debops-update" #o755) ; FIXME work-around git-fetch issue
2937 (with-output-to-file "bin/debops-update"
2939 (format #t "#!/bin/sh
2940 echo 'debops is installed via guix. guix-update is useless in this case.
2941 Please use `guix package -u debops` instead.'")))
2943 ;; patch shebangs only in actuall scripts, not in files included in
2944 ;; roles (which are to be delivered to the targte systems)
2945 (delete `patch-generated-file-shebangs)
2946 (replace 'patch-source-shebangs
2948 (for-each patch-shebang
2951 ;; Filter out symlinks.
2952 (eq? 'regular (stat:type stat)))
2954 (add-after 'unpack 'fix-paths
2956 (define (substitute-program-names file)
2957 ;; e.g. ANSIBLE_PLAYBOOK = '/gnu/store/…/bin/ansible-playbook'
2960 (let ((varname (string-upcase
2962 (lambda (c) (if (char=? c #\-) #\_ c))
2965 (((string-append "^(" varname " = )'.*'") line prefix)
2966 (string-append prefix "'" (which name) "'")))))
2967 '("ansible-playbook" "encfs" "find" "fusermount"
2968 "umount" "gpg" "ansible" "which")))
2969 (for-each substitute-program-names
2971 "bin/debops-padlock"
2973 "debops/__init__.py"
2974 "debops/cmds/__init__.py"))
2976 (home-page "https://www.debops.org/")
2977 (synopsis "Collection of general-purpose Ansible roles")
2978 (description "The Ansible roles provided by that can be used to manage
2979 Debian or Ubuntu hosts. In addition, a default set of Ansible playbooks can
2980 be used to apply the provided roles in a controlled way, using Ansible
2983 The roles are written with a high customization in mind, which can be done
2984 using Ansible inventory. This way the role and playbook code can be shared
2985 between multiple environments, with different configuration in to each one.
2987 Services can be managed on a single host, or spread between multiple hosts.
2988 DebOps provides support for different SQL and NoSQL databases, web servers,
2989 programming languages and specialized applications useful in a data center
2990 environment or in a cluster. The project can also be used to deploy
2991 virtualization environments using KVM/libvirt, Docker or LXC technologies to
2992 manage virtual machines and/or containers.")
2993 (license license:gpl3+)))
2995 (define-public emacs-ansible-doc
2996 (let ((commit "86083a7bb2ed0468ca64e52076b06441a2f8e9e0"))
2998 (name "emacs-ansible-doc")
2999 (version (git-version "0.4" "1" commit))
3004 (url "https://github.com/lunaryorn/ansible-doc.el")
3006 (file-name (git-file-name name version))
3009 "0lap404ch74w99n3xip176jr42b38xhyzkfnkyqg0g3wk2cd3aq8"))))
3010 (build-system emacs-build-system)
3011 ;; Unmaintained by upstream.
3012 (home-page "https://github.com/lunaryorn/ansible-doc.el")
3013 (synopsis "Ansible documentation for Emacs")
3015 "This package provides an Ansible documentation for GNU Emacs.
3017 @code{ansible-doc} allows you to view the documentation of an Ansible
3018 module and @code{ansible-doc-mode} minor mode adds documentation
3019 lookup to YAML Mode. You could enable the mode with @code{(add-hook
3020 'yaml-mode-hook #'ansible-doc-mode)}.")
3021 (license license:gpl3+))))
3023 (define-public cpulimit
3031 (url "https://github.com/opsengine/cpulimit")
3032 (commit (string-append "v" version))))
3033 (file-name (git-file-name name version))
3035 (base32 "1dz045yhcsw1rdamzpz4bk8mw888in7fyqk1q1b3m1yk4pd1ahkh"))
3036 (patches (search-patches "cpulimit-with-glib-2.32.patch"))))
3037 (build-system gnu-build-system)
3039 `(#:phases (modify-phases %standard-phases
3042 (lambda* (#:key make-flags #:allow-other-keys)
3043 (apply invoke "make" "-Csrc" make-flags)))
3045 (lambda* (#:key tests? make-flags #:allow-other-keys)
3047 (apply invoke "make" "-Ctests" make-flags))
3050 (lambda* (#:key outputs #:allow-other-keys)
3051 (let* ((out (assoc-ref outputs "out"))
3052 (bin (string-append out "/bin")))
3053 (install-file "src/cpulimit" bin))
3055 #:make-flags (list (string-append "CC=" ,(cc-for-target)))))
3056 (home-page "https://github.com/opsengine/cpulimit")
3057 (synopsis "Limit CPU usage")
3059 "Cpulimit limits the CPU usage of a process. It does not change the nice
3060 value or other scheduling priority settings, but the real CPU usage, and is
3061 able to adapt itself dynamically to the overall system load. Children
3062 processes and threads of the specified process may optionally share the same
3064 (license license:gpl2+)))
3066 (define-public autojump
3074 (url "https://github.com/wting/autojump")
3075 (commit (string-append "release-v" version))))
3076 (file-name (git-file-name name version))
3078 (base32 "1rgpsh70manr2dydna9da4x7p8ahii7dgdgwir5fka340n1wrcws"))))
3079 (build-system gnu-build-system)
3080 (native-inputs ; for tests
3081 (list python-mock python-pytest))
3083 `(("python" ,python-wrapper)))
3086 (modify-phases %standard-phases
3087 (add-after 'unpack 'make-git-checkout-writable
3088 ;; ‘install.py’ modifies files before installing them.
3090 (for-each make-file-writable (find-files "."))
3096 (invoke "python" "tests/unit/autojump_utils_test.py")))
3098 (lambda* (#:key outputs #:allow-other-keys)
3099 (setenv "SHELL" (which "bash"))
3100 (invoke "python" "install.py"
3101 (string-append "--destdir="
3102 (assoc-ref outputs "out"))))))))
3103 (home-page "https://github.com/wting/autojump")
3104 (synopsis "Shell extension for file system navigation")
3106 "Autojump provides a faster way to navigate your file system, with a \"cd
3107 command that learns\". It works by maintaining a database of the directories
3108 you use the most from the command line and allows you to \"jump\" to
3109 frequently used directories by typing only a small pattern.")
3110 (license license:gpl3+)))
3119 (url "https://github.com/clvv/fasd")
3121 (file-name (git-file-name name version))
3124 "1awi71jdv3mhjrmar2d4z1i90kn7apd7aq1w31sh6w4yibz9kiyj"))))
3125 (build-system gnu-build-system)
3127 `(#:phases (modify-phases %standard-phases
3128 (delete 'configure)) ;no configuration
3129 #:tests? #f ;no tests
3130 #:make-flags (list (string-append "PREFIX=" %output))))
3131 (home-page "https://github.com/clvv/fasd")
3132 (synopsis "Quick access to files and directories for shells")
3134 "Fasd (pronounced similar to \"fast\") is a command-line productivity
3135 booster. Fasd offers quick access to files and directories for POSIX shells.
3136 It is inspired by tools like autojump, z, and v. Fasd keeps track of files
3137 and directories you have accessed so that you can quickly reference them in
3139 (license license:x11)))
3141 (define-public iftop
3147 (uri (string-append "http://www.ex-parrot.com/~pdw/iftop/download"
3148 "/iftop-" version ".tar.gz"))
3151 "15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp"))))
3152 (build-system gnu-build-system)
3154 (list libpcap ncurses))
3156 ;; Fix build failure with GCC 10
3157 '(#:configure-flags '("CFLAGS=-O2 -g -fcommon")))
3158 (synopsis "Monitor network usage")
3159 (description "Iftop does for network usage what @command{top} does
3160 for CPU usage. It listens to network traffic on a named interface and
3161 displays a table of current bandwidth usage by pairs of hosts.")
3162 (home-page "http://www.ex-parrot.com/~pdw/iftop/")
3163 (license license:gpl2+)))
3165 (define-public munge
3171 (uri (string-append "https://github.com/dun/munge/releases/"
3172 "download/munge-" version "/munge-"
3176 "0h06sghb4rqvv1ywyd6mzsmbcgh712v6ygrff0gzm440y4ca41k6"))
3177 (modules '((guix build utils)))
3180 ;; Don't insist on write access to /var.
3181 (substitute* "src/etc/Makefile.in"
3182 (("\\$\\(INSTALL\\)(.*)localstatedir" _ middle)
3183 (string-append "-$(INSTALL)" middle "localstatedir"))
3184 (("\\$\\(MKDIR_P\\) .*(local|run)statedir.*")
3188 (list openssl libgcrypt))
3189 (build-system gnu-build-system)
3192 (list "--localstatedir=/var"
3193 (string-append "--with-pkgconfigdir="
3194 (assoc-ref %outputs "out") "/lib/pkgconfig")
3195 (string-append "--with-libgcrypt-prefix="
3196 (assoc-ref %build-inputs "libgcrypt"))
3197 ,@(if (%current-target-system)
3198 ;; Assume yes on pipes when cross compiling.
3199 `("ac_cv_file__dev_spx=yes"
3200 "x_ac_cv_check_fifo_recvfd=yes")
3203 (modify-phases %standard-phases
3204 ;; XXX Many test series fail. Some might be fixable, others do no-no
3205 ;; things like invoking ‘sudo’.
3206 (add-after 'unpack 'skip-failing-tests
3208 (for-each (lambda (test)
3209 (substitute* "t/Makefile.in"
3210 (((string-append test "\\.t ")) "")))
3211 (list "0100-munged-lock"
3213 "0011-munged-cmdline"
3214 "0012-munge-cmdline"
3215 "0013-unmunge-cmdline"
3216 "0101-munged-security-socket"
3217 "0102-munged-security-keyfile"
3218 "0103-munged-security-logfile"
3219 "0110-munged-origin-addr"))
3221 (home-page "https://dun.github.io/munge/")
3222 (synopsis "Cluster computing authentication service")
3224 "Munge is an authentication service for creating and validating
3225 credentials. It allows a process to authenticate the UID and GID of another
3226 local or remote process within a group of hosts having common users and
3227 groups. These hosts form a security realm that is defined by a shared
3228 cryptographic key. Clients within this security realm can create and validate
3229 credentials without the use of root privileges, reserved ports, or
3230 platform-specific methods.")
3231 (license license:gpl3+)))
3233 (define-public audit
3236 (home-page "https://people.redhat.com/sgrubb/audit/")
3240 (uri (string-append home-page "audit-" version ".tar.gz"))
3243 "0y5w8pl91xapi49ih1pw7h48lac201cj7fm89hkklmzi9m2715gx"))))
3244 (build-system gnu-build-system)
3246 `(#:configure-flags (list "--with-python=no"
3247 "--disable-static")))
3249 (list openldap gnutls cyrus-sasl))
3250 (synopsis "User-space component to the Linux auditing system")
3252 "This is the user-space component to the Linux auditing system, which
3253 allows logging of system calls made by user-land processes. @command{auditd} is
3254 responsible for writing audit records to the disk. Viewing the logs is done
3255 with the @code{ausearch} or @code{aureport} utilities. Configuring the audit
3256 rules is done with the @code{auditctl} utility.")
3257 (license license:gpl2+)))
3265 (uri (string-append "https://nmap.org/dist/nmap-" version
3269 "18bifn67kz2wxkbnfwcrin2xrhc6qf4p2bvxfqb2a2vbi8pryix5"))
3270 (modules '((guix build utils)))
3273 (for-each delete-file-recursively
3274 ;; Remove bundled lua, pcap, and pcre libraries.
3275 ;; FIXME: Remove bundled liblinear once packaged.
3279 ;; Remove pre-compiled binares.
3281 (build-system gnu-build-system)
3283 `(("openssl" ,openssl)
3284 ("libpcap" ,libpcap)
3287 ("zlib" ,zlib) ;for NSE compression support
3290 ("python" ,python-2)))
3292 ;; TODO Add zenmap output.
3293 (outputs '("out" "ndiff"))
3295 `(#:configure-flags '("--without-zenmap")
3297 (modify-phases %standard-phases
3298 (add-after 'configure 'patch-Makefile
3300 (substitute* "Makefile"
3301 ;; Do not attempt to build lua.
3302 (("build-dnet build-lua") "build-dnet"))))
3304 (lambda* (#:key outputs #:allow-other-keys)
3305 (define (make out . args)
3306 (apply invoke "make"
3307 (string-append "prefix=" out)
3309 (define (python-path dir)
3310 (string-append dir "/lib/python"
3311 ,(version-major+minor
3312 (package-version python))
3314 (let ((out (assoc-ref outputs "out"))
3315 (ndiff (assoc-ref outputs "ndiff")))
3316 (for-each mkdir-p (list out ndiff))
3322 (make ndiff "install-ndiff")
3323 (wrap-program (string-append ndiff "/bin/ndiff")
3324 `("GUIX_PYTHONPATH" prefix
3325 (,(python-path ndiff)))))))
3326 ;; These are the tests that do not require network access.
3328 (lambda* (#:key tests? #:allow-other-keys)
3334 ;; Nmap can't cope with out-of-source building.
3335 #:out-of-source? #f))
3336 (home-page "https://nmap.org/")
3337 (synopsis "Network discovery and security auditing tool")
3339 "Nmap (\"Network Mapper\") is a network discovery and security auditing
3340 tool. It is also useful for tasks such as network inventory, managing service
3341 upgrade schedules, and monitoring host or service uptime. It also provides an
3342 advanced netcat implementation (ncat), a utility for comparing scan
3343 results (ndiff), and a packet generation and response analysis tool (nping).")
3344 ;; See <https://github.com/nmap/nmap/issues/2199#issuecomment-894812634>.
3345 ;; This package uses nmap's bundled versions of libdnet and liblinear, which
3346 ;; both use a 3-clause BSD license.
3347 (license (list license:nmap license:bsd-3))))
3349 (define-public dstat
3357 (url "https://github.com/dstat-real/dstat")
3358 (commit (string-append "v" version))))
3359 (file-name (git-file-name "dstat" version))
3361 (base32 "1qnmkhqmjd1m3if05jj29dvr5hn6kayq9bkkkh881w472c0zhp8v"))
3362 (patches (search-patches "dstat-fix-crash-when-specifying-delay.patch"
3363 "dstat-skip-devices-without-io.patch"))))
3364 (build-system gnu-build-system)
3366 `(#:tests? #f ; no make check
3368 (list (string-append "prefix=" (assoc-ref %outputs "out")))
3370 (modify-phases %standard-phases
3371 (add-after 'unpack 'fix-python3-DeprecationWarning
3373 (substitute* "dstat"
3374 (("collections") "collections.abc"))
3376 (delete 'configure) ; no configure script
3377 (add-after 'install 'wrap
3378 (lambda* (#:key outputs #:allow-other-keys)
3379 (let ((out (assoc-ref outputs "out")))
3380 (wrap-program (string-append out "/bin/dstat")
3381 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))
3384 `(("python" ,python-wrapper)
3385 ("python-six" ,python-six)))
3386 (synopsis "Versatile resource statistics tool")
3387 (description "Dstat is a versatile replacement for @command{vmstat},
3388 @command{iostat}, @command{netstat}, and @command{ifstat}. Dstat overcomes
3389 some of their limitations and adds some extra features, more counters and
3390 flexibility. Dstat is handy for monitoring systems during performance tuning
3391 tests, benchmarks or troubleshooting.
3393 Dstat allows you to view all of your system resources in real-time, you can,
3394 e.g., compare disk utilization in combination with interrupts from your IDE
3395 controller, or compare the network bandwidth numbers directly with the disk
3396 throughput (in the same interval).")
3397 (home-page "http://dag.wiee.rs/home-made/dstat/")
3398 (license license:gpl2+)))
3400 (define-public thefuck
3408 (url "https://github.com/nvbn/thefuck")
3410 (file-name (git-file-name name version))
3412 (base32 "18ipa1bm6q1n5drbi8i65726hhqhl1g41390lfqrc11hkbvv443d"))
3413 (patches (search-patches "thefuck-test-environ.patch"))))
3414 (build-system python-build-system)
3417 (modify-phases %standard-phases
3419 (add-after 'install 'check
3420 (lambda* (#:key inputs outputs #:allow-other-keys)
3421 ;; Tests look for installed package
3422 (add-installed-pythonpath inputs outputs)
3423 ;; Some tests need write access to $HOME.
3424 (setenv "HOME" "/tmp")
3425 ;; Even with that, this function tries to mkdir /.config.
3426 (substitute* "tests/test_utils.py"
3427 (("settings\\.init\\(\\)") ""))
3428 (invoke "py.test" "-v"))))))
3430 (list python-colorama python-decorator python-psutil python-pyte
3433 (list go python-mock python-pytest python-pytest-mock))
3434 (home-page "https://github.com/nvbn/thefuck")
3435 (synopsis "Correct mistyped console command")
3437 "The Fuck tries to match a rule for a previous, mistyped command, creates
3438 a new command using the matched rule, and runs it.")
3439 (license license:x11)))
3448 (uri (string-append "mirror://sourceforge/diskinfo-di/di-" version ".tar.gz"))
3450 (base32 "1fv12j9b9sw6p38lcbzcw87zl5qp1aa7a4a4jn3449zz9af15ckr"))))
3451 (build-system gnu-build-system)
3453 `(#:tests? #f ; obscure test failures
3455 (modify-phases %standard-phases
3456 (delete 'configure) ; no configure script
3457 (add-before 'build 'setup-environment
3458 (lambda* (#:key outputs #:allow-other-keys)
3459 (setenv "CC" ,(cc-for-target))
3460 (setenv "prefix" (assoc-ref outputs "out")))))
3461 #:make-flags (list "--environment-overrides")))
3462 (home-page "https://gentoo.com/di/")
3463 (synopsis "Advanced df like disk information utility")
3465 "@code{di} is a disk information utility, displaying everything that your
3466 @code{df} command does and more. It features the ability to display your disk
3467 usage in whatever format you prefer. It is designed to be highly portable and
3468 produce uniform output across heterogeneous networks.")
3469 (license license:zlib)))
3471 (define-public cbatticon
3479 (url "https://github.com/valr/cbatticon")
3482 (base32 "0ivm2dzhsa9ir25ry418r2qg2llby9j7a6m3arbvq5c3kaj8m9jr"))
3483 (file-name (git-file-name name version))))
3484 (build-system gnu-build-system)
3486 `(#:tests? #f ; no tests
3488 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
3489 ,(string-append "CC=" (cc-for-target)))
3491 (modify-phases %standard-phases
3492 (delete 'configure)))) ; no configure script
3495 ("gettext" ,gettext-minimal)
3496 ("libnotify" ,libnotify)))
3499 (synopsis "Lightweight battery icon for the system tray")
3500 (description "cbatticon is a lightweight battery icon that displays
3501 the status of your battery in the system tray.")
3502 (home-page "https://github.com/valr/cbatticon")
3503 (license license:gpl2+)))
3505 (define-public interrobang
3506 (let ((revision "1")
3507 (commit "896543735e1c99144765fdbd7b6e6b5afbd8b881"))
3509 (name "interrobang")
3510 (version (git-version "0.0.0" revision commit))
3515 (url "https://github.com/TrilbyWhite/interrobang")
3517 (file-name (git-file-name name version))
3519 (base32 "1n13m70p1hfba5dy3i8hfclbr6k9q3d9dai3dg4jvhdhmxcpjzdf"))))
3520 (build-system gnu-build-system)
3522 `(#:tests? #f ; no tests
3524 (modify-phases %standard-phases
3525 (delete 'configure)) ; no configure script
3526 #:make-flags (list (string-append "PREFIX="
3527 (assoc-ref %outputs "out")))))
3532 (synopsis "Scriptable launcher menu")
3533 (description "Interrobang is a scriptable launcher menu with a customizable
3534 shortcut syntax and completion options.")
3535 (home-page "https://github.com/TrilbyWhite/interrobang")
3536 (license license:gpl3+))))
3538 (define-public pam-krb5
3545 (list (string-append
3546 "https://archives.eyrie.org/software/kerberos/"
3547 "pam-krb5-" version ".tar.xz")
3549 "https://archives.eyrie.org/software/ARCHIVE/"
3550 "pam-krb5/pam-krb5-" version ".tar.xz")))
3551 (patches (search-patches "pam-krb5-CVE-2020-10595.patch"))
3554 "1qjp8i1s9bz7g6kiqrkzzkxn5pfspa4sy53b6z40fqmdf9przdfb"))))
3555 (build-system gnu-build-system)
3558 (modify-phases %standard-phases
3559 (add-before 'configure 'disable-tests
3561 ;; The build container seems to interfere with some tests.
3562 (substitute* "tests/TESTS"
3563 (("module/basic\n") ""))
3564 (substitute* "tests/TESTS"
3565 (("pam-util/vector\n") ""))
3568 (list linux-pam mit-krb5))
3570 (list perl perl-test-pod)) ; required for tests
3571 (synopsis "Kerberos PAM module")
3573 "Pam-krb5 is a Kerberos PAM module for either MIT Kerberos or Heimdal.
3574 It supports ticket refreshing by screen savers, configurable
3575 authorization handling, authentication of non-local accounts for network
3576 services, password changing, and password expiration, as well as all the
3577 standard expected PAM features. It works correctly with OpenSSH, even
3578 with @code{ChallengeResponseAuthentication} and @code{PrivilegeSeparation}
3579 enabled, and supports extensive configuration either by PAM options or in
3580 krb5.conf or both. PKINIT is supported with recent versions of both MIT
3581 Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.")
3582 (home-page "https://www.eyrie.org/~eagle/software/pam-krb5/")
3583 ;; Dual licenced under a homebrew non-copyleft OR GPL (any version)
3584 ;; However, the tarball does not contain a copy of the GPL, so unless
3585 ;; we put one in, we cannot distribute it under GPL without violating
3586 ;; clause requiring us to give all recipients a copy.
3587 (license license:gpl1+)))
3589 (define (sunxi-tools-source version)
3593 (url "https://github.com/linux-sunxi/sunxi-tools")
3594 (commit (string-append "v" version))))
3596 (base32 "04f3jqg8ww4jxsf9c6ddcdgy2xbhkyp0b3l5f1hvvbv94p81rjxd"))
3598 (search-patches "sunxi-tools-remove-sys-io.patch"))
3599 (modules '((guix build utils)))
3601 ;; Remove binaries contained in the tarball which are only for the
3602 ;; target and can be regenerated anyway.
3604 (delete-file-recursively "bin")
3606 (file-name (git-file-name "sunxi-tools" version))))
3608 (define sunxi-target-tools
3610 (name "sunxi-target-tools")
3612 (build-system gnu-build-system)
3614 (sunxi-tools-source version))
3616 `(#:system "armhf-linux"
3618 #:make-flags (list (string-append "PREFIX="
3619 (assoc-ref %outputs "out"))
3620 (string-append "CROSS_COMPILE=")
3623 (modify-phases %standard-phases
3626 (lambda* (#:key make-flags #:allow-other-keys)
3627 (apply invoke "make" "target-tools" make-flags)))
3629 (lambda* (#:key make-flags #:allow-other-keys)
3630 (apply invoke "make" "install-target-tools"
3632 (home-page "https://github.com/linux-sunxi/sunxi-tools")
3633 (synopsis "Hardware management tools for Allwinner computers")
3634 (description "This package contains tools for Allwinner devices:
3636 @item @command{sunxi-meminfo}: Prints memory bus settings.
3638 (license license:gpl2+)))
3640 (define-public sunxi-tools
3642 (name "sunxi-tools")
3645 (sunxi-tools-source version))
3647 (list sunxi-target-tools pkg-config))
3650 (build-system gnu-build-system)
3652 `(#:tests? #f ; no tests exist
3653 #:make-flags (list (string-append "PREFIX="
3654 (assoc-ref %outputs "out"))
3655 (string-append "CROSS_COMPILE=disabled")
3658 (modify-phases %standard-phases
3661 (lambda* (#:key make-flags #:allow-other-keys)
3662 (apply invoke "make" "tools" "misc" make-flags)))
3664 (lambda* (#:key inputs outputs make-flags #:allow-other-keys)
3665 ;; Those tools have been built for armhf but are part of the
3666 ;; installation in the upstream package. So do the same
3668 (copy-recursively (assoc-ref inputs "sunxi-target-tools")
3669 (assoc-ref outputs "out"))
3670 (apply invoke "make" "install-tools" "install-misc"
3672 (home-page "https://github.com/linux-sunxi/sunxi-tools")
3673 (synopsis "Hardware management tools for Allwinner computers")
3674 (description "This package contains tools for Allwinner devices:
3676 @item @command{sunxi-fexc}, @command{bin2fex}, @command{fex2bin}: Compile
3677 a textual description of a board (.fex) to a binary representation (.bin).
3678 @item @command{sunxi-fel}: Puts an Allwinner device into FEL mode which
3679 makes it register as a special USB device (rather than USB host).
3680 You can then connect it to another computer and flash it from there.
3681 @item @command{sunxi-nand-part}: Partitions NAND flash.
3682 @item @command{sunxi-bootinfo}: Reads out boot0 and boot1 (Allwinner
3683 bootloader) parameters.
3684 @item @command{sunxi-pio}: Sets GPIO parameters and oscillates a GPIO
3685 in order to be able to find it.
3686 @item @command{sunxi-meminfo}: Prints memory bus settings.
3687 @item @command{sunxi-nand-image-builder}: Prepares raw NAND images.
3689 (license license:gpl2+)))
3699 (url "https://github.com/xboot/xfel.git")
3700 (commit (string-append "v" version))))
3702 (base32 "0r4j63vh6279fj1yh71h08d1av3nc0majlad5yh6admsxiig101m"))
3703 (file-name (git-file-name name version))))
3708 (build-system gnu-build-system)
3710 `(#:tests? #f ; No tests exist
3712 (modify-phases %standard-phases
3713 (add-after 'unpack 'patch-installation-target
3714 (lambda* (#:key outputs #:allow-other-keys)
3715 (let ((out (assoc-ref outputs "out")))
3716 (substitute* "Makefile"
3717 (("/usr/local") out)
3719 (("/etc/udev/rules.d")
3720 (string-append out "/lib/udev/rules.d"))))))
3721 (delete 'configure))))
3722 (home-page "https://github.com/xboot/xfel")
3723 (synopsis "Remote debugging tool for Allwinner D1 computers")
3724 (description "This package contains a debugging tool for Allwinner D1
3725 devices (connects via USB OTG).")
3726 (license license:expat)))
3728 (define-public sedsed
3736 (url "https://github.com/aureliojargas/sedsed")
3737 (commit (string-append "v" version))))
3738 (file-name (git-file-name name version))
3740 (base32 "05cl35mwljdb9ynbbsfa8zx6ig8r0xncbg2cir9vwn5manndjj18"))))
3741 (build-system python-build-system)
3743 `(#:tests? #f ; no tests
3745 (modify-phases %standard-phases
3746 (add-after 'unpack 'patch-sed-in
3748 (substitute* "sedsed.py"
3750 (string-append "sedbin = '" (which "sed") "'")))
3754 (lambda* (#:key outputs #:allow-other-keys)
3755 (let* ((out (assoc-ref outputs "out"))
3756 (bin (string-append out "/bin")))
3757 ;; Just one file to copy around
3758 (install-file "sedsed.py" bin)
3760 (add-after 'wrap 'symlink
3761 ;; Create 'sedsed' symlink to "sedsed.py".
3762 (lambda* (#:key outputs #:allow-other-keys)
3763 (let* ((out (assoc-ref outputs "out"))
3764 (bin (string-append out "/bin"))
3765 (sed (string-append bin "/sedsed"))
3766 (sedpy (string-append bin "/sedsed.py")))
3769 (home-page "https://aurelio.net/projects/sedsed")
3770 (synopsis "Sed sed scripts")
3772 "@code{sedsed} can debug, indent, tokenize and HTMLize your @command{sed}
3775 In debug mode, it reads your script and adds extra commands to it. When
3776 executed you can see the data flow between the commands, revealing all the
3777 magic sed performs on its internal buffers.
3779 In indent mode, your script is reformatted with standard spacing.
3781 In tokenize mode, you can see the elements of every command you use.
3783 In HTMLize mode, your script is converted to a beautiful colored HTML file,
3784 with all the commands and parameters identified for your viewing pleasure.
3786 With sedsed you can master any sed script. No more secrets, no more hidden
3788 (license license:expat)))
3790 (define-public igt-gpu-tools
3792 (name "igt-gpu-tools")
3793 ;; You should very likely remove the 'fix-meson.build phase when upgrading.
3799 (url "https://gitlab.freedesktop.org/drm/igt-gpu-tools.git")
3800 (commit (string-append "igt-gpu-tools-" version))))
3801 (file-name (git-file-name name version))
3803 (base32 "0m124pqv7zna25jnvk566c4kk628jr0w8mgnp8mr5xqz9cprgczm"))))
3804 (build-system meson-build-system)
3806 `(#:tests? #f ; many of the tests try to load kernel modules
3808 (modify-phases %standard-phases
3809 (add-after 'unpack 'find-rst2man.py
3811 (substitute* "man/meson.build"
3812 (("'rst2man'") "'rst2man.py'"))))
3813 (add-after 'unpack 'fix-meson.build
3814 ;; Fix ‘ERROR: Function does not take positional arguments.’
3816 (substitute* "lib/meson.build"
3817 (("f\\.underscorify\\(f\\)")
3818 "f.underscorify()")))))))
3829 (list bison flex pkg-config python-docutils))
3830 (home-page "https://gitlab.freedesktop.org/drm/igt-gpu-tools")
3831 (synopsis "Tools for development and testing of the Intel DRM driver")
3832 (description "IGT GPU Tools is a collection of tools for development and
3833 testing of the Intel DRM driver. There are many macro-level test suites that
3834 get used against the driver, including xtest, rendercheck, piglit, and
3835 oglconform, but failures from those can be difficult to track down to kernel
3836 changes, and many require complicated build procedures or specific testing
3837 environments to get useful results. Therefore, IGT GPU Tools includes
3838 low-level tools and tests specifically for development and testing of the
3840 (supported-systems '("i686-linux" "x86_64-linux"))
3841 (license license:expat)))
3843 (define-public neofetch
3850 (url "https://github.com/dylanaraps/neofetch")
3852 (file-name (git-file-name name version))
3855 "0i7wpisipwzk0j62pzaigbiq42y1mn4sbraz4my2jlz6ahwf00kv"))))
3856 (build-system gnu-build-system)
3858 `(#:tests? #f ; there are no tests
3860 (list (string-append "PREFIX=" %output))
3862 (modify-phases %standard-phases
3863 (delete 'configure)))) ; no configure script
3864 (home-page "https://github.com/dylanaraps/neofetch")
3865 (synopsis "System information script")
3866 (description "Neofetch is a command-line system information tool written in
3867 Bash. Neofetch displays information about your system next to an image, your OS
3868 logo, or any ASCII file of your choice. The main purpose of Neofetch is to be
3869 used in screenshots to show other users what operating system or distribution
3870 you are running, what theme or icon set you are using, etc.")
3871 (license license:expat)))
3873 (define-public hyfetch
3880 (uri (pypi-uri "HyFetch" version))
3882 (base32 "18s8r63aqyah34vbahccgkiqw4008i2w5kvhqd9s8bdd4yvsrn4n"))))
3883 (build-system python-build-system)
3884 (inputs (list python-hypy-utils python-typing-extensions))
3885 (arguments `(#:phases (modify-phases %standard-phases
3886 (add-before 'build 'set-HOME
3887 (lambda _ ;; Tries to set files in .config
3888 (setenv "HOME" "/tmp"))))))
3889 (home-page "https://github.com/hykilpikonna/HyFetch")
3890 (synopsis "@code{neofetch} with pride flags <3")
3891 (description "HyFetch is a command-line system information tool fork of
3892 @code{neofetch}. HyFetch displays information about your system next to your
3893 OS logo in ASCII representation. The ASCII representation is then colored in
3894 the pattern of the pride flag of your choice. The main purpose of HyFetch is to
3895 be used in screenshots to show other users what operating system or distribution
3896 you are running, what theme or icon set you are using, etc.")
3897 (license license:expat)))
3899 (define-public screenfetch
3901 (name "screenfetch")
3906 (url "https://github.com/KittyKatt/screenFetch")
3907 (commit (string-append "v" version))))
3908 (file-name (git-file-name name version))
3911 "04l8aqr474pb115nagn9f6y48jw92n1qfszgw7dbhgl4mpn95lcr"))))
3912 (build-system trivial-build-system)
3914 `(#:modules ((guix build utils))
3917 (use-modules (guix build utils))
3918 (let ((source (assoc-ref %build-inputs "source"))
3919 (out (assoc-ref %outputs "out")))
3920 (mkdir-p (string-append out "/bin/"))
3921 (copy-file (string-append source "/screenfetch-dev")
3922 (string-append out "/bin/screenfetch"))
3923 (install-file (string-append source "/screenfetch.1")
3924 (string-append out "/man/man1/"))
3925 (install-file (string-append source "/COPYING")
3926 (string-append out "/share/doc/" ,name "-" ,version))
3927 (substitute* (string-append out "/bin/screenfetch")
3928 (("/usr/bin/env bash")
3929 (search-input-file %build-inputs "/bin/bash")))
3931 (string-append out "/bin/screenfetch")
3933 (,(string-append (assoc-ref %build-inputs "bc") "/bin:"
3934 (assoc-ref %build-inputs "scrot") "/bin:"
3935 (assoc-ref %build-inputs "xdpyinfo") "/bin"
3936 (assoc-ref %build-inputs "xprop") "/bin"))))
3937 (substitute* (string-append out "/bin/screenfetch")
3940 (search-input-file %build-inputs
3943 (list bash bc scrot xdpyinfo xprop))
3944 (home-page "https://github.com/KittyKatt/screenFetch")
3945 (synopsis "System information script")
3946 (description "Bash screenshot information tool which can be used to
3947 generate those nifty terminal theme information and ASCII distribution logos in
3948 everyone's screenshots nowadays.")
3949 (license license:gpl3)))
3951 (define-public ufetch
3952 (let ((commit "98b622023e03fe24dbc137e9a68104dfe1fbd04a")
3956 (version (git-version "0.2" revision commit))
3960 (url "https://gitlab.com/jschx/ufetch.git")
3962 (file-name (git-file-name name version))
3965 "09c4zmikza16xpydinnqbi3hmcibfrrn10wij7j0j1wv1pj2sl2l"))))
3966 (build-system trivial-build-system)
3971 `(#:modules ((guix build utils))
3974 (use-modules (guix build utils))
3975 (let* ((source (assoc-ref %build-inputs "source"))
3976 (output (assoc-ref %outputs "out"))
3977 (bindir (string-append output "/bin"))
3978 (docdir (string-append output "/share/doc/ufetch-" ,version))
3979 (tput (search-input-file %build-inputs "/bin/tput")))
3980 (install-file (string-append source "/LICENSE") docdir)
3981 (setenv "PATH" (string-append (assoc-ref %build-inputs "bash") "/bin"))
3983 (for-each (lambda (src)
3984 (let ((dst (string-append bindir "/" (basename src))))
3987 (substitute* dst (("tput") tput))))
3988 (find-files source "ufetch-[[:alpha:]]*$"))
3989 ;; Note: the `ufetch` we create below will only work if run under
3990 ;; the Guix System. I.e. a user trying to run `ufetch` on a
3991 ;; foreign distro will not get great results. The `screenfetch`
3992 ;; program does actual runtime detection of the operating system,
3993 ;; and would be a better choice in such a situation.
3994 (symlink "ufetch-guix" (string-append bindir "/ufetch"))))))
3995 (home-page "https://gitlab.com/jschx/ufetch")
3996 (synopsis "Tiny system info")
3997 (description "This package provides a tiny system info utility.")
3998 (license license:isc))))
4000 (define-public pfetch
4001 (let ((commit "e18a0959ab98b963744755ec4687e59dc11db3c5")
4005 (version (git-version "0.7.0" revision commit))
4009 (url "https://github.com/dylanaraps/pfetch")
4011 (file-name (git-file-name name version))
4014 "1md40av6i3xvvwig5jzhy4kf3s5sgxxk35r0vcyrjd8qyndk927l"))))
4015 (build-system trivial-build-system)
4016 (inputs (list bash))
4018 `(#:modules ((guix build utils))
4021 (use-modules (guix build utils))
4022 (let* ((source (lambda (f)
4023 (string-append (assoc-ref %build-inputs "source") "/" f)))
4024 (output (assoc-ref %outputs "out"))
4025 (docdir (string-append output "/share/doc/pfetch-" ,version)))
4026 (install-file (source "LICENSE.md") docdir)
4027 (install-file (source "README.md") docdir)
4028 (install-file (source "pfetch") (string-append output "/bin"))
4030 (string-append output "/bin/pfetch")
4031 (list (string-append (assoc-ref %build-inputs "bash") "/bin")))
4033 (home-page "https://github.com/dylanaraps/pfetch")
4034 (synopsis "System information tool")
4035 (description "This package provides a simple, configurable system
4037 (license license:expat))))
4046 (uri (string-append "https://github.com/jarun/nnn/releases/download/v"
4047 version "/nnn-v" version ".tar.gz"))
4049 (base32 "0gvyvynw957yirvc1aj65flzni7niaj5bvyk82ka5dfgi2dazb0m"))))
4050 (build-system gnu-build-system)
4052 (list ncurses readline))
4056 (list #:tests? #f ; no tests
4059 (string-append "PREFIX=" #$output)
4060 (string-append "CC=" #$(cc-for-target))
4061 (string-append "PKG_CONFIG=" #$(pkg-config-for-target)))
4063 #~(modify-phases %standard-phases
4064 (delete 'configure)))) ; no configure script
4065 (home-page "https://github.com/jarun/nnn")
4066 (synopsis "Terminal file browser")
4068 "@command{nnn} is a fork of @command{noice}, a fast and minimal text
4069 terminal file browser with keyboard shortcuts for navigation, opening files and
4070 running tasks. There is no configuration file and MIME associations are
4072 (license license:bsd-2)))
4074 (define-public thermald
4082 (url "https://github.com/intel/thermal_daemon")
4083 (commit (string-append "v" version))))
4084 (file-name (git-file-name name version))
4086 (base32 "1n0ih86bkm09bzhjl7hllxkl4gzcxvzsznbwi8dx87ragsjlix6n"))))
4087 (build-system gnu-build-system)
4090 (let ((out (assoc-ref %outputs "out")))
4091 (list (string-append "--with-dbus-sys-dir="
4092 out "/etc/dbus-1/system.d")
4093 "--localstatedir=/var"
4094 "--disable-werror"))
4096 (list "V=1") ; log build commands
4098 (modify-phases %standard-phases
4099 (add-before 'bootstrap 'no-early-./configure
4101 (setenv "NO_CONFIGURE" "yet"))))))
4106 `(,glib "bin") ; for glib-genmarshal, etc.
4110 (list dbus-glib libevdev libxml2 upower xz))
4111 (home-page "https://01.org/linux-thermal-daemon/")
4112 (synopsis "CPU scaling for thermal management")
4113 (description "The Linux Thermal Daemon helps monitor and control temperature
4114 on systems running the Linux kernel.")
4115 ;; arm and aarch64 don't have cpuid.h.
4116 (supported-systems '("i686-linux" "x86_64-linux"))
4117 (license license:gpl2)))
4119 (define-public masscan
4127 (url "https://github.com/robertdavidgraham/masscan")
4129 (file-name (git-file-name name version))
4131 (base32 "0q0c7bsf0pbl8napry1qyg0gl4pd8wn872h4mz9b56dx4rx90vqg"))))
4132 (build-system gnu-build-system)
4136 `(#:test-target "regress"
4138 (list (string-append "CC=" ,(cc-for-target))
4139 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4141 (modify-phases %standard-phases
4142 (delete 'configure) ; no ./configure script
4143 (add-after 'unpack 'patch-path
4144 (lambda* (#:key outputs inputs #:allow-other-keys)
4145 (let* ((out (assoc-ref outputs "out"))
4146 (pcap (assoc-ref inputs "libpcap")))
4147 (substitute* "src/rawsock-pcap.c"
4148 (("libpcap.so") (string-append pcap "/lib/libpcap.so")))
4150 (synopsis "TCP port scanner")
4151 (description "MASSCAN is an asynchronous TCP port scanner. It can detect
4152 open ports, and also complete the TCP connection and interact with the remote
4153 application, collecting the information received.")
4154 (home-page "https://github.com/robertdavidgraham/masscan")
4155 ;; 'src/siphash24.c' is the SipHash reference implementation, which
4156 ;; bears a CC0 Public Domain Dedication.
4157 (license license:agpl3+)))
4159 (define-public hungrycat
4165 (uri (string-append "https://github.com/jwilk/hungrycat/"
4166 "releases/download/" version "/"
4167 "hungrycat-" version ".tar.gz"))
4170 "03fc1zsrf99lvxa7b4ps6pbi43304wbxh1f6ci4q0vkal370yfwh"))))
4171 (build-system gnu-build-system)
4174 `(("python" ,python-wrapper)
4175 ("python-nose" ,python-nose)))
4177 `(#:test-target "test"))
4178 (synopsis "Single tool that combines @command{cat} & @command{rm}")
4180 "hungrycat prints the contents of a file to standard output, while
4181 simultaneously freeing the disk space it occupied. It is useful if you need
4182 to process a large file, don't have enough space to store both the input and
4183 output files, and don't need the input file afterwards.
4184 While similar in principle to running @command{cat} immediately followed by
4185 @command{rm}, @command{hungrycat} actually frees blocks as soon as they are
4186 printed instead of after the entire file has been read, which is often too
4188 (home-page "https://jwilk.net/software/hungrycat")
4189 (license license:expat)))
4191 (define-public launchmon
4198 "https://github.com/LLNL/LaunchMON/releases/download/v"
4199 version "/launchmon-v" version ".tar.gz"))
4202 "0fm3nd9mydm9v2bf7bh01dbgrfnpwkapxa3dsvy3x1z0rz61qc0x"))
4203 (modules '((guix build utils)))
4206 ;; Fix build failure with GCC 7 due to a conversion error.
4207 ;; Remove for versions > 1.0.2.
4208 (substitute* "launchmon/src/linux/lmon_api/lmon_coloc_spawner.cxx"
4209 ((" lmonpl = '\\\\0'")
4210 " *lmonpl = '\\0'"))
4212 (build-system gnu-build-system)
4220 (synopsis "Infrastructue for large scale tool daemon launching")
4222 "LaunchMON is a software infrastructure that enables HPC run-time
4223 tools to co-locate tool daemons with a parallel job. Its API allows a
4224 tool to identify all the remote processes of a job and to scalably
4225 launch daemons into the relevant nodes.")
4226 (home-page "https://github.com/LLNL/LaunchMON")
4227 (supported-systems '("i686-linux" "x86_64-linux"))
4228 (license license:lgpl2.1)))
4230 (define-public spindle
4235 ;; We use git checkout to avoid github auto-generated tarballs
4238 (url "https://github.com/hpc/Spindle")
4239 (commit (string-append "v" version))))
4240 (file-name (git-file-name name version))
4243 "15n3ay0qq81r5v7fif61q1vdjcq44pp2nynkh3fvbzc9fj3c39wd"))))
4244 (build-system gnu-build-system)
4245 (arguments '(#:configure-flags '("--enable-sec-launchmon"
4246 "--enable-sec-munge"
4247 "--enable-sec-none")))
4251 ("launchmon" ,launchmon)
4252 ("libgcrypt" ,libgcrypt)))
4253 (synopsis "Scalable library loading in HPC environments")
4255 "Spindle is a tool for improving the performance of dynamic library and
4256 Python loading in HPC environments.")
4257 (home-page "https://github.com/hpc/Spindle")
4258 ;; This package supports x86_64 and PowerPC64
4259 (supported-systems '("x86_64-linux"))
4260 (license license:lgpl2.1)))
4262 (define-public inxi-minimal
4263 (let ((real-name "inxi"))
4265 (name "inxi-minimal")
4266 (version "3.3.23-1")
4271 (url "https://github.com/smxi/inxi")
4273 (file-name (git-file-name real-name version))
4275 (base32 "0bpaffv4zqinfk46sbx82gic7572xsqiwb1lf894l1s6a6xi7zrd"))))
4276 (build-system trivial-build-system)
4278 `(("bash" ,bash-minimal)
4280 ("procps" ,procps)))
4284 `(#:modules ((guix build utils))
4287 (use-modules (guix build utils)
4290 (setenv "PATH" (string-append
4291 (assoc-ref %build-inputs "bash") "/bin" ":"
4292 (assoc-ref %build-inputs "gzip") "/bin" ":"
4293 (assoc-ref %build-inputs "perl") "/bin" ":"))
4294 (copy-recursively (assoc-ref %build-inputs "source")
4295 ,(string-append real-name "-" version))
4296 (with-directory-excursion ,(string-append real-name "-" version)
4297 (with-fluids ((%default-port-encoding #f))
4298 (substitute* "inxi" (("/usr/bin/env perl") (which "perl"))))
4299 (let ((bin (string-append %output "/bin")))
4300 (install-file "inxi" bin)
4301 (wrap-program (string-append bin "/inxi")
4304 ,@(map (lambda (input)
4308 (cut string-append store <>)))
4310 ((member name '("util-linux"))
4311 (string-append (store-append "/bin") ":"
4312 (store-append "/sbin")))
4313 ((member name '("dmidecode" "iproute2"))
4314 (store-append "/sbin"))
4315 (else (store-append "/bin")))))))
4321 (((? (cut string-prefix? "perl-" <>) name) . dir)
4322 (string-append dir "/lib/perl5/site_perl"))
4325 (invoke "gzip" "-n" "inxi.1")
4326 (install-file "inxi.1.gz"
4327 (string-append %output "/share/man/man1"))))))
4328 (home-page "https://smxi.org/docs/inxi.htm")
4329 (synopsis "Full-featured system information script")
4330 (description "Inxi is a system information script that can display
4331 various things about your hardware and software to users in an IRC chatroom or
4332 support forum. It runs with the @code{/exec} command in most IRC clients.")
4333 (license license:gpl3+))))
4337 (inherit inxi-minimal)
4340 `(("dmidecode" ,dmidecode)
4342 ("bind:utils" ,isc-bind "utils") ; dig
4344 ("iproute2" ,iproute) ; ip
4345 ("kmod" ,kmod) ; modinfo
4346 ("lm-sensors" ,lm-sensors)
4347 ("mesa-utils" ,mesa-utils)
4348 ("pciutils" ,pciutils)
4351 ("util-linux" ,util-linux) ; lsblk
4352 ("usbutils" ,usbutils) ; lsusb
4354 ("xdpyinfo" ,xdpyinfo)
4357 ("coreutils" ,coreutils) ; uptime
4358 ("inetutils" ,inetutils) ; ifconfig
4359 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
4360 ("perl-http-tiny" ,perl-http-tiny)
4361 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
4362 ("perl-json-xs" ,perl-json-xs)
4363 ("perl-time-hires" ,perl-time-hires)
4364 ("lvm2" ,lvm2) ; lvs
4366 ;; TODO: Add more inputs:
4371 ,@(package-inputs inxi-minimal)))))
4373 (define-public pscircle
4381 (url "https://gitlab.com/mildlyparallel/pscircle.git")
4382 (commit (string-append "v" version))))
4383 (file-name (git-file-name name version))
4385 (base32 "1sm99423hh90kr4wdjqi9sdrrpk65j2vz2hzj65zcxfxyr6khjci"))))
4386 (build-system meson-build-system)
4390 (list cairo libpng libx11))
4391 (home-page "https://gitlab.com/mildlyparallel/pscircle")
4392 (synopsis "Visualize Linux processes in a form of radial tree")
4394 "@code{pscircle} visualizes Linux processes in the form of a radial tree.")
4395 (license license:gpl2+)))
4397 (define-public python-pyudev
4399 (name "python-pyudev")
4404 (uri (pypi-uri "pyudev" version))
4407 "0xmj6l08iih2js9skjqpv4w7y0dhxyg91zmrs6v5aa65gbmipfv9"))))
4408 (build-system python-build-system)
4410 `(#:tests? #f ; Tests require /sys
4412 (modify-phases %standard-phases
4413 (add-after 'unpack 'patch-ctypes-udev
4414 (lambda* (#:key inputs outputs #:allow-other-keys)
4415 (let ((eudev (assoc-ref inputs "eudev")))
4416 (substitute* "src/pyudev/core.py"
4418 (string-append "'" eudev "/lib/libudev.so'")))
4419 (substitute* "src/pyudev/_ctypeslib/utils.py"
4420 ;; Use absolute paths instead of keys.
4421 (("= find_library") "= "))
4428 (list python-docutils python-hypothesis python-mock python-pytest
4430 (home-page "https://pyudev.readthedocs.io/")
4431 (synopsis "Python udev binding")
4432 (description "This package provides @code{udev} bindings for Python.")
4433 (license license:lgpl2.1)))
4435 (define-public vmtouch
4443 (url "https://github.com/hoytech/vmtouch/")
4444 (commit (string-append "v" version))))
4445 (file-name (git-file-name name version))
4447 (base32 "08da6apzfkfjwasn4dxrlfxqfx7arl28apdzac5nvm0fhvws0dxk"))))
4448 (build-system gnu-build-system)
4452 `(#:tests? #f ; no tests
4455 (string-append "CC=" ,(cc-for-target))
4456 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4458 (modify-phases %standard-phases
4459 (delete 'configure))))
4460 (home-page "https://github.com/hoytech/vmtouch/")
4461 (synopsis "Portable file system cache diagnostics and control")
4463 "vmtouch is a tool for learning about and controlling the file system
4464 cache of unix and unix-like systems.")
4465 (license license:bsd-3)))
4467 (define-public solaar
4474 (url "https://github.com/pwr-Solaar/Solaar")
4476 (file-name (git-file-name name version))
4479 "0k7mjdfvf28fay50b2hs2z4qk6s23h71wvl8777idlrz5i5f43j5"))))
4480 (build-system python-build-system)
4483 (modify-phases %standard-phases
4484 (add-before 'build 'setenv-PATH
4486 (setenv "PYTHONPATH" "lib"))))))
4488 (list python-pygobject
4496 (home-page "https://pwr-solaar.github.io/Solaar/")
4497 (synopsis "Linux devices manager for the Logitech Unifying Receiver")
4498 (description "This package provides tools to manage clients of the
4499 Logitech Unifying Receiver.")
4500 (license license:gpl2)))
4502 (define-public lynis
4505 ;; Also update the ‘lynis-sdk’ input to the commit matching this release.
4511 (url "https://github.com/CISOfy/lynis")
4513 (file-name (git-file-name name version))
4515 (base32 "19kz1ffbbd431cdfw7fjcl5hjkks3gfkwk3w2zkwsxgyiky1gx3w"))
4516 (modules '((guix build utils)))
4519 ;; Remove proprietary plugins. As of now, all plugins supplied with
4520 ;; lynis are proprietary. In the future, if free plugins are
4521 ;; provided, whitelist them from deletion.
4522 (for-each delete-file (find-files "plugins"))))))
4523 (build-system gnu-build-system)
4530 (url "https://github.com/CISOfy/lynis-sdk")
4531 (commit "dffe5d352e4d6029ea95a84d50604ccd97cb8999")))
4532 (file-name (git-file-name "lynis-sdk" version))
4534 (base32 "05qq4395x8f0kyl1ppm74npsf8sb3hhgz0ck4fya91sy6a26b4ja"))))))
4537 (modify-phases %standard-phases
4539 ;; XXX Remove after fixing <https://issues.guix.gnu.org/55287>.
4540 (lambda* (#:key source #:allow-other-keys)
4543 (copy-recursively source "."
4546 (lambda* (#:key inputs outputs #:allow-other-keys)
4547 (substitute* "lynis"
4548 (("/usr/share/lynis")
4549 (string-append (assoc-ref outputs "out") "/share/lynis")))
4550 (substitute* "include/functions"
4551 (("/usr/local/etc/lynis")
4552 (string-append (assoc-ref outputs "out") "/etc/lynis")))))
4555 (lambda* (#:key outputs #:allow-other-keys)
4556 (let ((out (assoc-ref outputs "out")))
4557 (install-file "lynis" (string-append out "/bin/"))
4558 (install-file "default.prf" (string-append out "/etc/lynis"))
4561 (copy-recursively dir (string-append out "/share/lynis/" dir)))
4562 (list "db" "include" "plugins"))
4563 (install-file "lynis.8" (string-append out "/share/man/man8")))))
4565 (lambda* (#:key inputs #:allow-other-keys)
4566 (copy-recursively (assoc-ref inputs "lynis-sdk") "../lynis-sdk")
4567 (setenv "LANG" "en_US.UTF-8")
4568 (let ((lynis-dir (getcwd)))
4569 (with-directory-excursion "../lynis-sdk"
4570 (substitute* "config"
4571 (("\\.\\./lynis") lynis-dir))
4572 (substitute* "unit-tests/tests-language-translations.sh"
4573 (("\\.\\./lynis") lynis-dir))
4574 (invoke "sh" "lynis-devkit" "run" "unit-tests"))))))))
4575 (home-page "https://cisofy.com/lynis/")
4576 (synopsis "Security auditing tool")
4577 (description "Lynis is a security auditing tool. It performs an in-depth
4578 security scan and runs on the system itself. The primary goal is to test
4579 security defenses and provide tips for further system hardening. It will also
4580 scan for general system information, vulnerable software packages, and
4581 possible configuration issues.")
4582 (license license:gpl3+)))
4584 (define-public ngrep
4592 (url "https://github.com/jpr5/ngrep/")
4593 (commit (string-append "V" (string-replace-substring version "." "_")))))
4594 (file-name (git-file-name name version))
4597 "1x2fyd7wdqlj1r76ilal06cl2wmbz0ws6i3ys204sbjh1cj6dcl7"))))
4598 (build-system gnu-build-system)
4602 `(#:tests? #f ;; No tests.
4603 #:configure-flags (list (string-append "--with-pcap-includes="
4604 (assoc-ref %build-inputs "libpcap")
4606 (home-page "https://github.com/jpr5/ngrep/")
4607 (synopsis "Grep-like utility to search for network packets on an interface")
4608 (description "@command{ngrep} is like GNU grep applied to the network
4609 layer. It's a PCAP-based tool that allows you to specify an extended regular
4610 or hexadecimal expression to match against data payloads of packets. It
4611 understands many kinds of protocols, including IPv4/6, TCP, UDP, ICMPv4/6,
4612 IGMP and Raw, across a wide variety of interface types, and understands BPF
4613 filter logic in the same fashion as more common packet sniffing tools, such as
4614 tcpdump and snoop.")
4615 (license license:bsd-3)))
4617 (define-public pam-mount
4624 (uri (string-append "mirror://sourceforge/pam-mount/pam_mount/"
4625 "pam_mount-" version ".tar.xz"))
4627 (base32 "0832nh2qf9pisgwnbgx6hkylx5d7i416l19y3ly4ifv7k1p7mxqa"))))
4628 (build-system gnu-build-system)
4632 #~(list (string-append "--with-slibdir=" #$output "/lib")
4633 (string-append "--with-ssbindir=" #$output "/sbin"))
4635 #~(modify-phases %standard-phases
4636 (add-after 'unpack 'patch-file-names
4637 (lambda* (#:key inputs outputs #:allow-other-keys)
4638 (let ((out (assoc-ref outputs "out")))
4639 (substitute* "src/mtcrypt.c"
4640 (("\"(mount|umount)\";" _ command)
4641 (format #f "\"~a\";"
4642 (search-input-file inputs
4643 (string-append "bin/" command))))
4644 (("\"(fsck)\"," _ command)
4645 (format #f "\"~a\","
4646 (search-input-file inputs
4647 (string-append "sbin/" command)))))
4648 (substitute* "src/rdconf1.c"
4649 (("\"(mount|umount)\", \"" _ command)
4650 (format #f "\"~a\", \""
4651 (search-input-file inputs
4652 (string-append "bin/" command))))
4653 (("\"(fsck)\", \"" _ command)
4654 (format #f "\"~a\", \""
4655 (search-input-file inputs
4656 (string-append "sbin/" command))))
4657 (("\"pmvarrun\", \"")
4658 (format #f "\"~a/sbin/pmvarrun\", \"" out)))))))))
4660 (list perl pkg-config))
4669 `(,util-linux "lib")
4671 (home-page "https://inai.de/projects/pam_mount/")
4672 (synopsis "PAM module to mount volumes for a user session")
4674 "Pam-mount is a PAM module to mount volumes when a user logs in.
4675 It can mount all local file systems supported by @command{mount}, as well as
4676 LUKS volumes encrypted with the user's log-in password.")
4677 (license (list license:gpl2+ license:lgpl2.1+))))
4685 ;; The PyPI tarball lacks the test suite.
4688 (url "https://github.com/kellyjonbrazil/jc")
4689 (commit (string-append "v" version))))
4690 (file-name (git-file-name name version))
4692 (base32 "021zk0y8kb6v3qf3hwfg8qjzzmrca039nz3fjywiy2njmbhr8hyi"))))
4693 (build-system python-build-system)
4696 #~(modify-phases %standard-phases
4697 ;; XXX Guix's America/Los_Angeles time zone is somehow broken.
4698 (add-before 'check 'hack-time-zone
4700 (substitute* (find-files "tests" "^test.*\\.py$")
4701 (("America/Los_Angeles") "PST8PDT")))))))
4703 (list python-pygments python-ruamel.yaml python-xmltodict))
4704 (home-page "https://github.com/kellyjonbrazil/jc")
4705 (synopsis "Convert the output of command-line tools to JSON")
4706 (description "@code{jc} JSONifies the output of many CLI tools and
4707 file-types for easier parsing in scripts.")
4708 (license license:expat)))
4717 (url "https://github.com/kellyjonbrazil/jtbl")
4718 (commit (string-append "v" version))))
4719 (file-name (git-file-name name version))
4722 "19i21fqz2m40cds9pb17brjxkczqagmx2f7mfb0xdvbygaply5wz"))))
4723 (build-system python-build-system)
4725 (list python-tabulate))
4726 (home-page "https://github.com/kellyjonbrazil/jtbl")
4727 (synopsis "Command-line tool to print JSON data as a table in the terminal")
4728 (description "@code{jtbl} accepts piped JSON data from stdin and outputs a
4729 text table representation to stdout.")
4730 (license license:expat)))
4732 (define-public hosts
4739 (url "https://github.com/xwmx/hosts")
4741 (file-name (git-file-name name version))
4744 "1ni4z89kxzgwm26hhx908g04f2h0fypy7lgfa0rvsz8d0wslgcsn"))))
4745 (build-system trivial-build-system)
4747 `(("bats" ,bats) ;for test
4750 ("coreutils" ,coreutils)
4751 ("diffutils" ,diffutils)
4753 ("ncurses" ,ncurses) ;tput
4756 `(#:modules ((guix build utils))
4759 (use-modules (guix build utils))
4761 (copy-recursively (assoc-ref %build-inputs "source") ".")
4762 ;; patch-shebang phase
4764 (string-append (assoc-ref %build-inputs "bash") "/bin"
4765 ":" (assoc-ref %build-inputs "awk") "/bin"
4766 ":" (assoc-ref %build-inputs "coreutils") "/bin"
4767 ":" (assoc-ref %build-inputs "diffutils") "/bin"
4768 ":" (assoc-ref %build-inputs "grep") "/bin"
4769 ":" (assoc-ref %build-inputs "ncurses") "/bin"
4770 ":" (assoc-ref %build-inputs "sed") "/bin"
4771 ":" "/run/setuid-programs"
4772 ":" (getenv "PATH")))
4773 (substitute* "hosts"
4774 (("#!/usr/bin/env bash")
4775 (string-append "#!" (which "bash")
4776 "\nPATH=" (getenv "PATH"))))
4778 (setenv "TERM" "linux") ;set to tty for test
4779 (invoke (search-input-file %build-inputs "/bin/bats")
4782 (install-file "hosts" (string-append %output "/bin"))
4783 (let ((bash-completion
4784 (string-append %output "/etc/bash_completion.d")))
4785 (mkdir-p bash-completion)
4786 (copy-file "etc/hosts-completion.bash"
4787 (string-append bash-completion "/hosts")))
4788 (let ((zsh-completion
4789 (string-append %output "/share/zsh/site-functions")))
4790 (mkdir-p zsh-completion)
4791 (copy-file "etc/hosts-completion.zsh"
4792 (string-append zsh-completion "/_hosts")))
4793 (let ((doc (string-append %output "/share/doc/" ,name "-" ,version)))
4795 (install-file "LICENSE" doc)
4796 (install-file "README.md" doc))
4798 (home-page "https://github.com/xwmx/hosts/")
4799 (synopsis "Script for editing a foreign distro's @file{/etc/hosts} file")
4800 (description "Hosts is a command line program for managing
4801 @file{/etc/hosts} entries. On Guix System, @file{/etc/hosts} is managed from
4802 the system configuration; hosts only works when using the Guix package manager
4803 on a foreign distro. @command{hosts} works with existing hosts files and
4804 entries, providing commands to add, remove, comment, and search.")
4805 (license license:expat)))
4807 (define-public nmrpflash
4816 (url "https://github.com/jclehner/nmrpflash")
4817 (commit (string-append "v" version))))
4819 (base32 "0gp66l3a2wznjnlc2ljs8g38mfrf1b9a0qcfxqg2bczmfxnrsynj"))
4820 (file-name (git-file-name name version))))
4821 (build-system gnu-build-system)
4825 (list libnl libpcap))
4827 `(#:tests? #f ; None exist
4829 (list (string-append "CC=" ,(cc-for-target))
4830 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4832 (modify-phases %standard-phases
4834 (add-before 'install 'prepare-install
4835 (lambda* (#:key outputs #:allow-other-keys)
4836 (mkdir-p (string-append (assoc-ref outputs "out") "/bin")))))))
4837 (home-page "https://github.com/jclehner/nmrpflash")
4838 (synopsis "Netgear unbrick utility")
4839 (description "This package provides a utility to flash a new firmware
4840 image to a Netgear device. It has been tested on Netgear EX2700, EX6120,
4841 EX6150v2, DNG3700v2, R6100, R6220, R7000, D7000, WNR3500, R6400, R6800,
4842 R8000, R8500, WNDR3800, but is likely to be compatible with many other
4844 (license license:gpl3+)))
4852 (uri (string-append "https://www.atoptool.nl/download/atop-"
4856 "0kjwgf94skbrndv1krlmsrq34smzi3iwk73fbsnyw787gvqx4j6a"))))
4857 (build-system gnu-build-system)
4860 #:tests? #f ; no test suite
4862 #~(list (string-append "CC=" #$(cc-for-target))
4863 (string-append "DESTDIR=" #$output)
4864 (string-append "SYSDPATH=/etc/systemd/system")
4865 (string-append "PMPATHD=/etc/systemd/system-sleep")
4866 ;; Or else it tries to create /var/log/atop...
4867 (string-append "LOGPATH="))
4869 #~(modify-phases %standard-phases
4870 (delete 'configure) ; No ./configure script
4871 (add-before 'build 'patch-build
4873 (substitute* "Makefile"
4874 ;; Don't use /usr as a prefix.
4876 ;; Otherwise, it creates a blank configuration file as a "default".
4877 (("touch.*DEFPATH)/atop") "")
4878 (("chmod.*DEFPATH)/atop") "")))))))
4881 python-wrapper ; for `atopgpud`
4883 (home-page "https://www.atoptool.nl/")
4884 (synopsis "Linux performance monitoring console")
4885 (description "Atop is an ASCII full-screen performance monitor for Linux
4886 that is capable of reporting the activity of all processes (even processes have
4887 finished during the monitoring interval), daily logging of system and process
4888 activity for long-term analysis, highlighting overloaded system resources by
4889 using colors, etc. At regular intervals, it shows system-level activity related
4890 to the CPU, memory, swap, disks (including LVM) and network layers, and for
4891 every process (and thread) it shows e.g. the CPU utilization, memory growth,
4892 disk utilization, priority, username, state, and exit code.")
4894 `((release-monitoring-url . "https://www.atoptool.nl/downloadatop.php")))
4895 (license license:gpl2+)))
4897 ;; TODO: Unvendor u-root (pkg: forth, golang, testutil).
4905 (url "https://github.com/linuxboot/fiano.git")
4906 (commit (string-append "v" version))))
4907 (file-name (string-append name "-" version "-checkout"))
4910 "03ihdwwhb7g6bihx141cn0924sjs5ps6q3ps58pk1cg0g0srrr9h"))
4911 (modules '((guix build utils)))
4914 (delete-file-recursively "vendor/golang.org")
4915 (delete-file-recursively "vendor/github.com")
4917 (build-system go-build-system)
4919 `(#:import-path "github.com/linuxboot/fiano"
4920 #:unpack-path "github.com/linuxboot/fiano"))
4924 `(("go-golang-org-x-text" ,go-golang-org-x-text)
4925 ("go-github.com-ulikunitz-xz" ,go-github.com-ulikunitz-xz)))
4926 (synopsis "UEFI image editor")
4927 (description "This package provides a command-line UEFI image editor.")
4928 (home-page "https://github.com/linuxboot/fiano")
4929 (license license:bsd-3)))
4931 (define-public fiano-utk
4936 `(#:import-path "github.com/linuxboot/fiano/cmds/utk"
4937 #:unpack-path "github.com/linuxboot/fiano"))))
4939 (define-public fiano-fmap
4944 `(#:import-path "github.com/linuxboot/fiano/cmds/fmap"
4945 #:unpack-path "github.com/linuxboot/fiano"))))
4947 (define-public novena-eeprom
4949 (name "novena-eeprom")
4954 (url "https://github.com/xobs/novena-eeprom.git")
4955 (commit (string-append "v" version))))
4956 (file-name (string-append name "-" version "-checkout"))
4959 "00pd71mg0g20v0820ggp3ghf9nyj5s4wavaz9mkmrmsr91hcnf7i"))))
4960 (build-system gnu-build-system)
4962 `(#:tests? #f ; No tests exist
4964 (list (string-append "CC=" ,(cc-for-target)))
4966 (modify-phases %standard-phases
4969 (lambda* (#:key outputs #:allow-other-keys)
4970 (let* ((out (assoc-ref outputs "out"))
4971 (out-bin (string-append out "/bin"))
4972 (out-share-man (string-append out "/share/man/man8")))
4973 (install-file "novena-eeprom" out-bin)
4974 (install-file "novena-eeprom.8" out-share-man)))))))
4977 (synopsis "Novena EEPROM editor")
4978 (description "This package provides an editor for the Novena EEPROM.
4979 Novena boards contain a device-dependent descriptive EEPROM that defines
4980 various parameters such as serial number, MAC address, and featureset.
4981 This program allows you to view and manipulate this EEPROM list.")
4982 (home-page "https://github.com/xobs/novena-eeprom/")
4983 (supported-systems '("armhf-linux"))
4984 (license license:bsd-3)))
4986 (define-public lrzsz
4992 (uri (string-append "https://www.ohse.de/uwe/releases/lrzsz-"
4996 "1wcgfa9fsigf1gri74gq0pa7pyajk12m4z69x7ci9c6x9fqkd2y2"))))
4997 (build-system gnu-build-system)
5000 (modify-phases %standard-phases
5002 (lambda* (#:key outputs #:allow-other-keys)
5003 (setenv "CONFIG_SHELL" (which "bash"))
5004 (invoke "./configure"
5005 (string-append "--prefix="
5006 (assoc-ref outputs "out"))))))))
5007 (synopsis "Implementation of XMODEM/YMODEM/ZMODEM transfer protocols")
5008 (description "This package provides programs that transfer files using
5009 the XMODEM/YMODEM/ZMODEM file transfer protocols.")
5010 (home-page "https://ohse.de/uwe/software/lrzsz.html")
5011 (license license:gpl2+)))
5021 (url "https://github.com/leahneukirchen/nq")
5022 (commit (string-append "v" version))))
5023 (file-name (git-file-name name version))
5025 (base32 "0szbndvwl6ghwjzb165s09977s0r1yq8h0ziknm0h6xndkcjspl3"))))
5026 (build-system gnu-build-system)
5031 #~(list (string-append "CC=" #$(cc-for-target))
5032 (string-append "PREFIX=" #$output))
5034 #~(modify-phases %standard-phases
5035 (delete 'configure))))
5036 (synopsis "Unix command line queue utility")
5038 "@code{nq} can create very lightweight job queue systems which require no
5039 setup, maintenance, supervision, or any long-running processes.")
5040 (home-page "https://github.com/leahneukirchen/nq")
5041 (license license:public-domain)))
5043 (define-public lsofgraph
5044 (let ((commit "1d414bdc727c00a8c6cbfffc3c43128c60d6f0de")
5048 (version (git-version "0.0.1" revision commit)) ;no upstream release
5052 (url "https://github.com/zevv/lsofgraph")
5054 (file-name (git-file-name name version))
5057 "058x04yp6bc77hbl3qchqm7pa8f9vqfl9jryr88m8pzl7kvpif54"))))
5058 (build-system trivial-build-system)
5062 `(#:modules ((guix build utils))
5065 (use-modules (guix build utils))
5067 (copy-recursively (assoc-ref %build-inputs "source") ".")
5068 ;; patch-shebang phase
5070 (string-append (assoc-ref %build-inputs "lua") "/bin"
5071 ":" (getenv "PATH")))
5072 (substitute* "lsofgraph"
5073 (("#!/usr/bin/env lua")
5074 (string-append "#!" (which "lua"))))
5076 (install-file "lsofgraph" (string-append %output "/bin"))
5077 (let ((doc (string-append
5078 %output "/share/doc/" ,name "-" ,version)))
5080 (install-file "LICENSE" doc)
5081 (install-file "README.md" doc))
5083 (home-page "https://github.com/zevv/lsofgraph")
5084 (synopsis "Convert @code{lsof} output to @code{graphviz}")
5085 (description "Utility to convert @code{lsof} output to a graph showing
5086 FIFO and UNIX interprocess communication.")
5087 (license license:bsd-2))))
5089 (define-public runitor
5097 (url "https://github.com/bdd/runitor")
5098 (commit (string-append "v" version))))
5099 (file-name (git-file-name name version))
5101 (base32 "0vjfbyrbp5ywgzdz9j3x0qgjvnq7nw7193x8v9yy6k2cih1zsacn"))))
5102 (build-system go-build-system)
5104 `(#:unpack-path "bdd.fi/x/runitor"
5105 #:build-flags '(,(string-append "-ldflags=-X main.Version=" version))
5106 #:import-path "bdd.fi/x/runitor/cmd/runitor"
5107 #:install-source? #f))
5108 (home-page "https://github.com/bdd/runitor")
5109 (synopsis "Command runner with healthchecks.io integration")
5111 "Runitor runs the supplied command, captures its output, and based on its
5112 exit code reports successful or failed execution to
5113 @url{https://healthchecks.io,https://healthchecks.io} or your private instance.")
5114 (license license:bsd-0)))
5116 (define-public udpcast
5119 (version "20211207")
5123 ;; XXX: Original server is at https://www.udpcast.linux.lu is not
5125 (uri (list (string-append
5126 "https://fossies.org/linux/privat/udpcast-"
5129 "https://www.udpcast.linux.lu/download/udpcast-"
5130 version ".tar.gz")))
5132 (base32 "0l6hck694szrrvz85nm48rwb7mzvg2z2bwa50v51pkvym3kvxkm3"))))
5133 (build-system gnu-build-system)
5135 (list autoconf automake m4 perl))
5136 (arguments `(#:tests? #f)) ;no test suite
5137 (synopsis "Multicast file transfer tool")
5139 "UDPcast is a file transfer tool that can send data simultaneously to
5140 many destinations on a LAN. This can for instance be used to install entire
5141 classrooms of PC's at once. The advantage of UDPcast over using other
5142 methods (nfs, ftp, whatever) is that UDPcast uses UDP's multicast abilities:
5143 it won't take longer to install 15 machines than it would to install just 2.")
5144 (home-page "https://www.udpcast.linux.lu")
5145 (license license:gpl2+)))
5147 (define-public greetd
5151 (home-page "https://git.sr.ht/~kennylevinsen/greetd")
5157 (file-name (git-file-name name version))
5159 (base32 "0x5c3jkw09kvj2grcxm899y2n6ws8p990cyp9cs0fy6lm4fzlh6v"))))
5160 (build-system cargo-build-system)
5163 (("rust-nix" ,rust-nix-0.19)
5164 ("rust-pam-sys" ,rust-pam-sys-0.5)
5165 ("rust-rpassword" ,rust-rpassword-5)
5166 ("rust-users" ,rust-users-0.11)
5167 ("rust-serde" ,rust-serde-1)
5168 ("rust-serde-json" ,rust-serde-json-1)
5169 ("rust-libc" ,rust-libc-0.2)
5170 ("rust-tokio" ,rust-tokio-1)
5171 ("rust-getopts" ,rust-getopts-0.2)
5172 ("rust-thiserror" ,rust-thiserror-1)
5173 ("rust-async-trait" ,rust-async-trait-0.1)
5174 ("rust-enquote" ,rust-enquote-1))
5176 (modify-phases %standard-phases
5178 (add-after 'build 'build-man-pages
5179 (lambda* (#:key inputs #:allow-other-keys)
5180 (define (scdoc-cmd doc lvl)
5181 (system (string-append "scdoc < "
5182 doc "-" lvl ".scd > "
5184 (with-directory-excursion "man"
5185 (scdoc-cmd "greetd" "1")
5186 (scdoc-cmd "greetd" "5")
5187 (scdoc-cmd "greetd-ipc" "7")
5188 (scdoc-cmd "agreety" "1"))))
5190 (lambda* (#:key inputs outputs #:allow-other-keys)
5191 (let* ((out (assoc-ref outputs "out"))
5192 (bin (string-append out "/bin"))
5193 (sbin (string-append out "/sbin"))
5194 (share (string-append out "/share"))
5195 (man (string-append share "/man"))
5196 (man1 (string-append man "/man1"))
5197 (man5 (string-append man "/man5"))
5198 (man7 (string-append man "/man7"))
5199 (release "target/release")
5200 (greetd-bin (string-append release "/greetd"))
5201 (agreety-bin (string-append release "/agreety")))
5202 (install-file greetd-bin sbin)
5203 (install-file agreety-bin bin)
5204 (with-directory-excursion "man"
5205 (install-file "greetd.1" man1)
5206 (install-file "greetd.5" man5)
5207 (install-file "greetd-ipc.7" man7)
5208 (install-file "agreety.1" man1))))))))
5210 `(("linux-pam" ,linux-pam)
5212 (synopsis "Minimal and flexible login manager daemon")
5214 "greetd is a minimal and flexible login manager daemon
5215 that makes no assumptions about what you want to launch.
5217 If you can run it from your shell in a TTY, greetd can start it.
5219 If it can be taught to speak a simple JSON-based IPC protocol,
5220 then it can be a greeter.")
5221 (license license:gpl3+)))
5223 (define-public greetd-pam-mount
5226 (name "greetd-pam-mount")
5228 (substitute-keyword-arguments (package-arguments pam-mount)
5229 ((#:configure-flags flags ''())
5230 #~(cons* "--with-rundir=/run/greetd" #$flags))
5232 #~(modify-phases #$phases
5233 (add-after 'unpack 'patch-config-file-name
5234 (lambda* (#:key inputs #:allow-other-keys)
5235 (substitute* "src/pam_mount.c"
5236 ((".*define CONFIGFILE .*$")
5237 "#define CONFIGFILE \"/etc/security/greetd_pam_mount.conf.xml\"\n")
5238 (("pam_mount_config") "greetd_pam_mount_config")
5239 (("pam_mount_system_authtok") "greetd_pam_mount_system_authtok"))))))))
5240 (synopsis "PAM module to mount volumes for a user session (greetd variant)")
5242 "Pam-mount is a PAM module to mount volumes when a user logs in.
5243 It can mount all local file systems supported by @command{mount}, as well as
5244 LUKS volumes encrypted with the user's log-in password.
5246 This package inherits pam-mount but is compiled specifically for use with
5247 the @command{greetd} log-in manager. It uses a different configuration
5248 location and PAM name space from the original.
5250 This allows greetd-pam-mount to auto-(un)mount @env{XDG_RUNTIME_DIR} without
5251 interfering with any pam-mount configuration.")))
5253 (define-public wlgreet
5260 (url "https://git.sr.ht/~kennylevinsen/wlgreet")
5262 (file-name (git-file-name name version))
5265 "00grp63n9nrgqls3knxfv9wjbc7p0jwr7i2vzxy750dz85gi2kzn"))))
5266 (build-system cargo-build-system)
5268 (list #:cargo-inputs
5269 `(("rust-chrono" ,rust-chrono-0.4)
5270 ("rust-getopts" ,rust-getopts-0.2)
5271 ("rust-greetd-ipc" ,rust-greetd-ipc-0.8)
5272 ("rust-lazy-static" ,rust-lazy-static-1)
5273 ("rust-memmap2" ,rust-memmap2-0.3)
5274 ("rust-nix" ,rust-nix-0.15)
5275 ("rust-os-pipe" ,rust-os-pipe-0.8)
5276 ("rust-rusttype" ,rust-rusttype-0.7)
5277 ("rust-serde" ,rust-serde-1)
5278 ("rust-smithay-client-toolkit"
5279 ,rust-smithay-client-toolkit-0.15)
5280 ("rust-toml" ,rust-toml-0.5)
5281 ("rust-wayland-client" ,rust-wayland-client-0.29)
5282 ("rust-wayland-protocols" ,rust-wayland-protocols-0.29)
5283 ("rust-xml-rs" ,rust-xml-rs-0.8))
5285 #~(modify-phases %standard-phases
5286 (add-after 'unpack 'remove-bundled-fonts
5288 (delete-file-recursively "fonts")))
5289 (add-after 'remove-bundled-fonts 'fix-font-references
5290 (lambda* (#:key inputs #:allow-other-keys)
5291 (substitute* "src/draw.rs"
5292 (("\\.\\./fonts/dejavu/DejaVuSansMono\\.ttf" _)
5295 "share/fonts/truetype/DejaVuSansMono.ttf"))
5296 (("\\.\\./fonts/Roboto-Regular\\.ttf" _)
5299 "share/fonts/truetype/Roboto-Regular.ttf")))))
5300 (add-after 'configure 'fix-library-references
5301 (lambda* (#:key inputs vendor-dir #:allow-other-keys)
5302 (substitute* (find-files vendor-dir "\\.rs$")
5303 (("lib(wayland-.*|xkbcommon)\\.so" so-file)
5306 (string-append "lib/" so-file)))))))))
5312 (home-page "https://git.sr.ht/~kennylevinsen/wlgreet")
5313 (synopsis "Bare-bones Wayland-based greeter for @command{greetd}")
5315 "@command{wlgreet} provides a @command{greetd} greeter
5316 that runs on a Wayland compositor such as @command{sway}. It
5317 is implemented with pure Wayland APIs, so it does not depend
5319 (license license:gpl3)))
5321 (define-public libseat
5328 (url "https://git.sr.ht/~kennylevinsen/seatd")
5330 (file-name (git-file-name name version))
5333 "10f8387yy5as547xjjhl0cna6iywdgjmw0iq2nvcs8q6vlpnik4v"))))
5334 (build-system meson-build-system)
5336 `(#:configure-flags '("-Dlibseat-logind=elogind"
5337 "-Dserver=disabled")))
5339 `(("pkg-config" ,pkg-config)))
5341 `(("elogind" ,elogind)))
5342 (home-page "https://sr.ht/~kennylevinsen/seatd")
5343 (synopsis "Seat management library")
5345 "This package provides a universal seat management library that
5346 allows applications to use whatever seat management is available.")
5347 (license license:expat)))
5349 (define-public seatd
5354 `(#:configure-flags '("-Dlibseat-logind=elogind")
5356 (modify-phases %standard-phases
5357 (add-after 'install 'remove-libs
5358 (lambda* (#:key outputs #:allow-other-keys)
5359 (with-directory-excursion (assoc-ref outputs "out")
5360 (for-each delete-file-recursively '("lib" "include"))))))))
5362 `(("pkg-config" ,pkg-config)
5365 (synopsis "Seat management daemon")
5367 "This package provides a minimal seat management daemon whose task is to
5368 mediate access to shared devices, such as graphics and input, for applications
5370 (license license:expat)))
5372 (define-public fail2ban
5379 (url "https://github.com/fail2ban/fail2ban")
5381 (file-name (git-file-name name version))
5384 "00d9q8m284q2wy6q462nipzszplfbvrs9fhgn0y3imwsc24kv1db"))
5385 (modules '((guix build utils)))
5388 ;; Get rid of absolute file names.
5389 (substitute* "setup.py"
5392 (("/var/lib/fail2ban")
5396 (("\"/usr/lib/fail2ban/\"")
5397 "\"usr/lib/fail2ban/\"")
5398 (("'/usr/share/doc/fail2ban'")
5399 "'usr/share/doc/fail2ban'"))
5400 ;; disable tests performing unacceptable side-effects
5401 (let ((make-suite (lambda (t)
5403 "tests.addTest.unittest.makeSuite."
5405 (substitute* "fail2ban/tests/utils.py"
5406 (((make-suite "actiontestcase.CommandActionTest"))
5408 (((make-suite "misctestcase.SetupTest"))
5411 "filtertestcase.DNSUtilsNetworkTests"))
5413 (((make-suite "filtertestcase.IgnoreIPDNS"))
5415 (((make-suite "filtertestcase.GetFailures"))
5418 "fail2banclienttestcase.Fail2banServerTest"))
5421 "servertestcase.ServerConfigReaderTests"))
5423 (patches (search-patches
5424 "fail2ban-0.11.2_fix-setuptools-drop-2to3.patch"
5425 "fail2ban-python310-server-action.patch"
5426 "fail2ban-python310-server-actions.patch"
5427 "fail2ban-python310-server-jails.patch"
5428 "fail2ban-0.11.2_fix-test-suite.patch"
5429 "fail2ban-0.11.2_CVE-2021-32749.patch"
5430 "fail2ban-paths-guix-conf.patch"))))
5431 (build-system python-build-system)
5433 '(#:phases (modify-phases %standard-phases
5434 (add-before 'build 'invoke-2to3
5436 (invoke "./fail2ban-2to3")))
5437 (add-before 'install 'fix-default-config
5438 (lambda* (#:key outputs #:allow-other-keys)
5439 (substitute* '("config/paths-common.conf"
5440 "fail2ban/tests/utils.py"
5441 "fail2ban/client/configreader.py"
5442 "fail2ban/client/fail2bancmdline.py"
5443 "fail2ban/client/fail2banregex.py")
5445 (string-append (assoc-ref outputs "out")
5446 "/etc/fail2ban")))))
5447 (add-after 'fix-default-config 'set-action-dependencies
5448 (lambda* (#:key inputs #:allow-other-keys)
5449 ;; deleting things that are not feasible to fix
5450 ;; or won't be used any way
5451 (with-directory-excursion "config"
5452 (for-each delete-file
5456 "paths-freebsd.conf"
5457 "paths-opensuse.conf"
5459 (with-directory-excursion "config/action.d"
5460 (for-each delete-file
5466 "firewallcmd-allports.conf"
5467 "firewallcmd-common.conf"
5468 "firewallcmd-ipset.conf"
5469 "firewallcmd-multiport.conf"
5470 "firewallcmd-new.conf"
5471 "firewallcmd-rich-logging.conf"
5472 "firewallcmd-rich-rules.conf"
5476 "nginx-block-map.conf"
5479 "shorewall-ipset-proto6.conf"
5481 (let* ((lookup-cmd (lambda (i)
5482 (search-input-file inputs i)))
5484 (lookup-cmd (string-append "/bin/" i))))
5486 (lookup-cmd (string-append "/sbin/" i))))
5488 (sendmail (sbin "sendmail")))
5489 (substitute* (find-files "config/action.d" "\\.conf$")
5490 ;; TODO: deal with geoiplookup ..
5491 (("(awk|curl|dig|jq)" all cmd)
5493 (("(cat|echo|grep|head|printf|wc) " all
5495 (string-append (bin cmd) " "))
5496 ((" (date|rm|sed|tail|touch|tr) " all
5501 (string-append (bin "cut") " -d"))
5506 (string-append (bin "id") " -"))
5507 (("ip -([46]) addr" all ver)
5508 (string-append ip " -" ver " addr"))
5510 (string-append ip " route"))
5512 (string-append (sbin "ipset") " "))
5513 (("(iptables|ip6tables) <" all cmd)
5514 (string-append (sbin cmd) " <"))
5515 (("/usr/bin/nsupdate")
5518 (string-append sendmail " -E"))
5520 (string-append "nftables = " (sbin "nft")))
5522 (string-append (bin "perl") " -e"))
5523 (("/usr/sbin/sendmail")
5526 (string-append (bin "test") " -e"))
5528 (string-append "_whois = " (bin "whois")))))
5529 (substitute* "config/jail.conf"
5530 (("before = paths-debian.conf")
5531 "before = paths-guix.conf"))))
5532 (add-after 'install 'copy-man-pages
5533 (lambda* (#:key outputs #:allow-other-keys)
5534 (let* ((man (string-append (assoc-ref outputs "out")
5536 (install-man (lambda (m)
5538 (install-file (string-append f
5542 (install-man1 (install-man "1"))
5543 (install-man5 (install-man "5")))
5544 (with-directory-excursion "man"
5545 (for-each install-man1
5551 "fail2ban-testcases"))
5552 (for-each install-man5
5553 '("jail.conf")))))))))
5562 `(,isc-bind "utils")
5570 (home-page "http://www.fail2ban.org")
5571 (synopsis "Daemon to ban hosts that cause multiple authentication errors")
5573 "Fail2Ban scans log files like @file{/var/log/auth.log} and bans IP
5574 addresses conducting too many failed login attempts. It does this by updating
5575 system firewall rules to reject new connections from those IP addresses, for a
5576 configurable amount of time. Fail2Ban comes out-of-the-box ready to read many
5577 standard log files, such as those for sshd and Apache, and is easily
5578 configured to read any log file of your choosing, for any error you wish.
5580 Though Fail2Ban is able to reduce the rate of incorrect authentication
5581 attempts, it cannot eliminate the risk presented by weak authentication. Set
5582 up services to use only two factor, or public/private authentication
5583 mechanisms if you really want to protect services.")
5584 (license license:gpl2+)))
5593 "https://download.gnu.org.ua/pub/releases/rex/rex-"
5597 "1arb8z602invwavskq36nhwy42a3v14iyhi06iqlngfai2k93fai"))))
5598 (build-system gnu-build-system)
5601 #:tests? #f ; no tests
5603 #~(modify-phases %standard-phases
5604 ;; No configure script and Makefile.
5607 (add-before 'install 'patch-exec-expect
5610 (("exec expect") (string-append "exec " (which "expect"))))))
5614 (string-append "--prefix=" #$output)))))))
5615 (inputs (list expect))
5616 (home-page "https://www.gnu.org.ua/software/rex/")
5617 (synopsis "Remote execution utility")
5618 (description "@command{rex} runs a supplied command or shell script on
5619 several hosts in succession or in parallel. It can also be used to copy a
5620 file or files to several hosts.")
5621 (license license:gpl3+)))
5623 (define-public doctl
5630 (url "https://github.com/digitalocean/doctl")
5631 (commit (string-append "v" version))))
5632 (file-name (git-file-name name version))
5635 "1jmqvz1rdqrsr4l0bv3ik1jla0xnbdvcmnw9892acvfs3wsmliyc"))))
5636 (build-system go-build-system)
5638 (list #:import-path "github.com/digitalocean/doctl/cmd/doctl"
5639 #:unpack-path "github.com/digitalocean/doctl"
5642 #~(list (string-append "-ldflags=-X github.com/digitalocean/doctl.Label=release"
5643 " -X github.com/digitalocean/doctl.Major="
5644 (car (string-split #$version #\.))
5645 " -X github.com/digitalocean/doctl.Minor="
5646 (cadr (string-split #$version #\.))
5647 " -X github.com/digitalocean/doctl.Patch="
5648 (caddr (string-split #$version #\.))))
5649 #:install-source? #f
5651 #~(modify-phases %standard-phases
5652 (add-after 'install 'install-completions
5654 (define (install-completion shell file)
5655 (let ((file (string-append #$output file)))
5656 (mkdir-p (dirname file))
5657 (with-output-to-file file
5659 (invoke (string-append #$output "/bin/doctl")
5660 "completion" shell)))))
5661 (install-completion "bash" "/etc/bash_completion.d/doctl")
5662 (install-completion "fish"
5663 "/etc/fish/completions/doctl.fish")
5664 (install-completion "zsh"
5665 "/etc/zsh/site-functions/_doctl"))))))
5666 (home-page "https://github.com/digitalocean/doctl")
5667 (synopsis "Command line client for DigitalOcean")
5669 "@code{doctl} provides a unified command line interface to the DigitalOcean API.")
5670 (license license:asl2.0)))