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