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