gnu: libhx: Update to 4.2.
[jackhill/guix/guix.git] / gnu / packages / admin.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
4590ee9b 2;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
340c7033 3;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
dad963a4 4;;; Copyright © 2014, 2015, 2016, 2018, 2019, 2020 Mark H Weaver <mhw@netris.org>
1a06cafc 5;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2020, 2021 Eric Bavier <bavier@posteo.net>
d0457553 6;;; Copyright © 2015, 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
15926aec 7;;; Copyright © 2015 Alex Sassmannshausen <alex.sassmannshausen@gmail.com>
8d801045 8;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
3728ed7c 9;;; Copyright © 2016, 2017, 2020 Leo Famulari <leo@famulari.name>
f1957fc1 10;;; Copyright © 2016 Pjotr Prins <pjotr.guix@thebird.nl>
d10fa5c7 11;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
ef126b97 12;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
1a0346f0 13;;; Copyright © 2016 Peter Feigl <peter.feigl@nexoid.at>
61402398 14;;; Copyright © 2016 John J. Foerch <jjfoerch@earthlink.net>
3c986a7d 15;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
da7fde00 16;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
1b5b24c9
BS
17;;; Copyright © 2016 John Darrington <jmd@gnu.org>
18;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
6e75ea48 19;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23@gmail.com>
94551439 20;;; Copyright © 2017 Christine Lemmer-Webber <cwebber@dustycloud.org>
f8cbe98e 21;;; Copyright © 2017, 2018, 2020 Marius Bakke <mbakke@fastmail.com>
ba8551ec 22;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
3ebf2c29 23;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
abde01f2 24;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
ce3fef9f 25;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
4b3ff362 26;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
a20ede32 27;;; Copyright © 2019,2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
e8134442 28;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.org>
6eb1d20b 29;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
37760623 30;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
e41f8923 31;;; Copyright © 2019, 2021 Guillaume Le Vaillant <glv@posteo.net>
994d8ce3 32;;; Copyright © 2019, 2020, 2021 Mathieu Othacehe <m.othacehe@gmail.com>
73656471 33;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
1a9b3faa 34;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
5b401ed0 35;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
913c8897 36;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
248af684 37;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
18e79929 38;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
861ba525 39;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
c7be46b7 40;;; Copyright © 2021 qblade <qblade@protonmail.com>
53240608 41;;; Copyright © 2021 Hyunseok Kim <lasnesne@lagunposprasihopre.org>
b9986cac 42;;; Copyright © 2021 David Larsson <david.larsson@selfhosted.xyz>
296e2308 43;;; Copyright © 2021 WinterHound <winterhound@yandex.com>
eb939109 44;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
83bf3c63 45;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
7256d9d2 46;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
1df895b0 47;;;
233e7676 48;;; This file is part of GNU Guix.
1df895b0 49;;;
233e7676 50;;; GNU Guix is free software; you can redistribute it and/or modify it
1df895b0
LC
51;;; under the terms of the GNU General Public License as published by
52;;; the Free Software Foundation; either version 3 of the License, or (at
53;;; your option) any later version.
54;;;
233e7676 55;;; GNU Guix is distributed in the hope that it will be useful, but
1df895b0
LC
56;;; WITHOUT ANY WARRANTY; without even the implied warranty of
57;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
58;;; GNU General Public License for more details.
59;;;
60;;; You should have received a copy of the GNU General Public License
233e7676 61;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
1df895b0 62
4aeea896 63(define-module (gnu packages admin)
fbc1a58f 64 #:use-module (guix build-system cmake)
2b6164f0 65 #:use-module (guix build-system emacs)
ddb0fef5 66 #:use-module (guix build-system glib-or-gtk)
1df895b0 67 #:use-module (guix build-system gnu)
a94214f6 68 #:use-module (guix build-system go)
b19f3337 69 #:use-module (guix build-system meson)
d1ce1125 70 #:use-module (guix build-system perl)
4ecfbda7 71 #:use-module (guix build-system python)
2d2d5b29 72 #:use-module (guix build-system ruby)
c773aba8 73 #:use-module (guix build-system trivial)
1b36f758
TGR
74 #:use-module (guix download)
75 #:use-module (guix git-download)
76 #:use-module ((guix licenses) #:prefix license:)
77 #:use-module (guix packages)
78 #:use-module (guix utils)
59a43334 79 #:use-module (gnu packages)
67648704 80 #:use-module (gnu packages algebra)
ddb0fef5 81 #:use-module (gnu packages autogen)
1b36f758 82 #:use-module (gnu packages autotools)
c73d4c92 83 #:use-module (gnu packages base)
bbc94ed0 84 #:use-module (gnu packages bash)
1b36f758
TGR
85 #:use-module (gnu packages bison)
86 #:use-module (gnu packages boost)
cd2ce8ab 87 #:use-module (gnu packages c)
ac257f12 88 #:use-module (gnu packages check)
1b36f758
TGR
89 #:use-module (gnu packages compression)
90 #:use-module (gnu packages cross-base)
6eb1d20b 91 #:use-module (gnu packages crypto)
cd2ce8ab 92 #:use-module (gnu packages cryptsetup)
3d7a157c 93 #:use-module (gnu packages cyrus-sasl)
bbc94ed0 94 #:use-module (gnu packages dns)
1b36f758 95 #:use-module (gnu packages elf)
bbc94ed0 96 #:use-module (gnu packages file)
1b36f758 97 #:use-module (gnu packages flex)
ceb233bb 98 #:use-module (gnu packages gawk)
1b36f758
TGR
99 #:use-module (gnu packages gettext)
100 #:use-module (gnu packages gl)
101 #:use-module (gnu packages glib)
102 #:use-module (gnu packages gnome)
103 #:use-module (gnu packages gnupg)
a48cf78a 104 #:use-module (gnu packages golang)
1b36f758
TGR
105 #:use-module (gnu packages groff)
106 #:use-module (gnu packages gtk)
f15164e7 107 #:use-module (gnu packages guile)
c0a5cd1b 108 #:use-module (gnu packages hurd)
1b36f758 109 #:use-module (gnu packages image)
050e5756
MB
110 #:use-module (gnu packages imagemagick)
111 #:use-module (gnu packages inkscape)
1b36f758
TGR
112 #:use-module (gnu packages kerberos)
113 #:use-module (gnu packages libbsd)
114 #:use-module (gnu packages libftdi)
115 #:use-module (gnu packages libunwind)
116 #:use-module (gnu packages libusb)
117 #:use-module (gnu packages linux)
118 #:use-module (gnu packages lua)
72861d8e 119 #:use-module (gnu packages mail)
1b36f758
TGR
120 #:use-module (gnu packages man)
121 #:use-module (gnu packages mcrypt)
122 #:use-module (gnu packages mpi)
123 #:use-module (gnu packages ncurses)
124 #:use-module (gnu packages openldap)
125 #:use-module (gnu packages patchutils)
126 #:use-module (gnu packages pciutils)
d0457553 127 #:use-module (gnu packages pcre)
c73d4c92 128 #:use-module (gnu packages perl)
5ccde207 129 #:use-module (gnu packages perl-check)
87216303 130 #:use-module (gnu packages pkg-config)
b36fcf95 131 #:use-module (gnu packages popt)
1a0346f0 132 #:use-module (gnu packages python)
cc6f4912 133 #:use-module (gnu packages python-crypto)
1b2f753d 134 #:use-module (gnu packages python-web)
44d10b1f 135 #:use-module (gnu packages python-xyz)
050e5756 136 #:use-module (gnu packages qt)
1b36f758 137 #:use-module (gnu packages readline)
2d2d5b29 138 #:use-module (gnu packages ruby)
83bf3c63 139 #:use-module (gnu packages selinux)
d8a046d5 140 #:use-module (gnu packages serialization)
83bf3c63 141 #:use-module (gnu packages ssh)
9d0c291e 142 #:use-module (gnu packages sphinx)
1b36f758 143 #:use-module (gnu packages tcl)
2468ca04 144 #:use-module (gnu packages terminals)
fccf2fe0 145 #:use-module (gnu packages texinfo)
83bf3c63 146 #:use-module (gnu packages time)
1b36f758
TGR
147 #:use-module (gnu packages tls)
148 #:use-module (gnu packages version-control)
149 #:use-module (gnu packages web)
d10fa5c7 150 #:use-module (gnu packages xdisorg)
3ebf2c29 151 #:use-module (gnu packages xml)
1b36f758 152 #:use-module (gnu packages xorg))
f15164e7 153
a632eeb8 154;; This package uses su instead of sudo (because of SpaceFM).
ddb0fef5
RG
155(define-public ktsuss
156 (package
157 (name "ktsuss")
158 (version "2.1")
159 (source
160 (origin
161 (method git-fetch)
162 (uri
163 (git-reference
b0e7b699 164 (url "https://github.com/nomius/ktsuss")
ddb0fef5
RG
165 (commit version)))
166 (sha256
167 (base32 "0q9931f9hp47v1n8scli4bdg2rkjpf5jf8v7jj2gdn83aia1r2hz"))
168 (file-name (git-file-name name version))))
169 (build-system glib-or-gtk-build-system)
170 (arguments
a632eeb8 171 `(#:phases
ddb0fef5 172 (modify-phases %standard-phases
c53886a5
RG
173 (add-after 'unpack 'patch-file-names
174 (lambda _
ddb0fef5 175 (substitute* "configure.ac"
c53886a5 176 (("supath=`which su 2>/dev/null`")
a632eeb8 177 "supath=/run/setuid-programs/su"))
ddb0fef5
RG
178 #t)))))
179 (native-inputs
180 `(("autoconf" ,autoconf)
ddb0fef5
RG
181 ("automake" ,automake)
182 ("libtool" ,libtool)
183 ("pkg-config" ,pkg-config)))
184 (inputs
185 `(("glib" ,glib)
c53886a5 186 ("gtk+" ,gtk+-2)))
ddb0fef5
RG
187 (synopsis "Graphical front end for @command{su}")
188 (description
189 "Ktsuss stands for ``Keep the @command{su} simple, stupid''.
190It is a graphical version of @command{su} written in C and GTK+ 2, with
191simplicity in mind.")
192 (home-page "https://github.com/nomius/ktsuss")
193 (license license:bsd-3)))
194
c1f73569
RW
195(define-public aide
196 (package
197 (name "aide")
c3f4505e 198 (version "0.16.2")
737300be
TGR
199 (source
200 (origin
201 (method url-fetch)
202 (uri (string-append "https://github.com/aide/aide/releases/download/v"
203 version "/aide-" version ".tar.gz"))
204 (sha256
c3f4505e 205 (base32 "15xp47sz7kk1ciffw3f5xw2jg2mb2lqrbr3q6p4bkbz5dap9iy8p"))))
c1f73569
RW
206 (build-system gnu-build-system)
207 (native-inputs
208 `(("bison" ,bison)
209 ("flex" ,flex)))
210 (inputs
211 `(("libgcrypt" ,libgcrypt)
212 ("libgpg-error" ,libgpg-error)
213 ("libmhash" ,libmhash)
7d9d521f 214 ("pcre:static" ,pcre "static")
b067ad3e 215 ("pcre" ,pcre)
7d9d521f 216 ("zlib:static" ,zlib "static")
c1f73569
RW
217 ("zlib" ,zlib)))
218 (synopsis "File and directory integrity checker")
219 (description
220 "AIDE (Advanced Intrusion Detection Environment) is a file and directory
221integrity checker. It creates a database from the regular expression rules
222that it finds from its configuration files. Once this database is initialized
223it can be used to verify the integrity of the files. It has several message
224digest algorithms that are used to check the integrity of files. All of the
225usual file attributes can be checked for inconsistencies.")
737300be 226 (home-page "https://aide.github.io/")
c1f73569
RW
227 (license license:gpl2+)))
228
4971d5d0
RJ
229(define-public progress
230 (package
231 (name "progress")
5a948f31 232 (version "0.16")
4b6456ce
TGR
233 (source
234 (origin
235 (method git-fetch)
236 (uri (git-reference
b0e7b699 237 (url "https://github.com/Xfennec/progress")
4b6456ce
TGR
238 (commit (string-append "v" version))))
239 (sha256
5a948f31 240 (base32 "0gf10j9zd8spain94b5kigknwbdqajiy6fjsa5hhwsc1biz34hcj"))
4b6456ce 241 (file-name (git-file-name name version))))
4971d5d0 242 (build-system gnu-build-system)
eec9c4a7
TGR
243 (native-inputs
244 `(("pkg-config" ,pkg-config)
245 ("which" ,which)))
4971d5d0
RJ
246 (inputs
247 `(("ncurses" ,ncurses)))
248 (arguments
4b6456ce 249 `(#:tests? #f ; no test suite
b97b8b44
TGR
250 #:make-flags
251 (let ((target ,(%current-target-system)))
252 (list ,(string-append "CC=" (cc-for-target))
253 (string-append "PKG_CONFIG="
254 (if target
255 (string-append target "-pkg-config")
256 "pkg-config"))
257 (string-append "PREFIX=" (assoc-ref %outputs "out"))))
4971d5d0
RJ
258 #:phases
259 (modify-phases %standard-phases
4b6456ce 260 (delete 'configure)))) ; no configure script
4971d5d0
RJ
261 (home-page "https://github.com/Xfennec/progress")
262 (synopsis "Program to view the progress of the coreutils commands")
263 (description "A program that looks for coreutils basic commands (cp, mv,
264dd, tar, gzip/gunzip, cat, etc.) currently running on your system and displays
265the percentage of copied data. It can also show estimated time and throughput,
266and provides a \"top-like\" mode (monitoring).")
267 (license license:gpl3+)))
268
e932d371 269(define-public shepherd
133056bd
LC
270 (package
271 (name "shepherd")
3f9c62d1 272 (version "0.8.1")
133056bd
LC
273 (source (origin
274 (method url-fetch)
9fb1ca08 275 (uri (string-append "mirror://gnu/shepherd/shepherd-"
133056bd
LC
276 version ".tar.gz"))
277 (sha256
278 (base32
3f9c62d1 279 "0x9zr0x3xvk4qkb6jnda451d5iyrl06cz1bjzjsm0lxvjj3fabyk"))))
133056bd
LC
280 (build-system gnu-build-system)
281 (arguments
55b4120f
EF
282 '(#:configure-flags '("--localstatedir=/var")
283 #:make-flags '("GUILE_AUTO_COMPILE=0")))
425ab478
LC
284 (native-inputs
285 `(("pkg-config" ,pkg-config)
286
287 ;; This is the Guile we use as a cross-compiler...
b6bee63b 288 ("guile" ,guile-3.0)))
425ab478
LC
289 (inputs
290 ;; ... and this is the one that appears in shebangs when cross-compiling.
b6bee63b 291 `(("guile" ,guile-3.0)
bfb06e58
LC
292
293 ;; The 'shepherd' command uses Readline when used interactively. It's
294 ;; an unusual use case though, so we don't propagate it.
295 ("guile-readline" ,guile-readline)))
133056bd
LC
296 (synopsis "System service manager")
297 (description
298 "The GNU Shepherd is a daemon-managing daemon, meaning that it supervises
299the execution of system services, replacing similar functionality found in
300typical init systems. It provides dependency-handling through a convenient
301interface and is based on GNU Guile.")
302 (license license:gpl3+)
9fb1ca08 303 (home-page "https://www.gnu.org/software/shepherd/")))
e932d371 304
b6bee63b 305(define-public guile2.2-shepherd
139a9887
LC
306 (package
307 (inherit shepherd)
b6bee63b 308 (name "guile2.2-shepherd")
139a9887
LC
309 (native-inputs
310 `(("pkg-config" ,pkg-config)
b6bee63b 311 ("guile" ,guile-2.2)))
139a9887 312 (inputs
3c0f7dcb
EF
313 `(("guile" ,guile-2.2)
314 ("guile2.2-readline" ,guile2.2-readline)))))
b6bee63b 315
76812463
LC
316(define-public guile2.0-shepherd
317 (package
318 (inherit shepherd)
319 (name "guile2.0-shepherd")
320 (native-inputs
dbd94d96
EF
321 `(("help2man" ,help2man)
322 ("pkg-config" ,pkg-config)
76812463
LC
323 ("guile" ,guile-2.0)))
324 (inputs
dbd94d96
EF
325 `(("guile" ,guile-2.0)))
326 (arguments
327 `(#:phases
328 (modify-phases %standard-phases
329 (add-after 'unpack 'patch-source
330 (lambda _
331 ;; (ice-9 threads) isn't available in guile-2.0
332 (substitute* "modules/shepherd.scm"
333 ((".*\\(ice-9 threads\\).*") ""))
334 #t)))
335 ,@(package-arguments shepherd)))))
76812463 336
8e4d44ad
TGR
337(define-public cfm
338 (package
339 (name "cfm")
340 (version "0.6.6")
341 (source
342 (origin
343 (method git-fetch)
344 (uri (git-reference
345 (url "https://github.com/WillEccles/cfm")
346 (commit (string-append "v" version))))
347 (file-name (git-file-name name version))
348 (sha256
349 (base32 "14gapia902f29wa4dlrrj8jcwcff9bfvyhjccw9ddy2gxx2g8wmr"))))
350 (build-system gnu-build-system)
351 (arguments
352 `(#:tests? #f ; no test suite
353 #:make-flags
354 (list (string-append "CC=" ,(cc-for-target))
355 (string-append "PREFIX=" (assoc-ref %outputs "out")))
356 #:phases
357 (modify-phases %standard-phases
358 ;; Keeping xdg-open optional avoids a size increase of 293%.
359 (delete 'configure)))) ; no configure script
360 (home-page "https://eccles.dev/cfm/")
361 (synopsis
362 "Simple terminal file manager with @command{vi}-inspired key bindings")
363 (description
364 "The Cactus File Manager (@command{cfm}) helps you manage your files
365visually from a text terminal. It aims to be simple and fast, with key bindings
366inspired by @command{vi}.")
367 (license license:mpl2.0)))
368
bf949323
CB
369(define-public cloud-utils
370 (package
371 (name "cloud-utils")
f00ccdcb 372 (version "0.32")
bf949323
CB
373 (source
374 (origin
375 (method url-fetch)
376 (uri (string-append
377 "https://launchpad.net/cloud-utils/trunk/"
378 version "/+download/cloud-utils-" version ".tar.gz"))
379 (sha256
380 (base32
f00ccdcb 381 "0xxdi55lzw7j91zfajw7jhd2ilsqj2dy04i9brlk8j3pvb5ma8hk"))))
bf949323
CB
382 (build-system gnu-build-system)
383 (arguments
384 '(#:make-flags
385 (let ((out (assoc-ref %outputs "out")))
386 (list (string-append "BINDIR=" out "/bin")
387 (string-append "MANDIR=" out "/share/man/man1")
388 (string-append "DOCDIR=" out "/share/doc")))
389 #:phases
390 (modify-phases %standard-phases
391 (delete 'configure)
392 (delete 'check)
393 (add-after 'install 'wrap
394 (lambda* (#:key outputs inputs #:allow-other-keys)
395 (let ((growpart (string-append (assoc-ref outputs "out")
396 "/bin/growpart")))
397 (wrap-program growpart
398 `("PATH" ":" prefix (,(dirname (which "sfdisk"))
399 ,(dirname (which "readlink"))))))
400 #t)))))
401 (inputs
402 `(("python" ,python)
403 ("util-linux" ,util-linux))) ; contains sfdisk for growpart
404 (home-page "https://launchpad.net/cloud-utils")
405 (synopsis "Set of utilities for cloud computing environments")
406 (description
407 "This package contains a set of utilities for cloud computing
408environments:
409
410@itemize @bullet
411@item @command{cloud-localds} Create a disk for cloud-init to utilize nocloud
412@item @command{cloud-publish-image} Wrapper for cloud image publishing
413@item @command{cloud-publish-tarball} Wrapper for publishing cloud tarballs
414@item @command{cloud-publish-ubuntu} Import a Ubuntu cloud image
415@item @command{ec2metadata} Query and display @acronym{EC2,Amazon Elastic
416 Compute Cloud} metadata
417@item @command{growpart} Grow a partition to fill the device
418@item @command{mount-image-callback} Mount a file and run a command
419@item @command{resize-part-image} Resize a partition image to a new size
420@item @command{ubuntu-cloudimg-query} Get the latest Ubuntu
421 @acronym{AMI,Amazon Machine Image}
422@item @command{ubuntu-ec2-run} Run a @acronym{EC2,Amazon Elastic Compute
423 Cloud} instance using Ubuntu
424@item @command{vcs-run} Obtain a repository, and run a command
425@item @command{write-mime-multipart} Handle multipart
426 @acronym{MIME,Multipurpose Internet Mail Extensions} messages
427@end itemize")
428 (license license:gpl3)))
429
db341bfa
CB
430(define-public daemontools
431 (package
432 (name "daemontools")
433 (version "0.76")
434 (source (origin
435 (method url-fetch)
436 (uri (string-append
213114a7
TGR
437 "https://cr.yp.to/daemontools/"
438 "daemontools-" version ".tar.gz"))
db341bfa
CB
439 (sha256
440 (base32
441 "07scvw88faxkscxi91031pjkpccql6wspk4yrlnsbrrb5c0kamd5"))))
442 (build-system gnu-build-system)
443 (arguments
444 `(#:tests? #f ;; No tests as far as I can tell.
445 #:phases
446 (modify-phases %standard-phases
447 (add-after 'unpack 'chdir
448 (lambda _
213114a7 449 (chdir ,(string-append "daemontools-" version))
cb8ba848 450 #t))
db341bfa
CB
451 (delete 'configure)
452 (add-before 'build 'patch
453 (lambda _
454 (substitute* "src/error.h"
455 (("extern int errno;")
cb8ba848
MW
456 "#include <errno.h>"))
457 #t))
db341bfa
CB
458 (replace 'build
459 (lambda _
460 (invoke "package/compile")))
461 (replace 'install
462 (lambda* (#:key outputs #:allow-other-keys)
463 (let* ((out (assoc-ref outputs "out"))
464 (bin (string-append out "/bin")))
465 (for-each (lambda (file)
466 (install-file file bin))
cb8ba848
MW
467 (find-files "command")))
468 #t)))))
db341bfa
CB
469 (synopsis "Tools for managing UNIX style services")
470 (description
471 "@code{daemontools} is a collection of tools for managing UNIX
472services.")
473 (license license:public-domain)
474 (home-page "https://cr.yp.to/daemontools.html")))
475
296e2308
W
476(define-public daemonize
477 (package
478 (name "daemonize")
479 (version "1.7.8")
480 (source
481 (origin
482 (method git-fetch)
483 (uri (git-reference
484 (url "https://github.com/bmc/daemonize")
485 (commit (string-append "release-" version))))
486 (file-name (git-file-name name version))
487 (sha256
488 (base32 "0w4g0iyssyw7dd0061881z8s5czcl01mz6v00znax57zfxjqpvnm"))))
489 (build-system gnu-build-system)
490 (arguments '(#:tests? #f)) ; No tests available.
491 (home-page "http://software.clapper.org/daemonize/")
492 (synopsis "Command line utility to run a program as a daemon")
493 (description
494 "daemonize runs a command as a Unix daemon. It will close all open file
495descriptors, change working directory of the process to the root filesystem,
496reset its umask, run in the background, ignore I/O signals, handle
497@code{SIGCLD}, etc. Most programs that are designed to be run as daemons do
498that work for themselves. However, you’ll occasionally run across one that
499does not. When you must run a daemon program that does not properly make
500itself into a true Unix daemon, you can use daemonize to force it to run as a
501true daemon.")
502 (license license:bsd-3)))
503
fbc1a58f
CR
504(define-public dfc
505 (package
506 (name "dfc")
48167ccd 507 (version "3.1.1")
fbc1a58f
CR
508 (source
509 (origin
510 (method url-fetch)
511 (uri (string-append
eeb8b0e6 512 "https://projects.gw-computing.net/attachments/download/615/dfc-"
fbc1a58f
CR
513 version ".tar.gz"))
514 (sha256
515 (base32
48167ccd 516 "0m1fd7l85ckb7bq4c5c3g257bkjglm8gq7x42pkmpp87fkknc94n"))))
fbc1a58f
CR
517 (build-system cmake-build-system)
518 (arguments '(#:tests? #f)) ; There are no tests.
b94a6ca0 519 (native-inputs `(("gettext" ,gettext-minimal)))
eeb8b0e6 520 (home-page "https://projects.gw-computing.net/projects/dfc")
fbc1a58f
CR
521 (synopsis "Display file system space usage using graphs and colors")
522 (description
523 "dfc (df color) is a modern version of df. It uses colors, draws pretty
524graphs and can export its output to different formats.")
f61e0e79 525 (license license:bsd-3)))
fbc1a58f 526
2d2d5b29
MB
527(define-public facter
528 (package
529 (name "facter")
acbcc0c4 530 (version "4.0.52")
2d2d5b29
MB
531 (source (origin
532 (method git-fetch)
533 (uri (git-reference
44d66cf7 534 (url "https://github.com/puppetlabs/facter")
2d2d5b29
MB
535 (commit version)))
536 (file-name (git-file-name name version))
537 (sha256
538 (base32
acbcc0c4 539 "05j4q87sak1f1isj7ngzr59h3j3xskfwjjwfv0xd7lhwcaxg3a3c"))))
2d2d5b29
MB
540 (build-system ruby-build-system)
541 (arguments
c43c4d8b
TGR
542 `(#:phases
543 (modify-phases %standard-phases
544 (add-after 'unpack 'delete-facter-ng-gemspec
545 (lambda _
546 ;; XXX: ruby-build-system incorrectly finds
547 ;; facter-ng.gemspec from this directory and tries to
548 ;; build that instead of the proper facter.gemspec.
549 ;; Just delete it as a workaround, as it appears to
550 ;; only exist for backwards-compatibility after the
551 ;; facter-ng->facter rename.
552 (delete-file "agent/facter-ng.gemspec")
553 #t))
554 (add-after 'unpack 'embed-absolute-references
555 ;; Refer to absolute executable file names to avoid propagation.
556 (lambda* (#:key inputs #:allow-other-keys)
44d66cf7 557 (substitute* (find-files "lib/facter/resolvers" "\\.rb$")
c43c4d8b
TGR
558 (("execute\\('(which |)([^ ']+)" _ _ name)
559 (string-append "execute('" (or (which name)
560 name))))
561 #t))
562 (delete 'check)
563 (add-after 'wrap 'check
564 (lambda* (#:key tests? outputs #:allow-other-keys)
565 ;; XXX: The test suite wants to run Bundler and
566 ;; complains that the gemspec is invalid. For now
567 ;; just make sure that we can run the wrapped
568 ;; executable directly.
569 (if tests?
570 (invoke (string-append (assoc-ref outputs "out")
571 "/bin/facter")
572 ;; Many facts depend on /sys, /etc/os-release,
573 ;; etc, so we only run a small sample.
574 "facterversion" "architecture"
575 "kernel" "kernelversion")
576 (format #t "tests disabled~%"))
577 #t)))))
2d2d5b29 578 (inputs
c43c4d8b 579 `(("ruby-hocon" ,ruby-hocon)
2d2d5b29 580 ("ruby-sys-filesystem" ,ruby-sys-filesystem)
c43c4d8b
TGR
581 ("ruby-thor" ,ruby-thor)
582
583 ;; For ‘embed-absolute-references’.
584 ("dmidecode" ,dmidecode)
585 ("inetutils" ,inetutils) ; for ‘hostname’
586 ("iproute" ,iproute)
587 ("pciutils" ,pciutils)
588 ("util-linux" ,util-linux)))
2d2d5b29
MB
589 (synopsis "Collect and display system facts")
590 (description
591 "Facter is a tool that gathers basic facts about nodes (systems) such
592as hardware details, network settings, OS type and version, and more. These
593facts can be collected on the command line with the @command{facter} command
594or via the @code{facter} Ruby library.")
595 (home-page "https://github.com/puppetlabs/facter-ng")
596 (license license:expat)))
597
861ba525
SR
598(define-public ttyload
599 (let ((revision "1")
600 (commit "f9495372801ce4b4dad98ad854203e694c31c1eb"))
601 (package
602 (name "ttyload")
603 (version (git-version "0.5.3" revision commit))
604 (source
605 (origin
606 (method git-fetch)
607 (uri (git-reference
608 (url "https://github.com/lindes/ttyload")
609 (commit commit)))
610 (file-name (git-file-name name version))
611 (sha256
612 (base32 "0ldb7a13b9v876c6cbrs78pkizj64drnqx95z5shfbwgpwfhr4im"))))
613 (build-system gnu-build-system)
614 (arguments
615 `(#:tests? #f ; no tests
616 #:make-flags
617 (list (string-append "CC=" ,(cc-for-target)))
618 #:phases
619 (modify-phases %standard-phases
620 (delete 'configure)
621 (replace 'install
622 (lambda* (#:key outputs #:allow-other-keys)
623 (let* ((out (assoc-ref outputs "out"))
624 (bin (string-append out "/bin")))
625 (install-file "ttyload" bin)))))))
626 (home-page "https://www.daveltd.com/src/util/ttyload/")
627 (synopsis "Console based color-coded graphs of CPU load average")
628 (description
629 "Show graphs for 1 minute, 5 minute, 15 minute load averages on the
630console.")
631 ;; This package uses a modified version of the "ISC License".
632 (license (license:non-copyleft "file://LICENSE")))))
633
340c7033
CR
634(define-public htop
635 (package
611ee0c9 636 (name "htop")
51b77629 637 (version "3.1.1")
9925a234
TGR
638 (source
639 (origin
640 (method git-fetch)
641 (uri (git-reference
642 (url "https://github.com/htop-dev/htop")
643 (commit version)))
644 (sha256
51b77629 645 (base32 "19xnqnavpxbyix2gp1p3lbhlaawx0gdklx3aq4x4ylrxml2nwyi6"))
9925a234 646 (file-name (git-file-name name version))))
611ee0c9
MB
647 (build-system gnu-build-system)
648 (inputs
649 `(("ncurses" ,ncurses)))
650 (native-inputs
9925a234 651 `(("autoconf" ,autoconf)
6493d0ee 652 ("automake" ,automake)))
9925a234 653 (home-page "https://htop.dev")
611ee0c9
MB
654 (synopsis "Interactive process viewer")
655 (description
656 "This is htop, an interactive process viewer. It is a text-mode
340c7033 657application (for console or X terminals) and requires ncurses.")
611ee0c9 658 (license license:gpl2)))
340c7033 659
6bbd0fd2
MR
660(define-public bashtop
661 (package
662 (name "bashtop")
663 (version "0.9.25")
664 (source (origin
665 (method git-fetch)
666 (uri (git-reference
667 (url "https://github.com/aristocratos/bashtop")
668 (commit (string-append "v" version))))
669 (file-name (git-file-name name version))
670 (sha256
671 (base32
672 "07nlr6vmyb7yihaxj1fp424lmhwkdjl6mls92v90f6gsvikpa13v"))))
673 (build-system gnu-build-system)
674 (arguments
675 '(#:make-flags (list (string-append "PREFIX=" %output))
676 #:tests? #f ; bats test fails with loading load.bash
677 #:phases (modify-phases %standard-phases (delete 'configure))))
678 (home-page "https://github.com/aristocratos/bashtop")
679 (synopsis "Linux/OSX/FreeBSD resource monitor")
680 (description "Resource monitor that shows usage and stats for processor,
681memory, disks, network and processes.")
682 (license license:asl2.0)))
683
18e79929
ZJ
684(define-public bpytop
685 (package
686 (name "bpytop")
ada62041 687 (version "1.0.67")
18e79929
ZJ
688 (source
689 (origin
690 (method url-fetch)
691 (uri (pypi-uri "bpytop" version))
692 (sha256
ada62041 693 (base32 "1fwmiwvs8ax9az3hbp1p79x6m3wq73pn3vkbhcg9jvps4wv8wcwb"))))
18e79929 694 (build-system python-build-system)
15903eaa 695 (inputs
18e79929 696 `(("python-psutil" ,python-psutil)))
5b401ed0
MR
697 (arguments
698 `(#:phases
699 (modify-phases %standard-phases
700 (add-after 'install 'install-themes
701 (lambda* (#:key outputs #:allow-other-keys)
702 (let ((themes (string-append (assoc-ref outputs "out")
703 "/lib/python"
704 ,(version-major+minor
705 (package-version python))
706 "/site-packages/bpytop-themes")))
707 (mkdir-p themes)
ada62041 708 (copy-recursively "themes" themes)))))))
18e79929
ZJ
709 (home-page
710 "https://github.com/aristocratos/bpytop")
711 (synopsis "Resource monitor")
712 (description "Resource monitor that shows usage and stats for processor,
de5da4db 713memory, disks, network and processes. It's a Python port and continuation of
18e79929
ZJ
714@command{bashtop}.")
715 (license license:asl2.0)))
716
1df895b0
LC
717(define-public pies
718 (package
719 (name "pies")
a329bc7e 720 (version "1.6")
1df895b0
LC
721 (source
722 (origin
a9764b7d
LC
723 (method url-fetch)
724 (uri (string-append "mirror://gnu/pies/pies-"
725 version ".tar.bz2"))
726 (sha256
727 (base32
a329bc7e 728 "0ad5bg1czwmr4qw33aszxzc6ll99a9lfs32lyfb1wl5x9s1cc7az"))))
1df895b0 729 (build-system gnu-build-system)
a9764b7d
LC
730 (arguments
731 '(#:phases (modify-phases %standard-phases
732 (add-before 'build 'patch-/bin/sh
733 (lambda* (#:key inputs #:allow-other-keys)
734 ;; Use the right shell when executing user-provided
735 ;; shell commands.
736 (let ((bash (assoc-ref inputs "bash")))
3fb666bd 737 (substitute* '("src/progman.c" "src/comp.c")
a9764b7d
LC
738 (("\"/bin/sh\"")
739 (string-append "\"" bash "/bin/sh\"")))
740 #t))))))
56cb6f1d 741 (home-page "https://www.gnu.org.ua/software/pies/")
f50d2669 742 (synopsis "Program invocation and execution supervisor")
1df895b0 743 (description
79c311b8 744 "GNU pies is a program that supervises the invocation and execution of
a22dc0c4
LC
745other programs. It reads the list of programs to be started from its
746configuration file, executes them, and then monitors their status,
747re-executing them as necessary.")
f61e0e79 748 (license license:gpl3+)))
1df895b0
LC
749
750(define-public inetutils
751 (package
752 (name "inetutils")
4590ee9b 753 (version "1.9.4")
01eafd38
LC
754 (source (origin
755 (method url-fetch)
756 (uri (string-append "mirror://gnu/inetutils/inetutils-"
757 version ".tar.gz"))
4590ee9b 758 (patches (search-patches "inetutils-hurd.patch"))
01eafd38
LC
759 (sha256
760 (base32
4590ee9b 761 "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy"))))
1df895b0 762 (build-system gnu-build-system)
483188b7 763 (arguments
e4015e57
LC
764 `(#:configure-flags '("--localstatedir=/var"
765
766 ;; Make sure 'PATH_PROCNET_DEV' gets defined when
767 ;; cross-compiling (by default it does not.)
768 ,@(if (%current-target-system)
769 '("--with-path-procnet-dev=/proc/net/dev")
3d3ca76f
JN
770 '())
771 ,@(if (hurd-target?)
772 '("--disable-rcp"
773 "--disable-rexec"
774 "--disable-rexecd"
775 "--disable-rlogin"
776 "--disable-rlogind"
777 "--disable-rsh"
778 "--disable-rshd"
779 "--disable-uucpd"
780 "--disable-whois")
e4015e57 781 '()))
ed6a21b4
MB
782 ;; On some systems, 'libls.sh' may fail with an error such as:
783 ;; "Failed to tell switch -a apart from -A".
784 #:parallel-tests? #f))
3dd31008 785 (inputs `(("ncurses" ,ncurses)
6f5d28f9 786 ("readline" ,readline))) ;for 'ftp'
3d3ca76f
JN
787 (native-inputs (if (member (%current-system)
788 (package-supported-systems net-tools))
789 `(("netstat" ,net-tools)) ;for tests
790 '()))
6fd52309 791 (home-page "https://www.gnu.org/software/inetutils/")
f50d2669 792 (synopsis "Basic networking utilities")
1df895b0 793 (description
a22dc0c4 794 "Inetutils is a collection of common network programs, such as an ftp
e048de60
LF
795client and server, a telnet client and server, an rsh client and server, and
796hostname.")
f61e0e79 797 (license license:gpl3+)))
9a9e72d5
LC
798
799(define-public shadow
800 (package
801 (name "shadow")
1c78a291 802 (version "4.8.1")
9a9e72d5 803 (source (origin
ca2a55d4
SB
804 (method url-fetch)
805 (uri (string-append
4153ef23 806 "https://github.com/shadow-maint/shadow/releases/"
807 "download/" version "/shadow-" version ".tar.xz"))
7f31bd25 808 (patches (search-patches "shadow-hurd-pctrl.patch"))
ca2a55d4
SB
809 (sha256
810 (base32
1c78a291 811 "0qmfq50sdhz6xilgxvinblll8j2iqfl7hwk45bq744y4plq4dbd3"))))
9a9e72d5
LC
812 (build-system gnu-build-system)
813 (arguments
ce6223e6 814 `(;; Assume System V `setpgrp (void)', which is the default on GNU
9a9e72d5 815 ;; variants (`AC_FUNC_SETPGRP' is not cross-compilation capable.)
52701a3d 816 #:configure-flags
4f8d5e63
EF
817 '(,@(if (hurd-target?)
818 '()
819 '("--with-libpam"))
820 "ac_cv_func_setpgrp_void=yes")
9a9e72d5 821
52701a3d 822 #:phases
823 (modify-phases %standard-phases
994d8ce3
MO
824 ,@(if (%current-target-system)
825 '((add-before 'configure 'set-runtime-shell
826 (lambda* (#:key inputs #:allow-other-keys)
827 (let ((shell (string-append
828 (assoc-ref inputs "bash")
829 "/bin/bash")))
830 (setenv "RUNTIME_SHELL" shell)
831 (substitute* "configure.ac"
832 (("\\$SHELL")
833 "$RUNTIME_SHELL"))))))
834 '())
52701a3d 835 (add-before 'build 'set-nscd-file-name
836 (lambda* (#:key inputs #:allow-other-keys)
837 ;; Use the right file name for nscd.
ce6223e6
LC
838 (let ((libc (assoc-ref inputs
839 ,(if (%current-target-system)
840 "cross-libc"
841 "libc"))))
52701a3d 842 (substitute* "lib/nscd.c"
843 (("/usr/sbin/nscd")
acfa777e
MW
844 (string-append libc "/sbin/nscd")))
845 #t)))
52701a3d 846 (add-after 'install 'remove-groups
847 (lambda* (#:key outputs #:allow-other-keys)
848 ;; Remove `groups', which is already provided by Coreutils.
849 (let* ((out (assoc-ref outputs "out"))
850 (bin (string-append out "/bin"))
851 (man (string-append out "/share/man")))
852 (delete-file (string-append bin "/groups"))
853 (for-each delete-file (find-files man "^groups\\."))
854 #t))))))
9a9e72d5 855
4f8d5e63
EF
856 (inputs
857 `(,@(if (hurd-target?)
858 '()
994d8ce3
MO
859 `(("linux-pam" ,linux-pam)))
860 ,@(if (%current-target-system)
861 `(("bash" ,bash-minimal))
862 '())))
1f6dd7e9 863 (home-page "https://github.com/shadow-maint/shadow")
9a9e72d5
LC
864 (synopsis "Authentication-related tools such as passwd, su, and login")
865 (description
866 "Shadow provides a number of authentication-related tools, including:
867login, passwd, su, groupadd, and useradd.")
868
869 ;; The `vipw' program is GPLv2+.
870 ;; libmisc/salt.c is public domain.
f61e0e79 871 (license license:bsd-3)))
1e151896
LC
872
873(define-public mingetty
874 (package
875 (name "mingetty")
876 (version "1.08")
877 (source (origin
878 (method url-fetch)
de67e922
LF
879 (uri (string-append "mirror://sourceforge/mingetty/mingetty/"
880 version "/mingetty-" version ".tar.gz"))
1e151896
LC
881 (sha256
882 (base32
883 "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"))))
884 (build-system gnu-build-system)
885 (arguments
dc1d3cde
KK
886 `(#:phases
887 (modify-phases %standard-phases
888 (replace 'configure
ba0e1406 889 (lambda* (#:key inputs outputs target #:allow-other-keys)
dc1d3cde
KK
890 (let* ((out (assoc-ref outputs "out"))
891 (man8 (string-append out "/share/man/man8"))
892 (sbin (string-append out "/sbin"))
893 (shadow (assoc-ref inputs "shadow"))
894 (login (string-append shadow "/bin/login")))
895 (substitute* "Makefile"
ba0e1406
MO
896 ,@(if (%current-target-system)
897 '((("CC=.*$")
898 (string-append "CC=" target "-gcc\n")))
899 '())
dc1d3cde
KK
900 (("^SBINDIR.*")
901 (string-append "SBINDIR = " out
902 "/sbin\n"))
903 (("^MANDIR.*")
904 (string-append "MANDIR = " out
905 "/share/man/man8\n")))
906
907 ;; Pick the right 'login' by default.
908 (substitute* "mingetty.c"
909 (("\"/bin/login\"")
910 (string-append "\"" login "\"")))
911
912 (mkdir-p sbin)
913 (mkdir-p man8))
914 #t)))
1e151896
LC
915 #:tests? #f)) ; no tests
916 (inputs `(("shadow" ,shadow)))
917
3b3b60d0 918 (home-page "https://sourceforge.net/projects/mingetty")
1e151896
LC
919 (synopsis "Getty for the text console")
920 (description
921 "Small console getty that is started on the Linux text console,
36a4366d
EF
922asks for a login name and then transfers over to @code{login}. It is extended
923to allow automatic login and starting any app.")
f61e0e79 924 (license license:gpl2+)))
c773aba8
LC
925
926(define-public net-base
927 (package
928 (name "net-base")
db719df7 929 (version "5.3")
c773aba8
LC
930 (source (origin
931 (method url-fetch)
932 (uri (string-append
34af3684 933 "mirror://debian/pool/main/n/netbase/netbase_"
db719df7 934 version ".tar.xz"))
c773aba8
LC
935 (sha256
936 (base32
db719df7 937 "12xqjwg3p4rzmmh2iib6sigm9l29y3dgk74mmnw64k84jnbwdxl1"))))
c773aba8
LC
938 (build-system trivial-build-system)
939 (arguments
940 `(#:modules ((guix build utils))
941 #:builder (begin
942 (use-modules (guix build utils)
943 (srfi srfi-26))
944
945 (let* ((source (assoc-ref %build-inputs "source"))
946 (tar (assoc-ref %build-inputs "tar"))
db719df7 947 (xz (assoc-ref %build-inputs "xz"))
c773aba8
LC
948 (output (assoc-ref %outputs "out"))
949 (etc (string-append output "/etc")))
db719df7 950 (setenv "PATH" (string-append xz "/bin"))
e3cfef22
MW
951 (invoke (string-append tar "/bin/tar") "xvf"
952 source)
c773aba8
LC
953 (chdir ,(string-append "netbase-" version))
954 (mkdir-p etc)
955 (for-each copy-file
956 '("etc-services" "etc-protocols" "etc-rpc")
957 (map (cut string-append etc "/" <>)
958 '("services" "protocols" "rpc")))
959 #t))))
960 (native-inputs `(("tar" ,tar)
f61e0e79 961 ("xz" ,xz)))
c773aba8
LC
962 (synopsis "IANA protocol, port, and RPC number assignments")
963 (description
964 "This package provides the /etc/services, /etc/protocols, and /etc/rpc
965files, which contain information about the IANA-assigned port, protocol, and
e881752c 966ONC RPC numbers.")
eeb8b0e6 967 (home-page "https://packages.debian.org/sid/netbase")
f61e0e79 968 (license license:gpl2)))
94c4a58a
LC
969
970(define-public netcat
971 (package
972 (name "netcat")
973 (version "0.7.1")
974 (source (origin
975 (method url-fetch)
de67e922
LF
976 (uri (string-append "mirror://sourceforge/netcat/netcat/" version
977 "/netcat-" version ".tar.bz2"))
94c4a58a
LC
978 (sha256
979 (base32
980 "1frjcdkhkpzk0f84hx6hmw5l0ynpmji8vcbaxg8h5k2svyxz0nmm"))))
981 (build-system gnu-build-system)
0e4e89c2
MW
982 (arguments
983 `(#:configure-flags
984 ;; By default, man and info pages are put in PREFIX/{man,info},
985 ;; but we want them in PREFIX/share/{man,info}.
986 (let ((out (assoc-ref %outputs "out")))
987 (list (string-append "--mandir=" out "/share/man")
988 (string-append "--infodir=" out "/share/info")))))
94c4a58a
LC
989 (home-page "http://netcat.sourceforge.net")
990 (synopsis "Read and write data over TCP/IP")
991 (description
992 "Netcat is a featured networking utility which reads and writes data
993across network connections, using the TCP/IP protocol. It is designed to be a
994reliable \"back-end\" tool that can be used directly or easily driven by other
35b9e423 995programs and scripts. At the same time, it is a feature-rich network debugging
94c4a58a
LC
996and exploration tool, since it can create almost any kind of connection you
997would need and has several interesting built-in capabilities.")
f61e0e79 998 (license license:gpl2+)))
d038cac1 999
37760623
AG
1000(define-public netcat-openbsd
1001 (package
1002 (name "netcat-openbsd")
05c29040 1003 (version "1.217-2")
37760623
AG
1004 (source (origin
1005 (method git-fetch)
1006 (uri (git-reference
1007 (url "https://salsa.debian.org/debian/netcat-openbsd.git")
1008 (commit (string-append "debian/" version))))
1009 (file-name (git-file-name name version))
1010 (sha256
1011 (base32
05c29040 1012 "19sr52ix14w344pv13ppb0c1wyg5dxhic1fw2q0s3qfmx57b9hhp"))))
37760623
AG
1013 (build-system gnu-build-system)
1014 (arguments
ae58ebba 1015 `(#:tests? #f ; no test suite
37760623 1016 #:make-flags
aea2a0f9 1017 (list (string-append "CC=" ,(cc-for-target)))
37760623
AG
1018 #:phases
1019 (modify-phases %standard-phases
1020 (delete 'configure)
1021 (add-before 'build 'patch
1022 (lambda _
1023 (setenv "QUILT_PATCHES" "debian/patches")
1024 (invoke "quilt" "push" "-a")
1025 #t))
1026 (replace 'install
1027 (lambda* (#:key outputs #:allow-other-keys)
1028 (let* ((out (assoc-ref outputs "out"))
1029 (bin (string-append out "/bin"))
1030 (man (string-append out "/share/man/man1"))
1031 (doc (string-append out "/share/doc/netcat-openbsd-" ,version))
1032 (examples (string-append doc "/examples")))
1033 (install-file "nc" bin)
1034 (install-file "nc.1" man)
1035 (install-file "debian/copyright" doc)
1036 (copy-recursively "debian/examples" examples)
1037 #t))))))
1038 (inputs `(("libbsd" ,libbsd)))
1039 (native-inputs `(("pkg-config" ,pkg-config)
1040 ("quilt" ,quilt)))
1041 (home-page "https://packages.debian.org/sid/netcat-openbsd")
1042 (synopsis "Read and write data over TCP/IP")
1043 (description
1044 "Netcat is a simple Unix utility which reads and writes data across
1045network connections using TCP or UDP protocol. It is designed to be a reliable
1046\"back-end\" tool that can be used directly or easily driven by other programs
1047and scripts. At the same time it is a feature-rich network debugging and
1048exploration tool, since it can create almost any kind of connection you would
1049need and has several interesting built-in capabilities.
1050
1051This package contains the OpenBSD rewrite of netcat, including support for
1052IPv6, proxies, and Unix sockets.")
1053 (license (list license:bsd-3
1054 license:bsd-2)))) ; atomicio.*, socks.c
1055
8d0edc82
OP
1056(define-public sipcalc
1057 (package
1058 (name "sipcalc")
1059 (version "1.1.6")
1060 (source
1061 (origin
1062 (method url-fetch)
1063 (uri (string-append "http://www.routemeister.net/projects"
1064 "/sipcalc/files/sipcalc" "-" version ".tar.gz"))
1065 (sha256
1066 (base32
1067 "0mv3wndj4z2bsshh2k8d5sy3j8wxzgf8mzmmkvj1k8gpcz37dm6g"))))
1068 (build-system gnu-build-system)
720aa977 1069 (home-page "https://www.routemeister.net/projects/sipcalc/")
8d0edc82
OP
1070 (synopsis "Command-line IP subnet calculator")
1071 (description
1072 "Sipcalc is an advanced command-line IP subnet calculator. It can take
1073multiple forms of input (IPv4/IPv6/interface/hostname) and output a multitude
1074of information about a given subnet.
1075
1076Features include:
1077
1078@itemize @bullet
1079@item IPv4
1080@itemize
1081@item Retrieving of address information from interfaces.
1082@item Classfull and CIDR output.
1083@item Multiple address and netmask input and output formats (dotted quad, hex,
1084number of bits).
1085@item Output of broadcast address, network class, Cisco wildcard,
1086hosts/range, network range.
1087@item The ability to split a network based on a smaller netmask, now also with
1088recursive runs on the generated subnets. (also IPv6)
1089@end itemize
1090@item IPv6
1091@itemize
1092@item Compressed and expanded input and output addresses.
1093@item Standard IPv6 network output.
1094@item v4 in v6 output.
1095@item Reverse DNS address generation.
1096@end itemize
1097@end itemize\n")
1098 (license license:bsd-3)))
1099
b9986cac 1100(define-public prips
1101 (package
1102 (name "prips")
1103 (version "1.1.1")
1104 (source
1105 (origin
1106 (method url-fetch)
1107 (uri (string-append "https://devel.ringlet.net/files/sys/"
1108 name "/" name "-" version ".tar.xz"))
1109 (sha256
1110 (base32 "1a33vbl4w603mk6mm5r3vhk87fy3dfk5wdpch0yd3ncbkg3fmvqn"))))
1111 (build-system gnu-build-system)
1112 (arguments
1113 `(#:make-flags (list (string-append "CC=" ,(cc-for-target)))
1114 #:test-target "test"
1115 #:phases (modify-phases %standard-phases
1116 (delete 'configure)
1117 (replace 'install
1118 (lambda* (#:key outputs #:allow-other-keys)
1119 (let ((out (assoc-ref outputs "out")))
1120 (install-file "prips"
1121 (string-append out "/bin"))))))))
1122 (native-inputs `(("perl-test-harness" ,perl-test-harness)))
1123 (synopsis "Tool that prints the IP addresses in a given range")
1124 (description "Prips can be used to print all of the IP addresses in
1125 a given range. This allows the enhancement of tools only work
1126 on one host at a time (e.g. whois).")
1127 (home-page "https://devel.ringlet.net/sysutils/prips/")
1128 (license license:gpl2+)))
1129
d038cac1
LC
1130(define-public alive
1131 (package
1132 (name "alive")
ef126b97 1133 (version "2.0.3")
d038cac1
LC
1134 (source (origin
1135 (method url-fetch)
1136 (uri (string-append "mirror://gnu/alive/alive-"
1137 version ".tar.xz"))
1138 (sha256
1139 (base32
ef126b97 1140 "053hfp7s66lnilm1ii4jrjmy44wpa2cwwh6f0sl8cyz0mm813x4b"))))
d038cac1
LC
1141 (build-system gnu-build-system)
1142 (arguments '(#:configure-flags '("alive_cv_nice_ping=yes")))
1143 (inputs `(("guile" ,guile-2.0)
1144 ("inetutils" ,inetutils)))
6fd52309 1145 (home-page "https://www.gnu.org/software/alive/")
d038cac1
LC
1146 (synopsis "Autologin and keep-alive daemon")
1147 (description
1148 "GNU Alive sends periodic pings to a server, generally to keep a
1149connection alive.")
f61e0e79 1150 (license license:gpl3+)))
c73d4c92
LC
1151
1152(define-public isc-dhcp
6548b1e1 1153 (let* ((bind-major-version "9")
4e2432d1 1154 (bind-minor-version "11")
191e2347 1155 (bind-patch-version "32")
f7780fdf
MW
1156 (bind-release-type "") ; for patch release, use "-P"
1157 (bind-release-version "") ; for patch release, e.g. "6"
6548b1e1
MW
1158 (bind-version (string-append bind-major-version
1159 "."
1160 bind-minor-version
1161 "."
1162 bind-patch-version
1163 bind-release-type
1164 bind-release-version)))
1165 (package
1166 (name "isc-dhcp")
9e632a55 1167 (version "4.4.2-P1")
6548b1e1
MW
1168 (source (origin
1169 (method url-fetch)
8198b3db 1170 (uri (string-append "https://ftp.isc.org/isc/dhcp/"
6548b1e1 1171 version "/dhcp-" version ".tar.gz"))
e4d5b509 1172 (patches (search-patches "isc-dhcp-gcc-compat.patch"))
6548b1e1
MW
1173 (sha256
1174 (base32
9e632a55 1175 "06jsr0cg5rsmyibshrpcb9za0qgwvqccashdma7mlm1rflrh8pmh"))))
6548b1e1
MW
1176 (build-system gnu-build-system)
1177 (arguments
e54465ff 1178 `(#:parallel-build? #f
445013b6 1179 #:configure-flags '("--with-randomdev=/dev/random")
e54465ff 1180 #:phases
6548b1e1
MW
1181 (modify-phases %standard-phases
1182 (add-after 'unpack 'replace-bundled-bind
f7780fdf 1183 (lambda* (#:key inputs native-inputs #:allow-other-keys)
6548b1e1
MW
1184 (delete-file "bind/bind.tar.gz")
1185 (copy-file (assoc-ref inputs "bind-source-tarball")
1186 "bind/bind.tar.gz")
1187 (chmod "bind/bind.tar.gz" #o644)
1188 (substitute* "bind/version.tmp"
1189 (("^MAJORVER=.*")
1190 (format #f "MAJORVER=~a\n" ,bind-major-version))
1191 (("^MINORVER=.*")
1192 (format #f "MINORVER=~a\n" ,bind-minor-version))
1193 (("^PATCHVER=.*")
1194 (format #f "PATCHVER=~a\n" ,bind-patch-version))
1195 (("^RELEASETYPE=.*")
1196 (format #f "RELEASETYPE=~a\n" ,bind-release-type))
1197 (("^RELEASEVER=.*")
1198 (format #f "RELEASEVER=~a\n" ,bind-release-version)))
1199 #t))
f8cbe98e
MB
1200 ,@(if (%current-target-system)
1201 '((add-before 'configure 'fix-bind-cross-compilation
1202 (lambda _
1203 (substitute* "configure"
1204 (("--host=\\$host")
1205 "--host=$host_alias"))
1206 ;; BIND needs a native compiler because the DHCP
1207 ;; build system uses the built 'gen' executable.
1208 (setenv "BUILD_CC" "gcc")
1209 #t)))
1210 '())
6548b1e1
MW
1211 (add-after 'configure 'post-configure
1212 (lambda* (#:key outputs #:allow-other-keys)
1213 ;; Point to the right client script, which will be
1214 ;; installed in a later phase.
1215 (substitute* "includes/dhcpd.h"
1216 (("#define[[:blank:]]+_PATH_DHCLIENT_SCRIPT.*")
1217 (let ((out (assoc-ref outputs "out")))
1218 (string-append "#define _PATH_DHCLIENT_SCRIPT \""
1219 out "/libexec/dhclient-script"
1220 "\"\n"))))
c73d4c92 1221
6548b1e1
MW
1222 ;; During the 'build' phase, 'bind.tar.gz' is extracted, so
1223 ;; we must patch shebangs in there and make sure the right
1224 ;; shell is used.
1225 (with-directory-excursion "bind"
1226 (substitute* "Makefile"
f7780fdf 1227 (("\\./configure ")
6548b1e1
MW
1228 (let ((sh (which "sh")))
1229 (string-append "./configure CONFIG_SHELL="
f7780fdf 1230 sh " SHELL=" sh " "))))
c73d4c92 1231
6548b1e1 1232 (let ((bind-directory (string-append "bind-" ,bind-version)))
d6acc9f8 1233 (invoke "tar" "xf" "bind.tar.gz")
6548b1e1
MW
1234 (for-each patch-shebang
1235 (find-files bind-directory ".*"))
f7780fdf
MW
1236 (substitute* (string-append bind-directory "/configure")
1237 (("/usr/bin/file")
1238 (which "file")))
d6acc9f8
MW
1239 (invoke "tar" "cf" "bind.tar.gz"
1240 bind-directory
1241 ;; avoid non-determinism in the archive
1242 "--sort=name"
1243 "--mtime=@0"
1244 "--owner=root:0"
1245 "--group=root:0")))))
6548b1e1 1246 (add-after 'install 'post-install
7256d9d2
MD
1247 ;; TODO(core-updates): native-inputs isn't required anymore.
1248 (lambda* (#:key ,@(if (%current-target-system)
1249 '(native-inputs)
1250 '())
1251 inputs outputs #:allow-other-keys)
6548b1e1
MW
1252 ;; Install the dhclient script for GNU/Linux and make sure
1253 ;; if finds all the programs it needs.
1254 (let* ((out (assoc-ref outputs "out"))
1255 (libexec (string-append out "/libexec"))
17f168fc 1256 (coreutils (assoc-ref inputs "coreutils*"))
6548b1e1
MW
1257 (inetutils (assoc-ref inputs "inetutils"))
1258 (net-tools (assoc-ref inputs "net-tools"))
17f168fc 1259 (sed (assoc-ref inputs "sed*")))
6548b1e1
MW
1260 (substitute* "client/scripts/linux"
1261 (("/sbin/ip")
1262 (string-append (assoc-ref inputs "iproute")
1263 "/sbin/ip")))
c73d4c92 1264
6548b1e1
MW
1265 (mkdir-p libexec)
1266 (copy-file "client/scripts/linux"
1267 (string-append libexec "/dhclient-script"))
c73d4c92 1268
6548b1e1
MW
1269 (wrap-program
1270 (string-append libexec "/dhclient-script")
1271 `("PATH" ":" prefix
1272 ,(map (lambda (dir)
1273 (string-append dir "/bin:"
1274 dir "/sbin"))
d6acc9f8 1275 (list inetutils net-tools coreutils sed))))
7256d9d2
MD
1276 ;; TODO(core-updates): should not be required anymore,
1277 ;; once <https://issues.guix.gnu.org/49290> has been merged.
1278 ,@(if (%current-target-system)
1279 '((for-each
1280 (lambda (file)
1281 (substitute* file
1282 (((assoc-ref native-inputs "bash"))
1283 (assoc-ref inputs "bash"))))
1284 (list (string-append libexec
1285 "/dhclient-script")
1286 (string-append libexec
1287 "/.dhclient-script-real"))))
1288 '())
d6acc9f8 1289 #t))))))
c73d4c92 1290
f7780fdf
MW
1291 (native-inputs
1292 `(("perl" ,perl)
4bcc3908 1293 ("file" ,file)))
c73d4c92 1294
6548b1e1 1295 (inputs `(("inetutils" ,inetutils)
7256d9d2
MD
1296 ;; TODO(core-updates): simply make this unconditional
1297 ,@(if (%current-target-system)
1298 ;; for wrap-program
1299 `(("bash" ,(canonical-package bash-minimal)))
1300 '())
9ec263b4
JN
1301 ,@(if (hurd-target?) '()
1302 `(("net-tools" ,net-tools)
1303 ("iproute" ,iproute)))
dc343935 1304
4bcc3908
TGR
1305 ;; isc-dhcp bundles a copy of BIND, which has proved vulnerable
1306 ;; in the past. Use a BIND-VERSION of our choosing instead.
6548b1e1
MW
1307 ("bind-source-tarball"
1308 ,(origin
1309 (method url-fetch)
8198b3db 1310 (uri (string-append "https://ftp.isc.org/isc/bind9/"
6548b1e1
MW
1311 bind-version
1312 "/bind-" bind-version ".tar.gz"))
1313 (sha256
1314 (base32
191e2347 1315 "0hhkb4d14hvly2751cxl2s2xyim3bri8qaisgkcm456xfi5wpy6b"))))
c73d4c92 1316
17f168fc
MO
1317 ("coreutils*" ,coreutils)
1318 ("sed*" ,sed)))
6548b1e1 1319
ee206133 1320 (home-page "https://www.isc.org/dhcp/")
6548b1e1
MW
1321 (synopsis "Dynamic Host Configuration Protocol (DHCP) tools")
1322 (description
1323 "ISC's Dynamic Host Configuration Protocol (DHCP) distribution provides a
c73d4c92
LC
1324reference implementation of all aspects of DHCP, through a suite of DHCP
1325tools: server, client, and relay agent.")
4e2432d1 1326 (license license:mpl2.0)
159a5e01 1327 (properties '((cpe-name . "dhcp"))))))
02c86a5e 1328
785c96fb
GLV
1329(define-public radvd
1330 (package
1331 (name "radvd")
1332 (version "2.19")
1333 (source
1334 (origin
1335 (method git-fetch)
1336 (uri (git-reference
1337 (url "https://github.com/radvd-project/radvd")
1338 (commit (string-append "v" version))))
1339 (file-name (git-file-name name version))
1340 (sha256
1341 (base32 "1df827m3vkjq2bcs5y9wg2cygvpdwl8ppl446qqhyym584gz54nl"))))
1342 (build-system gnu-build-system)
1343 (native-inputs
1344 `(("autoconf" ,autoconf)
1345 ("automake" ,automake)
1346 ("bison" ,bison)
1347 ("check" ,check)
1348 ("flex" ,flex)
1349 ("pkg-config" ,pkg-config)))
1350 (arguments
1351 `(#:configure-flags '("--with-check")))
1352 (home-page "https://radvd.litech.org/")
1353 (synopsis "IPv6 Router Advertisement Daemon")
1354 (description
1355 "The Router Advertisement Daemon (radvd) is run on systems acting as IPv6
1356routers. It sends Router Advertisement messages specified by RFC 2461
1357periodically and when requested by a node sending a Router Solicitation
1358message. These messages are required for IPv6 stateless autoconfiguration.")
1359 (license (license:non-copyleft "file://COPYRIGHT"))))
1360
02c86a5e
LC
1361(define-public libpcap
1362 (package
1363 (name "libpcap")
3e908bb5 1364 (version "1.10.1")
02c86a5e
LC
1365 (source (origin
1366 (method url-fetch)
eeb8b0e6 1367 (uri (string-append "https://www.tcpdump.org/release/libpcap-"
02c86a5e
LC
1368 version ".tar.gz"))
1369 (sha256
1370 (base32
3e908bb5 1371 "1m5x26vlbymp90k1qh0w3nj2nxzyvfrmfmwpj17k81dgri55ya7d"))))
02c86a5e 1372 (build-system gnu-build-system)
24dd949c
TGR
1373 (native-inputs
1374 `(("bison" ,bison)
1375 ("flex" ,flex)))
1376 (arguments
1377 ;; There are some tests in testprogs/, but no automated test suite.
49dc5bb7
TGR
1378 `(#:tests? #f
1379 #:phases
1380 (modify-phases %standard-phases
1381 (add-after 'unpack 'omit-static-library
1382 ;; Neither build nor install libpcap.a.
1383 (lambda _
1384 (substitute* "Makefile.in"
1385 ((" libpcap\\.a") "")
1386 ((" install-archive ") " ")))))))
eeb8b0e6 1387 (home-page "https://www.tcpdump.org")
02c86a5e
LC
1388 (synopsis "Network packet capture library")
1389 (description
1390 "libpcap is an interface for user-level packet capture. It provides a
1391portable framework for low-level network monitoring. Applications include
1392network statistics collection, security monitoring, network debugging, etc.")
24dd949c
TGR
1393 (license (list license:bsd-4 ; fad-*.c and several other source files
1394 license:bsd-3 ; pcap/, sockutils.* & others
1395 license:bsd-2)))) ; the rest
02c86a5e 1396
1da34f5a
LC
1397(define-public tcpdump
1398 (package
1399 (name "tcpdump")
eca228eb 1400 (version "4.99.1")
1da34f5a
LC
1401 (source (origin
1402 (method url-fetch)
eeb8b0e6 1403 (uri (string-append "https://www.tcpdump.org/release/tcpdump-"
73a2ef36 1404 version ".tar.gz"))
1da34f5a
LC
1405 (sha256
1406 (base32
eca228eb 1407 "1ghfs5gifzrk3813zf9zalfbjs70wg6llz6q31k180r7zf2nkcvr"))))
1da34f5a 1408 (build-system gnu-build-system)
10db1e6c 1409 (inputs `(("libpcap" ,libpcap)
cc2b77df 1410 ("openssl" ,openssl)))
1da34f5a 1411 (native-inputs `(("perl" ,perl))) ; for tests
eeb8b0e6 1412 (home-page "https://www.tcpdump.org/")
1da34f5a
LC
1413 (synopsis "Network packet analyzer")
1414 (description
1415 "Tcpdump is a command-line tool to analyze network traffic passing
1416through the network interface controller.")
f61e0e79 1417 (license license:bsd-3)))
1da34f5a 1418
02c86a5e
LC
1419(define-public jnettop
1420 (package
1421 (name "jnettop")
1422 (version "0.13.0")
1423 (source (origin
1424 (method url-fetch)
53923b0f
BH
1425 (uri
1426 (string-append "https://web.archive.org/web/20161221100811/"
1427 "http://jnettop.kubs.info/dist/jnettop-"
1428 version ".tar.gz"))
02c86a5e
LC
1429 (sha256
1430 (base32
1431 "1855np7c4b0bqzhf1l1dyzxb90fpnvrirdisajhci5am6als31z9"))))
1432 (build-system gnu-build-system)
1433 (native-inputs
1434 `(("pkg-config" ,pkg-config)))
1435 (inputs
1436 `(("glib" ,glib)
1437 ("ncurses" ,ncurses)
1438 ("libpcap" ,libpcap)))
53923b0f
BH
1439 (home-page
1440 "https://web.archive.org/web/20160703195221/http://jnettop.kubs.info/wiki/")
02c86a5e
LC
1441 (synopsis "Visualize network traffic by bandwidth use")
1442 (description
1443 "Jnettop is a traffic visualiser, which captures traffic going
1444through the host it is running from and displays streams sorted
1445by bandwidth they use.")
f61e0e79 1446 (license license:gpl2+)))
87216303
EB
1447
1448(define-public clusterssh
1449 (package
1450 (name "clusterssh")
c5829179 1451 (version "4.13.2")
87216303
EB
1452 (source (origin
1453 (method url-fetch)
1454 (uri (string-append "mirror://sourceforge/clusterssh/"
c5829179
KK
1455 "2.%20ClusterSSH%20Series%204/"
1456 "App-ClusterSSH-v" version ".tar.gz"))
87216303
EB
1457 (sha256
1458 (base32
c5829179
KK
1459 "0rmk2p3f2wz1h092anidjclh212rv3gxyk0c641qk3frlrjnw6mp"))))
1460 (build-system perl-build-system)
12ea2571
TGR
1461 (arguments
1462 `(#:phases
1463 (modify-phases %standard-phases
1464 (add-after 'unpack 'refer-to-inputs
1465 (lambda* (#:key inputs #:allow-other-keys)
1466 (substitute* (list "lib/App/ClusterSSH/Config.pm"
1467 "t/15config.t")
1468 (("xterm")
1469 (which "xterm")))
1470 #t))
1471 (add-before 'check 'delete-failing-tests
1472 (lambda _
1473 ;; This checks whether all code is nicely formatted. The above
1474 ;; ‘refer-to-inputs’ phase breaks this pedantry, so disable it.
1475 (delete-file "t/perltidy.t")
1476 ;; Update the manifest so t/manifest.t happily passes.
1477 (substitute* "MANIFEST"
1478 (("t/perltidy.t\n") ""))
332a2765
TGR
1479 #t))
1480 (add-after 'install 'augment-library-path
1481 (lambda* (#:key inputs outputs #:allow-other-keys)
1482 (let* ((out (assoc-ref outputs "out"))
1483 (bin (string-append out "/bin")))
1484 (with-directory-excursion bin
1485 (for-each
1486 (lambda (program)
1487 (wrap-program program
1488 `("PERL5LIB" ":" prefix
1489 ,(map (lambda (file-name)
1490 (string-append file-name
1491 "/lib/perl5/site_perl"))
1492 (cons out
1493 (map (lambda (input)
1494 (assoc-ref inputs input))
1495 ;; These may be propagated and hence
1496 ;; not explicitly listed as inputs.
1497 (list "perl-class-data-inheritable"
1498 "perl-devel-stacktrace"
1499 "perl-exception-class"
1500 "perl-tk"
1501 "perl-try-tiny"
1502 "perl-x11-protocol"
1503 "perl-x11-protocol-other")))))))
1504 (find-files "." ".*")))
1505 #t))))))
c5829179
KK
1506 (native-inputs
1507 `(("perl-cpan-changes" ,perl-cpan-changes)
1508 ("perl-file-slurp" ,perl-file-slurp)
1509 ("perl-file-which" ,perl-file-which)
1510 ("perl-module-build" ,perl-module-build)
1511 ("perl-readonly" ,perl-readonly)
1512 ("perl-test-differences" ,perl-test-differences)
1513 ("perl-test-distmanifest" ,perl-test-distmanifest)
1514 ("perl-test-perltidy" ,perl-test-perltidy)
1515 ("perl-test-pod" ,perl-test-pod)
1516 ("perl-test-pod-coverage" ,perl-test-pod-coverage)
1517 ("perl-test-trap" ,perl-test-trap)
1518 ("perltidy" ,perltidy)))
12ea2571 1519 (inputs
12ea2571 1520 `(("perl-exception-class" ,perl-exception-class)
b07aea69 1521 ("perl-sort-naturally" ,perl-sort-naturally)
c5829179
KK
1522 ("perl-tk" ,perl-tk)
1523 ("perl-try-tiny" ,perl-try-tiny)
1524 ("perl-x11-protocol" ,perl-x11-protocol)
332a2765
TGR
1525 ("perl-x11-protocol-other" ,perl-x11-protocol-other)
1526 ("xterm" ,xterm)))
87216303 1527 ;; The clusterssh.sourceforge.net address requires login to view
3b3b60d0 1528 (home-page "https://sourceforge.net/projects/clusterssh/")
87216303
EB
1529 (synopsis "Secure concurrent multi-server terminal control")
1530 (description
1531 "ClusterSSH controls a number of xterm windows via a single graphical
1532console window to allow commands to be interactively run on multiple servers
1533over ssh connections.")
f61e0e79 1534 (license license:gpl2+)))
fccf2fe0 1535
d1ce1125
MB
1536(define-public rename
1537 (package
1538 (name "rename")
0db873dd 1539 (version "1.10")
d1ce1125
MB
1540 (source (origin
1541 (method url-fetch)
1542 (uri (string-append
1543 "mirror://cpan/authors/id/R/RM/RMBARKER/File-Rename-"
1544 version ".tar.gz"))
1545 (sha256
1546 (base32
0db873dd 1547 "137m8s06r4n038ivlr5r1d9a7q9l7shmwpvnyx053r9ndhvbnkh5"))))
d1ce1125 1548 (build-system perl-build-system)
e6dcf9ca
TGR
1549 (arguments
1550 `(#:phases
1551 (modify-phases %standard-phases
1552 (add-after 'install 'find-itself
1553 ;; Fix run-time 'Can't locate File/Rename.pm in @INC' failure.
1554 (lambda* (#:key outputs #:allow-other-keys)
1555 (let* ((out (assoc-ref outputs "out"))
1556 (bin (string-append out "/bin")))
1557 (with-directory-excursion bin
1558 (for-each
1559 (lambda (program)
1560 (wrap-program program
1561 `("PERL5LIB" ":" prefix
1562 (,(string-append out "/lib/perl5/site_perl")))))
1563 (find-files "." ".*")))
1564 #t))))))
d1ce1125
MB
1565 (native-inputs
1566 `(("perl-module-build" ,perl-module-build)
1567 ("perl-test-pod" ,perl-test-pod)
1568 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1569 (home-page "https://metacpan.org/pod/distribution/File-Rename/rename.PL")
1570 (synopsis "Perl extension for renaming multiple files")
1571 (description
1572 "This package provides a Perl interface (@code{Perl::Rename}) as well
1573as a command-line utility (@command{rename}) that can rename multiple files
1574at once based on a Perl regular expression.")
1575 (license license:perl-license)))
1576
fccf2fe0
LC
1577(define-public rottlog
1578 (package
1579 (name "rottlog")
1580 (version "0.72.2")
1581 (source (origin
1582 (method url-fetch)
1583 (uri (string-append "mirror://gnu/rottlog/rottlog-"
1584 version ".tar.gz"))
1585 (sha256
1586 (base32
1587 "0751mb9l2f0jrk3vj6q8ilanifd121dliwk0c34g8k0dlzsv3kd7"))
1588 (modules '((guix build utils)))
1589 (snippet
6cbee49d
MW
1590 '(begin
1591 (substitute* "Makefile.in"
1592 (("-o \\$\\{LOG_OWN\\} -g \\$\\{LOG_GROUP\\}")
1593 ;; Don't try to chown root.
1594 "")
1595 (("mkdir -p \\$\\(ROTT_STATDIR\\)")
1596 ;; Don't attempt to create /var/lib/rottlog.
1597 "true"))
1598 #t))))
fccf2fe0
LC
1599 (build-system gnu-build-system)
1600 (arguments
ef9652ef 1601 `(#:configure-flags (list "ROTT_ETCDIR=/etc/rottlog" ;rc file location
fccf2fe0 1602 "--localstatedir=/var")
268ad34e
LC
1603
1604 ;; Install example config files in OUT/etc.
1605 #:make-flags (list (string-append "ROTT_ETCDIR="
1606 (assoc-ref %outputs "out")
1607 "/etc"))
1608
8dc0ecae 1609 #:phases (modify-phases %standard-phases
d436c6b5 1610 (add-after 'unpack 'patch-paths
72861d8e 1611 (lambda* (#:key inputs #:allow-other-keys)
d436c6b5 1612 (substitute* "rc/rc"
72861d8e
LLB
1613 (("/usr/sbin/sendmail")
1614 (string-append (assoc-ref inputs "mailutils")
1615 "/bin/mail")))
d436c6b5 1616 #t))
ef9652ef
MO
1617 (add-after 'unpack 'fix-configure
1618 (lambda* (#:key inputs native-inputs #:allow-other-keys)
1619 ;; Replace outdated config.sub and config.guess:
1620 (for-each (lambda (file)
1621 (install-file
1622 (string-append
1623 (assoc-ref
1624 (or native-inputs inputs) "automake")
1625 "/share/automake-"
1626 ,(version-major+minor
1627 (package-version automake))
1628 "/" file) "."))
1629 '("config.sub" "config.guess"))
1630 #t))
11e74634
JN
1631 (add-after 'build 'set-packdir
1632 (lambda _
1633 ;; Set a default location for archived logs.
1634 (substitute* "rc/rc"
1635 (("packdir=\"\"")
1636 "packdir=\"/var/log\""))
1637 #t))
309e523e 1638 (add-before 'install 'tweak-rc-weekly
d81b89bf 1639 (lambda* (#:key inputs #:allow-other-keys)
309e523e
LC
1640 (substitute* "rc/weekly"
1641 (("/bin/kill")
d81b89bf
MO
1642 (string-append (assoc-ref inputs "coreutils*")
1643 "/bin/kill"))
309e523e
LC
1644 (("syslogd\\.pid")
1645 ;; The file is called 'syslog.pid' (no 'd').
1646 "syslog.pid"))
1647 #t))
8dc0ecae
LC
1648 (add-after 'install 'install-info
1649 (lambda _
cb8ba848 1650 (invoke "make" "install-info"))))))
fccf2fe0 1651 (native-inputs `(("texinfo" ,texinfo)
ef9652ef 1652 ("automake" ,automake)
fccf2fe0 1653 ("util-linux" ,util-linux))) ; for 'cal'
72861d8e
LLB
1654 (inputs `(("coreutils*" ,coreutils)
1655 ("mailutils" ,mailutils)))
6fd52309 1656 (home-page "https://www.gnu.org/software/rottlog/")
fccf2fe0
LC
1657 (synopsis "Log rotation and management")
1658 (description
1659 "GNU Rot[t]log is a program for managing log files. It is used to
1660automatically rotate out log files when they have reached a given size or
1661according to a given schedule. It can also be used to automatically compress
1662and archive such logs. Rot[t]log will mail reports of its activity to the
1663system administrator.")
f61e0e79 1664 (license license:gpl3+)))
e1485c7b
LC
1665
1666(define-public sudo
1667 (package
1668 (name "sudo")
1572737d 1669 (version "1.9.8p2")
e1485c7b
LC
1670 (source (origin
1671 (method url-fetch)
1672 (uri
6baa83d2 1673 (list (string-append "https://www.sudo.ws/sudo/dist/sudo-"
e1485c7b
LC
1674 version ".tar.gz")
1675 (string-append "ftp://ftp.sudo.ws/pub/sudo/OLD/sudo-"
1676 version ".tar.gz")))
1677 (sha256
1678 (base32
1572737d 1679 "0b8gd15l2g22w4fhhz0gzmq5c8370klanmy2c1p3px6yly6qnfwy"))
6b7f1b6c
MB
1680 (modules '((guix build utils)))
1681 (snippet
6cbee49d 1682 '(begin
aa6a3976 1683 (delete-file-recursively "lib/zlib")))))
e1485c7b 1684 (build-system gnu-build-system)
165e0918 1685 (outputs (list "out"))
e1485c7b 1686 (arguments
0086ec73 1687 `(#:configure-flags
6fa393e2
TGR
1688 (list (string-append "--docdir=" (assoc-ref %outputs "out")
1689 "/share/doc/" ,name "-" ,version)
1690
1691 "--with-logpath=/var/log/sudo.log"
8e950ee9 1692 "--with-rundir=/var/run/sudo" ; must be cleaned up at boot time
0086ec73
LC
1693 "--with-vardir=/var/db/sudo"
1694 "--with-iologdir=/var/log/sudo-io"
1695
1696 ;; 'visudo.c' expects _PATH_MV to be defined, but glibc doesn't
1697 ;; provide it.
1698 (string-append "CPPFLAGS=-D_PATH_MV='\""
1699 (assoc-ref %build-inputs "coreutils")
1700 "/bin/mv\"'"))
511495fb
LC
1701
1702 ;; Avoid non-determinism; see <http://bugs.gnu.org/21918>.
1703 #:parallel-build? #f
1704
7fae2063
TGR
1705 #:phases
1706 (modify-phases %standard-phases
1707 (add-before 'configure 'pre-configure
1708 (lambda _
1709 (substitute* "src/sudo_usage.h.in"
1710 ;; Do not capture 'configure' arguments since we would
1711 ;; unduly retain references, and also because the
1712 ;; CPPFLAGS above would close the string literal
1713 ;; prematurely.
1714 (("@CONFIGURE_ARGS@") "\"\""))
1715 (substitute* (find-files "." "Makefile\\.in")
6f6dbf2a 1716 ;; Allow installation as non-root.
7fae2063 1717 (("-o [[:graph:]]+ -g [[:graph:]]+")
7fae2063 1718 "")
6f6dbf2a 1719 ;; Don't try to create /etc/sudoers.
7fae2063 1720 (("^install: (.*)install-sudoers(.*)" _ before after)
7fae2063 1721 (string-append "install: " before after "\n"))
6f6dbf2a 1722 ;; Don't try to create /run/sudo.
7fae2063 1723 (("\\$\\(DESTDIR\\)\\$\\(rundir\\)")
7fae2063 1724 "$(TMPDIR)/dummy")
6f6dbf2a
TGR
1725 ;; Install example sudo{,_logsrvd}.conf to the right place.
1726 (("\\$\\(DESTDIR\\)\\$\\(sysconfdir\\)")
1727 "$(DESTDIR)/$(docdir)/examples")
1728 ;; Don't try to create /var/db/sudo.
7fae2063 1729 (("\\$\\(DESTDIR\\)\\$\\(vardir\\)")
4b052c6a 1730 "$(TMPDIR)/dummy"))
cbaf756c
TGR
1731
1732 ;; ‘Checking existing [/etc/]sudoers file for syntax errors’ is
1733 ;; not the task of the build system, and fails.
1734 (substitute* "plugins/sudoers/Makefile.in"
1735 (("^pre-install:" match)
aa6a3976 1736 (string-append match "\ndisabled-" match))))))
e1485c7b
LC
1737
1738 ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
1739 ;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
1740 #:tests? #f))
913c8897 1741 (native-inputs
e42765b6
JN
1742 ;; XXX TODO: Remove on next rebuild cycle.
1743 (if (hurd-target?)
1744 '()
1745 `(("groff" ,groff))))
e1485c7b 1746 (inputs
452244e6 1747 `(("coreutils" ,coreutils)
0e2abaca
EF
1748 ,@(if (hurd-target?)
1749 '()
1750 `(("linux-pam" ,linux-pam)))
452244e6 1751 ("zlib" ,zlib)))
6baa83d2 1752 (home-page "https://www.sudo.ws/")
e1485c7b
LC
1753 (synopsis "Run commands as root")
1754 (description
1755 "Sudo (su \"do\") allows a system administrator to delegate authority to
1756give certain users (or groups of users) the ability to run some (or all)
1757commands as root or another user while providing an audit trail of the
1758commands and their arguments.")
1759
1760 ;; See <http://www.sudo.ws/sudo/license.html>.
f61e0e79 1761 (license license:x11)))
952298d7 1762
248af684
MS
1763(define-public opendoas
1764 (package
1765 (name "opendoas")
9c815650 1766 (version "6.8.1")
248af684
MS
1767 (source (origin
1768 (method git-fetch)
1769 (uri (git-reference
b0e7b699 1770 (url "https://github.com/Duncaen/OpenDoas")
248af684
MS
1771 (commit (string-append "v" version))))
1772 (file-name (git-file-name name version))
1773 (sha256
1774 (base32
9c815650 1775 "0gfcssm21vdfg6kcrcc7hz1h4jmhy2zv29rfqyrrj3a6r9b5ah8p"))))
248af684
MS
1776 (build-system gnu-build-system)
1777 (arguments
1778 `(#:phases
1779 (modify-phases %standard-phases
eb939109
BW
1780 (add-before 'configure 'pre-configure
1781 (lambda* (#:key outputs #:allow-other-keys)
1782 (substitute* "GNUmakefile"
1783 (("^\tchown.*$") ""))
1784 ;; OpenDoas look for binaries in safepath when a rule specify a
1785 ;; relative command, such as “permit keepenv :wheel cmd guix”.
1786 (substitute* "doas.c"
1787 (("safepath =" match)
1788 (string-append match " \""
1789 "/run/setuid-programs:"
1790 "/run/current-system/profile/bin:"
1791 "/run/current-system/profile/sbin:"
1792 "\" ")))
1793 #t))
248af684
MS
1794 (replace 'configure
1795 ;; The configure script doesn't accept most of the default flags.
1796 (lambda* (#:key configure-flags #:allow-other-keys)
8d2ee4c5 1797 ;; The configure script can be told which compiler to use only
248af684
MS
1798 ;; through environment variables.
1799 (setenv "CC" ,(cc-for-target))
eb939109 1800 (apply invoke "./configure" configure-flags))))
248af684
MS
1801 #:configure-flags
1802 (list (string-append "--prefix=" (assoc-ref %outputs "out"))
248af684
MS
1803 "--with-timestamp")
1804 ;; Compiler choice is not carried over from the configure script.
1805 #:make-flags
1806 (list (string-append "CC=" ,(cc-for-target)))
1807 #:tests? #f)) ; no test suite
1808 (native-inputs
1809 `(("bison" ,bison)))
1810 (home-page "https://github.com/Duncaen/OpenDoas")
1811 (synopsis "Portable version of OpenBSD's doas command")
1812 (description "Doas is a minimal replacement for the venerable sudo. It was
1813initially written by Ted Unangst of the OpenBSD project to provide 95% of the
1814features of sudo with a fraction of the codebase.")
1815 (license (list license:bsd-3 ; libbsd/*
1816 license:isc)))) ; everything else
1817
1ce6f43a 1818(define-public wpa-supplicant-minimal
952298d7 1819 (package
1ce6f43a 1820 (name "wpa-supplicant-minimal")
ba7ff983 1821 (version "2.9")
952298d7
LC
1822 (source (origin
1823 (method url-fetch)
1824 (uri (string-append
eeb8b0e6 1825 "https://w1.fi/releases/wpa_supplicant-"
aeb1ed1a 1826 version ".tar.gz"))
952298d7
LC
1827 (sha256
1828 (base32
ba7ff983 1829 "05qzak1mssnxcgdrafifxh9w86a4ha69qabkg4bsigk499xyxggw"))
aeb1ed1a
MB
1830 (modules '((guix build utils)))
1831 (snippet
1832 '(begin
1833 (substitute* "wpa_supplicant/defconfig"
1834 ;; Disable D-Bus to save ~14MiB on the closure size.
1835 (("^CONFIG_CTRL_IFACE_DBUS" line _)
1836 (string-append "#" line)))
83a614b6
LLB
1837 #t))
1838 (patches
c18c8d3e
LLB
1839 (search-patches "wpa-supplicant-CVE-2021-27803.patch"
1840 "wpa-supplicant-CVE-2021-30004.patch"))))
952298d7
LC
1841 (build-system gnu-build-system)
1842 (arguments
8ec5adce 1843 `(#:phases
dc1d3cde
KK
1844 (modify-phases %standard-phases
1845 (replace 'configure
8ec5adce 1846 (lambda _
dc1d3cde
KK
1847 (chdir "wpa_supplicant")
1848 (copy-file "defconfig" ".config")
1849 (let ((port (open-file ".config" "al")))
1850 (display "
952298d7 1851 CONFIG_DEBUG_SYSLOG=y
40b4c6d6 1852
aeb1ed1a 1853 CONFIG_TLS=openssl
61bdd0d8 1854
952298d7
LC
1855 CONFIG_DRIVER_NL80211=y
1856 CFLAGS += $(shell pkg-config libnl-3.0 --cflags)
1857 CONFIG_LIBNL32=y
1858 CONFIG_READLINE=y\n" port)
cb8ba848 1859 (close-port port))
8ec5adce
EF
1860 ;; Make sure we have a pkg-config when cross compiling
1861 (substitute* '(".config"
1862 "Android.mk"
1863 "Makefile"
1864 "dbus/Makefile")
1865 (("pkg-config")
1866 (or (which "pkg-config")
1867 (which (string-append ,(%current-target-system)
1868 "-pkg-config")))))
cb8ba848 1869 #t))
3b165f2a 1870 (add-after 'install 'install-documentation
dc1d3cde
KK
1871 (lambda* (#:key outputs #:allow-other-keys)
1872 (let* ((out (assoc-ref outputs "out"))
3b165f2a 1873 (doc (string-append out "/share/doc/wpa-supplicant"))
dc1d3cde
KK
1874 (man (string-append out "/share/man"))
1875 (man5 (string-append man "/man5"))
1876 (man8 (string-append man "/man8")))
1877 (define (copy-man-page target)
1878 (lambda (file)
1879 (install-file file target)))
1880
1881 (mkdir-p man5) (mkdir man8)
1882 (for-each (copy-man-page man5)
1883 (find-files "doc/docbook" "\\.5"))
1884 (for-each (copy-man-page man8)
1885 (find-files "doc/docbook" "\\.8"))
3b165f2a
TL
1886
1887 ;; wpa_supplicant.conf(5) does not explain all configuration
1888 ;; options but refers to the example config file, so install it
1889 ;; along with READMEs.
1890 (for-each (lambda (file)
1891 (install-file file doc))
1892 '("README" "README-DPP" "README-HS20"
1893 "README-P2P" "README-WPS"
1894 "wpa_supplicant.conf"))
dc1d3cde 1895 #t))))
952298d7 1896
8ec5adce 1897 #:make-flags (list (string-append "CC=" ,(cc-for-target))
952298d7
LC
1898 (string-append "BINDIR=" (assoc-ref %outputs "out")
1899 "/sbin")
1900 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1901 "/lib"))
1902 #:tests? #f))
1903 (inputs
1904 `(("readline" ,readline)
1905 ("libnl" ,libnl)
aeb1ed1a 1906 ("openssl" ,openssl)))
952298d7
LC
1907 (native-inputs
1908 `(("pkg-config" ,pkg-config)))
eeb8b0e6 1909 (home-page "https://w1.fi/wpa_supplicant/")
952298d7
LC
1910 (synopsis "Connecting to WPA and WPA2-protected wireless networks")
1911 (description
1912 "wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
1913802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in
1914the client stations. It implements key negotiation with a WPA Authenticator
1915and it controls the roaming and IEEE 802.11 authentication/association of the
1916WLAN driver.
1917
36a4366d
EF
1918This package provides the @code{wpa_supplicant} daemon and the @code{wpa_cli}
1919command.")
952298d7
LC
1920
1921 ;; In practice, this is linked against Readline, which makes it GPLv3+.
107b081e
LC
1922 (license license:bsd-3)
1923
1924 (properties `((cpe-name . "wpa_supplicant")))))
c6b76405 1925
4fb7e0de 1926(define-public wpa-supplicant
1ce6f43a 1927 (package (inherit wpa-supplicant-minimal)
4fb7e0de
MW
1928 (name "wpa-supplicant")
1929 (inputs `(("dbus" ,dbus)
1ce6f43a 1930 ,@(package-inputs wpa-supplicant-minimal)))
4fb7e0de 1931 (arguments
1ce6f43a 1932 (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
4fb7e0de 1933 ((#:phases phases)
dc1d3cde
KK
1934 `(modify-phases ,phases
1935 (add-after 'configure 'configure-for-dbus
1936 (lambda _
1937 (let ((port (open-file ".config" "al")))
1938 (display "
4fb7e0de
MW
1939 CONFIG_CTRL_IFACE_DBUS_NEW=y
1940 CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
dc1d3cde
KK
1941 (close-port port))
1942 #t))
3b165f2a 1943 (add-after 'install-documentation 'install-dbus-conf
dc1d3cde
KK
1944 (lambda* (#:key outputs #:allow-other-keys)
1945 (let* ((out (assoc-ref outputs "out"))
1946 (dir (string-append out "/etc/dbus-1/system.d")))
1947 (mkdir-p dir)
1948 (copy-file "dbus/dbus-wpa_supplicant.conf"
1949 (string-append dir "/wpa_supplicant.conf")))
1950 #t))))))))
4fb7e0de 1951
050e5756
MB
1952(define-public wpa-supplicant-gui
1953 (package
1954 (inherit wpa-supplicant)
1955 (name "wpa-supplicant-gui")
ea0a5107 1956 (inputs `(("qtbase" ,qtbase-5)
050e5756
MB
1957 ("qtsvg" ,qtsvg)
1958 ,@(package-inputs wpa-supplicant)))
1959 (native-inputs
1960 ;; For icons.
1961 `(("imagemagick" ,imagemagick)
1962 ("inkscape" ,inkscape)
1963 ,@(package-native-inputs wpa-supplicant)))
1964 (arguments
1965 `(#:phases (modify-phases %standard-phases
1966 (add-after 'unpack 'chdir
1967 (lambda _
1968 (chdir "wpa_supplicant/wpa_gui-qt4")
1969 #t))
1970 (delete 'configure)
1971 (replace 'build
1972 (lambda _
1973 (invoke "qmake" "wpa_gui.pro")
1974 (invoke "make" "-j" (number->string (parallel-job-count)))
1975 (invoke "make" "-C" "icons")))
1976 (replace 'install
1977 (lambda* (#:key inputs outputs #:allow-other-keys)
1978 (let ((out (assoc-ref outputs "out"))
1979 (qt '("qtbase" "qtsvg")))
050e5756
MB
1980 (install-file "wpa_gui" (string-append out "/bin"))
1981 (install-file "wpa_gui.desktop"
1982 (string-append out "/share/applications"))
1983 (copy-recursively "icons/hicolor"
1984 (string-append out "/share/icons/hicolor"))
1985 (wrap-program (string-append out "/bin/wpa_gui")
1986 `("QT_PLUGIN_PATH" ":" prefix
1987 ,(map (lambda (label)
1988 (string-append (assoc-ref inputs label)
1989 "/lib/qt5/plugins/"))
1990 qt)))
1991 #t))))))
1992 (synopsis "Graphical user interface for WPA supplicant")))
1993
56038bac
LC
1994(define-public hostapd
1995 (package
1996 (name "hostapd")
f5bfaf32 1997 (version "2.9")
56038bac
LC
1998 (source (origin
1999 (method url-fetch)
2000 (uri (string-append "https://w1.fi/releases/hostapd-" version
2001 ".tar.gz"))
2002 (sha256
2003 (base32
83a614b6
LLB
2004 "1mrbvg4v7vm7mknf0n29mf88k3s4a4qj6r4d51wq8hmjj1m7s7c8"))
2005 (patches
55fca8ee
LLB
2006 (search-patches "wpa-supplicant-CVE-2021-27803.patch"
2007 "wpa-supplicant-CVE-2021-30004.patch"))))
56038bac
LC
2008 (build-system gnu-build-system)
2009 (arguments
afcf90c6 2010 `(#:phases
56038bac
LC
2011 (modify-phases %standard-phases
2012 (replace 'configure
afcf90c6 2013 (lambda _
56038bac
LC
2014 ;; This is mostly copied from 'wpa-supplicant' above.
2015 (chdir "hostapd")
2016 (copy-file "defconfig" ".config")
2017 (let ((port (open-file ".config" "al")))
2018 (display "
2019 CONFIG_LIBNL32=y
2020 CONFIG_IEEE80211R=y
2021 CONFIG_IEEE80211N=y
2022 CONFIG_IEEE80211AC=y\n" port)
2023 (close-port port))
2024 #t))
afcf90c6
EF
2025 (add-after 'unpack 'patch-pkg-config
2026 (lambda _
2027 (substitute* "src/drivers/drivers.mak"
2028 (("pkg-config")
2029 (or (which "pkg-config")
2030 (string-append ,(%current-target-system)
2031 "-pkg-config"))))
2032 #t))
56038bac
LC
2033 (add-after 'install 'install-man-pages
2034 (lambda* (#:key outputs #:allow-other-keys)
2035 (let* ((out (assoc-ref outputs "out"))
2036 (man (string-append out "/share/man"))
2037 (man1 (string-append man "/man1"))
2038 (man8 (string-append man "/man8")))
2039 (define (copy-man-page target)
2040 (lambda (file)
2041 (install-file file target)))
2042
2043 (for-each (copy-man-page man1)
2044 (find-files "." "\\.1"))
2045 (for-each (copy-man-page man8)
2046 (find-files "." "\\.8"))
2047 #t))))
2048
afcf90c6 2049 #:make-flags (list (string-append "CC=" ,(cc-for-target))
56038bac
LC
2050 (string-append "BINDIR=" (assoc-ref %outputs "out")
2051 "/sbin")
2052 (string-append "LIBDIR=" (assoc-ref %outputs "out")
2053 "/lib"))
2054 #:tests? #f))
2055 (native-inputs `(("pkg-config" ,pkg-config)))
2056
2057 ;; There's an optional dependency on SQLite.
2058 (inputs `(("openssl" ,openssl)
2059 ("libnl" ,libnl)))
2060 (home-page "https://w1.fi/hostapd/")
2061 (synopsis "Daemon for Wi-Fi access points and authentication servers")
2062 (description
2063 "hostapd is a user-space daemon for WiFi access points and authentication
2064servers. It implements IEEE 802.11 access point management, IEEE
2065802.1X/WPA/WPA2/EAP Authenticators, RADIUS client, EAP server, and RADIUS
2066authentication server.")
2067
2068 ;; Same license as wpa_supplicant.
2069 (license license:bsd-3)))
2070
c6b76405
LC
2071(define-public wakelan
2072 (package
2073 (name "wakelan")
2074 (version "1.1")
2075 (source (origin
2076 (method url-fetch)
2077 (uri (string-append
2078 "ftp://ftp.gwdg.de/pub/linux/metalab/system/network/misc/wakelan-"
2079 version ".tar.gz"))
2080 (sha256
2081 (base32
2082 "0vydqpf44146ir6k87gmqaq6xy66xhc1gkr3nsd7jj3nhy7ypx9x"))))
2083 (build-system gnu-build-system)
2084 (arguments
dc1d3cde
KK
2085 '(#:phases
2086 (modify-phases %standard-phases
2087 (replace 'configure
2088 (lambda* (#:key outputs #:allow-other-keys)
2089 (let ((out (assoc-ref outputs "out")))
2090 (mkdir-p (string-append out "/bin"))
2091 (mkdir-p (string-append out "/share/man/man1"))
2092
2093 ;; It's an old configure script that doesn't understand
2094 ;; the extra options we pass.
2095 (setenv "CONFIG_SHELL" (which "bash"))
cb8ba848
MW
2096 (invoke "./configure"
2097 (string-append "--prefix=" out)
2098 (string-append "--mandir=" out
2099 "/share/man"))))))
c6b76405 2100 #:tests? #f))
eeb8b0e6 2101 (home-page "https://www.kernel.org") ; really, no home page
c6b76405
LC
2102 (synopsis "Send a wake-on-LAN packet")
2103 (description
2104 "WakeLan broadcasts a properly formatted UDP packet across the local area
2105network, which causes enabled computers to power on.")
f61e0e79 2106 (license license:gpl2+)))
d43f4296
LC
2107
2108(define-public dmidecode
2109 (package
2110 (name "dmidecode")
6f19c32b
TGR
2111 (version "3.3")
2112 (source
2113 (origin
2114 (method url-fetch)
2115 (uri (string-append "mirror://savannah/dmidecode/dmidecode-"
2116 version ".tar.xz"))
2117 (sha256
2118 (base32 "0m8lzg9rf1qssasiix672bxk5qwms90561g8hfkkhk31h2kkgiw2"))))
d43f4296
LC
2119 (build-system gnu-build-system)
2120 (arguments
6f19c32b
TGR
2121 `(#:tests? #f ; no 'check' target
2122 #:make-flags
2123 (list (string-append "CC=" ,(cc-for-target))
2124 (string-append "prefix="
2125 (assoc-ref %outputs "out")))
2126 #:phases
2127 (modify-phases %standard-phases
2128 (delete 'configure)))) ; no configure script
340978d7 2129 (home-page "https://www.nongnu.org/dmidecode/")
d43f4296
LC
2130 (synopsis "Read hardware information from the BIOS")
2131 (description
2132 "Dmidecode reports information about your system's hardware as described
2133in your system BIOS according to the SMBIOS/DMI standard. This typically
2134includes system manufacturer, model name, serial number, BIOS version, asset
2135tag as well as a lot of other details of varying level of interest and
2136reliability depending on the manufacturer. This will often include usage
2137status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory
2138module slots, and the list of I/O ports (e.g. serial, parallel, USB).")
f61e0e79 2139 (license license:gpl2+)))
42dc3af5 2140
13c8c2bf
MW
2141(define-public acpica
2142 (package
2143 (name "acpica")
2cced18b 2144 (version "20210930")
13c8c2bf
MW
2145 (source (origin
2146 (method url-fetch)
2147 (uri (string-append
2148 "https://acpica.org/sites/acpica/files/acpica-unix2-"
f2530423 2149 version ".tar.gz"))
13c8c2bf
MW
2150 (sha256
2151 (base32
2cced18b 2152 "06wsrl1118sl9z76p9sh53zvzv5hpm82qks896d8slx5dgnzrrll"))))
13c8c2bf
MW
2153 (build-system gnu-build-system)
2154 (native-inputs `(("flex" ,flex)
2155 ("bison" ,bison)))
2156 (arguments
12110f94
EF
2157 `(#:make-flags (list (string-append "PREFIX=" %output)
2158 (string-append "CC=" ,(cc-for-target))
13c8c2bf
MW
2159 "HOST=_LINUX"
2160 "OPT_CFLAGS=-Wall -fno-strict-aliasing")
e56feffe 2161 #:tests? #f ; no 'check' target
dc1d3cde 2162 #:phases (modify-phases %standard-phases (delete 'configure))))
6c441efc 2163 (home-page "https://acpica.org/")
018be4ca 2164 (synopsis "Tools for the development and debugging of ACPI tables")
13c8c2bf 2165 (description
4d1e4af4
TGR
2166 "The @acronym{ACPICA, ACPI Component Architecture} project provides an
2167OS-independent reference implementation of the @acronym{ACPI, Advanced
2168Configuration and Power Interface} specification. ACPICA code contains those
2169portions of ACPI meant to be directly integrated into the host OS as a
2170kernel-resident subsystem, and a small set of tools to assist in developing and
2171debugging ACPI tables.
2172
2173This package contains only the user-space tools needed for ACPI table
13c8c2bf 2174development, not the kernel implementation of ACPI.")
e56feffe 2175 (license license:gpl2))) ; dual GPLv2/ACPICA Licence
4cf7bd2b 2176
bee9f97e
CB
2177(define-public s-tui
2178 (package
2179 (name "s-tui")
35d9d5bf 2180 (version "1.1.1")
bee9f97e
CB
2181 (source
2182 (origin
2183 (method url-fetch)
2184 (uri (pypi-uri "s-tui" version))
2185 (sha256
35d9d5bf 2186 (base32 "1clk59wf6v1lq33h4x5qwxvz5ng9mfkp1s6ynxa58w2raq8dbmy5"))))
bee9f97e
CB
2187 (build-system python-build-system)
2188 (inputs
2189 `(("python-psutil" ,python-psutil)
2190 ("python-urwid" ,python-urwid)))
2191 (home-page "https://github.com/amanusk/s-tui")
2192 (synopsis "Interactive terminal stress test and monitoring tool")
2193 (description
2194 "The Stress Terminal UI displays graphs of the CPU frequency,
2195utilization, temperature and power.")
2196 (license license:gpl2+)))
2197
4cf7bd2b
MW
2198(define-public stress
2199 (package
2200 (name "stress")
ecc7de52 2201 (version "1.0.5")
4cf7bd2b
MW
2202 (source (origin
2203 (method url-fetch)
2204 (uri (string-append "mirror://debian/pool/main/s/stress/stress_"
2205 version ".orig.tar.gz"))
2206 (sha256
2207 (base32
ecc7de52 2208 "09shpd85g8dvpiw0mnwykss676g0s7lbi8ab37xjinb5lfff960p"))))
4cf7bd2b 2209 (build-system gnu-build-system)
ecc7de52
TGR
2210 (native-inputs
2211 `(("autoconf" ,autoconf)
2212 ("automake" ,automake)))
abf7fed5 2213 (home-page "https://packages.debian.org/sid/stress")
9e771e3b 2214 (synopsis "Impose load on and stress test a computer system")
4cf7bd2b 2215 (description
35b9e423 2216 "Stress is a tool that imposes a configurable amount of CPU, memory, I/O,
4cf7bd2b
MW
2217or disk stress on a POSIX-compliant operating system and reports any errors it
2218detects.
2219
35b9e423 2220Stress is not a benchmark. It is a tool used by system administrators to
4cf7bd2b
MW
2221evaluate how well their systems will scale, by kernel programmers to evaluate
2222perceived performance characteristics, and by systems programmers to expose
2223the classes of bugs which only or more frequently manifest themselves when the
2224system is under heavy load.")
f61e0e79 2225 (license license:gpl2+)))
b36fcf95
EB
2226
2227(define-public detox
2228 (package
2229 (name "detox")
99df1b2a 2230 (version "1.4.5")
b36fcf95 2231 (source (origin
c2d512d3
EB
2232 (method git-fetch)
2233 (uri (git-reference
b0e7b699 2234 (url "https://github.com/dharple/detox")
c2d512d3 2235 (commit (string-append "v" version))))
f1d4d79f 2236 (file-name (git-file-name name version))
b36fcf95
EB
2237 (sha256
2238 (base32
99df1b2a 2239 "116bgpbkh3c96h6vq0880rmnpb5kbnnlvvkpsrcib6928bj8lfvi"))))
b36fcf95 2240 (build-system gnu-build-system)
c2d512d3
EB
2241 (native-inputs
2242 `(("autoconf" ,autoconf)
2243 ("automake" ,automake)
2244 ("flex" ,flex)))
b36fcf95 2245 (arguments
1a06cafc 2246 `(#:phases (modify-phases %standard-phases
c2d512d3
EB
2247 (add-after 'unpack 'delete-configure
2248 ;; The "configure" script is present, but otherwise the
2249 ;; project is not bootstrapped: missing install-sh and
2250 ;; Makefile.in, so delete it so the bootstrap phase will
2251 ;; take over.
1a06cafc
EB
2252 (lambda _ (delete-file "configure") #t))
2253 (replace 'check
2254 (lambda _
2255 (invoke "./tests/test.sh" "src/detox"))))))
c2d512d3 2256 (home-page "https://github.com/dharple/detox")
e881752c 2257 (synopsis "Clean up file names")
b36fcf95
EB
2258 (description
2259 "Detox is a program that renames files to make them easier to work with
2260under Unix and related operating systems. Spaces and various other unsafe
2261characters (such as \"$\") get replaced with \"_\". ISO 8859-1 (Latin-1)
2262characters can be replaced as well, as can UTF-8 characters.")
f61e0e79 2263 (license license:bsd-3)))
c4492a16
LC
2264
2265(define-public testdisk
2266 (package
2267 (name "testdisk")
2b336e93 2268 (version "7.1")
c4492a16
LC
2269 (source (origin
2270 (method url-fetch)
e14c06d8 2271 (uri (string-append "https://www.cgsecurity.org/testdisk-"
c4492a16
LC
2272 version ".tar.bz2"))
2273 (sha256
2274 (base32
2b336e93 2275 "1zlh44w67py416hkvw6nrfmjickc2d43v51vcli5p374d5sw84ql"))))
c4492a16
LC
2276 (build-system gnu-build-system)
2277 (inputs
d6a08ec0 2278 `(("ntfs-3g" ,ntfs-3g)
bb93042c 2279 ("util-linux" ,util-linux "lib")
cc2b77df 2280 ("openssl" ,openssl)
2b336e93 2281 ;; FIXME: add reiserfs.
f61e0e79 2282 ("zlib" ,zlib)
c4492a16 2283 ("e2fsprogs" ,e2fsprogs)
4bd428a7 2284 ("libjpeg" ,libjpeg-turbo)
c4492a16 2285 ("ncurses" ,ncurses)))
8fc46a43 2286 (home-page "https://www.cgsecurity.org/wiki/TestDisk")
c4492a16
LC
2287 (synopsis "Data recovery tool")
2288 (description
2289 "TestDisk is a program for data recovery, primarily designed to help
2290recover lost partitions and/or make non-booting disks bootable again.")
f61e0e79 2291 (license license:gpl2+)))
c4492a16 2292
15926aec
AS
2293(define-public tree
2294 (package
2295 (name "tree")
1e2ebf7c 2296 (version "1.8.0")
15926aec
AS
2297 (source (origin
2298 (method url-fetch)
2299 (uri (string-append
2300 "http://mama.indstate.edu/users/ice/tree/src/tree-"
2301 version ".tgz"))
2302 (sha256
1e2ebf7c 2303 (base32 "1hmpz6k0mr6salv0nprvm1g0rdjva1kx03bdf1scw8a38d5mspbi"))))
15926aec
AS
2304 (build-system gnu-build-system)
2305 (arguments
dc1d3cde 2306 '(#:phases (modify-phases %standard-phases (delete 'configure))
15926aec
AS
2307 #:tests? #f ; no check target
2308 #:make-flags (let ((out (assoc-ref %outputs "out")))
2309 (list (string-append "prefix=" out)))))
2310 (synopsis "Recursively list the contents of a directory")
2311 (description
2312 "Tree is a recursive directory listing command that produces a depth
2313indented listing of files, which is colorized ala dircolors if the LS_COLORS
2314environment variable is set and output is to tty.")
2315 (home-page "http://mama.indstate.edu/users/ice/tree/")
2316 (license license:gpl2+)))
2317
e693927a
SR
2318(define-public lr
2319 (package
2320 (name "lr")
2321 (version "1.5.1")
2322 (source
2323 (origin
2324 (method git-fetch)
2325 (uri (git-reference
2326 (url "https://git.vuxu.org/lr/")
2327 (commit (string-append "v" version))))
2328 (file-name (git-file-name name version))
2329 (sha256
2330 (base32 "1wv2acm4r5y5gg6f64v2hiwpg1f3lnr4fy1a9zssw77fmdc7ys3j"))))
2331 (build-system gnu-build-system)
2332 (arguments
2333 `(#:tests? #f
2334 #:make-flags (list (string-append "CC=" ,(cc-for-target))
2335 (string-append "PREFIX=" %output))
2336 #:phases (modify-phases %standard-phases
2337 (delete 'configure))))
2338 (synopsis "Tool to generate customized file listings")
2339 (description
2340 "lr is a tool for generating file listings, which includes the best
2341features of ls(1), find(1), stat(1) and du(1).")
2342 (home-page "https://git.vuxu.org/lr/about")
2343 (license license:expat)))
2344
c2619e10
LC
2345(define-public direvent
2346 (package
2347 (name "direvent")
857ff515 2348 (version "5.2")
c2619e10
LC
2349 (source (origin
2350 (method url-fetch)
2351 (uri (string-append "mirror://gnu/direvent/direvent-"
2352 version ".tar.gz"))
2353 (sha256
2354 (base32
857ff515 2355 "0m9vi01b1km0cpknflyzsjnknbava0s1n6393b2bpjwyvb6j5613"))
c2619e10 2356 (modules '((guix build utils)))
6cbee49d
MW
2357 (snippet '(begin
2358 (substitute* "tests/testsuite"
2359 (("#![[:blank:]]?/bin/sh")
2360 "#!$SHELL"))
2361 #t))))
c2619e10
LC
2362 (build-system gnu-build-system)
2363 (arguments
dc1d3cde
KK
2364 '(#:phases
2365 (modify-phases %standard-phases
2366 (add-before 'build 'patch-/bin/sh
2367 (lambda* (#:key inputs #:allow-other-keys)
2368 ;; Use the right shell when executing the watcher and
2369 ;; user-provided shell commands.
2370 (let ((bash (assoc-ref inputs "bash")))
2371 (substitute* '("src/direvent.c" "src/progman.c")
2372 (("\"/bin/sh\"")
2373 (string-append "\"" bash "/bin/sh\"")))
2374
2375 ;; Adjust the 'shell.at' test accordingly.
2376 (substitute* "tests/testsuite"
2377 (("SHELL=/bin/sh")
2378 (string-append "SHELL=" bash "/bin/sh")))
2379
2380 #t))))))
1977e857 2381 (home-page "https://www.gnu.org.ua/software/direvent/")
c2619e10
LC
2382 (synopsis "Daemon to monitor directories for events such as file removal")
2383 (description
2384 "A daemon that monitors directories for events, such as creating,
35b9e423 2385deleting or modifying files. It can monitor different sets of directories for
c2619e10
LC
2386different events. When an event is detected, direvent calls a specified
2387external program with information about the event, such as the location
c5779c93
LC
2388within the file system where it occurred. Thus, \"direvent\" provides an
2389easy way to react immediately if given files undergo changes, for example, to
c2619e10 2390track changes in important system configuration files.")
f61e0e79 2391 (license license:gpl3+)))
da6c3749
TUBK
2392
2393(define-public libcap-ng
2394 (package
2395 (name "libcap-ng")
8000d225 2396 (version "0.8.2")
da6c3749
TUBK
2397 (source (origin
2398 (method url-fetch)
2399 (uri (string-append
eeb8b0e6 2400 "https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-"
da6c3749
TUBK
2401 version ".tar.gz"))
2402 (sha256
2403 (base32
8000d225 2404 "1sasp1n154aqy9fz0knlb966svm7xg1zjhg1vr4q839bgjvq7h2j"))))
da6c3749 2405 (build-system gnu-build-system)
dd935df2
TGR
2406 (arguments
2407 `(#:configure-flags
2408 (list "--without-python")))
4a2982a1 2409 (home-page "https://people.redhat.com/sgrubb/libcap-ng/")
da6c3749
TUBK
2410 (synopsis "Library for more easily working with POSIX capabilities")
2411 (description
2412 "The libcap-ng library is intended to make programming with POSIX
2413capabilities easier than the traditional libcap library. It includes
2414utilities that can analyse all currently running applications and print out
2415any capabilities and whether or not it has an open ended bounding set. The
2416included utilities are designed to let admins and developers spot apps from
2417various ways that may be running with too much privilege.")
2418 ;; The library is lgpl2.1+, but also ships some utils which are gpl2+.
f61e0e79 2419 (license (list license:lgpl2.1+ license:gpl2+))))
d02f2cc4
TUBK
2420
2421(define-public smartmontools
2422 (package
2423 (name "smartmontools")
da7fde00 2424 (version "7.2")
d02f2cc4
TUBK
2425 (source (origin
2426 (method url-fetch)
2427 (uri (string-append
2428 "mirror://sourceforge/smartmontools/smartmontools/"
2429 version "/smartmontools-" version ".tar.gz"))
2430 (sha256
2431 (base32
da7fde00 2432 "1mlc25sd5rgj5xmzcllci47inmfdw7cp185fday6hc9rwqkqmnaw"))))
d02f2cc4
TUBK
2433 (build-system gnu-build-system)
2434 (inputs `(("libcap-ng" ,libcap-ng)))
51b6a1dd 2435 (home-page "https://www.smartmontools.org/")
d02f2cc4
TUBK
2436 (synopsis "S.M.A.R.T. harddisk control and monitoring tools")
2437 (description
2438 "The smartmontools package contains utility programs to control and
2439monitor storage systems using the Self-Monitoring, Analysis and Reporting
c115b2db
TGR
2440Technology System (@dfn{S.M.A.R.T.}) built into most modern ATA and SCSI hard
2441disks. In many cases, these utilities will provide advanced warning of disk
d02f2cc4 2442degradation and failure.")
f61e0e79 2443 (license license:gpl2+)))
6efd0823
RW
2444
2445(define-public fdupes
2446 (package
2447 (name "fdupes")
5a9f2ae1 2448 (version "2.1.2")
6efd0823
RW
2449 (source
2450 (origin
5a9f2ae1
TGR
2451 (method url-fetch)
2452 (uri (string-append "https://github.com/adrianlopezroche/fdupes/"
2453 "releases/download/v" version "/"
2454 "fdupes-" version ".tar.gz"))
6efd0823 2455 (sha256
5a9f2ae1 2456 (base32 "1g9p50xhi2sp0hqxml4w2k0kq9jv988q2yxm347z5349dlxvap6d"))))
6efd0823 2457 (build-system gnu-build-system)
5a9f2ae1
TGR
2458 (inputs
2459 `(("ncurses" ,ncurses)
2460 ("pcre2" ,pcre2)))
6efd0823
RW
2461 (home-page "https://github.com/adrianlopezroche/fdupes")
2462 (synopsis "Identify duplicate files")
2463 (description
2464 "fdupes is a program for identifying duplicate files residing within
2465specified directories.")
2466 (license license:expat)))
4ecfbda7
DT
2467
2468(define-public graphios
2469 (package
2470 (name "graphios")
2471 (version "2.0.3")
2472 (source
2473 (origin
2474 (method url-fetch)
4267aa75 2475 (uri (pypi-uri "graphios" version))
4ecfbda7
DT
2476 (sha256
2477 (base32
2478 "1h87hvc315wg6lklbf4l7csd3n5pgljwrfli1p3nasdi0izgn66i"))))
2479 (build-system python-build-system)
2480 (arguments
2481 ;; Be warned: Building with Python 3 succeeds, but the build process
2482 ;; throws a syntax error that is ignored.
2483 `(#:python ,python-2
2484 #:phases
2485 (modify-phases %standard-phases
2486 (add-before 'build 'fix-setup.py
2487 (lambda* (#:key outputs #:allow-other-keys)
2488 ;; Fix hardcoded, unprefixed file names.
2489 (let ((out (assoc-ref outputs "out")))
2490 (substitute* '("setup.py")
2491 (("/etc") (string-append out "/etc"))
2492 (("/usr") out)
2493 (("distro_ver = .*") "distro_ver = ''"))
2494 #t))))))
4ecfbda7
DT
2495 (home-page "https://github.com/shawn-sterling/graphios")
2496 (synopsis "Emit Nagios metrics to Graphite, Statsd, and Librato")
2497 (description
2498 "Graphios is a script to emit nagios perfdata to various upstream metrics
2499processing and time-series systems. It's currently compatible with Graphite,
2500Statsd, Librato and InfluxDB. Graphios can emit Nagios metrics to any number
2501of supported upstream metrics systems simultaneously.")
2502 (license license:gpl2+)))
8d801045 2503
83bf3c63
MC
2504(define-public ansible-core
2505 (package
2506 (name "ansible-core")
90cd653a 2507 (version "2.11.6")
83bf3c63
MC
2508 (source
2509 (origin
2510 (method url-fetch)
2511 (uri (pypi-uri "ansible-core" version))
2512 (sha256
90cd653a 2513 (base32 "0fih7nxszni8imi5sywsifd976v77ydhip43pzg7dd65qy1h5mck"))))
83bf3c63
MC
2514 (build-system python-build-system)
2515 (arguments
2516 `(#:modules ((guix build python-build-system)
2517 (guix build utils)
2518 (ice-9 ftw))
2519 #:phases
2520 (modify-phases %standard-phases
2521 ;; Several ansible commands (ansible-config, ansible-console, etc.)
2522 ;; are just symlinks to a single ansible executable. The ansible
2523 ;; executable behaves differently based on the value of sys.argv[0].
2524 ;; This does not work well with our wrap phase, and therefore the
2525 ;; following two phases are required as a workaround.
2526 (add-after 'unpack 'hide-wrapping
2527 (lambda _
2528 ;; Overwrite sys.argv[0] to hide the wrapper script from it.
2529 (substitute* "bin/ansible"
2530 (("import traceback" all)
2531 (string-append all "
2532import re
2533sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
2534")))))
2535 (add-after 'install 'replace-symlinks
2536 (lambda* (#:key outputs #:allow-other-keys)
2537 ;; Replace symlinks with duplicate copies of the ansible
2538 ;; executable so that sys.argv[0] has the correct value.
2539 (define bin (string-append (assoc-ref outputs "out") "/bin"))
2540 (with-directory-excursion bin
2541 (for-each
2542 (lambda (ansible-symlink)
2543 (delete-file ansible-symlink)
2544 (copy-file "ansible" ansible-symlink))
2545 (scandir "." (lambda (x)
2546 (and (eq? 'symlink (stat:type (lstat x)))
2547 (string-prefix? "ansible-" x)
2548 (string=? "ansible" (readlink x)))))))))
2549 (add-after 'unpack 'preserve-pythonpath
2550 (lambda _
2551 (substitute* "test/lib/ansible_test/_internal/ansible_util.py"
2552 (("PYTHONPATH=get_ansible_python_path\\(args\\)" all)
2553 (string-append all "+ ':' + os.environ['PYTHONPATH']")))))
2554 (add-after 'unpack 'patch-paths
2555 (lambda* (#:key inputs outputs #:allow-other-keys)
2556 (substitute* "lib/ansible/module_utils/compat/selinux.py"
2557 (("libselinux.so.1" name)
2558 (string-append (assoc-ref inputs "libselinux")
2559 "/lib/" name)))
2560 (substitute* "test/units/modules/test_async_wrapper.py"
2561 (("/usr/bin/python")
2562 (which "python")))))
2563 (replace 'check
2564 ;; The environment for the test suite can be tricky to get right.
2565 ;; The environment used for Ansible's CI defined in the following
2566 ;; Dockerfile can be used as a reference:
2567 ;; https://raw.githubusercontent.com/ansible/
2568 ;; default-test-container/master/Dockerfile.
2569 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
2570 (when tests?
2571 ;; Otherwise Ansible fails to create its config directory.
2572 (setenv "HOME" "/tmp")
2573 (setenv "PATH" (string-append (getenv "PATH") ":"
2574 (assoc-ref outputs "out") "/bin"))
2575 (add-installed-pythonpath inputs outputs)
2576 ;; This test module messes up with sys.path and causes many
2577 ;; test failures.
2578 (delete-file "test/units/_vendor/test_vendor.py")
2579 ;; The test fails when run in the container, for reasons
2580 ;; unknown.
2581 (delete-file "test/units/utils/test_display.py")
2582 ;; This test fail for reasons unknown.
2583 (delete-file "test/units/cli/test_adhoc.py")
2584 ;; The test suite needs to be run with 'ansible-test', which
2585 ;; does some extra environment setup. Taken from
2586 ;; https://raw.githubusercontent.com/ansible/ansible/\
2587 ;; devel/test/utils/shippable/shippable.sh.
2588 (invoke "ansible-test" "units" "-v")))))))
2589 (native-inputs
2590 `(("openssh" ,openssh)
2591 ("openssl" ,openssl)
2592 ("python-mock" ,python-mock)
2593 ("python-pycrypto" ,python-pycrypto)
2594 ("python-pytest" ,python-pytest)
2595 ("python-pytest-forked" ,python-pytest-forked)
2596 ("python-pytest-mock" ,python-pytest-mock)
2597 ("python-pytest-xdist" ,python-pytest-xdist)
2598 ("python-pytz" ,python-pytz)))
2599 (inputs ;optional dependencies captured in wrap scripts
2600 `(("libselinux" ,libselinux)
2601 ("python-paramiko" ,python-paramiko)
2602 ("python-passlib" ,python-passlib)
2603 ("python-pexpect" ,python-pexpect)
2604 ("sshpass" ,sshpass)))
2605 (propagated-inputs ;core dependencies listed in egg-info/requires.txt
2606 `(("python-cryptography" ,python-cryptography)
2607 ("python-jinja2" ,python-jinja2)
2608 ("python-pyyaml" ,python-pyyaml)
2609 ("python-packaging" ,python-packaging) ;for version number parsing
2610 ("python-resolvelib" ,python-resolvelib-0.5)))
2611 (home-page "https://www.ansible.com/")
2612 (synopsis "Radically simple IT automation")
2613 (description "Ansible aims to be a radically simple IT automation system.
2614It handles configuration management, application deployment, cloud
2615provisioning, ad-hoc task execution, network automation, and multi-node
2616orchestration. Ansible facilitates complex changes like zero-downtime rolling
2617updates with load balancers. This package is the core of Ansible, which
2618provides the following commands:
2619@itemize
2620@item ansible
2621@item ansible-config
2622@item ansible-connection
2623@item ansible-console
2624@item ansible-doc
2625@item ansible-galaxy
2626@item ansible-inventory
2627@item ansible-playbook
2628@item ansible-pull
2629@item ansible-test
2630@item ansible-vault
2631@end itemize")
2632 (license license:gpl3+)))
2633
8d801045
ED
2634(define-public ansible
2635 (package
2636 (name "ansible")
019bf963 2637 (version "4.4.0")
8d801045
ED
2638 (source
2639 (origin
2640 (method url-fetch)
697e86dd 2641 (uri (pypi-uri "ansible" version))
8d801045 2642 (sha256
019bf963 2643 (base32 "031n22j0lsmh69x6i6gkva81j68b4yzh1pbg3q2h4bknl85q46ag"))))
8d801045 2644 (build-system python-build-system)
019bf963
MC
2645 (propagated-inputs
2646 `(("ansible-core" ,ansible-core)))
2647 ;; The Ansible collections are found by ansible-core via PYTHONPATH; the
2648 ;; following search path ensures that they are found even when Python is
2649 ;; not present in the profile.
2650 (native-search-paths
2651 ;; XXX: Attempting to use (package-native-search-paths python)
2652 ;; here would cause an error about python being an unbound
2653 ;; variable in the tests/cpan.scm test.
2654 (list (search-path-specification
2655 (variable "PYTHONPATH")
2656 (files (list "lib/python3.8/site-packages")))))
ff18d0f1 2657 (home-page "https://www.ansible.com/")
8d801045 2658 (synopsis "Radically simple IT automation")
019bf963
MC
2659 (description "Ansible aims to be a radically simple IT automation system.
2660It handles configuration management, application deployment, cloud
2661provisioning, ad-hoc task execution, network automation, and multi-node
2662orchestration. Ansible facilitates complex changes like zero-downtime rolling
2663updates with load balancers. This package provides a curated set of
2664community-maintained Ansible collections, which contain playbooks, roles,
2665modules and plugins that extend Ansible.")
8d801045 2666 (license license:gpl3+)))
44157e9f 2667
6eb1d20b
HG
2668(define-public debops
2669 (package
2670 (name "debops")
2671 (version "1.1.0")
2672 (source
2673 (origin
2674 (method git-fetch)
2675 (uri (git-reference
2676 (url "https://github.com/debops/debops")
2677 (commit (string-append "v" version))))
2678 (file-name (git-file-name name version))
2679 (sha256
2680 (base32 "052b2dykdn35pdpn9s4prawl6nl6yzih8nyf54hpvhpisvjrm1v5"))
2681 (patches
2682 (search-patches "debops-constants-for-external-program-names.patch"
2683 "debops-debops-defaults-fall-back-to-less.patch"))))
2684 (build-system python-build-system)
2685 (native-inputs
2686 `(("git" ,git)))
2687 (inputs
2688 `(("ansible" ,ansible)
2689 ("encfs" ,encfs)
2690 ("fuse" ,fuse)
2691 ("util-linux" ,util-linux) ;; for umount
2692 ("findutils" ,findutils)
2693 ("gnupg" ,gnupg)
2694 ("which" ,which)))
2695 (propagated-inputs
2696 `(("python-future" ,python-future)
2697 ("python-distro" ,python-distro)))
2698 (arguments
2699 `(#:tests? #f
2700 #:phases
2701 (modify-phases %standard-phases
2702 (add-after 'unpack 'nuke-debops-update
2703 (lambda _
2704 (chmod "bin/debops-update" #o755) ; FIXME work-around git-fetch issue
2705 (with-output-to-file "bin/debops-update"
2706 (lambda ()
2707 (format #t "#!/bin/sh
2708echo 'debops is installed via guix. guix-update is useless in this case.
2709Please use `guix package -u debops` instead.'")))
2710 #t))
2711 ;; patch shebangs only in actuall scripts, not in files included in
2712 ;; roles (which are to be delivered to the targte systems)
2713 (delete `patch-generated-file-shebangs)
2714 (replace 'patch-source-shebangs
2715 (lambda _
2716 (for-each patch-shebang
2717 (find-files "bin"
2718 (lambda (file stat)
2719 ;; Filter out symlinks.
2720 (eq? 'regular (stat:type stat)))
2721 #:stat lstat))))
2722 (add-after 'unpack 'fix-paths
2723 (lambda _
2724 (define (substitute-program-names file)
2725 ;; e.g. ANSIBLE_PLAYBOOK = '/gnu/store/…/bin/ansible-playbook'
2726 (for-each
2727 (lambda (name)
2728 (let ((varname (string-upcase
2729 (string-map
2730 (lambda (c) (if (char=? c #\-) #\_ c))
2731 name))))
2732 (substitute* file
2733 (((string-append "^(" varname " = )'.*'") line prefix)
2734 (string-append prefix "'" (which name) "'")))))
2735 '("ansible-playbook" "encfs" "find" "fusermount"
2736 "umount" "gpg" "ansible" "which")))
2737 (for-each substitute-program-names
2738 '("bin/debops"
2739 "bin/debops-padlock"
2740 "bin/debops-task"
2741 "debops/__init__.py"
2742 "debops/cmds/__init__.py"))
2743 #t)))))
2744 (home-page "https://www.debops.org/")
2745 (synopsis "Collection of general-purpose Ansible roles")
2746 (description "The Ansible roles provided by that can be used to manage
2747Debian or Ubuntu hosts. In addition, a default set of Ansible playbooks can
2748be used to apply the provided roles in a controlled way, using Ansible
2749inventory groups.
2750
2751The roles are written with a high customization in mind, which can be done
2752using Ansible inventory. This way the role and playbook code can be shared
2753between multiple environments, with different configuration in to each one.
2754
2755Services can be managed on a single host, or spread between multiple hosts.
2756DebOps provides support for different SQL and NoSQL databases, web servers,
2757programming languages and specialized applications useful in a data center
2758environment or in a cluster. The project can also be used to deploy
2759virtualization environments using KVM/libvirt, Docker or LXC technologies to
2760manage virtual machines and/or containers.")
2761 (license license:gpl3+)))
2762
2b6164f0
OP
2763(define-public emacs-ansible-doc
2764 (let ((commit "86083a7bb2ed0468ca64e52076b06441a2f8e9e0"))
2765 (package
2766 (name "emacs-ansible-doc")
2767 (version (git-version "0.4" "1" commit))
2768 (source
2769 (origin
2770 (method git-fetch)
2771 (uri (git-reference
2772 (url "https://github.com/lunaryorn/ansible-doc.el")
2773 (commit commit)))
2774 (file-name (git-file-name name version))
2775 (sha256
2776 (base32
2777 "0lap404ch74w99n3xip176jr42b38xhyzkfnkyqg0g3wk2cd3aq8"))))
2778 (build-system emacs-build-system)
2779 ;; Unmaintained by upstream.
2780 (home-page "https://github.com/lunaryorn/ansible-doc.el")
2781 (synopsis "Ansible documentation for Emacs")
2782 (description
2783 "This package provides an Ansible documentation for GNU Emacs.
2784
2785@code{ansible-doc} allows you to view the documentation of an Ansible
2786module and @code{ansible-doc-mode} minor mode adds documentation
2787lookup to YAML Mode. You could enable the mode with @code{(add-hook
2788'yaml-mode-hook #'ansible-doc-mode)}.")
2789 (license license:gpl3+))))
2790
44157e9f
EB
2791(define-public cpulimit
2792 (package
2793 (name "cpulimit")
2794 (version "0.2")
2795 (source
2796 (origin
aa372292
TGR
2797 (method git-fetch)
2798 (uri (git-reference
b0e7b699 2799 (url "https://github.com/opsengine/cpulimit")
aa372292
TGR
2800 (commit (string-append "v" version))))
2801 (file-name (git-file-name name version))
44157e9f 2802 (sha256
aa372292 2803 (base32 "1dz045yhcsw1rdamzpz4bk8mw888in7fyqk1q1b3m1yk4pd1ahkh"))))
44157e9f
EB
2804 (build-system gnu-build-system)
2805 (arguments
2806 `(#:phases (modify-phases %standard-phases
2807 (delete 'configure)
cb8ba848 2808 (replace 'build
6e26bd5b
EF
2809 (lambda* (#:key make-flags #:allow-other-keys)
2810 (apply invoke "make" "-Csrc" make-flags)))
cb8ba848 2811 (replace 'check
d4560e0b
EF
2812 (lambda* (#:key tests? make-flags #:allow-other-keys)
2813 (when tests?
2814 (apply invoke "make" "-Ctests" make-flags))
2815 #t))
cb8ba848
MW
2816 (replace 'install
2817 (lambda* (#:key outputs #:allow-other-keys)
2818 (let* ((out (assoc-ref outputs "out"))
2819 (bin (string-append out "/bin")))
2820 (install-file "src/cpulimit" bin))
6e26bd5b
EF
2821 #t)))
2822 #:make-flags (list (string-append "CC=" ,(cc-for-target)))))
44157e9f
EB
2823 (home-page "https://github.com/opsengine/cpulimit")
2824 (synopsis "Limit CPU usage")
2825 (description
2826 "Cpulimit limits the CPU usage of a process. It does not change the nice
2827value or other scheduling priority settings, but the real CPU usage, and is
2828able to adapt itself dynamically to the overall system load. Children
2829processes and threads of the specified process may optionally share the same
2830limits.")
2831 (license license:gpl2+)))
2328b47c
EB
2832
2833(define-public autojump
2834 (package
2835 (name "autojump")
0e684357 2836 (version "22.5.3")
2328b47c
EB
2837 (source
2838 (origin
24d459ce
TGR
2839 (method git-fetch)
2840 (uri (git-reference
b0e7b699 2841 (url "https://github.com/wting/autojump")
24d459ce
TGR
2842 (commit (string-append "release-v" version))))
2843 (file-name (git-file-name name version))
2328b47c 2844 (sha256
0e684357 2845 (base32 "1rgpsh70manr2dydna9da4x7p8ahii7dgdgwir5fka340n1wrcws"))))
2328b47c 2846 (build-system gnu-build-system)
24d459ce 2847 (native-inputs ; for tests
2328b47c
EB
2848 `(("python-mock" ,python-mock)
2849 ("python-pytest" ,python-pytest)))
2850 (inputs
2851 `(("python" ,python-wrapper)))
2852 (arguments
eb9dda9c
KK
2853 `(#:phases
2854 (modify-phases %standard-phases
24d459ce
TGR
2855 (add-after 'unpack 'make-git-checkout-writable
2856 ;; ‘install.py’ modifies files before installing them.
2857 (lambda _
2858 (for-each make-file-writable (find-files "."))
2859 #t))
eb9dda9c
KK
2860 (delete 'configure)
2861 (delete 'build)
2862 (replace 'check
2863 (lambda _
2864 (invoke "python" "tests/unit/autojump_utils_test.py")))
2865 (replace 'install
2866 (lambda* (#:key outputs #:allow-other-keys)
2867 (setenv "SHELL" (which "bash"))
2868 (invoke "python" "install.py"
2869 (string-append "--destdir="
2870 (assoc-ref outputs "out"))))))))
2328b47c 2871 (home-page "https://github.com/wting/autojump")
8f65585b 2872 (synopsis "Shell extension for file system navigation")
2328b47c 2873 (description
8f65585b 2874 "Autojump provides a faster way to navigate your file system, with a \"cd
2328b47c
EB
2875command that learns\". It works by maintaining a database of the directories
2876you use the most from the command line and allows you to \"jump\" to
2877frequently used directories by typing only a small pattern.")
2878 (license license:gpl3+)))
765973cd 2879
1ca0ac1e
EB
2880(define-public fasd
2881 (package
2882 (name "fasd")
2883 (version "1.0.1")
2884 (source (origin
2885 (method git-fetch)
2886 (uri (git-reference
b0e7b699 2887 (url "https://github.com/clvv/fasd")
1ca0ac1e
EB
2888 (commit version)))
2889 (file-name (git-file-name name version))
2890 (sha256
2891 (base32
2892 "1awi71jdv3mhjrmar2d4z1i90kn7apd7aq1w31sh6w4yibz9kiyj"))))
2893 (build-system gnu-build-system)
2894 (arguments
2895 `(#:phases (modify-phases %standard-phases
2896 (delete 'configure)) ;no configuration
2897 #:tests? #f ;no tests
2898 #:make-flags (list (string-append "PREFIX=" %output))))
2899 (home-page "https://github.com/clvv/fasd")
2900 (synopsis "Quick access to files and directories for shells")
2901 (description
2902 "Fasd (pronounced similar to \"fast\") is a command-line productivity
2903booster. Fasd offers quick access to files and directories for POSIX shells.
2904It is inspired by tools like autojump, z, and v. Fasd keeps track of files
2905and directories you have accessed so that you can quickly reference them in
2906the command line.")
2907 (license license:x11)))
2908
765973cd
LF
2909(define-public iftop
2910 (package
2911 (name "iftop")
2912 (version "1.0pre4")
2913 (source (origin
2914 (method url-fetch)
2915 (uri (string-append "http://www.ex-parrot.com/~pdw/iftop/download"
2916 "/iftop-" version ".tar.gz"))
2917 (sha256
2918 (base32
2919 "15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp"))))
2920 (build-system gnu-build-system)
2921 (inputs
2922 `(("libpcap" ,libpcap)
2923 ("ncurses" ,ncurses)))
2924 (synopsis "Monitor network usage")
2925 (description "Iftop does for network usage what @command{top} does
2926for CPU usage. It listens to network traffic on a named interface and
2927displays a table of current bandwidth usage by pairs of hosts.")
2928 (home-page "http://www.ex-parrot.com/~pdw/iftop/")
d4e21fbb 2929 (license license:gpl2+)))
f1957fc1
PP
2930
2931(define-public munge
2932 (package
2933 (name "munge")
5ee0e013 2934 (version "0.5.14")
f1957fc1
PP
2935 (source (origin
2936 (method url-fetch)
b52ae4de
EF
2937 (uri (string-append "https://github.com/dun/munge/releases/"
2938 "download/munge-" version "/munge-"
2939 version ".tar.xz"))
f1957fc1
PP
2940 (sha256
2941 (base32
5ee0e013 2942 "0h06sghb4rqvv1ywyd6mzsmbcgh712v6ygrff0gzm440y4ca41k6"))
8d080506
LC
2943 (modules '((guix build utils)))
2944 (snippet
2945 '(begin
2946 ;; Don't insist on write access to /var.
2947 (substitute* "src/etc/Makefile.in"
2948 (("\\$\\(INSTALL\\)(.*)localstatedir" _ middle)
5ee0e013
TGR
2949 (string-append "-$(INSTALL)" middle "localstatedir"))
2950 (("\\$\\(MKDIR_P\\) .*(local|run)statedir.*")
2951 ""))
8d080506 2952 #t))))
f1957fc1
PP
2953 (inputs
2954 `(("openssl" ,openssl)
2955 ("libgcrypt" ,libgcrypt)))
2956 (build-system gnu-build-system)
5ee0e013
TGR
2957 (arguments
2958 '(#:configure-flags
2959 (list "--localstatedir=/var"
2960 (string-append "--with-pkgconfigdir="
2961 (assoc-ref %outputs "out") "/lib/pkgconfig"))
2962 #:phases
2963 (modify-phases %standard-phases
2964 ;; XXX Many test series fail. Some might be fixable, others do no-no
2965 ;; things like invoking ‘sudo’.
2966 (add-after 'unpack 'skip-failing-tests
2967 (lambda _
2968 (for-each (lambda (test)
2969 (substitute* "t/Makefile.in"
2970 (((string-append test "\\.t ")) "")))
2971 (list "0100-munged-lock"
2972 "0010-basic"
2973 "0011-munged-cmdline"
2974 "0012-munge-cmdline"
2975 "0013-unmunge-cmdline"
2976 "0101-munged-security-socket"
2977 "0102-munged-security-keyfile"
2978 "0103-munged-security-logfile"
2979 "0110-munged-origin-addr"))
2980 #t)))))
b52ae4de 2981 (home-page "https://dun.github.io/munge/")
f1957fc1
PP
2982 (synopsis "Cluster computing authentication service")
2983 (description
2984 "Munge is an authentication service for creating and validating
2985credentials. It allows a process to authenticate the UID and GID of another
2986local or remote process within a group of hosts having common users and
2987groups. These hosts form a security realm that is defined by a shared
2988cryptographic key. Clients within this security realm can create and validate
2989credentials without the use of root privileges, reserved ports, or
2990platform-specific methods.")
2991 (license license:gpl3+)))
3d7a157c
RW
2992
2993(define-public audit
2994 (package
2995 (name "audit")
00f81f83 2996 (home-page "https://people.redhat.com/sgrubb/audit/")
b4e1f1ae 2997 (version "2.8.5")
3d7a157c
RW
2998 (source (origin
2999 (method url-fetch)
fe2f0166 3000 (uri (string-append home-page "audit-" version ".tar.gz"))
3d7a157c
RW
3001 (sha256
3002 (base32
b4e1f1ae 3003 "1dzcwb2q78q7x41shcachn7f4aksxbxd470yk38zh03fch1l2p8f"))))
3d7a157c 3004 (build-system gnu-build-system)
3d7a157c 3005 (arguments
8938b369
MB
3006 `(#:configure-flags (list "--with-python=no"
3007 "--disable-static")))
3d7a157c
RW
3008 (inputs
3009 `(("openldap" ,openldap)
1bafad56 3010 ("gnutls" ,gnutls)
3d7a157c
RW
3011 ("sasl" ,cyrus-sasl)))
3012 (synopsis "User-space component to the Linux auditing system")
3013 (description
3014 "auditd is the user-space component to the Linux auditing system, which
3015allows logging of system calls made by user-land processes. It's responsible
3016for writing audit records to the disk. Viewing the logs is done with the
3017@code{ausearch} or @code{aureport} utilities. Configuring the audit rules is
3018done with the @code{auditctl} utility.")
3019 (license license:gpl2+)))
d0457553
TUBK
3020
3021(define-public nmap
3022 (package
3023 (name "nmap")
a91ad29d 3024 (version "7.92")
d0457553
TUBK
3025 (source (origin
3026 (method url-fetch)
3027 (uri (string-append "https://nmap.org/dist/nmap-" version
3028 ".tar.bz2"))
3029 (sha256
3030 (base32
a91ad29d 3031 "18bifn67kz2wxkbnfwcrin2xrhc6qf4p2bvxfqb2a2vbi8pryix5"))
d0457553
TUBK
3032 (modules '((guix build utils)))
3033 (snippet
6cbee49d
MW
3034 '(begin
3035 (for-each delete-file-recursively
3036 ;; Remove bundled lua, pcap, and pcre libraries.
3037 ;; FIXME: Remove bundled liblinear once packaged.
3038 '("liblua"
3039 "libpcap"
3040 "libpcre"
3041 ;; Remove pre-compiled binares.
a91ad29d 3042 "mswin32"))))))
d0457553
TUBK
3043 (build-system gnu-build-system)
3044 (inputs
3045 `(("openssl" ,openssl)
3046 ("libpcap" ,libpcap)
3047 ("pcre" ,pcre)
3048 ("lua" ,lua)
069d0b7f
MB
3049 ("zlib" ,zlib) ;for NSE compression support
3050
d0457553
TUBK
3051 ;; For 'ndiff'.
3052 ("python" ,python-2)))
3053
3054 ;; TODO Add zenmap output.
3055 (outputs '("out" "ndiff"))
3056 (arguments
cc729d25 3057 `(#:configure-flags '("--without-zenmap")
d0457553
TUBK
3058 #:phases
3059 (modify-phases %standard-phases
f4dc22bc
MB
3060 (add-after 'configure 'patch-Makefile
3061 (lambda _
3062 (substitute* "Makefile"
3063 ;; Do not attempt to build lua.
a91ad29d 3064 (("build-dnet build-lua") "build-dnet"))))
d0457553
TUBK
3065 (replace 'install
3066 (lambda* (#:key outputs #:allow-other-keys)
3067 (define (make out . args)
cb8ba848
MW
3068 (apply invoke "make"
3069 (string-append "prefix=" out)
3070 args))
d0457553 3071 (define (python-path dir)
cc729d25
EF
3072 (string-append dir "/lib/python"
3073 ,(version-major+minor
3074 (package-version python))
3075 "/site-packages"))
d0457553
TUBK
3076 (let ((out (assoc-ref outputs "out"))
3077 (ndiff (assoc-ref outputs "ndiff")))
3078 (for-each mkdir-p (list out ndiff))
3079 (make out
3080 "install-nmap"
3081 "install-nse"
3082 "install-ncat"
3083 "install-nping")
3084 (make ndiff "install-ndiff")
3085 (wrap-program (string-append ndiff "/bin/ndiff")
3086 `("PYTHONPATH" prefix
a91ad29d 3087 (,(python-path ndiff)))))))
d0457553
TUBK
3088 ;; These are the tests that do not require network access.
3089 (replace 'check
cb8ba848
MW
3090 (lambda _ (invoke "make"
3091 "check-nse"
3092 "check-ndiff"
3093 "check-dns"))))
d0457553
TUBK
3094 ;; Nmap can't cope with out-of-source building.
3095 #:out-of-source? #f))
3096 (home-page "https://nmap.org/")
3097 (synopsis "Network discovery and security auditing tool")
3098 (description
3099 "Nmap (\"Network Mapper\") is a network discovery and security auditing
3100tool. It is also useful for tasks such as network inventory, managing service
3101upgrade schedules, and monitoring host or service uptime. It also provides an
3102advanced netcat implementation (ncat), a utility for comparing scan
3103results (ndiff), and a packet generation and response analysis tool (nping).")
a91ad29d 3104 ;; See <https://github.com/nmap/nmap/issues/2199#issuecomment-894812634>.
d0457553
TUBK
3105 ;; This package uses nmap's bundled versions of libdnet and liblinear, which
3106 ;; both use a 3-clause BSD license.
2dba37e2 3107 (license (list license:nmap license:bsd-3))))
1a0346f0
P
3108
3109(define-public dstat
3110 (package
3111 (name "dstat")
ad20da2e 3112 (version "0.7.4")
fc204d24
TGR
3113 (source
3114 (origin
3115 (method git-fetch)
3116 (uri (git-reference
e620447f 3117 (url "https://github.com/dstat-real/dstat")
ad20da2e 3118 (commit (string-append "v" version))))
fc204d24
TGR
3119 (file-name (git-file-name "dstat" version))
3120 (sha256
10a32973
TGR
3121 (base32 "1qnmkhqmjd1m3if05jj29dvr5hn6kayq9bkkkh881w472c0zhp8v"))
3122 (patches (search-patches "dstat-fix-crash-when-specifying-delay.patch"
3123 "dstat-skip-devices-without-io.patch"))))
1a0346f0
P
3124 (build-system gnu-build-system)
3125 (arguments
fc204d24 3126 `(#:tests? #f ; no make check
5c8e8bc5
TGR
3127 #:make-flags
3128 (list (string-append "prefix=" (assoc-ref %outputs "out")))
5cc5364e
TGR
3129 #:phases
3130 (modify-phases %standard-phases
fa67073f
TGR
3131 (add-after 'unpack 'fix-python3-DeprecationWarning
3132 (lambda _
3133 (substitute* "dstat"
3134 (("collections") "collections.abc"))
3135 #t))
5cc5364e
TGR
3136 (delete 'configure) ; no configure script
3137 (add-after 'install 'wrap
3138 (lambda* (#:key outputs #:allow-other-keys)
3139 (let ((out (assoc-ref outputs "out")))
3140 (wrap-program (string-append out "/bin/dstat")
3141 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
3142 #t))))))
3143 (inputs
5cc5364e
TGR
3144 `(("python" ,python-wrapper)
3145 ("python-six" ,python-six)))
1a0346f0
P
3146 (synopsis "Versatile resource statistics tool")
3147 (description "Dstat is a versatile replacement for @command{vmstat},
3148@command{iostat}, @command{netstat}, and @command{ifstat}. Dstat overcomes
3149some of their limitations and adds some extra features, more counters and
3150flexibility. Dstat is handy for monitoring systems during performance tuning
3151tests, benchmarks or troubleshooting.
3152
3153Dstat allows you to view all of your system resources in real-time, you can,
3154e.g., compare disk utilization in combination with interrupts from your IDE
3155controller, or compare the network bandwidth numbers directly with the disk
3156throughput (in the same interval).")
3157 (home-page "http://dag.wiee.rs/home-made/dstat/")
c59f62e9 3158 (license license:gpl2+)))
0405e5f4
EB
3159
3160(define-public thefuck
3161 (package
3162 (name "thefuck")
a48cf78a 3163 (version "3.30")
a0c693e1
TGR
3164 (source
3165 (origin
3166 (method git-fetch)
3167 (uri (git-reference
b0e7b699 3168 (url "https://github.com/nvbn/thefuck")
a0c693e1
TGR
3169 (commit version)))
3170 (file-name (git-file-name name version))
3171 (sha256
a48cf78a 3172 (base32 "0fnf78956pwhb9cgv1jmgypnkma5xzflkivfrkfiadbgin848yfg"))
a0c693e1 3173 (patches (search-patches "thefuck-test-environ.patch"))))
0405e5f4 3174 (build-system python-build-system)
1c1b67a3 3175 (arguments
bf5b6fb2
EB
3176 '(#:phases
3177 (modify-phases %standard-phases
3178 (delete 'check)
3179 (add-after 'install 'check
3180 (lambda* (#:key inputs outputs #:allow-other-keys)
3181 ;; Tests look for installed package
3182 (add-installed-pythonpath inputs outputs)
3183 ;; Some tests need write access to $HOME.
3184 (setenv "HOME" "/tmp")
2216b6f4
TGR
3185 (invoke "py.test" "-v")
3186 #t)))))
1c1b67a3 3187 (propagated-inputs
0405e5f4
EB
3188 `(("python-colorama" ,python-colorama)
3189 ("python-decorator" ,python-decorator)
3190 ("python-psutil" ,python-psutil)
2468ca04 3191 ("python-pyte" ,python-pyte)
0405e5f4 3192 ("python-six" ,python-six)))
2d1ac1d1 3193 (native-inputs
a48cf78a
TGR
3194 `(("go" ,go)
3195 ("python-mock" ,python-mock)
1c1b67a3 3196 ("python-pytest" ,python-pytest)
2468ca04 3197 ("python-pytest-mock" ,python-pytest-mock)))
0405e5f4
EB
3198 (home-page "https://github.com/nvbn/thefuck")
3199 (synopsis "Correct mistyped console command")
3200 (description
3201 "The Fuck tries to match a rule for a previous, mistyped command, creates
3202a new command using the matched rule, and runs it.")
3203 (license license:x11)))
61402398
JF
3204
3205(define-public di
3206 (package
3207 (name "di")
d3184ee4 3208 (version "4.50")
61402398
JF
3209 (source
3210 (origin
3211 (method url-fetch)
e999ea12 3212 (uri (string-append "mirror://sourceforge/diskinfo-di/di-" version ".tar.gz"))
61402398 3213 (sha256
d3184ee4 3214 (base32 "0aj9ldkvmj8fmrk685vd2gagz0q8lwsn2nfbx6r6mza94mn8pw42"))))
61402398
JF
3215 (build-system gnu-build-system)
3216 (arguments
ad9baf38 3217 `(#:tests? #f ; obscure test failures
61402398
JF
3218 #:phases
3219 (modify-phases %standard-phases
ad9baf38 3220 (delete 'configure) ; no configure script
61402398
JF
3221 (add-before 'build 'setup-environment
3222 (lambda* (#:key outputs #:allow-other-keys)
aba98be5 3223 (setenv "CC" ,(cc-for-target))
61402398
JF
3224 (setenv "prefix" (assoc-ref outputs "out"))
3225 #t)))
3226 #:make-flags (list "--environment-overrides")))
f76c16d2 3227 (home-page "https://gentoo.com/di/")
61402398
JF
3228 (synopsis "Advanced df like disk information utility")
3229 (description
36a4366d 3230 "@code{di} is a disk information utility, displaying everything that your
26c6de8b
TGR
3231@code{df} command does and more. It features the ability to display your disk
3232usage in whatever format you prefer. It is designed to be highly portable and
3233produce uniform output across heterogeneous networks.")
61402398 3234 (license license:zlib)))
5ec8b02d 3235
3236(define-public cbatticon
3237 (package
3238 (name "cbatticon")
50db7df4 3239 (version "1.6.10")
d8d910e6
TGR
3240 (source
3241 (origin
3242 (method git-fetch)
3243 (uri (git-reference
b0e7b699 3244 (url "https://github.com/valr/cbatticon")
d8d910e6
TGR
3245 (commit version)))
3246 (sha256
50db7df4 3247 (base32 "0ivm2dzhsa9ir25ry418r2qg2llby9j7a6m3arbvq5c3kaj8m9jr"))
d8d910e6 3248 (file-name (git-file-name name version))))
5ec8b02d 3249 (build-system gnu-build-system)
3250 (arguments
d8d910e6 3251 `(#:tests? #f ; no tests
5ec8b02d 3252 #:make-flags
3253 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
9c44af6b 3254 ,(string-append "CC=" (cc-for-target)))
5ec8b02d 3255 #:phases
3256 (modify-phases %standard-phases
d8d910e6 3257 (delete 'configure)))) ; no configure script
5ec8b02d 3258 (inputs
3259 `(("gtk+" ,gtk+)
b94a6ca0 3260 ("gettext" ,gettext-minimal)
5ec8b02d 3261 ("libnotify" ,libnotify)))
3262 (native-inputs
3263 `(("pkg-config" ,pkg-config)))
3264 (synopsis "Lightweight battery icon for the system tray")
3265 (description "cbatticon is a lightweight battery icon that displays
3266the status of your battery in the system tray.")
3267 (home-page "https://github.com/valr/cbatticon")
3268 (license license:gpl2+)))
c08533b2 3269
3270(define-public interrobang
3271 (let ((revision "1")
3272 (commit "896543735e1c99144765fdbd7b6e6b5afbd8b881"))
3273 (package
3274 (name "interrobang")
807a3099
TGR
3275 (version (git-version "0.0.0" revision commit))
3276 (source
3277 (origin
3278 (method git-fetch)
3279 (uri (git-reference
b0e7b699 3280 (url "https://github.com/TrilbyWhite/interrobang")
807a3099
TGR
3281 (commit commit)))
3282 (file-name (git-file-name name version))
3283 (sha256
3284 (base32 "1n13m70p1hfba5dy3i8hfclbr6k9q3d9dai3dg4jvhdhmxcpjzdf"))))
c08533b2 3285 (build-system gnu-build-system)
3286 (arguments
807a3099 3287 `(#:tests? #f ; no tests
c08533b2 3288 #:phases
3289 (modify-phases %standard-phases
807a3099 3290 (delete 'configure)) ; no configure script
c08533b2 3291 #:make-flags (list (string-append "PREFIX="
3292 (assoc-ref %outputs "out")))))
3293 (inputs
3294 `(("libx11" ,libx11)))
3295 (native-inputs
3296 `(("pkg-config" ,pkg-config)))
3297 (synopsis "Scriptable launcher menu")
3298 (description "Interrobang is a scriptable launcher menu with a customizable
3299shortcut syntax and completion options.")
3300 (home-page "https://github.com/TrilbyWhite/interrobang")
3301 (license license:gpl3+))))
94c5dc8c 3302
94c5dc8c
JD
3303(define-public pam-krb5
3304 (package
3305 (name "pam-krb5")
0e6c242b 3306 (version "4.8")
94c5dc8c
JD
3307 (source (origin
3308 (method url-fetch)
ed683219
EF
3309 (uri
3310 (list (string-append
3311 "https://archives.eyrie.org/software/kerberos/"
3312 "pam-krb5-" version ".tar.xz")
3313 (string-append
3314 "https://archives.eyrie.org/software/ARCHIVE/"
3315 "pam-krb5/pam-krb5-" version ".tar.xz")))
653a51cb 3316 (patches (search-patches "pam-krb5-CVE-2020-10595.patch"))
94c5dc8c
JD
3317 (sha256
3318 (base32
0e6c242b 3319 "1qjp8i1s9bz7g6kiqrkzzkxn5pfspa4sy53b6z40fqmdf9przdfb"))))
94c5dc8c
JD
3320 (build-system gnu-build-system)
3321 (arguments
3322 `(#:phases
3323 (modify-phases %standard-phases
3324 (add-before 'configure 'disable-tests
3325 (lambda _
3326 ;; The build container seems to interfere with some tests.
3327 (substitute* "tests/TESTS"
3328 (("module/basic\n") ""))
3329 (substitute* "tests/TESTS"
3330 (("pam-util/vector\n") ""))
3331 #t)))))
3332 (inputs
3333 `(("linux-pam" ,linux-pam)
3334 ("mit-krb5" ,mit-krb5)))
3335 (native-inputs
3336 `(("perl" ,perl)
3337 ("perl-test-pod" ,perl-test-pod))) ; required for tests
3338 (synopsis "Kerberos PAM module")
3339 (description
3340 "Pam-krb5 is a Kerberos PAM module for either MIT Kerberos or Heimdal.
3341It supports ticket refreshing by screen savers, configurable
3342authorization handling, authentication of non-local accounts for network
3343services, password changing, and password expiration, as well as all the
3344standard expected PAM features. It works correctly with OpenSSH, even
45298300
TGR
3345with @code{ChallengeResponseAuthentication} and @code{PrivilegeSeparation}
3346enabled, and supports extensive configuration either by PAM options or in
94c5dc8c
JD
3347krb5.conf or both. PKINIT is supported with recent versions of both MIT
3348Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.")
ed683219 3349 (home-page "https://www.eyrie.org/~eagle/software/pam-krb5/")
94c5dc8c
JD
3350 ;; Dual licenced under a homebrew non-copyleft OR GPL (any version)
3351 ;; However, the tarball does not contain a copy of the GPL, so unless
3352 ;; we put one in, we cannot distribute it under GPL without violating
3353 ;; clause requiring us to give all recipients a copy.
3354 (license license:gpl1+)))
3355
208e7434 3356(define (sunxi-tools-source version)
b04ca7a1 3357 (origin
43eb601f
TGR
3358 (method git-fetch)
3359 (uri (git-reference
b0e7b699 3360 (url "https://github.com/linux-sunxi/sunxi-tools")
43eb601f 3361 (commit (string-append "v" version))))
b04ca7a1 3362 (sha256
43eb601f 3363 (base32 "04f3jqg8ww4jxsf9c6ddcdgy2xbhkyp0b3l5f1hvvbv94p81rjxd"))
7e917283
DM
3364 (patches
3365 (search-patches "sunxi-tools-remove-sys-io.patch"))
b04ca7a1
DM
3366 (modules '((guix build utils)))
3367 (snippet
3368 ;; Remove binaries contained in the tarball which are only for the
3369 ;; target and can be regenerated anyway.
6cbee49d
MW
3370 '(begin
3371 (delete-file-recursively "bin")
3372 #t))
208e7434
DM
3373 (file-name (git-file-name "sunxi-tools" version))))
3374
3375(define sunxi-target-tools
3376 (package
3377 (name "sunxi-target-tools")
3378 (version "1.4.2")
3379 (build-system gnu-build-system)
3380 (source
3381 (sunxi-tools-source version))
3382 (arguments
3383 `(#:system "armhf-linux"
3384 #:tests? #f
3385 #:make-flags (list (string-append "PREFIX="
3386 (assoc-ref %outputs "out"))
3387 (string-append "CROSS_COMPILE=")
3388 "CC=gcc")
3389 #:phases
3390 (modify-phases %standard-phases
3391 (delete 'configure)
3392 (replace 'build
3393 (lambda* (#:key make-flags #:allow-other-keys)
3394 (apply invoke "make" "target-tools" make-flags)))
3395 (replace 'install
3396 (lambda* (#:key make-flags #:allow-other-keys)
3397 (apply invoke "make" "install-target-tools"
3398 make-flags))))))
3399 (home-page "https://github.com/linux-sunxi/sunxi-tools")
3400 (synopsis "Hardware management tools for Allwinner computers")
3401 (description "This package contains tools for Allwinner devices:
3402@enumerate
3403@item @command{sunxi-meminfo}: Prints memory bus settings.
3404@end enumerate")
3405 (license license:gpl2+)))
3406
3407(define-public sunxi-tools
3408 (package
3409 (name "sunxi-tools")
3410 (version "1.4.2")
3411 (source
3412 (sunxi-tools-source version))
b04ca7a1 3413 (native-inputs
208e7434
DM
3414 `(("sunxi-target-tools" ,sunxi-target-tools)
3415 ("pkg-config" ,pkg-config)))
b04ca7a1
DM
3416 (inputs
3417 `(("libusb" ,libusb)))
3418 (build-system gnu-build-system)
3419 (arguments
faa6bdf8 3420 `(#:tests? #f ; no tests exist
b04ca7a1
DM
3421 #:make-flags (list (string-append "PREFIX="
3422 (assoc-ref %outputs "out"))
208e7434 3423 (string-append "CROSS_COMPILE=disabled")
faa6bdf8 3424 "CC=gcc")
b04ca7a1
DM
3425 #:phases
3426 (modify-phases %standard-phases
b054b26a 3427 (delete 'configure)
faa6bdf8
DM
3428 (replace 'build
3429 (lambda* (#:key make-flags #:allow-other-keys)
cb8ba848 3430 (apply invoke "make" "tools" "misc" make-flags)))
b054b26a 3431 (replace 'install
208e7434
DM
3432 (lambda* (#:key inputs outputs make-flags #:allow-other-keys)
3433 ;; Those tools have been built for armhf but are part of the
3434 ;; installation in the upstream package. So do the same
3435 ;; here.
3436 (copy-recursively (assoc-ref inputs "sunxi-target-tools")
3437 (assoc-ref outputs "out"))
3438 (apply invoke "make" "install-tools" "install-misc"
cb8ba848 3439 make-flags))))))
b04ca7a1
DM
3440 (home-page "https://github.com/linux-sunxi/sunxi-tools")
3441 (synopsis "Hardware management tools for Allwinner computers")
3442 (description "This package contains tools for Allwinner devices:
3443@enumerate
3444@item @command{sunxi-fexc}, @command{bin2fex}, @command{fex2bin}: Compile
3445a textual description of a board (.fex) to a binary representation (.bin).
3446@item @command{sunxi-fel}: Puts an Allwinner device into FEL mode which
3447makes it register as a special USB device (rather than USB host).
3448You can then connect it to another computer and flash it from there.
3449@item @command{sunxi-nand-part}: Partitions NAND flash.
3450@item @command{sunxi-bootinfo}: Reads out boot0 and boot1 (Allwinner
3451bootloader) parameters.
3452@item @command{sunxi-pio}: Sets GPIO parameters and oscillates a GPIO
3453in order to be able to find it.
3454@item @command{sunxi-meminfo}: Prints memory bus settings.
b054b26a 3455@item @command{sunxi-nand-image-builder}: Prepares raw NAND images.
b04ca7a1
DM
3456@end enumerate")
3457 (license license:gpl2+)))
a054777e 3458
3459(define-public sedsed
3460 (package
3461 (name "sedsed")
bde99125 3462 (version "1.1")
a054777e 3463 (source
3464 (origin
7d6e8fda
TGR
3465 (method git-fetch)
3466 (uri (git-reference
b0e7b699 3467 (url "https://github.com/aureliojargas/sedsed")
7d6e8fda
TGR
3468 (commit (string-append "v" version))))
3469 (file-name (git-file-name name version))
a054777e 3470 (sha256
bde99125 3471 (base32 "05cl35mwljdb9ynbbsfa8zx6ig8r0xncbg2cir9vwn5manndjj18"))))
a054777e 3472 (build-system python-build-system)
3473 (arguments
7d6e8fda 3474 `(#:tests? #f ; no tests
a054777e 3475 #:phases
3476 (modify-phases %standard-phases
3477 (add-after 'unpack 'patch-sed-in
3478 (lambda _
3479 (substitute* "sedsed.py"
3480 (("sedbin = 'sed'")
3481 (string-append "sedbin = '" (which "sed") "'")))
3482 #t))
3483 (delete 'build)
3484 (replace 'install
3485 (lambda* (#:key outputs #:allow-other-keys)
3486 (let* ((out (assoc-ref outputs "out"))
3487 (bin (string-append out "/bin")))
3488 ;; Just one file to copy around
3489 (install-file "sedsed.py" bin)
3490 #t)))
b7e26ec6 3491 (add-after 'wrap 'symlink
a054777e 3492 ;; Create 'sedsed' symlink to "sedsed.py".
3493 (lambda* (#:key outputs #:allow-other-keys)
3494 (let* ((out (assoc-ref outputs "out"))
3495 (bin (string-append out "/bin"))
3496 (sed (string-append bin "/sedsed"))
3497 (sedpy (string-append bin "/sedsed.py")))
b7e26ec6 3498 (symlink sedpy sed)
a054777e 3499 #t))))))
fbdabdad 3500 (home-page "https://aurelio.net/projects/sedsed")
a054777e 3501 (synopsis "Sed sed scripts")
3502 (description
975a0c15
TGR
3503 "@code{sedsed} can debug, indent, tokenize and HTMLize your @command{sed}
3504script.
a054777e 3505
975a0c15 3506In debug mode, it reads your script and adds extra commands to it. When
a054777e 3507executed you can see the data flow between the commands, revealing all the
975a0c15 3508magic sed performs on its internal buffers.
a054777e 3509
975a0c15 3510In indent mode, your script is reformatted with standard spacing.
a054777e 3511
975a0c15 3512In tokenize mode, you can see the elements of every command you use.
a054777e 3513
975a0c15 3514In HTMLize mode, your script is converted to a beautiful colored HTML file,
a054777e 3515with all the commands and parameters identified for your viewing pleasure.
3516
3517With sedsed you can master any sed script. No more secrets, no more hidden
3518buffers.")
3519 (license license:expat)))
d10fa5c7 3520
dca48d3c 3521(define-public igt-gpu-tools
d10fa5c7 3522 (package
dca48d3c 3523 (name "igt-gpu-tools")
69f0534a 3524 (version "1.26")
e4d6746f
TGR
3525 (source
3526 (origin
3527 (method git-fetch)
3528 (uri (git-reference
3529 (url "https://gitlab.freedesktop.org/drm/igt-gpu-tools.git")
3530 (commit (string-append "igt-gpu-tools-" version))))
3531 (file-name (git-file-name name version))
3532 (sha256
69f0534a 3533 (base32 "0m124pqv7zna25jnvk566c4kk628jr0w8mgnp8mr5xqz9cprgczm"))))
ad7749a1 3534 (build-system meson-build-system)
d10fa5c7 3535 (arguments
778d6b52 3536 `(#:tests? #f)) ; many of the tests try to load kernel modules
d10fa5c7 3537 (inputs
10082d30 3538 `(("cairo" ,cairo)
bdd5fbaf 3539 ("elfutils" ,elfutils) ; libdw
10082d30 3540 ("eudev" ,eudev)
10082d30 3541 ("kmod" ,kmod)
d10fa5c7
RW
3542 ("libdrm" ,libdrm)
3543 ("libpciaccess" ,libpciaccess)
d10fa5c7 3544 ("libunwind" ,libunwind)
8ae5fde2 3545 ("procps" ,procps)))
d10fa5c7 3546 (native-inputs
ad7749a1
TGR
3547 `(("bison" ,bison)
3548 ("flex" ,flex)
d10fa5c7 3549 ("pkg-config" ,pkg-config)))
49d41690 3550 (home-page "https://gitlab.freedesktop.org/drm/igt-gpu-tools")
d10fa5c7 3551 (synopsis "Tools for development and testing of the Intel DRM driver")
dca48d3c 3552 (description "IGT GPU Tools is a collection of tools for development and
d10fa5c7
RW
3553testing of the Intel DRM driver. There are many macro-level test suites that
3554get used against the driver, including xtest, rendercheck, piglit, and
3555oglconform, but failures from those can be difficult to track down to kernel
3556changes, and many require complicated build procedures or specific testing
dca48d3c 3557environments to get useful results. Therefore, IGT GPU Tools includes
d10fa5c7
RW
3558low-level tools and tests specifically for development and testing of the
3559Intel DRM Driver.")
9f375a4c 3560 (supported-systems '("i686-linux" "x86_64-linux"))
d10fa5c7 3561 (license license:expat)))
c1aba1a7 3562
6e75ea48 3563(define-public neofetch
816bce68
MR
3564 (package
3565 (name "neofetch")
1a9acdef 3566 (version "7.1.0")
816bce68
MR
3567 (source (origin
3568 (method git-fetch)
3569 (uri (git-reference
3570 (url "https://github.com/dylanaraps/neofetch")
3571 (commit version)))
3572 (file-name (git-file-name name version))
3573 (sha256
3574 (base32
1a9acdef 3575 "0i7wpisipwzk0j62pzaigbiq42y1mn4sbraz4my2jlz6ahwf00kv"))))
816bce68
MR
3576 (build-system gnu-build-system)
3577 (arguments
3578 `(#:tests? #f ; there are no tests
3579 #:make-flags
3580 (list (string-append "PREFIX=" %output))
3581 #:phases
3582 (modify-phases %standard-phases
3583 (delete 'configure)))) ; no configure script
3584 (home-page "https://github.com/dylanaraps/neofetch")
3585 (synopsis "System information script")
3586 (description "Neofetch is a command-line system information tool written in
2cd8e6e0 3587Bash. Neofetch displays information about your system next to an image, your OS
6e75ea48
EJ
3588logo, or any ASCII file of your choice. The main purpose of Neofetch is to be
3589used in screenshots to show other users what operating system or distribution
3590you are running, what theme or icon set you are using, etc.")
816bce68 3591 (license license:expat)))
a76ca052 3592
67648704 3593(define-public screenfetch
9dbda847
TGR
3594 (package
3595 (name "screenfetch")
89f51a9d 3596 (version "3.9.1")
9dbda847
TGR
3597 (source (origin
3598 (method git-fetch)
3599 (uri (git-reference
3600 (url "https://github.com/KittyKatt/screenFetch")
3601 (commit (string-append "v" version))))
3602 (file-name (git-file-name name version))
3603 (sha256
3604 (base32
89f51a9d 3605 "04l8aqr474pb115nagn9f6y48jw92n1qfszgw7dbhgl4mpn95lcr"))))
9dbda847
TGR
3606 (build-system trivial-build-system)
3607 (arguments
3608 `(#:modules ((guix build utils))
3609 #:builder
3610 (begin
3611 (use-modules (guix build utils))
3612 (let ((source (assoc-ref %build-inputs "source"))
3613 (out (assoc-ref %outputs "out")))
3614 (mkdir-p (string-append out "/bin/"))
3615 (copy-file (string-append source "/screenfetch-dev")
3616 (string-append out "/bin/screenfetch"))
3617 (install-file (string-append source "/screenfetch.1")
3618 (string-append out "/man/man1/"))
3619 (install-file (string-append source "/COPYING")
3620 (string-append out "/share/doc/" ,name "-" ,version))
3621 (substitute* (string-append out "/bin/screenfetch")
3622 (("/usr/bin/env bash")
3623 (string-append (assoc-ref %build-inputs "bash")
3624 "/bin/bash")))
3625 (wrap-program
67648704 3626 (string-append out "/bin/screenfetch")
9dbda847
TGR
3627 `("PATH" ":" prefix
3628 (,(string-append (assoc-ref %build-inputs "bc") "/bin:"
3629 (assoc-ref %build-inputs "scrot") "/bin:"
3630 (assoc-ref %build-inputs "xdpyinfo") "/bin"
3631 (assoc-ref %build-inputs "xprop") "/bin"))))
3632 (substitute* (string-append out "/bin/screenfetch")
3633 (("#!#f")
3634 (string-append "#!" (assoc-ref %build-inputs "bash")
3635 "/bin/bash")))))))
3636 (inputs
3637 `(("bash" ,bash)
3638 ("bc" ,bc)
3639 ("scrot" ,scrot)
3640 ("xdpyinfo" ,xdpyinfo)
3641 ("xprop" ,xprop)))
3642 (home-page "https://github.com/KittyKatt/screenFetch")
3643 (synopsis "System information script")
3644 (description "Bash screenshot information tool which can be used to
67648704
JK
3645generate those nifty terminal theme information and ASCII distribution logos in
3646everyone's screenshots nowadays.")
9dbda847 3647 (license license:gpl3)))
67648704 3648
ce9ea433
EB
3649(define-public ufetch
3650 (let ((commit "98b622023e03fe24dbc137e9a68104dfe1fbd04a")
3651 (revision "1"))
3652 (package
3653 (name "ufetch")
3654 (version (git-version "0.2" revision commit))
3655 (source (origin
3656 (method git-fetch)
3657 (uri (git-reference
3658 (url "https://gitlab.com/jschx/ufetch.git")
3659 (commit commit)))
3660 (file-name (git-file-name name version))
3661 (sha256
3662 (base32
3663 "09c4zmikza16xpydinnqbi3hmcibfrrn10wij7j0j1wv1pj2sl2l"))))
3664 (build-system trivial-build-system)
3665 (inputs
3666 `(("bash" ,bash)
3667 ("tput" ,ncurses)))
3668 (arguments
3669 `(#:modules ((guix build utils))
3670 #:builder
3671 (begin
3672 (use-modules (guix build utils))
3673 (let* ((source (assoc-ref %build-inputs "source"))
3674 (output (assoc-ref %outputs "out"))
3675 (bindir (string-append output "/bin"))
3676 (docdir (string-append output "/share/doc/ufetch-" ,version))
3677 (tput (string-append (assoc-ref %build-inputs "tput") "/bin/tput")))
3678 (install-file (string-append source "/LICENSE") docdir)
3679 (setenv "PATH" (string-append (assoc-ref %build-inputs "bash") "/bin"))
3680 (mkdir-p bindir)
3681 (for-each (lambda (src)
3682 (let ((dst (string-append bindir "/" (basename src))))
3683 (copy-file src dst)
3684 (patch-shebang dst)
3685 (substitute* dst (("tput") tput))))
3686 (find-files source "ufetch-[[:alpha:]]*$"))
3687 ;; Note: the `ufetch` we create below will only work if run under
3688 ;; the Guix System. I.e. a user trying to run `ufetch` on a
3689 ;; foreign distro will not get great results. The `screenfetch`
3690 ;; program does actual runtime detection of the operating system,
3691 ;; and would be a better choice in such a situation.
3692 (symlink "ufetch-guix" (string-append bindir "/ufetch"))))))
3693 (home-page "https://gitlab.com/jschx/ufetch")
3694 (synopsis "Tiny system info")
3695 (description "This package provides a tiny system info utility.")
3696 (license license:isc))))
3697
67d621c5
EB
3698(define-public pfetch
3699 (let ((commit "e18a0959ab98b963744755ec4687e59dc11db3c5")
3700 (revision "0"))
3701 (package
3702 (name "pfetch")
3703 (version (git-version "0.7.0" revision commit))
3704 (source (origin
3705 (method git-fetch)
3706 (uri (git-reference
3707 (url "https://github.com/dylanaraps/pfetch")
3708 (commit commit)))
3709 (file-name (git-file-name name version))
3710 (sha256
3711 (base32
3712 "1md40av6i3xvvwig5jzhy4kf3s5sgxxk35r0vcyrjd8qyndk927l"))))
3713 (build-system trivial-build-system)
3714 (inputs `(("bash" ,bash)))
3715 (arguments
3716 `(#:modules ((guix build utils))
3717 #:builder
3718 (begin
3719 (use-modules (guix build utils))
3720 (let* ((source (lambda (f)
3721 (string-append (assoc-ref %build-inputs "source") "/" f)))
3722 (output (assoc-ref %outputs "out"))
3723 (docdir (string-append output "/share/doc/pfetch-" ,version)))
3724 (install-file (source "LICENSE.md") docdir)
3725 (install-file (source "README.md") docdir)
3726 (install-file (source "pfetch") (string-append output "/bin"))
3727 (patch-shebang
3728 (string-append output "/bin/pfetch")
3729 (list (string-append (assoc-ref %build-inputs "bash") "/bin")))
3730 #t))))
3731 (home-page "https://github.com/dylanaraps/pfetch")
3732 (synopsis "System information tool")
3733 (description "This package provides a simple, configurable system
3734information tool.")
3735 (license license:expat))))
3736
a76ca052
EJ
3737(define-public nnn
3738 (package
3739 (name "nnn")
1e1a274f 3740 (version "4.1.1")
eb5a6643
TGR
3741 (source
3742 (origin
3743 (method url-fetch)
3744 (uri (string-append "https://github.com/jarun/nnn/releases/download/v"
16572d0e 3745 version "/nnn-v" version ".tar.gz"))
eb5a6643 3746 (sha256
1e1a274f 3747 (base32 "1fnf35s3b2nfp18s712n5vhg6idx4rfgwdfv74nc2933v9l2dq7h"))))
a76ca052 3748 (build-system gnu-build-system)
eb5a6643
TGR
3749 (inputs
3750 `(("ncurses" ,ncurses)
3751 ("readline" ,readline)))
3752 (native-inputs
3753 `(("pkg-config" ,pkg-config)))
a76ca052 3754 (arguments
cbd104bf 3755 `(#:tests? #f ; no tests
a76ca052 3756 #:phases
a76ca052 3757 (modify-phases %standard-phases
49dd606f 3758 (delete 'configure)) ; no configure script
a76ca052
EJ
3759 #:make-flags
3760 (list
3761 (string-append "PREFIX="
3762 (assoc-ref %outputs "out"))
49dd606f
TGR
3763 (string-append "CC=" ,(cc-for-target))
3764 (string-append "PKG_CONFIG=" ,(pkg-config-for-target)))))
a76ca052
EJ
3765 (home-page "https://github.com/jarun/nnn")
3766 (synopsis "Terminal file browser")
605a40b3
TGR
3767 (description
3768 "@command{nnn} is a fork of @command{noice}, a fast and minimal text
3769terminal file browser with keyboard shortcuts for navigation, opening files and
3770running tasks. There is no configuration file and MIME associations are
3771hard-coded.")
a76ca052 3772 (license license:bsd-2)))
58989684
CAW
3773
3774(define-public thermald
3775 (package
3776 (name "thermald")
8871671a 3777 (version "2.4.6")
58989684
CAW
3778 (source
3779 (origin
d09e84c2
EF
3780 (method git-fetch)
3781 (uri (git-reference
66741676 3782 (url "https://github.com/intel/thermal_daemon")
d09e84c2
EF
3783 (commit (string-append "v" version))))
3784 (file-name (git-file-name name version))
3785 (sha256
8871671a 3786 (base32 "1lgaky8cmxbi17zpymy2v9wgknx1g92bq50j6kfpsm8qgb7djjb6"))))
58989684
CAW
3787 (build-system gnu-build-system)
3788 (arguments
12007839 3789 `(#:configure-flags
8fe36949 3790 (let ((out (assoc-ref %outputs "out")))
7a67a45f 3791 (list (string-append "--with-dbus-sys-dir="
58989684 3792 out "/etc/dbus-1/system.d")
c9188cdb
TGR
3793 "--localstatedir=/var"))
3794 #:make-flags
3795 (list "V=1") ; log build commands
3796 #:phases
3797 (modify-phases %standard-phases
3798 (add-before 'bootstrap 'no-early-./configure
3799 (lambda _
ddd871c1 3800 (setenv "NO_CONFIGURE" "yet"))))))
58989684
CAW
3801 (native-inputs
3802 `(("autoconf" ,autoconf)
7a67a45f 3803 ("autoconf-archive" ,autoconf-archive)
58989684
CAW
3804 ("automake" ,automake)
3805 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
c9188cdb 3806 ("gtk-doc" ,gtk-doc)
58989684
CAW
3807 ("pkg-config" ,pkg-config)))
3808 (inputs
3809 `(("dbus-glib" ,dbus-glib)
c9188cdb
TGR
3810 ("libevdev" ,libevdev)
3811 ("libxml2" ,libxml2)
3812 ("upower" ,upower)
3813 ("xz" ,xz)))
58989684
CAW
3814 (home-page "https://01.org/linux-thermal-daemon/")
3815 (synopsis "CPU scaling for thermal management")
3816 (description "The Linux Thermal Daemon helps monitor and control temperature
3817on systems running the Linux kernel.")
b6315bc0 3818 ;; arm and aarch64 don't have cpuid.h.
86ee7625 3819 (supported-systems '("i686-linux" "x86_64-linux"))
7fb78380 3820 (license license:gpl2)))
d7c64ad5
LF
3821
3822(define-public masscan
3823 (package
3824 (name "masscan")
b4bf9516 3825 (version "1.0.5")
e956d76d
TGR
3826 (source
3827 (origin
3828 (method git-fetch)
3829 (uri (git-reference
b0e7b699 3830 (url "https://github.com/robertdavidgraham/masscan")
e956d76d
TGR
3831 (commit version)))
3832 (file-name (git-file-name name version))
3833 (sha256
3834 (base32 "0q0c7bsf0pbl8napry1qyg0gl4pd8wn872h4mz9b56dx4rx90vqg"))))
d7c64ad5
LF
3835 (build-system gnu-build-system)
3836 (inputs
3837 `(("libpcap" ,libpcap)))
3838 (arguments
164c4910 3839 `(#:test-target "regress"
b4bf9516 3840 #:make-flags
164c4910 3841 (list (string-append "CC=" ,(cc-for-target))
b4bf9516 3842 (string-append "PREFIX=" (assoc-ref %outputs "out")))
d7c64ad5
LF
3843 #:phases
3844 (modify-phases %standard-phases
b4bf9516 3845 (delete 'configure) ; no ./configure script
d7c64ad5
LF
3846 (add-after 'unpack 'patch-path
3847 (lambda* (#:key outputs inputs #:allow-other-keys)
3848 (let* ((out (assoc-ref outputs "out"))
3849 (pcap (assoc-ref inputs "libpcap")))
3850 (substitute* "src/rawsock-pcap.c"
3851 (("libpcap.so") (string-append pcap "/lib/libpcap.so")))
3852 #t))))))
3853 (synopsis "TCP port scanner")
3854 (description "MASSCAN is an asynchronous TCP port scanner. It can detect
3855open ports, and also complete the TCP connection and interact with the remote
3856application, collecting the information received.")
3857 (home-page "https://github.com/robertdavidgraham/masscan")
b4bf9516
TGR
3858 ;; 'src/siphash24.c' is the SipHash reference implementation, which
3859 ;; bears a CC0 Public Domain Dedication.
d7c64ad5 3860 (license license:agpl3+)))
82d57f12
TGR
3861
3862(define-public hungrycat
3863 (package
3864 (name "hungrycat")
3865 (version "0.4.1")
3866 (source (origin
3867 (method url-fetch)
3868 (uri (string-append "https://github.com/jwilk/hungrycat/"
3869 "releases/download/" version "/"
e20796dc 3870 "hungrycat-" version ".tar.gz"))
82d57f12
TGR
3871 (sha256
3872 (base32
3873 "03fc1zsrf99lvxa7b4ps6pbi43304wbxh1f6ci4q0vkal370yfwh"))))
3874 (build-system gnu-build-system)
3875 (native-inputs
3876 ;; For tests.
3877 `(("python" ,python-wrapper)
3878 ("python-nose" ,python-nose)))
3879 (arguments
3880 `(#:test-target "test"))
3881 (synopsis "A single tool that combines @command{cat} & @command{rm}")
3882 (description
3883 "hungrycat prints the contents of a file to standard output, while
3884simultaneously freeing the disk space it occupied. It is useful if you need
3885to process a large file, don't have enough space to store both the input and
3886output files, and don't need the input file afterwards.
3887While similar in principle to running @command{cat} immediately followed by
3888@command{rm}, @command{hungrycat} actually frees blocks as soon as they are
3889printed instead of after the entire file has been read, which is often too
3890late.")
3891 (home-page "https://jwilk.net/software/hungrycat")
3892 (license license:expat)))
3ebf2c29
PAR
3893
3894(define-public launchmon
3895 (package
3896 (name "launchmon")
3897 (version "1.0.2")
3898 (source (origin
3899 (method url-fetch)
3900 (uri (string-append
3901 "https://github.com/LLNL/LaunchMON/releases/download/v"
f44eca94 3902 version "/launchmon-v" version ".tar.gz"))
3ebf2c29
PAR
3903 (sha256
3904 (base32
989d564f
MB
3905 "0fm3nd9mydm9v2bf7bh01dbgrfnpwkapxa3dsvy3x1z0rz61qc0x"))
3906 (modules '((guix build utils)))
3907 (snippet
3908 '(begin
3909 ;; Fix build failure with GCC 7 due to a conversion error.
3910 ;; Remove for versions > 1.0.2.
3911 (substitute* "launchmon/src/linux/lmon_api/lmon_coloc_spawner.cxx"
3912 ((" lmonpl = '\\\\0'")
3913 " *lmonpl = '\\0'"))
3914 #t))))
3ebf2c29
PAR
3915 (build-system gnu-build-system)
3916 (inputs
3917 `(("mpi" ,openmpi)
3918 ("munge" ,munge)
3919 ("boost" ,boost)
3920 ("libelf" ,libelf)
3921 ("libgcrypt" ,libgcrypt)
3922 ("libgpg-error" ,libgpg-error)))
3923 (synopsis "Infrastructue for large scale tool daemon launching")
3924 (description
3925 "LaunchMON is a software infrastructure that enables HPC run-time
3926tools to co-locate tool daemons with a parallel job. Its API allows a
3927tool to identify all the remote processes of a job and to scalably
3928launch daemons into the relevant nodes.")
3929 (home-page "https://github.com/LLNL/LaunchMON")
3930 (supported-systems '("i686-linux" "x86_64-linux"))
3931 (license license:lgpl2.1)))
541dac8a
PAR
3932
3933(define-public spindle
3934 (package
3935 (name "spindle")
3936 (version "0.10")
3937 (source (origin
3938 ;; We use git checkout to avoid github auto-generated tarballs
3939 (method git-fetch)
3940 (uri (git-reference
b0e7b699 3941 (url "https://github.com/hpc/Spindle")
541dac8a
PAR
3942 (commit (string-append "v" version))))
3943 (file-name (git-file-name name version))
3944 (sha256
3945 (base32
3946 "15n3ay0qq81r5v7fif61q1vdjcq44pp2nynkh3fvbzc9fj3c39wd"))))
3947 (build-system gnu-build-system)
3948 (arguments '(#:configure-flags '("--enable-sec-launchmon"
3949 "--enable-sec-munge"
3950 "--enable-sec-none")))
3951 (inputs
3952 `(("mpi" ,openmpi)
3953 ("munge" ,munge)
3954 ("launchmon" ,launchmon)
3955 ("libgcrypt" ,libgcrypt)))
3956 (synopsis "Scalable library loading in HPC environments")
3957 (description
3958 "Spindle is a tool for improving the performance of dynamic library and
3959Python loading in HPC environments.")
3960 (home-page "https://github.com/hpc/Spindle")
785f40df
EF
3961 ;; This package supports x86_64 and PowerPC64
3962 (supported-systems '("x86_64-linux"))
541dac8a 3963 (license license:lgpl2.1)))
bbc94ed0
PN
3964
3965(define-public inxi-minimal
3966 (let ((real-name "inxi"))
3967 (package
3968 (name "inxi-minimal")
fbc449cc 3969 (version "3.3.08-1")
bbc94ed0
PN
3970 (source
3971 (origin
b740a305
TGR
3972 (method git-fetch)
3973 (uri (git-reference
3974 (url "https://github.com/smxi/inxi")
3975 (commit version)))
7458ceac 3976 (file-name (git-file-name real-name version))
bbc94ed0 3977 (sha256
fbc449cc 3978 (base32 "0kgxyxfw4hkmp9s3nazdqqvbfb4jqwv59mnpaa7g4n63nrqjv06v"))))
bbc94ed0
PN
3979 (build-system trivial-build-system)
3980 (inputs
a49bbaa6
EF
3981 `(("bash" ,bash-minimal)
3982 ("perl" ,perl)
3983 ("procps" ,procps)))
bbc94ed0 3984 (native-inputs
b740a305 3985 `(("gzip" ,gzip)))
bbc94ed0 3986 (arguments
77eaf5fc 3987 `(#:modules ((guix build utils))
bbc94ed0
PN
3988 #:builder
3989 (begin
3990 (use-modules (guix build utils)
3991 (ice-9 match)
3992 (srfi srfi-26))
3993 (setenv "PATH" (string-append
3994 (assoc-ref %build-inputs "bash") "/bin" ":"
3995 (assoc-ref %build-inputs "gzip") "/bin" ":"
b740a305
TGR
3996 (assoc-ref %build-inputs "perl") "/bin" ":"))
3997 (copy-recursively (assoc-ref %build-inputs "source")
3998 ,(string-append real-name "-" version))
bbc94ed0
PN
3999 (with-directory-excursion ,(string-append real-name "-" version)
4000 (with-fluids ((%default-port-encoding #f))
4001 (substitute* "inxi" (("/usr/bin/env perl") (which "perl"))))
4002 (let ((bin (string-append %output "/bin")))
4003 (install-file "inxi" bin)
4004 (wrap-program (string-append bin "/inxi")
4005 `("PATH" ":" =
4006 ("$PATH"
4007 ,@(map (lambda (input)
4008 (match input
4009 ((name . store)
4010 (let ((store-append
4011 (cut string-append store <>)))
4012 (cond
4013 ((member name '("util-linux"))
4014 (string-append (store-append "/bin") ":"
4015 (store-append "/sbin")))
4016 ((member name '("dmidecode" "iproute2"))
4017 (store-append "/sbin"))
4018 (else (store-append "/bin")))))))
4019 %build-inputs)))
4020 `("PERL5LIB" ":" =
4021 ,(delete
4022 ""
4023 (map (match-lambda
4024 (((? (cut string-prefix? "perl-" <>) name) . dir)
4025 (string-append dir "/lib/perl5/site_perl"))
4026 (_ ""))
4027 %build-inputs)))))
4028 (invoke "gzip" "inxi.1")
4029 (install-file "inxi.1.gz"
55f5556e 4030 (string-append %output "/share/man/man1")))
bbc94ed0
PN
4031 #t)))
4032 (home-page "https://smxi.org/docs/inxi.htm")
4ee41a6a 4033 (synopsis "Full-featured system information script")
bbc94ed0
PN
4034 (description "Inxi is a system information script that can display
4035various things about your hardware and software to users in an IRC chatroom or
4ee41a6a 4036support forum. It runs with the @code{/exec} command in most IRC clients.")
bbc94ed0
PN
4037 (license license:gpl3+))))
4038
4039(define-public inxi
4040 (package
4041 (inherit inxi-minimal)
4042 (name "inxi")
4043 (inputs
4044 `(("dmidecode" ,dmidecode)
4045 ("file" ,file)
4046 ("bind:utils" ,isc-bind "utils") ; dig
4047 ("gzip" ,gzip)
4048 ("iproute2" ,iproute) ; ip
4049 ("kmod" ,kmod) ; modinfo
4050 ("lm-sensors" ,lm-sensors)
4051 ("mesa-utils" ,mesa-utils)
4052 ("pciutils" ,pciutils)
bbc94ed0
PN
4053 ("tar" ,tar)
4054 ("tree" ,tree)
4055 ("util-linux" ,util-linux) ; lsblk
4056 ("usbutils" ,usbutils) ; lsusb
4057 ("wmctrl" ,wmctrl)
4058 ("xdpyinfo" ,xdpyinfo)
4059 ("xprop" ,xprop)
4060 ("xrandr" ,xrandr)
4061 ("coreutils" ,coreutils) ; uptime
4062 ("inetutils" ,inetutils) ; ifconfig
4063 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
4064 ("perl-http-tiny" ,perl-http-tiny)
4065 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
4066 ("perl-json-xs" ,perl-json-xs)
4067 ("perl-time-hires" ,perl-time-hires)
04b0636e
TGR
4068 ("lvm2" ,lvm2) ; lvs
4069 ("mdadm" ,mdadm)
bbc94ed0
PN
4070 ;; TODO: Add more inputs:
4071 ;; ipmi-sensors
4072 ;; hddtemp
4073 ;; perl-xml-dumper
4074 ;; ipmitool
4075 ,@(package-inputs inxi-minimal)))))
b19f3337
OP
4076
4077(define-public pscircle
4078 (package
4079 (name "pscircle")
0b4ced58 4080 (version "1.3.1")
b19f3337
OP
4081 (source
4082 (origin
494b702a
TGR
4083 (method git-fetch)
4084 (uri (git-reference
4085 (url "https://gitlab.com/mildlyparallel/pscircle.git")
4086 (commit (string-append "v" version))))
4087 (file-name (git-file-name name version))
b19f3337 4088 (sha256
0b4ced58 4089 (base32 "1sm99423hh90kr4wdjqi9sdrrpk65j2vz2hzj65zcxfxyr6khjci"))))
b19f3337
OP
4090 (build-system meson-build-system)
4091 (native-inputs
4092 `(("pkg-config" ,pkg-config)))
4093 (inputs
4094 `(("cairo" ,cairo)
4095 ("libpng" ,libpng)
4096 ("libx11" ,libx11)))
4097 (home-page "https://gitlab.com/mildlyparallel/pscircle")
4098 (synopsis "Visualize Linux processes in a form of radial tree")
4099 (description
4100 "@code{pscircle} visualizes Linux processes in the form of a radial tree.")
4101 (license license:gpl2+)))
ac94ccb9
DM
4102
4103(define-public python-pyudev
4104 (package
4105 (name "python-pyudev")
78fca231 4106 (version "0.22.0")
ac94ccb9
DM
4107 (source
4108 (origin
4109 (method url-fetch)
4110 (uri (pypi-uri "pyudev" version))
4111 (sha256
4112 (base32
78fca231 4113 "0xmj6l08iih2js9skjqpv4w7y0dhxyg91zmrs6v5aa65gbmipfv9"))))
ac94ccb9
DM
4114 (build-system python-build-system)
4115 (arguments
4116 `(#:tests? #f ; Tests require /sys
4117 #:phases
4118 (modify-phases %standard-phases
4119 (add-after 'unpack 'patch-ctypes-udev
4120 (lambda* (#:key inputs outputs #:allow-other-keys)
4121 (let ((eudev (assoc-ref inputs "eudev")))
4122 (substitute* "src/pyudev/core.py"
4123 (("'udev'")
4124 (string-append "'" eudev "/lib/libudev.so'")))
4125 (substitute* "src/pyudev/_ctypeslib/utils.py"
4126 ;; Use absolute paths instead of keys.
4127 (("= find_library") "= "))
4128 #t))))))
4129 (inputs
4130 `(("eudev" ,eudev)))
cbb1b168
RJ
4131 (propagated-inputs
4132 `(("python-six" ,python-six)))
ac94ccb9
DM
4133 (native-inputs
4134 `(("python-docutils" ,python-docutils)
4135 ("python-hypothesis" ,python-hypothesis)
4136 ("python-mock" ,python-mock)
4137 ("python-pytest" ,python-pytest)
4138 ("python-sphinx" ,python-sphinx)))
a20ede32 4139 (home-page "https://pyudev.readthedocs.io/")
ac94ccb9
DM
4140 (synopsis "Python udev binding")
4141 (description "This package provides @code{udev} bindings for Python.")
4142 (license license:lgpl2.1)))
15c56e82 4143
c7be46b7 4144(define-public vmtouch
4145 (package
4146 (name "vmtouch")
4147 (version "1.3.1")
4148 (source
4149 (origin
4150 (method git-fetch)
4151 (uri (git-reference
4152 (url "https://github.com/hoytech/vmtouch/")
4153 (commit (string-append "v" version))))
4154 (file-name (git-file-name name version))
4155 (sha256
4156 (base32 "08da6apzfkfjwasn4dxrlfxqfx7arl28apdzac5nvm0fhvws0dxk"))))
4157 (build-system gnu-build-system)
4158 (native-inputs
4159 `(("perl" ,perl)))
4160 (arguments
4161 `(#:tests? #f ; no tests
4162 #:make-flags
4163 (list
4164 (string-append "CC=" ,(cc-for-target))
4165 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4166 #:phases
4167 (modify-phases %standard-phases
4168 (delete 'configure))))
4169 (home-page "https://github.com/hoytech/vmtouch/")
4170 (synopsis "Portable file system cache diagnostics and control")
4171 (description
4172 "vmtouch is a tool for learning about and controlling the file system
4173cache of unix and unix-like systems.")
4174 (license license:bsd-3)))
4175
15c56e82
DM
4176(define-public solaar
4177 (package
4178 (name "solaar")
49ae8353 4179 (version "1.0.6")
15c56e82
DM
4180 (source (origin
4181 (method git-fetch)
4182 (uri (git-reference
aed5b1ff 4183 (url "https://github.com/pwr-Solaar/Solaar")
15c56e82
DM
4184 (commit version)))
4185 (file-name (git-file-name name version))
4186 (sha256
4187 (base32
49ae8353 4188 "04zclzfc31l2fj5shcsngnmcvcmmhnc567l3wb9yfhs8k39k9kb2"))))
15c56e82
DM
4189 (build-system python-build-system)
4190 (arguments
4191 `(#:phases
4192 (modify-phases %standard-phases
210f5420 4193 (add-before 'build 'setenv-PATH
15c56e82
DM
4194 (lambda _
4195 (setenv "PYTHONPATH" (string-append "lib:" (getenv "PYTHONPATH")))
4196 #t)))))
4197 (propagated-inputs
4198 `(("python-pygobject" ,python-pygobject)
53240608 4199 ("python-pyudev" ,python-pyudev)
4200
4201 ;; For GUI.
4202 ("python-pyyaml" ,python-pyyaml)
4203 ("python-psutil" ,python-psutil)
4204 ("python-xlib" ,python-xlib)
4205 ("gtk+" ,gtk+)
4206 ("python-pygobject" ,python-pygobject)))
17db882d 4207 (home-page "https://pwr-solaar.github.io/Solaar/")
15c56e82
DM
4208 (synopsis "Linux devices manager for the Logitech Unifying Receiver")
4209 (description "This package provides tools to manage clients of the
4210Logitech Unifying Receiver.")
4211 (license license:gpl2)))
4d26987d
AI
4212
4213(define-public lynis
4214 (package
4215 (name "lynis")
112dc8eb 4216 ;; Also update the ‘lynis-sdk’ input to the commit matching this release.
d84420d4 4217 (version "3.0.6")
4d26987d
AI
4218 (source
4219 (origin
4220 (method git-fetch)
4221 (uri (git-reference
4222 (url "https://github.com/CISOfy/lynis")
4223 (commit version)))
4224 (file-name (git-file-name name version))
4225 (sha256
d84420d4 4226 (base32 "1a1n8alcq6zil1rwk9940cg3x2nz3igcxfad99505pdh7ccz9324"))
4d26987d
AI
4227 (modules '((guix build utils)))
4228 (snippet
4229 '(begin
4230 ;; Remove proprietary plugins. As of now, all plugins supplied with
4231 ;; lynis are proprietary. In the future, if free plugins are
4232 ;; provided, whitelist them from deletion.
d84420d4 4233 (for-each delete-file (find-files "plugins"))))))
4d26987d
AI
4234 (build-system gnu-build-system)
4235 (native-inputs
4236 `(;; For tests
4237 ("lynis-sdk"
4238 ,(origin
4239 (method git-fetch)
4240 (uri (git-reference
4241 (url "https://github.com/CISOfy/lynis-sdk")
d84420d4 4242 (commit "1c4e5f60a03e29a1525ca9ec17c793461058253d")))
4d26987d
AI
4243 (file-name (git-file-name "lynis-sdk" version))
4244 (sha256
d84420d4 4245 (base32 "060k8k1q4c7nvrv3cwscxq8md2v75q3nrwwim1hgfw20divw3npy"))))))
4d26987d
AI
4246 (arguments
4247 `(#:phases
4248 (modify-phases %standard-phases
4249 (replace 'configure
4250 (lambda* (#:key inputs outputs #:allow-other-keys)
4251 (substitute* "lynis"
4252 (("/usr/share/lynis")
4253 (string-append (assoc-ref outputs "out") "/share/lynis")))
4254 (substitute* "include/functions"
4255 (("/usr/local/etc/lynis")
d84420d4 4256 (string-append (assoc-ref outputs "out") "/etc/lynis")))))
4d26987d
AI
4257 (delete 'build)
4258 (replace 'install
4259 (lambda* (#:key outputs #:allow-other-keys)
4260 (let ((out (assoc-ref outputs "out")))
4261 (install-file "lynis" (string-append out "/bin/"))
4262 (install-file "default.prf" (string-append out "/etc/lynis"))
4263 (for-each
4264 (lambda (dir)
4265 (copy-recursively dir (string-append out "/share/lynis/" dir)))
4266 (list "db" "include" "plugins"))
d84420d4 4267 (install-file "lynis.8" (string-append out "/share/man/man8")))))
4d26987d
AI
4268 (replace 'check
4269 (lambda* (#:key inputs #:allow-other-keys)
4270 (copy-recursively (assoc-ref inputs "lynis-sdk") "../lynis-sdk")
4271 (setenv "LANG" "en_US.UTF-8")
4272 (let ((lynis-dir (getcwd)))
4273 (with-directory-excursion "../lynis-sdk"
4274 (substitute* "config"
4275 (("\\.\\./lynis") lynis-dir))
4276 (substitute* "unit-tests/tests-language-translations.sh"
4277 (("\\.\\./lynis") lynis-dir))
4278 (invoke "sh" "lynis-devkit" "run" "unit-tests"))))))))
4279 (home-page "https://cisofy.com/lynis/")
4280 (synopsis "Security auditing tool")
4281 (description "Lynis is a security auditing tool. It performs an in-depth
4282security scan and runs on the system itself. The primary goal is to test
4283security defenses and provide tips for further system hardening. It will also
4284scan for general system information, vulnerable software packages, and
4285possible configuration issues.")
4286 (license license:gpl3+)))
2eddeeba
PN
4287
4288(define-public ngrep
4289 (package
4290 (name "ngrep")
4291 (version "1.47")
4292 (source
4293 (origin
4294 (method git-fetch)
4295 (uri (git-reference
4296 (url "https://github.com/jpr5/ngrep/")
4297 (commit (string-append "V" (string-replace-substring version "." "_")))))
4298 (file-name (git-file-name name version))
4299 (sha256
4300 (base32
4301 "1x2fyd7wdqlj1r76ilal06cl2wmbz0ws6i3ys204sbjh1cj6dcl7"))))
4302 (build-system gnu-build-system)
4303 (inputs
4304 `(("libpcap" ,libpcap)))
4305 (arguments
4306 `(#:tests? #f ;; No tests.
4307 #:configure-flags (list (string-append "--with-pcap-includes="
4308 (assoc-ref %build-inputs "libpcap")
4309 "/include/pcap"))))
4310 (home-page "https://github.com/jpr5/ngrep/")
4311 (synopsis "Grep-like utility to search for network packets on an interface")
4312 (description "@command{ngrep} is like GNU grep applied to the network
4313layer. It's a PCAP-based tool that allows you to specify an extended regular
4314or hexadecimal expression to match against data payloads of packets. It
4315understands many kinds of protocols, including IPv4/6, TCP, UDP, ICMPv4/6,
4316IGMP and Raw, across a wide variety of interface types, and understands BPF
4317filter logic in the same fashion as more common packet sniffing tools, such as
4318tcpdump and snoop.")
4319 (license license:bsd-3)))
cd2ce8ab
GLV
4320
4321(define-public pam-mount
4322 (package
4323 (name "pam-mount")
f7aa0734 4324 (version "2.18")
cd2ce8ab
GLV
4325 (source
4326 (origin
4327 (method url-fetch)
4328 (uri (string-append "mirror://sourceforge/pam-mount/pam_mount/"
6a84fddc 4329 "pam_mount-" version ".tar.xz"))
cd2ce8ab 4330 (sha256
f7aa0734 4331 (base32 "0832nh2qf9pisgwnbgx6hkylx5d7i416l19y3ly4ifv7k1p7mxqa"))))
cd2ce8ab
GLV
4332 (build-system gnu-build-system)
4333 (native-inputs
4334 `(("perl" ,perl)
4335 ("pkg-config" ,pkg-config)))
4336 (inputs
4337 `(("cryptsetup" ,cryptsetup)
4338 ("libhx" ,libhx)
4339 ("libxml2" ,libxml2)
4340 ("linux-pam" ,linux-pam)
4341 ("lvm2" ,lvm2)
4342 ("openssl" ,openssl)
f7aa0734 4343 ("pcre2" ,pcre2)
bb93042c 4344 ("libmount" ,util-linux "lib")
cd2ce8ab
GLV
4345 ("util-linux" ,util-linux)))
4346 (arguments
4347 `(#:configure-flags
4348 (list (string-append "--with-slibdir=" %output "/lib")
4349 (string-append "--with-ssbindir=" %output "/sbin"))
4350 #:phases
4351 (modify-phases %standard-phases
4352 (add-after 'unpack 'fix-program-paths
4353 (lambda* (#:key inputs outputs #:allow-other-keys)
4354 (let ((util-linux (assoc-ref inputs "util-linux"))
4355 (out (assoc-ref outputs "out")))
4356 (substitute* "src/mtcrypt.c"
4357 (("\"mount\";")
4358 (string-append "\"" util-linux "/bin/mount\";"))
4359 (("\"umount\";")
4360 (string-append "\"" util-linux "/bin/umount\";"))
4361 (("\"fsck\",")
4362 (string-append "\"" util-linux "/sbin/fsck\",")))
4363 (substitute* "src/rdconf1.c"
4364 (("\"mount\", \"")
4365 (string-append "\"" util-linux "/bin/mount\", \""))
4366 (("\"umount\", \"")
4367 (string-append "\"" util-linux "/bin/umount\", \""))
4368 (("\"fsck\", \"")
4369 (string-append "\"" util-linux "/sbin/fsck\", \""))
4370 (("\"pmvarrun\", \"")
4371 (string-append "\"" out "/sbin/pmvarrun\", \""))))
4372 #t)))))
4373 (home-page "http://pam-mount.sourceforge.net")
4374 (synopsis "PAM module to mount volumes for a user session")
4375 (description
4376 "Pam-mount is a PAM module that can mount volumes when a user logs in.
4377It supports mounting local filesystems of any kind the normal mount utility
4378supports. It can also mount encrypted LUKS volumes using the password
4379supplied by the user when logging in.")
4380 (license (list license:gpl2+ license:lgpl2.1+))))
ace3e549 4381
d8a046d5
OP
4382(define-public jc
4383 (package
4384 (name "jc")
b94cb3be
TGR
4385 (version "1.13.4")
4386 (source
4387 (origin
4388 ;; The PyPI tarball lacks the test suite.
4389 (method git-fetch)
4390 (uri (git-reference
4391 (url "https://github.com/kellyjonbrazil/jc")
4392 (commit (string-append "v" version))))
4393 (file-name (git-file-name name version))
4394 (sha256
4395 (base32 "0rwvyyrdnw43pixp8h51rncq2inc9pbbj1j2191y5si00pjw34zr"))))
d8a046d5
OP
4396 (build-system python-build-system)
4397 (propagated-inputs
b94cb3be
TGR
4398 `(("python-pygments" ,python-pygments)
4399 ("python-ruamel.yaml" ,python-ruamel.yaml)
4400 ("python-xmltodict" ,python-xmltodict)))
d8a046d5
OP
4401 (home-page "https://github.com/kellyjonbrazil/jc")
4402 (synopsis "Convert the output of command-line tools to JSON")
4403 (description "@code{jc} JSONifies the output of many CLI tools and
4404file-types for easier parsing in scripts.")
4405 (license license:expat)))
4406
ace3e549
OP
4407(define-public jtbl
4408 (package
4409 (name "jtbl")
517bd086 4410 (version "1.1.7")
ace3e549
OP
4411 (source (origin
4412 (method git-fetch)
4413 (uri (git-reference
b0e7b699 4414 (url "https://github.com/kellyjonbrazil/jtbl")
ace3e549
OP
4415 (commit (string-append "v" version))))
4416 (file-name (git-file-name name version))
4417 (sha256
4418 (base32
517bd086 4419 "19i21fqz2m40cds9pb17brjxkczqagmx2f7mfb0xdvbygaply5wz"))))
ace3e549
OP
4420 (build-system python-build-system)
4421 (inputs
4422 `(("python-tabulate" ,python-tabulate)))
4423 (home-page "https://github.com/kellyjonbrazil/jtbl")
4424 (synopsis "Command-line tool to print JSON data as a table in the terminal")
4425 (description "@code{jtbl} accepts piped JSON data from stdin and outputs a
4426text table representation to stdout.")
4427 (license license:expat)))
ceb233bb
OP
4428
4429(define-public hosts
4430 (package
4431 (name "hosts")
4432 (version "3.6.3")
4433 (source (origin
4434 (method git-fetch)
4435 (uri (git-reference
b0e7b699 4436 (url "https://github.com/xwmx/hosts")
ceb233bb
OP
4437 (commit version)))
4438 (file-name (git-file-name name version))
4439 (sha256
4440 (base32
4441 "1ni4z89kxzgwm26hhx908g04f2h0fypy7lgfa0rvsz8d0wslgcsn"))))
4442 (build-system trivial-build-system)
4443 (inputs
4444 `(("bats" ,bats) ;for test
4445 ("awk" ,gawk)
4446 ("bash" ,bash)
4447 ("coreutils" ,coreutils)
4448 ("diffutils" ,diffutils)
4449 ("grep" ,grep)
4450 ("ncurses" ,ncurses) ;tput
4451 ("sed" ,sed)))
4452 (arguments
4453 `(#:modules ((guix build utils))
4454 #:builder
4455 (begin
4456 (use-modules (guix build utils))
4457 ;; copy source
4458 (copy-recursively (assoc-ref %build-inputs "source") ".")
4459 ;; patch-shebang phase
4460 (setenv "PATH"
4461 (string-append (assoc-ref %build-inputs "bash") "/bin"
4462 ":" (assoc-ref %build-inputs "awk") "/bin"
4463 ":" (assoc-ref %build-inputs "coreutils") "/bin"
4464 ":" (assoc-ref %build-inputs "diffutils") "/bin"
4465 ":" (assoc-ref %build-inputs "grep") "/bin"
4466 ":" (assoc-ref %build-inputs "ncurses") "/bin"
4467 ":" (assoc-ref %build-inputs "sed") "/bin"
4468 ":" "/run/setuid-programs"
4469 ":" (getenv "PATH")))
4470 (substitute* "hosts"
4471 (("#!/usr/bin/env bash")
4472 (string-append "#!" (which "bash")
4473 "\nPATH=" (getenv "PATH"))))
4474 ;; check phase
4475 (setenv "TERM" "linux") ;set to tty for test
4476 (invoke (string-append (assoc-ref %build-inputs "bats") "/bin/bats")
4477 "test")
4478 ;; install phase
4479 (install-file "hosts" (string-append %output "/bin"))
4480 (let ((bash-completion
4481 (string-append %output "/etc/bash_completion.d")))
4482 (mkdir-p bash-completion)
4483 (copy-file "etc/hosts-completion.bash"
4484 (string-append bash-completion "/hosts")))
4485 (let ((zsh-completion
4486 (string-append %output "/share/zsh/site-functions")))
4487 (mkdir-p zsh-completion)
4488 (copy-file "etc/hosts-completion.zsh"
4489 (string-append zsh-completion "/_hosts")))
4490 (let ((doc (string-append %output "/share/doc/" ,name "-" ,version)))
4491 (mkdir-p doc)
4492 (install-file "LICENSE" doc)
4493 (install-file "README.md" doc))
4494 #t)))
4495 (home-page "https://github.com/xwmx/hosts/")
4a986753 4496 (synopsis "Script for editing a foreign distro's @file{/etc/hosts} file")
ceb233bb 4497 (description "Hosts is a command line program for managing
4a986753
JN
4498@file{/etc/hosts} entries. On Guix System, @file{/etc/hosts} is managed from
4499the system configuration; hosts only works when using the Guix package manager
4500on a foreign distro. @command{hosts} works with existing hosts files and
4501entries, providing commands to add, remove, comment, and search.")
ceb233bb 4502 (license license:expat)))
93d3cfec
DM
4503
4504(define-public nmrpflash
4505 (package
4506 (name "nmrpflash")
6b1b6b0e 4507 (version "0.9.15")
93d3cfec
DM
4508 (source
4509 (origin
4510 (method git-fetch)
4511 (uri
4512 (git-reference
8ed4c468 4513 (url "https://github.com/jclehner/nmrpflash")
93d3cfec
DM
4514 (commit (string-append "v" version))))
4515 (sha256
6b1b6b0e 4516 (base32 "0ssfls1sfh8w748qsnkfgndlpw395100x2yynzbk5jd56scxvp20"))
93d3cfec
DM
4517 (file-name (git-file-name name version))))
4518 (build-system gnu-build-system)
4519 (native-inputs
4520 `(("pkg-config" ,pkg-config)))
4521 (inputs
4522 `(("libnl" ,libnl)
4523 ("libpcap" ,libpcap)))
4524 (arguments
4525 `(#:tests? #f ; None exist
4526 #:make-flags
4527 (list (string-append "CC=" ,(cc-for-target))
4528 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4529 #:phases
4530 (modify-phases %standard-phases
4531 (delete 'configure)
4532 (add-before 'install 'prepare-install
4533 (lambda* (#:key outputs #:allow-other-keys)
4534 (mkdir-p (string-append (assoc-ref outputs "out") "/bin"))
4535 #t)))))
4536 (home-page "https://github.com/jclehner/nmrpflash")
4537 (synopsis "Netgear unbrick utility")
4538 (description "This package provides a utility to flash a new firmware
4539image to a Netgear device. It has been tested on Netgear EX2700, EX6120,
4540EX6150v2, DNG3700v2, R6100, R6220, R7000, D7000, WNR3500, R6400, R6800,
4541R8000, R8500, WNDR3800, but is likely to be compatible with many other
4542Netgear devices.")
4543 (license license:gpl3+)))
3728ed7c
LF
4544
4545(define-public atop
4546 (package
4547 (name "atop")
ae3e6ba5 4548 (version "2.6.0")
3728ed7c
LF
4549 (source (origin
4550 (method url-fetch)
4551 (uri (string-append "https://www.atoptool.nl/download/atop-"
4552 version ".tar.gz"))
4553 (sha256
4554 (base32
ae3e6ba5 4555 "0wlg0n0h9vwpjp2dcb623jvvqck422jrjpq9mbpzg4hnawxcmhly"))))
3728ed7c
LF
4556 (build-system gnu-build-system)
4557 (arguments
4558 `(#:tests? #f ; no test suite
4559 #:make-flags
4560 (list (string-append "CC=" ,(cc-for-target))
4561 ;; The installer requires a choice between systemd or SysV.
4562 "systemdinstall"
4563 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
4564 (string-append "BINPATH=/bin")
4565 (string-append "SBINPATH=/sbin")
4566 (string-append "SYSDPATH=/etc/systemd/system")
4567 (string-append "PMPATHD=/etc/systemd/system-sleep")
4568 (string-append "MAN1PATH=/share/man/man1")
4569 (string-append "MAN5PATH=/share/man/man5")
4570 (string-append "MAN8PATH=/share/man/man8")
4571 ;; Or else it tries to create /var/log/atop...
4572 (string-append "LOGPATH="))
4573 #:phases
4574 (modify-phases %standard-phases
4575 (delete 'configure) ; No ./configure script
4576 (add-before 'build 'patch-build
4577 (lambda* (#:key outputs #:allow-other-keys)
4578 (substitute* "Makefile"
4579 ;; We don't need to chown things in the build environment.
4580 (("chown.*$") "")
4581 ;; We can't toggle the setuid bit in the build environment.
4582 (("chmod 04711") "chmod 0711")
4583 ;; Otherwise, it creates a blank configuration file as a "default".
4584 (("touch.*DEFPATH)/atop") "")
4585 (("chmod.*DEFPATH)/atop") ""))
4586 #t)))))
4587 (inputs
4588 `(("ncurses" ,ncurses)
4589 ("python" ,python-wrapper) ; for `atopgpud`
4590 ("zlib" ,zlib)))
4591 (home-page "https://www.atoptool.nl/")
4592 (synopsis "Linux performance monitoring console")
4593 (description "Atop is an ASCII full-screen performance monitor for Linux
4594that is capable of reporting the activity of all processes (even processes have
4595finished during the monitoring interval), daily logging of system and process
4596activity for long-term analysis, highlighting overloaded system resources by
4597using colors, etc. At regular intervals, it shows system-level activity related
4598to the CPU, memory, swap, disks (including LVM) and network layers, and for
4599every process (and thread) it shows e.g. the CPU utilization, memory growth,
4600disk utilization, priority, username, state, and exit code.")
4601 (license license:gpl2+)))
a94214f6
DM
4602
4603;; TODO: Unvendor u-root (pkg: forth, golang, testutil).
4604(define fiano
4605 (package
4606 (name "fiano")
4607 (version "5.0.0")
4608 (source (origin
4609 (method git-fetch)
4610 (uri (git-reference
4611 (url "https://github.com/linuxboot/fiano.git")
4612 (commit (string-append "v" version))))
4613 (file-name (string-append name "-" version "-checkout"))
4614 (sha256
4615 (base32
4616 "03ihdwwhb7g6bihx141cn0924sjs5ps6q3ps58pk1cg0g0srrr9h"))
4617 (modules '((guix build utils)))
4618 (snippet
4619 '(begin
4620 (delete-file-recursively "vendor/golang.org")
4621 (delete-file-recursively "vendor/github.com")
4622 #t))))
4623 (build-system go-build-system)
4624 (arguments
4625 `(#:import-path "github.com/linuxboot/fiano"
4626 #:unpack-path "github.com/linuxboot/fiano"))
4627 (native-inputs
4628 `())
4629 (inputs
4630 `(("go-golang-org-x-text" ,go-golang-org-x-text)
4631 ("go-github.com-ulikunitz-xz" ,go-github.com-ulikunitz-xz)))
4632 (synopsis "UEFI image editor")
4633 (description "This package provides a command-line UEFI image editor.")
4634 (home-page "https://github.com/linuxboot/fiano")
4635 (license license:bsd-3)))
4f318f74
DM
4636
4637(define-public fiano-utk
4638 (package
4639 (inherit fiano)
4640 (name "fiano-utk")
4641 (arguments
4642 `(#:import-path "github.com/linuxboot/fiano/cmds/utk"
4643 #:unpack-path "github.com/linuxboot/fiano"))))
ad012138
DM
4644
4645(define-public fiano-fmap
4646 (package
4647 (inherit fiano)
4648 (name "fiano-fmap")
4649 (arguments
4650 `(#:import-path "github.com/linuxboot/fiano/cmds/fmap"
4651 #:unpack-path "github.com/linuxboot/fiano"))))
00fb3976
DM
4652
4653(define-public novena-eeprom
4654 (package
4655 (name "novena-eeprom")
4656 (version "2.3")
4657 (source (origin
4658 (method git-fetch)
4659 (uri (git-reference
4660 (url "https://github.com/xobs/novena-eeprom.git")
4661 (commit (string-append "v" version))))
4662 (file-name (string-append name "-" version "-checkout"))
4663 (sha256
4664 (base32
4665 "00pd71mg0g20v0820ggp3ghf9nyj5s4wavaz9mkmrmsr91hcnf7i"))))
4666 (build-system gnu-build-system)
4667 (arguments
4668 `(#:tests? #f ; No tests exist
4669 #:make-flags
4670 (list (string-append "CC=" ,(cc-for-target)))
4671 #:phases
4672 (modify-phases %standard-phases
4673 (delete 'configure)
4674 (replace 'install
4675 (lambda* (#:key outputs #:allow-other-keys)
4676 (let* ((out (assoc-ref outputs "out"))
4677 (out-bin (string-append out "/bin"))
4678 (out-share-man (string-append out "/share/man/man8")))
4679 (install-file "novena-eeprom" out-bin)
4680 (install-file "novena-eeprom.8" out-share-man)))))))
4681 (inputs
4682 `(("i2c-tools" ,i2c-tools)))
4683 (synopsis "Novena EEPROM editor")
4684 (description "This package provides an editor for the Novena EEPROM.
4685Novena boards contain a device-dependent descriptive EEPROM that defines
4686various parameters such as serial number, MAC address, and featureset.
4687This program allows you to view and manipulate this EEPROM list.")
4688 (home-page "https://github.com/xobs/novena-eeprom/")
4689 (supported-systems '("armhf-linux"))
4690 (license license:bsd-3)))
74a83afd
DM
4691
4692(define-public lrzsz
4693 (package
4694 (name "lrzsz")
4695 (version "0.12.20")
4696 (source (origin
4697 (method url-fetch)
4698 (uri (string-append "https://www.ohse.de/uwe/releases/lrzsz-"
4699 version ".tar.gz"))
4700 (sha256
4701 (base32
4702 "1wcgfa9fsigf1gri74gq0pa7pyajk12m4z69x7ci9c6x9fqkd2y2"))))
4703 (build-system gnu-build-system)
4704 (arguments
4705 `(#:phases
4706 (modify-phases %standard-phases
4707 (replace 'configure
4708 (lambda* (#:key outputs #:allow-other-keys)
4709 (setenv "CONFIG_SHELL" (which "bash"))
4710 (invoke "./configure"
4711 (string-append "--prefix="
4712 (assoc-ref outputs "out"))))))))
4713 (synopsis "Implementation of XMODEM/YMODEM/ZMODEM transfer protocols")
4714 (description "This package provides programs that transfer files using
4715the XMODEM/YMODEM/ZMODEM file transfer protocols.")
4716 (home-page "https://ohse.de/uwe/software/lrzsz.html")
4717 (license license:gpl2+)))
e41f8923
GLV
4718
4719(define-public nq
4720 (package
4721 (name "nq")
e04c0468 4722 (version "0.4")
e41f8923
GLV
4723 (source
4724 (origin
4725 (method git-fetch)
4726 (uri (git-reference
4727 (url "https://github.com/leahneukirchen/nq")
4728 (commit (string-append "v" version))))
4729 (file-name (git-file-name name version))
4730 (sha256
e04c0468 4731 (base32 "0sdamjzvmf6cxhjmd1rjvn7zm6k10fp5n6vabyxd3yl30cgrxw2i"))))
e41f8923
GLV
4732 (build-system gnu-build-system)
4733 (native-inputs
4734 `(("perl" ,perl)))
4735 (arguments
4736 `(#:make-flags (list (string-append "CC=" ,(cc-for-target))
4737 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4738 #:phases
4739 (modify-phases %standard-phases
4740 (delete 'configure))))
4741 (synopsis "Unix command line queue utility")
4742 (description
4743 "@code{nq} can create very lightweight job queue systems which require no
4744setup, maintenance, supervision, or any long-running processes.")
4745 (home-page "https://github.com/leahneukirchen/nq")
4746 (license license:public-domain)))
63fec9fd
OP
4747
4748(define-public lsofgraph
4749 (let ((commit "1d414bdc727c00a8c6cbfffc3c43128c60d6f0de")
4750 (revision "1"))
4751 (package
4752 (name "lsofgraph")
4753 (version (git-version "0.0.1" revision commit)) ;no upstream release
4754 (source (origin
4755 (method git-fetch)
4756 (uri (git-reference
4757 (url "https://github.com/zevv/lsofgraph")
4758 (commit commit)))
4759 (file-name (git-file-name name version))
4760 (sha256
4761 (base32
4762 "058x04yp6bc77hbl3qchqm7pa8f9vqfl9jryr88m8pzl7kvpif54"))))
4763 (build-system trivial-build-system)
4764 (inputs
4765 `(("lua" ,lua)))
4766 (arguments
4767 `(#:modules ((guix build utils))
4768 #:builder
4769 (begin
4770 (use-modules (guix build utils))
4771 ;; copy source
4772 (copy-recursively (assoc-ref %build-inputs "source") ".")
4773 ;; patch-shebang phase
4774 (setenv "PATH"
4775 (string-append (assoc-ref %build-inputs "lua") "/bin"
4776 ":" (getenv "PATH")))
4777 (substitute* "lsofgraph"
4778 (("#!/usr/bin/env lua")
4779 (string-append "#!" (which "lua"))))
4780 ;; install phase
4781 (install-file "lsofgraph" (string-append %output "/bin"))
4782 (let ((doc (string-append
4783 %output "/share/doc/" ,name "-" ,version)))
4784 (mkdir-p doc)
4785 (install-file "LICENSE" doc)
4786 (install-file "README.md" doc))
4787 #t)))
4788 (home-page "https://github.com/zevv/lsofgraph")
4789 (synopsis "Convert @code{lsof} output to @code{graphviz}")
4790 (description "Utility to convert @code{lsof} output to a graph showing
4791FIFO and UNIX interprocess communication.")
4792 (license license:bsd-2))))
987b50f4
SPW
4793
4794(define-public runitor
4795 (package
4796 (name "runitor")
4797 (version "0.8.0")
4798 (source
4799 (origin
4800 (method git-fetch)
4801 (uri (git-reference
4802 (url "https://github.com/bdd/runitor")
4803 (commit (string-append "v" version))))
4804 (file-name (git-file-name name version))
4805 (sha256
4806 (base32 "0vjfbyrbp5ywgzdz9j3x0qgjvnq7nw7193x8v9yy6k2cih1zsacn"))))
4807 (build-system go-build-system)
4808 (arguments
4809 `(#:unpack-path "bdd.fi/x/runitor"
4810 #:go ,go-1.17
4811 #:build-flags '(,(string-append "-ldflags=-X main.Version=" version))
4812 #:import-path "bdd.fi/x/runitor/cmd/runitor"
4813 #:install-source? #f))
4814 (home-page "https://github.com/bdd/runitor")
4815 (synopsis "Command runner with healthchecks.io integration")
4816 (description
4817 "Runitor runs the supplied command, captures its output, and based on its
4818exit code reports successful or failed execution to
4819@url{https://healthchecks.io,https://healthchecks.io} or your private instance.")
4820 (license license:bsd-0)))