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