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