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