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