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