gnu: sway: Update to 1.4
[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>
47956fa0 15;;; Copyright © 2016, 2017 ng0 <ng0@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
268ad34e 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))
11e74634
JN
1246 (add-after 'build 'set-packdir
1247 (lambda _
1248 ;; Set a default location for archived logs.
1249 (substitute* "rc/rc"
1250 (("packdir=\"\"")
1251 "packdir=\"/var/log\""))
1252 #t))
309e523e
LC
1253 (add-before 'install 'tweak-rc-weekly
1254 (lambda _
1255 (substitute* "rc/weekly"
1256 (("/bin/kill")
1257 (which "kill"))
1258 (("syslogd\\.pid")
1259 ;; The file is called 'syslog.pid' (no 'd').
1260 "syslog.pid"))
1261 #t))
8dc0ecae
LC
1262 (add-after 'install 'install-info
1263 (lambda _
cb8ba848 1264 (invoke "make" "install-info"))))))
fccf2fe0
LC
1265 (native-inputs `(("texinfo" ,texinfo)
1266 ("util-linux" ,util-linux))) ; for 'cal'
6fd52309 1267 (home-page "https://www.gnu.org/software/rottlog/")
fccf2fe0
LC
1268 (synopsis "Log rotation and management")
1269 (description
1270 "GNU Rot[t]log is a program for managing log files. It is used to
1271automatically rotate out log files when they have reached a given size or
1272according to a given schedule. It can also be used to automatically compress
1273and archive such logs. Rot[t]log will mail reports of its activity to the
1274system administrator.")
f61e0e79 1275 (license license:gpl3+)))
e1485c7b
LC
1276
1277(define-public sudo
1278 (package
1279 (name "sudo")
8031a55a 1280 (version "1.8.31p1")
e1485c7b
LC
1281 (source (origin
1282 (method url-fetch)
1283 (uri
6baa83d2 1284 (list (string-append "https://www.sudo.ws/sudo/dist/sudo-"
e1485c7b
LC
1285 version ".tar.gz")
1286 (string-append "ftp://ftp.sudo.ws/pub/sudo/OLD/sudo-"
1287 version ".tar.gz")))
1288 (sha256
1289 (base32
8031a55a 1290 "1n0mdmgcs92af34xxsnsh1arrngymhdmwd9srjgjbk65q7xzsg67"))
6b7f1b6c
MB
1291 (modules '((guix build utils)))
1292 (snippet
6cbee49d
MW
1293 '(begin
1294 (delete-file-recursively "lib/zlib")
1295 #t))))
e1485c7b
LC
1296 (build-system gnu-build-system)
1297 (arguments
0086ec73
LC
1298 `(#:configure-flags
1299 (list "--with-logpath=/var/log/sudo.log"
8e950ee9 1300 "--with-rundir=/var/run/sudo" ; must be cleaned up at boot time
0086ec73
LC
1301 "--with-vardir=/var/db/sudo"
1302 "--with-iologdir=/var/log/sudo-io"
1303
1304 ;; 'visudo.c' expects _PATH_MV to be defined, but glibc doesn't
1305 ;; provide it.
1306 (string-append "CPPFLAGS=-D_PATH_MV='\""
1307 (assoc-ref %build-inputs "coreutils")
1308 "/bin/mv\"'"))
511495fb
LC
1309
1310 ;; Avoid non-determinism; see <http://bugs.gnu.org/21918>.
1311 #:parallel-build? #f
1312
7fae2063
TGR
1313 #:phases
1314 (modify-phases %standard-phases
1315 (add-before 'configure 'pre-configure
1316 (lambda _
1317 (substitute* "src/sudo_usage.h.in"
1318 ;; Do not capture 'configure' arguments since we would
1319 ;; unduly retain references, and also because the
1320 ;; CPPFLAGS above would close the string literal
1321 ;; prematurely.
1322 (("@CONFIGURE_ARGS@") "\"\""))
1323 (substitute* (find-files "." "Makefile\\.in")
1324 (("-o [[:graph:]]+ -g [[:graph:]]+")
1325 ;; Allow installation as non-root.
1326 "")
1327 (("^install: (.*)install-sudoers(.*)" _ before after)
1328 ;; Don't try to create /etc/sudoers.
1329 (string-append "install: " before after "\n"))
1330 (("\\$\\(DESTDIR\\)\\$\\(rundir\\)")
1331 ;; Don't try to create /run/sudo.
1332 "$(TMPDIR)/dummy")
1333 (("\\$\\(DESTDIR\\)\\$\\(vardir\\)")
1334 ;; Don't try to create /var/db/sudo.
4b052c6a 1335 "$(TMPDIR)/dummy"))
cbaf756c
TGR
1336
1337 ;; ‘Checking existing [/etc/]sudoers file for syntax errors’ is
1338 ;; not the task of the build system, and fails.
1339 (substitute* "plugins/sudoers/Makefile.in"
1340 (("^pre-install:" match)
1341 (string-append match "\ndisabled-" match)))
4b052c6a 1342 #t)))
e1485c7b
LC
1343
1344 ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
1345 ;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
1346 #:tests? #f))
913c8897
VL
1347 (native-inputs
1348 `(("groff" ,groff)))
e1485c7b 1349 (inputs
913c8897 1350 `(("linux-pam" ,linux-pam)
6b7f1b6c 1351 ("zlib" ,zlib)
e1485c7b 1352 ("coreutils" ,coreutils)))
6baa83d2 1353 (home-page "https://www.sudo.ws/")
e1485c7b
LC
1354 (synopsis "Run commands as root")
1355 (description
1356 "Sudo (su \"do\") allows a system administrator to delegate authority to
1357give certain users (or groups of users) the ability to run some (or all)
1358commands as root or another user while providing an audit trail of the
1359commands and their arguments.")
1360
1361 ;; See <http://www.sudo.ws/sudo/license.html>.
f61e0e79 1362 (license license:x11)))
952298d7 1363
1ce6f43a 1364(define-public wpa-supplicant-minimal
952298d7 1365 (package
1ce6f43a 1366 (name "wpa-supplicant-minimal")
ba7ff983 1367 (version "2.9")
952298d7
LC
1368 (source (origin
1369 (method url-fetch)
1370 (uri (string-append
eeb8b0e6 1371 "https://w1.fi/releases/wpa_supplicant-"
aeb1ed1a 1372 version ".tar.gz"))
952298d7
LC
1373 (sha256
1374 (base32
ba7ff983 1375 "05qzak1mssnxcgdrafifxh9w86a4ha69qabkg4bsigk499xyxggw"))
aeb1ed1a
MB
1376 (modules '((guix build utils)))
1377 (snippet
1378 '(begin
1379 (substitute* "wpa_supplicant/defconfig"
1380 ;; Disable D-Bus to save ~14MiB on the closure size.
1381 (("^CONFIG_CTRL_IFACE_DBUS" line _)
1382 (string-append "#" line)))
1383 #t))))
952298d7
LC
1384 (build-system gnu-build-system)
1385 (arguments
dc1d3cde
KK
1386 '(#:phases
1387 (modify-phases %standard-phases
1388 (replace 'configure
1389 (lambda* (#:key outputs #:allow-other-keys)
1390 (chdir "wpa_supplicant")
1391 (copy-file "defconfig" ".config")
1392 (let ((port (open-file ".config" "al")))
1393 (display "
952298d7 1394 CONFIG_DEBUG_SYSLOG=y
40b4c6d6 1395
aeb1ed1a 1396 CONFIG_TLS=openssl
61bdd0d8 1397
952298d7
LC
1398 CONFIG_DRIVER_NL80211=y
1399 CFLAGS += $(shell pkg-config libnl-3.0 --cflags)
1400 CONFIG_LIBNL32=y
1401 CONFIG_READLINE=y\n" port)
cb8ba848
MW
1402 (close-port port))
1403 #t))
3b165f2a 1404 (add-after 'install 'install-documentation
dc1d3cde
KK
1405 (lambda* (#:key outputs #:allow-other-keys)
1406 (let* ((out (assoc-ref outputs "out"))
3b165f2a 1407 (doc (string-append out "/share/doc/wpa-supplicant"))
dc1d3cde
KK
1408 (man (string-append out "/share/man"))
1409 (man5 (string-append man "/man5"))
1410 (man8 (string-append man "/man8")))
1411 (define (copy-man-page target)
1412 (lambda (file)
1413 (install-file file target)))
1414
1415 (mkdir-p man5) (mkdir man8)
1416 (for-each (copy-man-page man5)
1417 (find-files "doc/docbook" "\\.5"))
1418 (for-each (copy-man-page man8)
1419 (find-files "doc/docbook" "\\.8"))
3b165f2a
TL
1420
1421 ;; wpa_supplicant.conf(5) does not explain all configuration
1422 ;; options but refers to the example config file, so install it
1423 ;; along with READMEs.
1424 (for-each (lambda (file)
1425 (install-file file doc))
1426 '("README" "README-DPP" "README-HS20"
1427 "README-P2P" "README-WPS"
1428 "wpa_supplicant.conf"))
dc1d3cde 1429 #t))))
952298d7
LC
1430
1431 #:make-flags (list "CC=gcc"
1432 (string-append "BINDIR=" (assoc-ref %outputs "out")
1433 "/sbin")
1434 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1435 "/lib"))
1436 #:tests? #f))
1437 (inputs
1438 `(("readline" ,readline)
1439 ("libnl" ,libnl)
aeb1ed1a 1440 ("openssl" ,openssl)))
952298d7
LC
1441 (native-inputs
1442 `(("pkg-config" ,pkg-config)))
eeb8b0e6 1443 (home-page "https://w1.fi/wpa_supplicant/")
952298d7
LC
1444 (synopsis "Connecting to WPA and WPA2-protected wireless networks")
1445 (description
1446 "wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
1447802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in
1448the client stations. It implements key negotiation with a WPA Authenticator
1449and it controls the roaming and IEEE 802.11 authentication/association of the
1450WLAN driver.
1451
36a4366d
EF
1452This package provides the @code{wpa_supplicant} daemon and the @code{wpa_cli}
1453command.")
952298d7
LC
1454
1455 ;; In practice, this is linked against Readline, which makes it GPLv3+.
107b081e
LC
1456 (license license:bsd-3)
1457
1458 (properties `((cpe-name . "wpa_supplicant")))))
c6b76405 1459
4fb7e0de 1460(define-public wpa-supplicant
1ce6f43a 1461 (package (inherit wpa-supplicant-minimal)
4fb7e0de
MW
1462 (name "wpa-supplicant")
1463 (inputs `(("dbus" ,dbus)
1ce6f43a 1464 ,@(package-inputs wpa-supplicant-minimal)))
4fb7e0de 1465 (arguments
1ce6f43a 1466 (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
4fb7e0de 1467 ((#:phases phases)
dc1d3cde
KK
1468 `(modify-phases ,phases
1469 (add-after 'configure 'configure-for-dbus
1470 (lambda _
1471 (let ((port (open-file ".config" "al")))
1472 (display "
4fb7e0de
MW
1473 CONFIG_CTRL_IFACE_DBUS_NEW=y
1474 CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
dc1d3cde
KK
1475 (close-port port))
1476 #t))
3b165f2a 1477 (add-after 'install-documentation 'install-dbus-conf
dc1d3cde
KK
1478 (lambda* (#:key outputs #:allow-other-keys)
1479 (let* ((out (assoc-ref outputs "out"))
1480 (dir (string-append out "/etc/dbus-1/system.d")))
1481 (mkdir-p dir)
1482 (copy-file "dbus/dbus-wpa_supplicant.conf"
1483 (string-append dir "/wpa_supplicant.conf")))
1484 #t))))))))
4fb7e0de 1485
050e5756
MB
1486(define-public wpa-supplicant-gui
1487 (package
1488 (inherit wpa-supplicant)
1489 (name "wpa-supplicant-gui")
1490 (inputs `(("qtbase" ,qtbase)
1491 ("qtsvg" ,qtsvg)
1492 ,@(package-inputs wpa-supplicant)))
1493 (native-inputs
1494 ;; For icons.
1495 `(("imagemagick" ,imagemagick)
1496 ("inkscape" ,inkscape)
1497 ,@(package-native-inputs wpa-supplicant)))
1498 (arguments
1499 `(#:phases (modify-phases %standard-phases
1500 (add-after 'unpack 'chdir
1501 (lambda _
1502 (chdir "wpa_supplicant/wpa_gui-qt4")
1503 #t))
1504 (delete 'configure)
1505 (replace 'build
1506 (lambda _
1507 (invoke "qmake" "wpa_gui.pro")
1508 (invoke "make" "-j" (number->string (parallel-job-count)))
1509 (invoke "make" "-C" "icons")))
1510 (replace 'install
1511 (lambda* (#:key inputs outputs #:allow-other-keys)
1512 (let ((out (assoc-ref outputs "out"))
1513 (qt '("qtbase" "qtsvg")))
050e5756
MB
1514 (install-file "wpa_gui" (string-append out "/bin"))
1515 (install-file "wpa_gui.desktop"
1516 (string-append out "/share/applications"))
1517 (copy-recursively "icons/hicolor"
1518 (string-append out "/share/icons/hicolor"))
1519 (wrap-program (string-append out "/bin/wpa_gui")
1520 `("QT_PLUGIN_PATH" ":" prefix
1521 ,(map (lambda (label)
1522 (string-append (assoc-ref inputs label)
1523 "/lib/qt5/plugins/"))
1524 qt)))
1525 #t))))))
1526 (synopsis "Graphical user interface for WPA supplicant")))
1527
56038bac
LC
1528(define-public hostapd
1529 (package
1530 (name "hostapd")
f5bfaf32 1531 (version "2.9")
56038bac
LC
1532 (source (origin
1533 (method url-fetch)
1534 (uri (string-append "https://w1.fi/releases/hostapd-" version
1535 ".tar.gz"))
1536 (sha256
1537 (base32
f5bfaf32 1538 "1mrbvg4v7vm7mknf0n29mf88k3s4a4qj6r4d51wq8hmjj1m7s7c8"))))
56038bac
LC
1539 (build-system gnu-build-system)
1540 (arguments
1541 '(#:phases
1542 (modify-phases %standard-phases
1543 (replace 'configure
1544 (lambda* (#:key outputs #:allow-other-keys)
1545 ;; This is mostly copied from 'wpa-supplicant' above.
1546 (chdir "hostapd")
1547 (copy-file "defconfig" ".config")
1548 (let ((port (open-file ".config" "al")))
1549 (display "
1550 CONFIG_LIBNL32=y
1551 CONFIG_IEEE80211R=y
1552 CONFIG_IEEE80211N=y
1553 CONFIG_IEEE80211AC=y\n" port)
1554 (close-port port))
1555 #t))
1556 (add-after 'install 'install-man-pages
1557 (lambda* (#:key outputs #:allow-other-keys)
1558 (let* ((out (assoc-ref outputs "out"))
1559 (man (string-append out "/share/man"))
1560 (man1 (string-append man "/man1"))
1561 (man8 (string-append man "/man8")))
1562 (define (copy-man-page target)
1563 (lambda (file)
1564 (install-file file target)))
1565
1566 (for-each (copy-man-page man1)
1567 (find-files "." "\\.1"))
1568 (for-each (copy-man-page man8)
1569 (find-files "." "\\.8"))
1570 #t))))
1571
1572 #:make-flags (list "CC=gcc"
1573 (string-append "BINDIR=" (assoc-ref %outputs "out")
1574 "/sbin")
1575 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1576 "/lib"))
1577 #:tests? #f))
1578 (native-inputs `(("pkg-config" ,pkg-config)))
1579
1580 ;; There's an optional dependency on SQLite.
1581 (inputs `(("openssl" ,openssl)
1582 ("libnl" ,libnl)))
1583 (home-page "https://w1.fi/hostapd/")
1584 (synopsis "Daemon for Wi-Fi access points and authentication servers")
1585 (description
1586 "hostapd is a user-space daemon for WiFi access points and authentication
1587servers. It implements IEEE 802.11 access point management, IEEE
1588802.1X/WPA/WPA2/EAP Authenticators, RADIUS client, EAP server, and RADIUS
1589authentication server.")
1590
1591 ;; Same license as wpa_supplicant.
1592 (license license:bsd-3)))
1593
c6b76405
LC
1594(define-public wakelan
1595 (package
1596 (name "wakelan")
1597 (version "1.1")
1598 (source (origin
1599 (method url-fetch)
1600 (uri (string-append
1601 "ftp://ftp.gwdg.de/pub/linux/metalab/system/network/misc/wakelan-"
1602 version ".tar.gz"))
1603 (sha256
1604 (base32
1605 "0vydqpf44146ir6k87gmqaq6xy66xhc1gkr3nsd7jj3nhy7ypx9x"))))
1606 (build-system gnu-build-system)
1607 (arguments
dc1d3cde
KK
1608 '(#:phases
1609 (modify-phases %standard-phases
1610 (replace 'configure
1611 (lambda* (#:key outputs #:allow-other-keys)
1612 (let ((out (assoc-ref outputs "out")))
1613 (mkdir-p (string-append out "/bin"))
1614 (mkdir-p (string-append out "/share/man/man1"))
1615
1616 ;; It's an old configure script that doesn't understand
1617 ;; the extra options we pass.
1618 (setenv "CONFIG_SHELL" (which "bash"))
cb8ba848
MW
1619 (invoke "./configure"
1620 (string-append "--prefix=" out)
1621 (string-append "--mandir=" out
1622 "/share/man"))))))
c6b76405 1623 #:tests? #f))
eeb8b0e6 1624 (home-page "https://www.kernel.org") ; really, no home page
c6b76405
LC
1625 (synopsis "Send a wake-on-LAN packet")
1626 (description
1627 "WakeLan broadcasts a properly formatted UDP packet across the local area
1628network, which causes enabled computers to power on.")
f61e0e79 1629 (license license:gpl2+)))
d43f4296
LC
1630
1631(define-public dmidecode
1632 (package
1633 (name "dmidecode")
31fdfc0c 1634 (version "3.2")
d43f4296
LC
1635 (source (origin
1636 (method url-fetch)
1637 (uri (string-append
1638 "mirror://savannah/dmidecode/dmidecode-"
06438b07 1639 version ".tar.xz"))
d43f4296
LC
1640 (sha256
1641 (base32
31fdfc0c 1642 "1pcfhcgs2ifdjwp7amnsr3lq95pgxpr150bjhdinvl505px0cw07"))))
d43f4296
LC
1643 (build-system gnu-build-system)
1644 (arguments
06438b07 1645 '(#:phases (modify-phases %standard-phases (delete 'configure))
d43f4296
LC
1646 #:tests? #f ; no 'check' target
1647 #:make-flags (list (string-append "prefix="
1648 (assoc-ref %outputs "out")))))
340978d7 1649 (home-page "https://www.nongnu.org/dmidecode/")
d43f4296
LC
1650 (synopsis "Read hardware information from the BIOS")
1651 (description
1652 "Dmidecode reports information about your system's hardware as described
1653in your system BIOS according to the SMBIOS/DMI standard. This typically
1654includes system manufacturer, model name, serial number, BIOS version, asset
1655tag as well as a lot of other details of varying level of interest and
1656reliability depending on the manufacturer. This will often include usage
1657status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory
1658module slots, and the list of I/O ports (e.g. serial, parallel, USB).")
f61e0e79 1659 (license license:gpl2+)))
42dc3af5 1660
13c8c2bf
MW
1661(define-public acpica
1662 (package
1663 (name "acpica")
75083257 1664 (version "20200326")
13c8c2bf
MW
1665 (source (origin
1666 (method url-fetch)
1667 (uri (string-append
1668 "https://acpica.org/sites/acpica/files/acpica-unix2-"
1669 version ".tar.gz"))
1670 (sha256
1671 (base32
75083257 1672 "0y08l6djjn87jmsp5kj0myjdb48000g20xlfs0a22jzzi383h3by"))))
13c8c2bf
MW
1673 (build-system gnu-build-system)
1674 (native-inputs `(("flex" ,flex)
1675 ("bison" ,bison)))
1676 (arguments
1677 '(#:make-flags (list (string-append "PREFIX=" %output)
4a462aa7 1678 "CC=gcc"
13c8c2bf
MW
1679 "HOST=_LINUX"
1680 "OPT_CFLAGS=-Wall -fno-strict-aliasing")
e56feffe 1681 #:tests? #f ; no 'check' target
dc1d3cde 1682 #:phases (modify-phases %standard-phases (delete 'configure))))
6c441efc 1683 (home-page "https://acpica.org/")
35b9e423 1684 (synopsis "Tools for the development and debug of ACPI tables")
13c8c2bf 1685 (description
3908546a 1686 "The ACPI Component Architecture (@dfn{ACPICA}) project provides an
13c8c2bf 1687OS-independent reference implementation of the Advanced Configuration and
3908546a
TGR
1688Power Interface Specification (@dfn{ACPI}). ACPICA code contains those portions
1689of ACPI meant to be directly integrated into the host OS as a kernel-resident
13c8c2bf
MW
1690subsystem, and a small set of tools to assist in developing and debugging ACPI
1691tables. This package contains only the user-space tools needed for ACPI table
1692development, not the kernel implementation of ACPI.")
e56feffe 1693 (license license:gpl2))) ; dual GPLv2/ACPICA Licence
4cf7bd2b 1694
bee9f97e
CB
1695(define-public s-tui
1696 (package
1697 (name "s-tui")
96d580a6 1698 (version "1.0.0")
bee9f97e
CB
1699 (source
1700 (origin
1701 (method url-fetch)
1702 (uri (pypi-uri "s-tui" version))
1703 (sha256
96d580a6 1704 (base32 "0r5yhlsi5xiy7ii1w4kqkaxz9069v5bbfwi3x3xnxhk51yjfgr8n"))))
bee9f97e
CB
1705 (build-system python-build-system)
1706 (inputs
1707 `(("python-psutil" ,python-psutil)
1708 ("python-urwid" ,python-urwid)))
1709 (home-page "https://github.com/amanusk/s-tui")
1710 (synopsis "Interactive terminal stress test and monitoring tool")
1711 (description
1712 "The Stress Terminal UI displays graphs of the CPU frequency,
1713utilization, temperature and power.")
1714 (license license:gpl2+)))
1715
4cf7bd2b
MW
1716(define-public stress
1717 (package
1718 (name "stress")
ca52937c 1719 (version "1.0.4")
4cf7bd2b
MW
1720 (source (origin
1721 (method url-fetch)
1722 (uri (string-append "mirror://debian/pool/main/s/stress/stress_"
1723 version ".orig.tar.gz"))
1724 (sha256
1725 (base32
ca52937c 1726 "0nw210jajk38m3y7h8s130ps2qsbz7j75wab07hi2r3hlz14yzh5"))))
4cf7bd2b 1727 (build-system gnu-build-system)
abf7fed5 1728 (home-page "https://packages.debian.org/sid/stress")
9e771e3b 1729 (synopsis "Impose load on and stress test a computer system")
4cf7bd2b 1730 (description
35b9e423 1731 "Stress is a tool that imposes a configurable amount of CPU, memory, I/O,
4cf7bd2b
MW
1732or disk stress on a POSIX-compliant operating system and reports any errors it
1733detects.
1734
35b9e423 1735Stress is not a benchmark. It is a tool used by system administrators to
4cf7bd2b
MW
1736evaluate how well their systems will scale, by kernel programmers to evaluate
1737perceived performance characteristics, and by systems programmers to expose
1738the classes of bugs which only or more frequently manifest themselves when the
1739system is under heavy load.")
f61e0e79 1740 (license license:gpl2+)))
b36fcf95
EB
1741
1742(define-public detox
1743 (package
1744 (name "detox")
c2d512d3 1745 (version "1.3.0")
b36fcf95 1746 (source (origin
c2d512d3
EB
1747 (method git-fetch)
1748 (uri (git-reference
1749 (url "https://github.com/dharple/detox.git")
1750 (commit (string-append "v" version))))
f1d4d79f 1751 (file-name (git-file-name name version))
b36fcf95
EB
1752 (sha256
1753 (base32
c2d512d3 1754 "1dd608c7g65s5lj02cddvani3q9kzirddgkjqa22ap9d4f8b9xgr"))))
b36fcf95 1755 (build-system gnu-build-system)
c2d512d3
EB
1756 (native-inputs
1757 `(("autoconf" ,autoconf)
1758 ("automake" ,automake)
1759 ("flex" ,flex)))
b36fcf95 1760 (arguments
c2d512d3
EB
1761 `(#:tests? #f ;no 'check' target
1762 #:phases (modify-phases %standard-phases
1763 (add-after 'unpack 'delete-configure
1764 ;; The "configure" script is present, but otherwise the
1765 ;; project is not bootstrapped: missing install-sh and
1766 ;; Makefile.in, so delete it so the bootstrap phase will
1767 ;; take over.
1768 (lambda _ (delete-file "configure") #t)))))
1769 (home-page "https://github.com/dharple/detox")
e881752c 1770 (synopsis "Clean up file names")
b36fcf95
EB
1771 (description
1772 "Detox is a program that renames files to make them easier to work with
1773under Unix and related operating systems. Spaces and various other unsafe
1774characters (such as \"$\") get replaced with \"_\". ISO 8859-1 (Latin-1)
1775characters can be replaced as well, as can UTF-8 characters.")
f61e0e79 1776 (license license:bsd-3)))
c4492a16
LC
1777
1778(define-public testdisk
1779 (package
1780 (name "testdisk")
2b336e93 1781 (version "7.1")
c4492a16
LC
1782 (source (origin
1783 (method url-fetch)
e14c06d8 1784 (uri (string-append "https://www.cgsecurity.org/testdisk-"
c4492a16
LC
1785 version ".tar.bz2"))
1786 (sha256
1787 (base32
2b336e93 1788 "1zlh44w67py416hkvw6nrfmjickc2d43v51vcli5p374d5sw84ql"))))
c4492a16
LC
1789 (build-system gnu-build-system)
1790 (inputs
d6a08ec0 1791 `(("ntfs-3g" ,ntfs-3g)
bb93042c 1792 ("util-linux" ,util-linux "lib")
cc2b77df 1793 ("openssl" ,openssl)
2b336e93 1794 ;; FIXME: add reiserfs.
f61e0e79 1795 ("zlib" ,zlib)
c4492a16 1796 ("e2fsprogs" ,e2fsprogs)
4bd428a7 1797 ("libjpeg" ,libjpeg-turbo)
c4492a16 1798 ("ncurses" ,ncurses)))
8fc46a43 1799 (home-page "https://www.cgsecurity.org/wiki/TestDisk")
c4492a16
LC
1800 (synopsis "Data recovery tool")
1801 (description
1802 "TestDisk is a program for data recovery, primarily designed to help
1803recover lost partitions and/or make non-booting disks bootable again.")
f61e0e79 1804 (license license:gpl2+)))
c4492a16 1805
15926aec
AS
1806(define-public tree
1807 (package
1808 (name "tree")
1e2ebf7c 1809 (version "1.8.0")
15926aec
AS
1810 (source (origin
1811 (method url-fetch)
1812 (uri (string-append
1813 "http://mama.indstate.edu/users/ice/tree/src/tree-"
1814 version ".tgz"))
1815 (sha256
1e2ebf7c 1816 (base32 "1hmpz6k0mr6salv0nprvm1g0rdjva1kx03bdf1scw8a38d5mspbi"))))
15926aec
AS
1817 (build-system gnu-build-system)
1818 (arguments
dc1d3cde 1819 '(#:phases (modify-phases %standard-phases (delete 'configure))
15926aec
AS
1820 #:tests? #f ; no check target
1821 #:make-flags (let ((out (assoc-ref %outputs "out")))
1822 (list (string-append "prefix=" out)))))
1823 (synopsis "Recursively list the contents of a directory")
1824 (description
1825 "Tree is a recursive directory listing command that produces a depth
1826indented listing of files, which is colorized ala dircolors if the LS_COLORS
1827environment variable is set and output is to tty.")
1828 (home-page "http://mama.indstate.edu/users/ice/tree/")
1829 (license license:gpl2+)))
1830
c2619e10
LC
1831(define-public direvent
1832 (package
1833 (name "direvent")
857ff515 1834 (version "5.2")
c2619e10
LC
1835 (source (origin
1836 (method url-fetch)
1837 (uri (string-append "mirror://gnu/direvent/direvent-"
1838 version ".tar.gz"))
1839 (sha256
1840 (base32
857ff515 1841 "0m9vi01b1km0cpknflyzsjnknbava0s1n6393b2bpjwyvb6j5613"))
c2619e10 1842 (modules '((guix build utils)))
6cbee49d
MW
1843 (snippet '(begin
1844 (substitute* "tests/testsuite"
1845 (("#![[:blank:]]?/bin/sh")
1846 "#!$SHELL"))
1847 #t))))
c2619e10
LC
1848 (build-system gnu-build-system)
1849 (arguments
dc1d3cde
KK
1850 '(#:phases
1851 (modify-phases %standard-phases
1852 (add-before 'build 'patch-/bin/sh
1853 (lambda* (#:key inputs #:allow-other-keys)
1854 ;; Use the right shell when executing the watcher and
1855 ;; user-provided shell commands.
1856 (let ((bash (assoc-ref inputs "bash")))
1857 (substitute* '("src/direvent.c" "src/progman.c")
1858 (("\"/bin/sh\"")
1859 (string-append "\"" bash "/bin/sh\"")))
1860
1861 ;; Adjust the 'shell.at' test accordingly.
1862 (substitute* "tests/testsuite"
1863 (("SHELL=/bin/sh")
1864 (string-append "SHELL=" bash "/bin/sh")))
1865
1866 #t))))))
1977e857 1867 (home-page "https://www.gnu.org.ua/software/direvent/")
c2619e10
LC
1868 (synopsis "Daemon to monitor directories for events such as file removal")
1869 (description
1870 "A daemon that monitors directories for events, such as creating,
35b9e423 1871deleting or modifying files. It can monitor different sets of directories for
c2619e10
LC
1872different events. When an event is detected, direvent calls a specified
1873external program with information about the event, such as the location
c5779c93
LC
1874within the file system where it occurred. Thus, \"direvent\" provides an
1875easy way to react immediately if given files undergo changes, for example, to
c2619e10 1876track changes in important system configuration files.")
f61e0e79 1877 (license license:gpl3+)))
da6c3749
TUBK
1878
1879(define-public libcap-ng
1880 (package
1881 (name "libcap-ng")
c692c1b7 1882 (version "0.7.10")
da6c3749
TUBK
1883 (source (origin
1884 (method url-fetch)
1885 (uri (string-append
eeb8b0e6 1886 "https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-"
da6c3749
TUBK
1887 version ".tar.gz"))
1888 (sha256
1889 (base32
c692c1b7 1890 "1gzzy12agfa9ddipdf72h9y68zqqnvsjjylv4vnq6hj4w2safk58"))))
da6c3749 1891 (build-system gnu-build-system)
dd935df2
TGR
1892 (arguments
1893 `(#:configure-flags
1894 (list "--without-python")))
4a2982a1 1895 (home-page "https://people.redhat.com/sgrubb/libcap-ng/")
da6c3749
TUBK
1896 (synopsis "Library for more easily working with POSIX capabilities")
1897 (description
1898 "The libcap-ng library is intended to make programming with POSIX
1899capabilities easier than the traditional libcap library. It includes
1900utilities that can analyse all currently running applications and print out
1901any capabilities and whether or not it has an open ended bounding set. The
1902included utilities are designed to let admins and developers spot apps from
1903various ways that may be running with too much privilege.")
1904 ;; The library is lgpl2.1+, but also ships some utils which are gpl2+.
f61e0e79 1905 (license (list license:lgpl2.1+ license:gpl2+))))
d02f2cc4
TUBK
1906
1907(define-public smartmontools
1908 (package
1909 (name "smartmontools")
d252fbb4 1910 (version "7.1")
d02f2cc4
TUBK
1911 (source (origin
1912 (method url-fetch)
1913 (uri (string-append
1914 "mirror://sourceforge/smartmontools/smartmontools/"
1915 version "/smartmontools-" version ".tar.gz"))
1916 (sha256
1917 (base32
d252fbb4 1918 "0imqb7ka4ia5573w8rnpck571pjjc9698pdjcapy9cfyk4n4swrz"))))
d02f2cc4
TUBK
1919 (build-system gnu-build-system)
1920 (inputs `(("libcap-ng" ,libcap-ng)))
51b6a1dd 1921 (home-page "https://www.smartmontools.org/")
d02f2cc4
TUBK
1922 (synopsis "S.M.A.R.T. harddisk control and monitoring tools")
1923 (description
1924 "The smartmontools package contains utility programs to control and
1925monitor storage systems using the Self-Monitoring, Analysis and Reporting
c115b2db
TGR
1926Technology System (@dfn{S.M.A.R.T.}) built into most modern ATA and SCSI hard
1927disks. In many cases, these utilities will provide advanced warning of disk
d02f2cc4 1928degradation and failure.")
f61e0e79 1929 (license license:gpl2+)))
6efd0823
RW
1930
1931(define-public fdupes
1932 (package
1933 (name "fdupes")
47d7b303 1934 (version "1.6.1")
6efd0823
RW
1935 (source
1936 (origin
9bc96d13
TGR
1937 (method git-fetch)
1938 (uri (git-reference
1939 (url "https://github.com/adrianlopezroche/fdupes.git")
1940 (commit (string-append "v" version))))
1941 (file-name (git-file-name name version))
6efd0823 1942 (sha256
9bc96d13 1943 (base32 "19b6vqblddaw8ccw4sn0qsqzbswlhrz8ia6n4m3hymvcxn8skpz9"))))
6efd0823
RW
1944 (build-system gnu-build-system)
1945 (arguments
e192a230
TGR
1946 '(#:phases (modify-phases %standard-phases
1947 (delete 'configure))
6efd0823 1948 #:tests? #f ; no 'check' target
47d7b303
TGR
1949 #:make-flags (list "CC=gcc"
1950 (string-append "PREFIX="
6efd0823
RW
1951 (assoc-ref %outputs "out")))))
1952 (home-page "https://github.com/adrianlopezroche/fdupes")
1953 (synopsis "Identify duplicate files")
1954 (description
1955 "fdupes is a program for identifying duplicate files residing within
1956specified directories.")
1957 (license license:expat)))
4ecfbda7
DT
1958
1959(define-public graphios
1960 (package
1961 (name "graphios")
1962 (version "2.0.3")
1963 (source
1964 (origin
1965 (method url-fetch)
4267aa75 1966 (uri (pypi-uri "graphios" version))
4ecfbda7
DT
1967 (sha256
1968 (base32
1969 "1h87hvc315wg6lklbf4l7csd3n5pgljwrfli1p3nasdi0izgn66i"))))
1970 (build-system python-build-system)
1971 (arguments
1972 ;; Be warned: Building with Python 3 succeeds, but the build process
1973 ;; throws a syntax error that is ignored.
1974 `(#:python ,python-2
1975 #:phases
1976 (modify-phases %standard-phases
1977 (add-before 'build 'fix-setup.py
1978 (lambda* (#:key outputs #:allow-other-keys)
1979 ;; Fix hardcoded, unprefixed file names.
1980 (let ((out (assoc-ref outputs "out")))
1981 (substitute* '("setup.py")
1982 (("/etc") (string-append out "/etc"))
1983 (("/usr") out)
1984 (("distro_ver = .*") "distro_ver = ''"))
1985 #t))))))
4ecfbda7
DT
1986 (home-page "https://github.com/shawn-sterling/graphios")
1987 (synopsis "Emit Nagios metrics to Graphite, Statsd, and Librato")
1988 (description
1989 "Graphios is a script to emit nagios perfdata to various upstream metrics
1990processing and time-series systems. It's currently compatible with Graphite,
1991Statsd, Librato and InfluxDB. Graphios can emit Nagios metrics to any number
1992of supported upstream metrics systems simultaneously.")
1993 (license license:gpl2+)))
8d801045
ED
1994
1995(define-public ansible
1996 (package
1997 (name "ansible")
830dab87 1998 (version "2.9.6")
8d801045
ED
1999 (source
2000 (origin
2001 (method url-fetch)
697e86dd 2002 (uri (pypi-uri "ansible" version))
8d801045 2003 (sha256
830dab87 2004 (base32 "1jfbp1i3nl4yvqwd5ssy43dz3pq2x03mn875vb8r56gqh43kmksr"))))
8d801045
ED
2005 (build-system python-build-system)
2006 (native-inputs
504e26ed
KB
2007 `(("python-bcrypt" ,python-bcrypt)
2008 ("python-pynacl" ,python-pynacl)
2009 ("python-httplib2" ,python-httplib2)
2010 ("python-passlib" ,python-passlib)
2011 ("python-nose" ,python-nose)
2012 ("python-mock" ,python-mock)
2013 ("python-jinja2" ,python-jinja2)
2014 ("python-pyyaml" ,python-pyyaml)
2015 ("python-paramiko" ,python-paramiko)))
8d801045 2016 (inputs
504e26ed
KB
2017 `(("python-cryptography" ,python-cryptography)
2018 ("python-jinja2" ,python-jinja2)
2019 ("python-pyyaml" ,python-pyyaml)
2020 ("python-paramiko" ,python-paramiko)))
01cb4d47
AI
2021 (arguments
2022 `(#:phases
2023 (modify-phases %standard-phases
2024 ;; Several ansible commands (ansible-config, ansible-console, etc.)
2025 ;; are just symlinks to a single ansible executable. The ansible
2026 ;; executable behaves differently based on the value of
2027 ;; sys.argv[0]. This does not work well with our wrap phase, and
2028 ;; therefore the following two phases are required as a workaround.
2029 (add-after 'unpack 'hide-wrapping
2030 (lambda _
2031 ;; Overwrite sys.argv[0] to hide the wrapper script from it.
2032 (substitute* "bin/ansible"
2033 (("import traceback" all)
2034 (string-append all "
2035import re
2036sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
2037")))
2038 #t))
ba8551ec 2039 (add-after 'install 'replace-symlinks
01cb4d47 2040 (lambda* (#:key outputs #:allow-other-keys)
ba8551ec
AI
2041 ;; Replace symlinks with duplicate copies of the ansible
2042 ;; executable.
01cb4d47
AI
2043 (let ((out (assoc-ref outputs "out")))
2044 (for-each
2045 (lambda (subprogram)
ba8551ec
AI
2046 (delete-file (string-append out "/bin/ansible-" subprogram))
2047 (copy-file (string-append out "/bin/ansible")
2048 (string-append out "/bin/ansible-" subprogram)))
01cb4d47
AI
2049 (list "config" "console" "doc" "galaxy"
2050 "inventory" "playbook" "pull" "vault")))
2051 #t)))))
ff18d0f1 2052 (home-page "https://www.ansible.com/")
8d801045
ED
2053 (synopsis "Radically simple IT automation")
2054 (description "Ansible is a radically simple IT automation system. It
e22473ff
TGR
2055handles configuration management, application deployment, cloud provisioning,
2056ad hoc task execution, and multinode orchestration---including trivializing
2057things like zero-downtime rolling updates with load balancers.")
8d801045 2058 (license license:gpl3+)))
44157e9f 2059
6eb1d20b
HG
2060(define-public debops
2061 (package
2062 (name "debops")
2063 (version "1.1.0")
2064 (source
2065 (origin
2066 (method git-fetch)
2067 (uri (git-reference
2068 (url "https://github.com/debops/debops")
2069 (commit (string-append "v" version))))
2070 (file-name (git-file-name name version))
2071 (sha256
2072 (base32 "052b2dykdn35pdpn9s4prawl6nl6yzih8nyf54hpvhpisvjrm1v5"))
2073 (patches
2074 (search-patches "debops-constants-for-external-program-names.patch"
2075 "debops-debops-defaults-fall-back-to-less.patch"))))
2076 (build-system python-build-system)
2077 (native-inputs
2078 `(("git" ,git)))
2079 (inputs
2080 `(("ansible" ,ansible)
2081 ("encfs" ,encfs)
2082 ("fuse" ,fuse)
2083 ("util-linux" ,util-linux) ;; for umount
2084 ("findutils" ,findutils)
2085 ("gnupg" ,gnupg)
2086 ("which" ,which)))
2087 (propagated-inputs
2088 `(("python-future" ,python-future)
2089 ("python-distro" ,python-distro)))
2090 (arguments
2091 `(#:tests? #f
2092 #:phases
2093 (modify-phases %standard-phases
2094 (add-after 'unpack 'nuke-debops-update
2095 (lambda _
2096 (chmod "bin/debops-update" #o755) ; FIXME work-around git-fetch issue
2097 (with-output-to-file "bin/debops-update"
2098 (lambda ()
2099 (format #t "#!/bin/sh
2100echo 'debops is installed via guix. guix-update is useless in this case.
2101Please use `guix package -u debops` instead.'")))
2102 #t))
2103 ;; patch shebangs only in actuall scripts, not in files included in
2104 ;; roles (which are to be delivered to the targte systems)
2105 (delete `patch-generated-file-shebangs)
2106 (replace 'patch-source-shebangs
2107 (lambda _
2108 (for-each patch-shebang
2109 (find-files "bin"
2110 (lambda (file stat)
2111 ;; Filter out symlinks.
2112 (eq? 'regular (stat:type stat)))
2113 #:stat lstat))))
2114 (add-after 'unpack 'fix-paths
2115 (lambda _
2116 (define (substitute-program-names file)
2117 ;; e.g. ANSIBLE_PLAYBOOK = '/gnu/store/…/bin/ansible-playbook'
2118 (for-each
2119 (lambda (name)
2120 (let ((varname (string-upcase
2121 (string-map
2122 (lambda (c) (if (char=? c #\-) #\_ c))
2123 name))))
2124 (substitute* file
2125 (((string-append "^(" varname " = )'.*'") line prefix)
2126 (string-append prefix "'" (which name) "'")))))
2127 '("ansible-playbook" "encfs" "find" "fusermount"
2128 "umount" "gpg" "ansible" "which")))
2129 (for-each substitute-program-names
2130 '("bin/debops"
2131 "bin/debops-padlock"
2132 "bin/debops-task"
2133 "debops/__init__.py"
2134 "debops/cmds/__init__.py"))
2135 #t)))))
2136 (home-page "https://www.debops.org/")
2137 (synopsis "Collection of general-purpose Ansible roles")
2138 (description "The Ansible roles provided by that can be used to manage
2139Debian or Ubuntu hosts. In addition, a default set of Ansible playbooks can
2140be used to apply the provided roles in a controlled way, using Ansible
2141inventory groups.
2142
2143The roles are written with a high customization in mind, which can be done
2144using Ansible inventory. This way the role and playbook code can be shared
2145between multiple environments, with different configuration in to each one.
2146
2147Services can be managed on a single host, or spread between multiple hosts.
2148DebOps provides support for different SQL and NoSQL databases, web servers,
2149programming languages and specialized applications useful in a data center
2150environment or in a cluster. The project can also be used to deploy
2151virtualization environments using KVM/libvirt, Docker or LXC technologies to
2152manage virtual machines and/or containers.")
2153 (license license:gpl3+)))
2154
2b6164f0
OP
2155(define-public emacs-ansible-doc
2156 (let ((commit "86083a7bb2ed0468ca64e52076b06441a2f8e9e0"))
2157 (package
2158 (name "emacs-ansible-doc")
2159 (version (git-version "0.4" "1" commit))
2160 (source
2161 (origin
2162 (method git-fetch)
2163 (uri (git-reference
2164 (url "https://github.com/lunaryorn/ansible-doc.el")
2165 (commit commit)))
2166 (file-name (git-file-name name version))
2167 (sha256
2168 (base32
2169 "0lap404ch74w99n3xip176jr42b38xhyzkfnkyqg0g3wk2cd3aq8"))))
2170 (build-system emacs-build-system)
2171 ;; Unmaintained by upstream.
2172 (home-page "https://github.com/lunaryorn/ansible-doc.el")
2173 (synopsis "Ansible documentation for Emacs")
2174 (description
2175 "This package provides an Ansible documentation for GNU Emacs.
2176
2177@code{ansible-doc} allows you to view the documentation of an Ansible
2178module and @code{ansible-doc-mode} minor mode adds documentation
2179lookup to YAML Mode. You could enable the mode with @code{(add-hook
2180'yaml-mode-hook #'ansible-doc-mode)}.")
2181 (license license:gpl3+))))
2182
44157e9f
EB
2183(define-public cpulimit
2184 (package
2185 (name "cpulimit")
2186 (version "0.2")
2187 (source
2188 (origin
aa372292
TGR
2189 (method git-fetch)
2190 (uri (git-reference
2191 (url "https://github.com/opsengine/cpulimit.git")
2192 (commit (string-append "v" version))))
2193 (file-name (git-file-name name version))
44157e9f 2194 (sha256
aa372292 2195 (base32 "1dz045yhcsw1rdamzpz4bk8mw888in7fyqk1q1b3m1yk4pd1ahkh"))))
44157e9f
EB
2196 (build-system gnu-build-system)
2197 (arguments
2198 `(#:phases (modify-phases %standard-phases
2199 (delete 'configure)
cb8ba848
MW
2200 (replace 'build
2201 (lambda _
2202 (invoke "make" "CC=gcc" "-Csrc")))
2203 (replace 'check
2204 (lambda _
2205 (invoke "make" "CC=gcc" "-Ctests")))
2206 (replace 'install
2207 (lambda* (#:key outputs #:allow-other-keys)
2208 (let* ((out (assoc-ref outputs "out"))
2209 (bin (string-append out "/bin")))
2210 (install-file "src/cpulimit" bin))
2211 #t)))))
44157e9f
EB
2212 (home-page "https://github.com/opsengine/cpulimit")
2213 (synopsis "Limit CPU usage")
2214 (description
2215 "Cpulimit limits the CPU usage of a process. It does not change the nice
2216value or other scheduling priority settings, but the real CPU usage, and is
2217able to adapt itself dynamically to the overall system load. Children
2218processes and threads of the specified process may optionally share the same
2219limits.")
2220 (license license:gpl2+)))
2328b47c
EB
2221
2222(define-public autojump
2223 (package
2224 (name "autojump")
0e684357 2225 (version "22.5.3")
2328b47c
EB
2226 (source
2227 (origin
24d459ce
TGR
2228 (method git-fetch)
2229 (uri (git-reference
2230 (url "https://github.com/wting/autojump.git")
2231 (commit (string-append "release-v" version))))
2232 (file-name (git-file-name name version))
2328b47c 2233 (sha256
0e684357 2234 (base32 "1rgpsh70manr2dydna9da4x7p8ahii7dgdgwir5fka340n1wrcws"))))
2328b47c 2235 (build-system gnu-build-system)
24d459ce 2236 (native-inputs ; for tests
2328b47c
EB
2237 `(("python-mock" ,python-mock)
2238 ("python-pytest" ,python-pytest)))
2239 (inputs
2240 `(("python" ,python-wrapper)))
2241 (arguments
eb9dda9c
KK
2242 `(#:phases
2243 (modify-phases %standard-phases
24d459ce
TGR
2244 (add-after 'unpack 'make-git-checkout-writable
2245 ;; ‘install.py’ modifies files before installing them.
2246 (lambda _
2247 (for-each make-file-writable (find-files "."))
2248 #t))
eb9dda9c
KK
2249 (delete 'configure)
2250 (delete 'build)
2251 (replace 'check
2252 (lambda _
2253 (invoke "python" "tests/unit/autojump_utils_test.py")))
2254 (replace 'install
2255 (lambda* (#:key outputs #:allow-other-keys)
2256 (setenv "SHELL" (which "bash"))
2257 (invoke "python" "install.py"
2258 (string-append "--destdir="
2259 (assoc-ref outputs "out"))))))))
2328b47c 2260 (home-page "https://github.com/wting/autojump")
8f65585b 2261 (synopsis "Shell extension for file system navigation")
2328b47c 2262 (description
8f65585b 2263 "Autojump provides a faster way to navigate your file system, with a \"cd
2328b47c
EB
2264command that learns\". It works by maintaining a database of the directories
2265you use the most from the command line and allows you to \"jump\" to
2266frequently used directories by typing only a small pattern.")
2267 (license license:gpl3+)))
765973cd 2268
1ca0ac1e
EB
2269(define-public fasd
2270 (package
2271 (name "fasd")
2272 (version "1.0.1")
2273 (source (origin
2274 (method git-fetch)
2275 (uri (git-reference
2276 (url "https://github.com/clvv/fasd.git")
2277 (commit version)))
2278 (file-name (git-file-name name version))
2279 (sha256
2280 (base32
2281 "1awi71jdv3mhjrmar2d4z1i90kn7apd7aq1w31sh6w4yibz9kiyj"))))
2282 (build-system gnu-build-system)
2283 (arguments
2284 `(#:phases (modify-phases %standard-phases
2285 (delete 'configure)) ;no configuration
2286 #:tests? #f ;no tests
2287 #:make-flags (list (string-append "PREFIX=" %output))))
2288 (home-page "https://github.com/clvv/fasd")
2289 (synopsis "Quick access to files and directories for shells")
2290 (description
2291 "Fasd (pronounced similar to \"fast\") is a command-line productivity
2292booster. Fasd offers quick access to files and directories for POSIX shells.
2293It is inspired by tools like autojump, z, and v. Fasd keeps track of files
2294and directories you have accessed so that you can quickly reference them in
2295the command line.")
2296 (license license:x11)))
2297
765973cd
LF
2298(define-public iftop
2299 (package
2300 (name "iftop")
2301 (version "1.0pre4")
2302 (source (origin
2303 (method url-fetch)
2304 (uri (string-append "http://www.ex-parrot.com/~pdw/iftop/download"
2305 "/iftop-" version ".tar.gz"))
2306 (sha256
2307 (base32
2308 "15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp"))))
2309 (build-system gnu-build-system)
2310 (inputs
2311 `(("libpcap" ,libpcap)
2312 ("ncurses" ,ncurses)))
2313 (synopsis "Monitor network usage")
2314 (description "Iftop does for network usage what @command{top} does
2315for CPU usage. It listens to network traffic on a named interface and
2316displays a table of current bandwidth usage by pairs of hosts.")
2317 (home-page "http://www.ex-parrot.com/~pdw/iftop/")
d4e21fbb 2318 (license license:gpl2+)))
f1957fc1
PP
2319
2320(define-public munge
2321 (package
2322 (name "munge")
5ee0e013 2323 (version "0.5.14")
f1957fc1
PP
2324 (source (origin
2325 (method url-fetch)
b52ae4de
EF
2326 (uri (string-append "https://github.com/dun/munge/releases/"
2327 "download/munge-" version "/munge-"
2328 version ".tar.xz"))
f1957fc1
PP
2329 (sha256
2330 (base32
5ee0e013 2331 "0h06sghb4rqvv1ywyd6mzsmbcgh712v6ygrff0gzm440y4ca41k6"))
8d080506
LC
2332 (modules '((guix build utils)))
2333 (snippet
2334 '(begin
2335 ;; Don't insist on write access to /var.
2336 (substitute* "src/etc/Makefile.in"
2337 (("\\$\\(INSTALL\\)(.*)localstatedir" _ middle)
5ee0e013
TGR
2338 (string-append "-$(INSTALL)" middle "localstatedir"))
2339 (("\\$\\(MKDIR_P\\) .*(local|run)statedir.*")
2340 ""))
8d080506 2341 #t))))
f1957fc1
PP
2342 (inputs
2343 `(("openssl" ,openssl)
2344 ("libgcrypt" ,libgcrypt)))
2345 (build-system gnu-build-system)
5ee0e013
TGR
2346 (arguments
2347 '(#:configure-flags
2348 (list "--localstatedir=/var"
2349 (string-append "--with-pkgconfigdir="
2350 (assoc-ref %outputs "out") "/lib/pkgconfig"))
2351 #:phases
2352 (modify-phases %standard-phases
2353 ;; XXX Many test series fail. Some might be fixable, others do no-no
2354 ;; things like invoking ‘sudo’.
2355 (add-after 'unpack 'skip-failing-tests
2356 (lambda _
2357 (for-each (lambda (test)
2358 (substitute* "t/Makefile.in"
2359 (((string-append test "\\.t ")) "")))
2360 (list "0100-munged-lock"
2361 "0010-basic"
2362 "0011-munged-cmdline"
2363 "0012-munge-cmdline"
2364 "0013-unmunge-cmdline"
2365 "0101-munged-security-socket"
2366 "0102-munged-security-keyfile"
2367 "0103-munged-security-logfile"
2368 "0110-munged-origin-addr"))
2369 #t)))))
b52ae4de 2370 (home-page "https://dun.github.io/munge/")
f1957fc1
PP
2371 (synopsis "Cluster computing authentication service")
2372 (description
2373 "Munge is an authentication service for creating and validating
2374credentials. It allows a process to authenticate the UID and GID of another
2375local or remote process within a group of hosts having common users and
2376groups. These hosts form a security realm that is defined by a shared
2377cryptographic key. Clients within this security realm can create and validate
2378credentials without the use of root privileges, reserved ports, or
2379platform-specific methods.")
2380 (license license:gpl3+)))
3d7a157c
RW
2381
2382(define-public audit
2383 (package
2384 (name "audit")
00f81f83 2385 (home-page "https://people.redhat.com/sgrubb/audit/")
b4e1f1ae 2386 (version "2.8.5")
3d7a157c
RW
2387 (source (origin
2388 (method url-fetch)
fe2f0166 2389 (uri (string-append home-page "audit-" version ".tar.gz"))
3d7a157c
RW
2390 (sha256
2391 (base32
b4e1f1ae 2392 "1dzcwb2q78q7x41shcachn7f4aksxbxd470yk38zh03fch1l2p8f"))))
3d7a157c 2393 (build-system gnu-build-system)
3d7a157c 2394 (arguments
8938b369
MB
2395 `(#:configure-flags (list "--with-python=no"
2396 "--disable-static")))
3d7a157c
RW
2397 (inputs
2398 `(("openldap" ,openldap)
1bafad56 2399 ("gnutls" ,gnutls)
3d7a157c
RW
2400 ("sasl" ,cyrus-sasl)))
2401 (synopsis "User-space component to the Linux auditing system")
2402 (description
2403 "auditd is the user-space component to the Linux auditing system, which
2404allows logging of system calls made by user-land processes. It's responsible
2405for writing audit records to the disk. Viewing the logs is done with the
2406@code{ausearch} or @code{aureport} utilities. Configuring the audit rules is
2407done with the @code{auditctl} utility.")
2408 (license license:gpl2+)))
d0457553
TUBK
2409
2410(define-public nmap
2411 (package
2412 (name "nmap")
8895b2e0 2413 (version "7.80")
d0457553
TUBK
2414 (source (origin
2415 (method url-fetch)
2416 (uri (string-append "https://nmap.org/dist/nmap-" version
2417 ".tar.bz2"))
2418 (sha256
2419 (base32
8895b2e0 2420 "1aizfys6l9f9grm82bk878w56mg0zpkfns3spzj157h98875mypw"))
d0457553
TUBK
2421 (modules '((guix build utils)))
2422 (snippet
6cbee49d
MW
2423 '(begin
2424 (for-each delete-file-recursively
2425 ;; Remove bundled lua, pcap, and pcre libraries.
2426 ;; FIXME: Remove bundled liblinear once packaged.
2427 '("liblua"
2428 "libpcap"
2429 "libpcre"
2430 ;; Remove pre-compiled binares.
2431 "mswin32"))
2432 #t))))
d0457553
TUBK
2433 (build-system gnu-build-system)
2434 (inputs
2435 `(("openssl" ,openssl)
2436 ("libpcap" ,libpcap)
2437 ("pcre" ,pcre)
2438 ("lua" ,lua)
069d0b7f
MB
2439 ("zlib" ,zlib) ;for NSE compression support
2440
d0457553
TUBK
2441 ;; For 'ndiff'.
2442 ("python" ,python-2)))
2443
2444 ;; TODO Add zenmap output.
2445 (outputs '("out" "ndiff"))
2446 (arguments
cc729d25 2447 `(#:configure-flags '("--without-zenmap")
d0457553
TUBK
2448 #:phases
2449 (modify-phases %standard-phases
f4dc22bc
MB
2450 (add-after 'configure 'patch-Makefile
2451 (lambda _
2452 (substitute* "Makefile"
2453 ;; Do not attempt to build lua.
2454 (("build-dnet build-lua") "build-dnet"))
2455 #t))
d0457553
TUBK
2456 (replace 'install
2457 (lambda* (#:key outputs #:allow-other-keys)
2458 (define (make out . args)
cb8ba848
MW
2459 (apply invoke "make"
2460 (string-append "prefix=" out)
2461 args))
d0457553 2462 (define (python-path dir)
cc729d25
EF
2463 (string-append dir "/lib/python"
2464 ,(version-major+minor
2465 (package-version python))
2466 "/site-packages"))
d0457553
TUBK
2467 (let ((out (assoc-ref outputs "out"))
2468 (ndiff (assoc-ref outputs "ndiff")))
2469 (for-each mkdir-p (list out ndiff))
2470 (make out
2471 "install-nmap"
2472 "install-nse"
2473 "install-ncat"
2474 "install-nping")
2475 (make ndiff "install-ndiff")
2476 (wrap-program (string-append ndiff "/bin/ndiff")
2477 `("PYTHONPATH" prefix
cb8ba848
MW
2478 (,(python-path ndiff)))))
2479 #t))
d0457553
TUBK
2480 ;; These are the tests that do not require network access.
2481 (replace 'check
cb8ba848
MW
2482 (lambda _ (invoke "make"
2483 "check-nse"
2484 "check-ndiff"
2485 "check-dns"))))
d0457553
TUBK
2486 ;; Nmap can't cope with out-of-source building.
2487 #:out-of-source? #f))
2488 (home-page "https://nmap.org/")
2489 (synopsis "Network discovery and security auditing tool")
2490 (description
2491 "Nmap (\"Network Mapper\") is a network discovery and security auditing
2492tool. It is also useful for tasks such as network inventory, managing service
2493upgrade schedules, and monitoring host or service uptime. It also provides an
2494advanced netcat implementation (ncat), a utility for comparing scan
2495results (ndiff), and a packet generation and response analysis tool (nping).")
2496 ;; This package uses nmap's bundled versions of libdnet and liblinear, which
2497 ;; both use a 3-clause BSD license.
2498 (license (list license:nmap license:bsd-3))))
1a0346f0
P
2499
2500(define-public dstat
2501 (package
2502 (name "dstat")
ad20da2e 2503 (version "0.7.4")
fc204d24
TGR
2504 (source
2505 (origin
2506 (method git-fetch)
2507 (uri (git-reference
2508 (url "https://github.com/dagwieers/dstat.git")
ad20da2e 2509 (commit (string-append "v" version))))
fc204d24
TGR
2510 (file-name (git-file-name "dstat" version))
2511 (sha256
10a32973
TGR
2512 (base32 "1qnmkhqmjd1m3if05jj29dvr5hn6kayq9bkkkh881w472c0zhp8v"))
2513 (patches (search-patches "dstat-fix-crash-when-specifying-delay.patch"
2514 "dstat-skip-devices-without-io.patch"))))
1a0346f0
P
2515 (build-system gnu-build-system)
2516 (arguments
fc204d24 2517 `(#:tests? #f ; no make check
1a0346f0
P
2518 #:make-flags (let ((out (assoc-ref %outputs "out")))
2519 (list (string-append "DESTDIR=" out)
2520 "prefix=/"))
5cc5364e
TGR
2521 #:phases
2522 (modify-phases %standard-phases
fa67073f
TGR
2523 (add-after 'unpack 'fix-python3-DeprecationWarning
2524 (lambda _
2525 (substitute* "dstat"
2526 (("collections") "collections.abc"))
2527 #t))
5cc5364e
TGR
2528 (delete 'configure) ; no configure script
2529 (add-after 'install 'wrap
2530 (lambda* (#:key outputs #:allow-other-keys)
2531 (let ((out (assoc-ref outputs "out")))
2532 (wrap-program (string-append out "/bin/dstat")
2533 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
2534 #t))))))
2535 (inputs
5cc5364e
TGR
2536 `(("python" ,python-wrapper)
2537 ("python-six" ,python-six)))
1a0346f0
P
2538 (synopsis "Versatile resource statistics tool")
2539 (description "Dstat is a versatile replacement for @command{vmstat},
2540@command{iostat}, @command{netstat}, and @command{ifstat}. Dstat overcomes
2541some of their limitations and adds some extra features, more counters and
2542flexibility. Dstat is handy for monitoring systems during performance tuning
2543tests, benchmarks or troubleshooting.
2544
2545Dstat allows you to view all of your system resources in real-time, you can,
2546e.g., compare disk utilization in combination with interrupts from your IDE
2547controller, or compare the network bandwidth numbers directly with the disk
2548throughput (in the same interval).")
2549 (home-page "http://dag.wiee.rs/home-made/dstat/")
c59f62e9 2550 (license license:gpl2+)))
0405e5f4
EB
2551
2552(define-public thefuck
2553 (package
2554 (name "thefuck")
a48cf78a 2555 (version "3.30")
a0c693e1
TGR
2556 (source
2557 (origin
2558 (method git-fetch)
2559 (uri (git-reference
2560 (url "https://github.com/nvbn/thefuck.git")
2561 (commit version)))
2562 (file-name (git-file-name name version))
2563 (sha256
a48cf78a 2564 (base32 "0fnf78956pwhb9cgv1jmgypnkma5xzflkivfrkfiadbgin848yfg"))
a0c693e1 2565 (patches (search-patches "thefuck-test-environ.patch"))))
0405e5f4 2566 (build-system python-build-system)
1c1b67a3 2567 (arguments
bf5b6fb2
EB
2568 '(#:phases
2569 (modify-phases %standard-phases
2570 (delete 'check)
2571 (add-after 'install 'check
2572 (lambda* (#:key inputs outputs #:allow-other-keys)
2573 ;; Tests look for installed package
2574 (add-installed-pythonpath inputs outputs)
2575 ;; Some tests need write access to $HOME.
2576 (setenv "HOME" "/tmp")
2216b6f4
TGR
2577 (invoke "py.test" "-v")
2578 #t)))))
1c1b67a3 2579 (propagated-inputs
0405e5f4
EB
2580 `(("python-colorama" ,python-colorama)
2581 ("python-decorator" ,python-decorator)
2582 ("python-psutil" ,python-psutil)
2468ca04 2583 ("python-pyte" ,python-pyte)
0405e5f4 2584 ("python-six" ,python-six)))
2d1ac1d1 2585 (native-inputs
a48cf78a
TGR
2586 `(("go" ,go)
2587 ("python-mock" ,python-mock)
1c1b67a3 2588 ("python-pytest" ,python-pytest)
2468ca04 2589 ("python-pytest-mock" ,python-pytest-mock)))
0405e5f4
EB
2590 (home-page "https://github.com/nvbn/thefuck")
2591 (synopsis "Correct mistyped console command")
2592 (description
2593 "The Fuck tries to match a rule for a previous, mistyped command, creates
2594a new command using the matched rule, and runs it.")
2595 (license license:x11)))
61402398
JF
2596
2597(define-public di
2598 (package
2599 (name "di")
1a665022 2600 (version "4.47.3")
61402398
JF
2601 (source
2602 (origin
2603 (method url-fetch)
2604 (uri (string-append "https://gentoo.com/di/di-" version ".tar.gz"))
2605 (sha256
1a665022 2606 (base32 "0m4npba50sf5s61g5z3xd2r7937zwja941f2h3f081xi24c2hfck"))))
61402398
JF
2607 (build-system gnu-build-system)
2608 (arguments
ad9baf38 2609 `(#:tests? #f ; obscure test failures
61402398
JF
2610 #:phases
2611 (modify-phases %standard-phases
ad9baf38 2612 (delete 'configure) ; no configure script
61402398
JF
2613 (add-before 'build 'setup-environment
2614 (lambda* (#:key outputs #:allow-other-keys)
2615 (setenv "CC" "gcc")
2616 (setenv "prefix" (assoc-ref outputs "out"))
2617 #t)))
2618 #:make-flags (list "--environment-overrides")))
f76c16d2 2619 (home-page "https://gentoo.com/di/")
61402398
JF
2620 (synopsis "Advanced df like disk information utility")
2621 (description
36a4366d 2622 "@code{di} is a disk information utility, displaying everything that your
26c6de8b
TGR
2623@code{df} command does and more. It features the ability to display your disk
2624usage in whatever format you prefer. It is designed to be highly portable and
2625produce uniform output across heterogeneous networks.")
61402398 2626 (license license:zlib)))
5ec8b02d 2627
2628(define-public cbatticon
2629 (package
2630 (name "cbatticon")
50db7df4 2631 (version "1.6.10")
d8d910e6
TGR
2632 (source
2633 (origin
2634 (method git-fetch)
2635 (uri (git-reference
2636 (url "https://github.com/valr/cbatticon.git")
2637 (commit version)))
2638 (sha256
50db7df4 2639 (base32 "0ivm2dzhsa9ir25ry418r2qg2llby9j7a6m3arbvq5c3kaj8m9jr"))
d8d910e6 2640 (file-name (git-file-name name version))))
5ec8b02d 2641 (build-system gnu-build-system)
2642 (arguments
d8d910e6 2643 `(#:tests? #f ; no tests
5ec8b02d 2644 #:make-flags
2645 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2646 "CC=gcc")
2647 #:phases
2648 (modify-phases %standard-phases
d8d910e6 2649 (delete 'configure)))) ; no configure script
5ec8b02d 2650 (inputs
2651 `(("gtk+" ,gtk+)
b94a6ca0 2652 ("gettext" ,gettext-minimal)
5ec8b02d 2653 ("libnotify" ,libnotify)))
2654 (native-inputs
2655 `(("pkg-config" ,pkg-config)))
2656 (synopsis "Lightweight battery icon for the system tray")
2657 (description "cbatticon is a lightweight battery icon that displays
2658the status of your battery in the system tray.")
2659 (home-page "https://github.com/valr/cbatticon")
2660 (license license:gpl2+)))
c08533b2 2661
2662(define-public interrobang
2663 (let ((revision "1")
2664 (commit "896543735e1c99144765fdbd7b6e6b5afbd8b881"))
2665 (package
2666 (name "interrobang")
807a3099
TGR
2667 (version (git-version "0.0.0" revision commit))
2668 (source
2669 (origin
2670 (method git-fetch)
2671 (uri (git-reference
2672 (url "https://github.com/TrilbyWhite/interrobang.git")
2673 (commit commit)))
2674 (file-name (git-file-name name version))
2675 (sha256
2676 (base32 "1n13m70p1hfba5dy3i8hfclbr6k9q3d9dai3dg4jvhdhmxcpjzdf"))))
c08533b2 2677 (build-system gnu-build-system)
2678 (arguments
807a3099 2679 `(#:tests? #f ; no tests
c08533b2 2680 #:phases
2681 (modify-phases %standard-phases
807a3099 2682 (delete 'configure)) ; no configure script
c08533b2 2683 #:make-flags (list (string-append "PREFIX="
2684 (assoc-ref %outputs "out")))))
2685 (inputs
2686 `(("libx11" ,libx11)))
2687 (native-inputs
2688 `(("pkg-config" ,pkg-config)))
2689 (synopsis "Scriptable launcher menu")
2690 (description "Interrobang is a scriptable launcher menu with a customizable
2691shortcut syntax and completion options.")
2692 (home-page "https://github.com/TrilbyWhite/interrobang")
2693 (license license:gpl3+))))
94c5dc8c 2694
94c5dc8c
JD
2695(define-public pam-krb5
2696 (package
2697 (name "pam-krb5")
0e6c242b 2698 (version "4.8")
94c5dc8c
JD
2699 (source (origin
2700 (method url-fetch)
2701 (uri (string-append
ab213bfd
TGR
2702 "https://archives.eyrie.org/software/kerberos/"
2703 "pam-krb5-" version ".tar.xz"))
653a51cb 2704 (patches (search-patches "pam-krb5-CVE-2020-10595.patch"))
94c5dc8c
JD
2705 (sha256
2706 (base32
0e6c242b 2707 "1qjp8i1s9bz7g6kiqrkzzkxn5pfspa4sy53b6z40fqmdf9przdfb"))))
94c5dc8c
JD
2708 (build-system gnu-build-system)
2709 (arguments
2710 `(#:phases
2711 (modify-phases %standard-phases
2712 (add-before 'configure 'disable-tests
2713 (lambda _
2714 ;; The build container seems to interfere with some tests.
2715 (substitute* "tests/TESTS"
2716 (("module/basic\n") ""))
2717 (substitute* "tests/TESTS"
2718 (("pam-util/vector\n") ""))
2719 #t)))))
2720 (inputs
2721 `(("linux-pam" ,linux-pam)
2722 ("mit-krb5" ,mit-krb5)))
2723 (native-inputs
2724 `(("perl" ,perl)
2725 ("perl-test-pod" ,perl-test-pod))) ; required for tests
2726 (synopsis "Kerberos PAM module")
2727 (description
2728 "Pam-krb5 is a Kerberos PAM module for either MIT Kerberos or Heimdal.
2729It supports ticket refreshing by screen savers, configurable
2730authorization handling, authentication of non-local accounts for network
2731services, password changing, and password expiration, as well as all the
2732standard expected PAM features. It works correctly with OpenSSH, even
45298300
TGR
2733with @code{ChallengeResponseAuthentication} and @code{PrivilegeSeparation}
2734enabled, and supports extensive configuration either by PAM options or in
94c5dc8c
JD
2735krb5.conf or both. PKINIT is supported with recent versions of both MIT
2736Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.")
eeb8b0e6 2737 (home-page "https://www.eyrie.org/~eagle/software/pam-krb5")
94c5dc8c
JD
2738 ;; Dual licenced under a homebrew non-copyleft OR GPL (any version)
2739 ;; However, the tarball does not contain a copy of the GPL, so unless
2740 ;; we put one in, we cannot distribute it under GPL without violating
2741 ;; clause requiring us to give all recipients a copy.
2742 (license license:gpl1+)))
2743
208e7434 2744(define (sunxi-tools-source version)
b04ca7a1 2745 (origin
43eb601f
TGR
2746 (method git-fetch)
2747 (uri (git-reference
2748 (url "https://github.com/linux-sunxi/sunxi-tools.git")
2749 (commit (string-append "v" version))))
b04ca7a1 2750 (sha256
43eb601f 2751 (base32 "04f3jqg8ww4jxsf9c6ddcdgy2xbhkyp0b3l5f1hvvbv94p81rjxd"))
b04ca7a1
DM
2752 (modules '((guix build utils)))
2753 (snippet
2754 ;; Remove binaries contained in the tarball which are only for the
2755 ;; target and can be regenerated anyway.
6cbee49d
MW
2756 '(begin
2757 (delete-file-recursively "bin")
2758 #t))
208e7434
DM
2759 (file-name (git-file-name "sunxi-tools" version))))
2760
2761(define sunxi-target-tools
2762 (package
2763 (name "sunxi-target-tools")
2764 (version "1.4.2")
2765 (build-system gnu-build-system)
2766 (source
2767 (sunxi-tools-source version))
2768 (arguments
2769 `(#:system "armhf-linux"
2770 #:tests? #f
2771 #:make-flags (list (string-append "PREFIX="
2772 (assoc-ref %outputs "out"))
2773 (string-append "CROSS_COMPILE=")
2774 "CC=gcc")
2775 #:phases
2776 (modify-phases %standard-phases
2777 (delete 'configure)
2778 (replace 'build
2779 (lambda* (#:key make-flags #:allow-other-keys)
2780 (apply invoke "make" "target-tools" make-flags)))
2781 (replace 'install
2782 (lambda* (#:key make-flags #:allow-other-keys)
2783 (apply invoke "make" "install-target-tools"
2784 make-flags))))))
2785 (home-page "https://github.com/linux-sunxi/sunxi-tools")
2786 (synopsis "Hardware management tools for Allwinner computers")
2787 (description "This package contains tools for Allwinner devices:
2788@enumerate
2789@item @command{sunxi-meminfo}: Prints memory bus settings.
2790@end enumerate")
2791 (license license:gpl2+)))
2792
2793(define-public sunxi-tools
2794 (package
2795 (name "sunxi-tools")
2796 (version "1.4.2")
2797 (source
2798 (sunxi-tools-source version))
b04ca7a1 2799 (native-inputs
208e7434
DM
2800 `(("sunxi-target-tools" ,sunxi-target-tools)
2801 ("pkg-config" ,pkg-config)))
b04ca7a1
DM
2802 (inputs
2803 `(("libusb" ,libusb)))
2804 (build-system gnu-build-system)
2805 (arguments
faa6bdf8 2806 `(#:tests? #f ; no tests exist
b04ca7a1
DM
2807 #:make-flags (list (string-append "PREFIX="
2808 (assoc-ref %outputs "out"))
208e7434 2809 (string-append "CROSS_COMPILE=disabled")
faa6bdf8 2810 "CC=gcc")
b04ca7a1
DM
2811 #:phases
2812 (modify-phases %standard-phases
b054b26a 2813 (delete 'configure)
faa6bdf8
DM
2814 (replace 'build
2815 (lambda* (#:key make-flags #:allow-other-keys)
cb8ba848 2816 (apply invoke "make" "tools" "misc" make-flags)))
b054b26a 2817 (replace 'install
208e7434
DM
2818 (lambda* (#:key inputs outputs make-flags #:allow-other-keys)
2819 ;; Those tools have been built for armhf but are part of the
2820 ;; installation in the upstream package. So do the same
2821 ;; here.
2822 (copy-recursively (assoc-ref inputs "sunxi-target-tools")
2823 (assoc-ref outputs "out"))
2824 (apply invoke "make" "install-tools" "install-misc"
cb8ba848 2825 make-flags))))))
b04ca7a1
DM
2826 (home-page "https://github.com/linux-sunxi/sunxi-tools")
2827 (synopsis "Hardware management tools for Allwinner computers")
2828 (description "This package contains tools for Allwinner devices:
2829@enumerate
2830@item @command{sunxi-fexc}, @command{bin2fex}, @command{fex2bin}: Compile
2831a textual description of a board (.fex) to a binary representation (.bin).
2832@item @command{sunxi-fel}: Puts an Allwinner device into FEL mode which
2833makes it register as a special USB device (rather than USB host).
2834You can then connect it to another computer and flash it from there.
2835@item @command{sunxi-nand-part}: Partitions NAND flash.
2836@item @command{sunxi-bootinfo}: Reads out boot0 and boot1 (Allwinner
2837bootloader) parameters.
2838@item @command{sunxi-pio}: Sets GPIO parameters and oscillates a GPIO
2839in order to be able to find it.
2840@item @command{sunxi-meminfo}: Prints memory bus settings.
b054b26a 2841@item @command{sunxi-nand-image-builder}: Prepares raw NAND images.
b04ca7a1
DM
2842@end enumerate")
2843 (license license:gpl2+)))
a054777e 2844
2845(define-public sedsed
2846 (package
2847 (name "sedsed")
bde99125 2848 (version "1.1")
a054777e 2849 (source
2850 (origin
7d6e8fda
TGR
2851 (method git-fetch)
2852 (uri (git-reference
2853 (url "https://github.com/aureliojargas/sedsed.git")
2854 (commit (string-append "v" version))))
2855 (file-name (git-file-name name version))
a054777e 2856 (sha256
bde99125 2857 (base32 "05cl35mwljdb9ynbbsfa8zx6ig8r0xncbg2cir9vwn5manndjj18"))))
a054777e 2858 (build-system python-build-system)
2859 (arguments
7d6e8fda 2860 `(#:tests? #f ; no tests
a054777e 2861 #:phases
2862 (modify-phases %standard-phases
2863 (add-after 'unpack 'patch-sed-in
2864 (lambda _
2865 (substitute* "sedsed.py"
2866 (("sedbin = 'sed'")
2867 (string-append "sedbin = '" (which "sed") "'")))
2868 #t))
2869 (delete 'build)
2870 (replace 'install
2871 (lambda* (#:key outputs #:allow-other-keys)
2872 (let* ((out (assoc-ref outputs "out"))
2873 (bin (string-append out "/bin")))
2874 ;; Just one file to copy around
2875 (install-file "sedsed.py" bin)
2876 #t)))
b7e26ec6 2877 (add-after 'wrap 'symlink
a054777e 2878 ;; Create 'sedsed' symlink to "sedsed.py".
2879 (lambda* (#:key outputs #:allow-other-keys)
2880 (let* ((out (assoc-ref outputs "out"))
2881 (bin (string-append out "/bin"))
2882 (sed (string-append bin "/sedsed"))
2883 (sedpy (string-append bin "/sedsed.py")))
b7e26ec6 2884 (symlink sedpy sed)
a054777e 2885 #t))))))
fbdabdad 2886 (home-page "https://aurelio.net/projects/sedsed")
a054777e 2887 (synopsis "Sed sed scripts")
2888 (description
975a0c15
TGR
2889 "@code{sedsed} can debug, indent, tokenize and HTMLize your @command{sed}
2890script.
a054777e 2891
975a0c15 2892In debug mode, it reads your script and adds extra commands to it. When
a054777e 2893executed you can see the data flow between the commands, revealing all the
975a0c15 2894magic sed performs on its internal buffers.
a054777e 2895
975a0c15 2896In indent mode, your script is reformatted with standard spacing.
a054777e 2897
975a0c15 2898In tokenize mode, you can see the elements of every command you use.
a054777e 2899
975a0c15 2900In HTMLize mode, your script is converted to a beautiful colored HTML file,
a054777e 2901with all the commands and parameters identified for your viewing pleasure.
2902
2903With sedsed you can master any sed script. No more secrets, no more hidden
2904buffers.")
2905 (license license:expat)))
d10fa5c7 2906
dca48d3c 2907(define-public igt-gpu-tools
d10fa5c7 2908 (package
dca48d3c 2909 (name "igt-gpu-tools")
bdd5fbaf 2910 (version "1.24")
e4d6746f
TGR
2911 (source
2912 (origin
2913 (method git-fetch)
2914 (uri (git-reference
2915 (url "https://gitlab.freedesktop.org/drm/igt-gpu-tools.git")
2916 (commit (string-append "igt-gpu-tools-" version))))
2917 (file-name (git-file-name name version))
2918 (sha256
bdd5fbaf 2919 (base32 "1gpdjs5aj6vsnzwcjvw5bb120lgffvvshi4202phr0bzw3b92ky8"))))
d10fa5c7
RW
2920 (build-system gnu-build-system)
2921 (arguments
778d6b52 2922 `(#:tests? #f)) ; many of the tests try to load kernel modules
d10fa5c7 2923 (inputs
10082d30 2924 `(("cairo" ,cairo)
bdd5fbaf 2925 ("elfutils" ,elfutils) ; libdw
10082d30
TGR
2926 ("eudev" ,eudev)
2927 ("glib" ,glib)
2928 ("kmod" ,kmod)
d10fa5c7
RW
2929 ("libdrm" ,libdrm)
2930 ("libpciaccess" ,libpciaccess)
d10fa5c7
RW
2931 ("libunwind" ,libunwind)
2932 ("libxrandr" ,libxrandr)
10082d30
TGR
2933 ("openssl" ,openssl)
2934 ("procps" ,procps)
2935 ("util-macros" ,util-macros)))
d10fa5c7
RW
2936 (native-inputs
2937 `(("autoconf" ,autoconf)
2938 ("automake" ,automake)
2939 ("libtool" ,libtool)
2940 ("pkg-config" ,pkg-config)))
49d41690 2941 (home-page "https://gitlab.freedesktop.org/drm/igt-gpu-tools")
d10fa5c7 2942 (synopsis "Tools for development and testing of the Intel DRM driver")
dca48d3c 2943 (description "IGT GPU Tools is a collection of tools for development and
d10fa5c7
RW
2944testing of the Intel DRM driver. There are many macro-level test suites that
2945get used against the driver, including xtest, rendercheck, piglit, and
2946oglconform, but failures from those can be difficult to track down to kernel
2947changes, and many require complicated build procedures or specific testing
dca48d3c 2948environments to get useful results. Therefore, IGT GPU Tools includes
d10fa5c7
RW
2949low-level tools and tests specifically for development and testing of the
2950Intel DRM Driver.")
9f375a4c 2951 (supported-systems '("i686-linux" "x86_64-linux"))
d10fa5c7 2952 (license license:expat)))
c1aba1a7 2953
b611f9c2
BS
2954(define-public fabric
2955 (package
2956 (name "fabric")
b8eeaaa2 2957 (version "1.14.1")
b611f9c2
BS
2958 (source
2959 (origin
2960 (method url-fetch)
2961 (uri (pypi-uri "Fabric" version))
2962 (sha256
2963 (base32
b8eeaaa2 2964 "1a3ndlpdw6bhn8fcw1jgznl117a8pnr84az9rb5fwnrypf1ph2b6"))))
b611f9c2
BS
2965 (build-system python-build-system)
2966 (arguments
e68e4a90
BS
2967 `(#:python ,python-2 ; Python 2 only
2968 #:phases
2969 (modify-phases %standard-phases
2970 (replace 'check
2971 (lambda _
2972 (invoke
2973 "nosetests" "-v" "tests/"
2974 ;; This test hangs indefinitely when run on a single core VM
2975 ;; (see GNU bug #26647 and Debian bug #850230).
2976 "--exclude=test_nested_execution_with_explicit_ports"
2977 ;; This test randomly fails in certain environments causing too
2978 ;; much noise to be useful (see Debian bug #854686).
2979 "--exclude=test_should_use_sentinel_for_tasks_that_errored"))))))
1b5b24c9 2980 (native-inputs
e68e4a90
BS
2981 `(("python2-fudge" ,python2-fudge) ; Requires < 1.0
2982 ("python2-jinja2" ,python2-jinja2) ; Requires < 3.0
2983 ("python2-nose" ,python2-nose) ; Requires < 2.0
a62d455d
RJ
2984 ("python2-pynacl" ,python2-pynacl)
2985 ("python2-bcrypt" ,python2-bcrypt)))
b611f9c2 2986 (propagated-inputs
b611f9c2 2987 `(("python2-paramiko" ,python2-paramiko)))
a06faea9 2988 (home-page "https://www.fabfile.org/")
b611f9c2
BS
2989 (synopsis "Simple Pythonic remote execution and deployment tool")
2990 (description
2991 "Fabric is designed to upload files and run shell commands on a number of
2992servers in parallel or serially. These commands are grouped in tasks (which
2993are regular Python functions) and specified in a @dfn{fabfile}.
2994
2995It is similar to Capistrano, except it's implemented in Python and doesn't
2996expect you to be deploying Rails applications. Fabric is a simple, Pythonic
2997tool for remote execution and deployment.")
2998 (license license:bsd-2)))
6e75ea48
EJ
2999
3000(define-public neofetch
816bce68
MR
3001 (package
3002 (name "neofetch")
3003 (version "7.0.0")
3004 (source (origin
3005 (method git-fetch)
3006 (uri (git-reference
3007 (url "https://github.com/dylanaraps/neofetch")
3008 (commit version)))
3009 (file-name (git-file-name name version))
3010 (sha256
3011 (base32
3012 "0xc0fdc7n5bhqirh83agqiy8r14l14zwca07czvj8vgnsnfybslr"))))
3013 (build-system gnu-build-system)
3014 (arguments
3015 `(#:tests? #f ; there are no tests
3016 #:make-flags
3017 (list (string-append "PREFIX=" %output))
3018 #:phases
3019 (modify-phases %standard-phases
3020 (delete 'configure)))) ; no configure script
3021 (home-page "https://github.com/dylanaraps/neofetch")
3022 (synopsis "System information script")
3023 (description "Neofetch is a command-line system information tool written in
2cd8e6e0 3024Bash. Neofetch displays information about your system next to an image, your OS
6e75ea48
EJ
3025logo, or any ASCII file of your choice. The main purpose of Neofetch is to be
3026used in screenshots to show other users what operating system or distribution
3027you are running, what theme or icon set you are using, etc.")
816bce68 3028 (license license:expat)))
a76ca052 3029
67648704 3030(define-public screenfetch
9dbda847
TGR
3031 (package
3032 (name "screenfetch")
89f51a9d 3033 (version "3.9.1")
9dbda847
TGR
3034 (source (origin
3035 (method git-fetch)
3036 (uri (git-reference
3037 (url "https://github.com/KittyKatt/screenFetch")
3038 (commit (string-append "v" version))))
3039 (file-name (git-file-name name version))
3040 (sha256
3041 (base32
89f51a9d 3042 "04l8aqr474pb115nagn9f6y48jw92n1qfszgw7dbhgl4mpn95lcr"))))
9dbda847
TGR
3043 (build-system trivial-build-system)
3044 (arguments
3045 `(#:modules ((guix build utils))
3046 #:builder
3047 (begin
3048 (use-modules (guix build utils))
3049 (let ((source (assoc-ref %build-inputs "source"))
3050 (out (assoc-ref %outputs "out")))
3051 (mkdir-p (string-append out "/bin/"))
3052 (copy-file (string-append source "/screenfetch-dev")
3053 (string-append out "/bin/screenfetch"))
3054 (install-file (string-append source "/screenfetch.1")
3055 (string-append out "/man/man1/"))
3056 (install-file (string-append source "/COPYING")
3057 (string-append out "/share/doc/" ,name "-" ,version))
3058 (substitute* (string-append out "/bin/screenfetch")
3059 (("/usr/bin/env bash")
3060 (string-append (assoc-ref %build-inputs "bash")
3061 "/bin/bash")))
3062 (wrap-program
67648704 3063 (string-append out "/bin/screenfetch")
9dbda847
TGR
3064 `("PATH" ":" prefix
3065 (,(string-append (assoc-ref %build-inputs "bc") "/bin:"
3066 (assoc-ref %build-inputs "scrot") "/bin:"
3067 (assoc-ref %build-inputs "xdpyinfo") "/bin"
3068 (assoc-ref %build-inputs "xprop") "/bin"))))
3069 (substitute* (string-append out "/bin/screenfetch")
3070 (("#!#f")
3071 (string-append "#!" (assoc-ref %build-inputs "bash")
3072 "/bin/bash")))))))
3073 (inputs
3074 `(("bash" ,bash)
3075 ("bc" ,bc)
3076 ("scrot" ,scrot)
3077 ("xdpyinfo" ,xdpyinfo)
3078 ("xprop" ,xprop)))
3079 (home-page "https://github.com/KittyKatt/screenFetch")
3080 (synopsis "System information script")
3081 (description "Bash screenshot information tool which can be used to
67648704
JK
3082generate those nifty terminal theme information and ASCII distribution logos in
3083everyone's screenshots nowadays.")
9dbda847 3084 (license license:gpl3)))
67648704 3085
a76ca052
EJ
3086(define-public nnn
3087 (package
3088 (name "nnn")
5c9a3976 3089 (version "2.8.1")
eb5a6643
TGR
3090 (source
3091 (origin
3092 (method url-fetch)
3093 (uri (string-append "https://github.com/jarun/nnn/releases/download/v"
16572d0e 3094 version "/nnn-v" version ".tar.gz"))
eb5a6643 3095 (sha256
5c9a3976 3096 (base32 "1g47bndxld875d0xb3pgmlw223mz47p1xcvwym861y6l4zkgiyp0"))))
a76ca052 3097 (build-system gnu-build-system)
eb5a6643
TGR
3098 (inputs
3099 `(("ncurses" ,ncurses)
3100 ("readline" ,readline)))
3101 (native-inputs
3102 `(("pkg-config" ,pkg-config)))
a76ca052 3103 (arguments
eb5a6643 3104 '(#:tests? #f ; no tests
a76ca052 3105 #:phases
a76ca052 3106 (modify-phases %standard-phases
eb5a6643 3107 (delete 'configure)) ; no configure script
a76ca052
EJ
3108 #:make-flags
3109 (list
3110 (string-append "PREFIX="
3111 (assoc-ref %outputs "out"))
a76ca052
EJ
3112 "CC=gcc")))
3113 (home-page "https://github.com/jarun/nnn")
3114 (synopsis "Terminal file browser")
3115 (description "@command{nnn} is a fork of @command{noice}, a blazing-fast
3116lightweight terminal file browser with easy keyboard shortcuts for
3117navigation, opening files and running tasks. There is no config file and
3118mime associations are hard-coded. The incredible user-friendliness and speed
3119make it a perfect utility on modern distros.")
3120 (license license:bsd-2)))
58989684
CAW
3121
3122(define-public thermald
3123 (package
3124 (name "thermald")
63471410 3125 (version "1.9.1")
58989684
CAW
3126 (source
3127 (origin
d09e84c2
EF
3128 (method git-fetch)
3129 (uri (git-reference
3130 (url "https://github.com/01org/thermal_daemon")
3131 (commit (string-append "v" version))))
3132 (file-name (git-file-name name version))
3133 (sha256
63471410 3134 (base32 "0iagc3jqpnh6q2fa1gx4wx6r8qg0556j60xr159zqg95djr4dv99"))))
58989684
CAW
3135 (build-system gnu-build-system)
3136 (arguments
12007839 3137 `(#:configure-flags
58989684
CAW
3138 (let ((out (assoc-ref %outputs "out")))
3139 (list (string-append "--sysconfdir="
3140 out "/etc")
58989684
CAW
3141 (string-append "--with-dbus-sys-dir="
3142 out "/etc/dbus-1/system.d")
3143 "--localstatedir=/var"))))
3144 (native-inputs
3145 `(("autoconf" ,autoconf)
3146 ("automake" ,automake)
3147 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
3148 ("pkg-config" ,pkg-config)))
3149 (inputs
3150 `(("dbus-glib" ,dbus-glib)
3151 ("libxml2" ,libxml2)))
3152 (home-page "https://01.org/linux-thermal-daemon/")
3153 (synopsis "CPU scaling for thermal management")
3154 (description "The Linux Thermal Daemon helps monitor and control temperature
3155on systems running the Linux kernel.")
b6315bc0 3156 ;; arm and aarch64 don't have cpuid.h.
86ee7625 3157 (supported-systems '("i686-linux" "x86_64-linux"))
58989684 3158 (license license:gpl2+)))
d7c64ad5
LF
3159
3160(define-public masscan
3161 (package
3162 (name "masscan")
b4bf9516 3163 (version "1.0.5")
e956d76d
TGR
3164 (source
3165 (origin
3166 (method git-fetch)
3167 (uri (git-reference
3168 (url "https://github.com/robertdavidgraham/masscan.git")
3169 (commit version)))
3170 (file-name (git-file-name name version))
3171 (sha256
3172 (base32 "0q0c7bsf0pbl8napry1qyg0gl4pd8wn872h4mz9b56dx4rx90vqg"))))
d7c64ad5
LF
3173 (build-system gnu-build-system)
3174 (inputs
3175 `(("libpcap" ,libpcap)))
3176 (arguments
3177 '(#:test-target "regress"
b4bf9516
TGR
3178 #:make-flags
3179 (list "CC=gcc"
3180 (string-append "PREFIX=" (assoc-ref %outputs "out")))
d7c64ad5
LF
3181 #:phases
3182 (modify-phases %standard-phases
b4bf9516 3183 (delete 'configure) ; no ./configure script
d7c64ad5
LF
3184 (add-after 'unpack 'patch-path
3185 (lambda* (#:key outputs inputs #:allow-other-keys)
3186 (let* ((out (assoc-ref outputs "out"))
3187 (pcap (assoc-ref inputs "libpcap")))
3188 (substitute* "src/rawsock-pcap.c"
3189 (("libpcap.so") (string-append pcap "/lib/libpcap.so")))
3190 #t))))))
3191 (synopsis "TCP port scanner")
3192 (description "MASSCAN is an asynchronous TCP port scanner. It can detect
3193open ports, and also complete the TCP connection and interact with the remote
3194application, collecting the information received.")
3195 (home-page "https://github.com/robertdavidgraham/masscan")
b4bf9516
TGR
3196 ;; 'src/siphash24.c' is the SipHash reference implementation, which
3197 ;; bears a CC0 Public Domain Dedication.
d7c64ad5 3198 (license license:agpl3+)))
82d57f12
TGR
3199
3200(define-public hungrycat
3201 (package
3202 (name "hungrycat")
3203 (version "0.4.1")
3204 (source (origin
3205 (method url-fetch)
3206 (uri (string-append "https://github.com/jwilk/hungrycat/"
3207 "releases/download/" version "/"
e20796dc 3208 "hungrycat-" version ".tar.gz"))
82d57f12
TGR
3209 (sha256
3210 (base32
3211 "03fc1zsrf99lvxa7b4ps6pbi43304wbxh1f6ci4q0vkal370yfwh"))))
3212 (build-system gnu-build-system)
3213 (native-inputs
3214 ;; For tests.
3215 `(("python" ,python-wrapper)
3216 ("python-nose" ,python-nose)))
3217 (arguments
3218 `(#:test-target "test"))
3219 (synopsis "A single tool that combines @command{cat} & @command{rm}")
3220 (description
3221 "hungrycat prints the contents of a file to standard output, while
3222simultaneously freeing the disk space it occupied. It is useful if you need
3223to process a large file, don't have enough space to store both the input and
3224output files, and don't need the input file afterwards.
3225While similar in principle to running @command{cat} immediately followed by
3226@command{rm}, @command{hungrycat} actually frees blocks as soon as they are
3227printed instead of after the entire file has been read, which is often too
3228late.")
3229 (home-page "https://jwilk.net/software/hungrycat")
3230 (license license:expat)))
3ebf2c29
PAR
3231
3232(define-public launchmon
3233 (package
3234 (name "launchmon")
3235 (version "1.0.2")
3236 (source (origin
3237 (method url-fetch)
3238 (uri (string-append
3239 "https://github.com/LLNL/LaunchMON/releases/download/v"
f44eca94 3240 version "/launchmon-v" version ".tar.gz"))
3ebf2c29
PAR
3241 (sha256
3242 (base32
989d564f
MB
3243 "0fm3nd9mydm9v2bf7bh01dbgrfnpwkapxa3dsvy3x1z0rz61qc0x"))
3244 (modules '((guix build utils)))
3245 (snippet
3246 '(begin
3247 ;; Fix build failure with GCC 7 due to a conversion error.
3248 ;; Remove for versions > 1.0.2.
3249 (substitute* "launchmon/src/linux/lmon_api/lmon_coloc_spawner.cxx"
3250 ((" lmonpl = '\\\\0'")
3251 " *lmonpl = '\\0'"))
3252 #t))))
3ebf2c29
PAR
3253 (build-system gnu-build-system)
3254 (inputs
3255 `(("mpi" ,openmpi)
3256 ("munge" ,munge)
3257 ("boost" ,boost)
3258 ("libelf" ,libelf)
3259 ("libgcrypt" ,libgcrypt)
3260 ("libgpg-error" ,libgpg-error)))
3261 (synopsis "Infrastructue for large scale tool daemon launching")
3262 (description
3263 "LaunchMON is a software infrastructure that enables HPC run-time
3264tools to co-locate tool daemons with a parallel job. Its API allows a
3265tool to identify all the remote processes of a job and to scalably
3266launch daemons into the relevant nodes.")
3267 (home-page "https://github.com/LLNL/LaunchMON")
3268 (supported-systems '("i686-linux" "x86_64-linux"))
3269 (license license:lgpl2.1)))
541dac8a
PAR
3270
3271(define-public spindle
3272 (package
3273 (name "spindle")
3274 (version "0.10")
3275 (source (origin
3276 ;; We use git checkout to avoid github auto-generated tarballs
3277 (method git-fetch)
3278 (uri (git-reference
3279 (url "https://github.com/hpc/Spindle.git")
3280 (commit (string-append "v" version))))
3281 (file-name (git-file-name name version))
3282 (sha256
3283 (base32
3284 "15n3ay0qq81r5v7fif61q1vdjcq44pp2nynkh3fvbzc9fj3c39wd"))))
3285 (build-system gnu-build-system)
3286 (arguments '(#:configure-flags '("--enable-sec-launchmon"
3287 "--enable-sec-munge"
3288 "--enable-sec-none")))
3289 (inputs
3290 `(("mpi" ,openmpi)
3291 ("munge" ,munge)
3292 ("launchmon" ,launchmon)
3293 ("libgcrypt" ,libgcrypt)))
3294 (synopsis "Scalable library loading in HPC environments")
3295 (description
3296 "Spindle is a tool for improving the performance of dynamic library and
3297Python loading in HPC environments.")
3298 (home-page "https://github.com/hpc/Spindle")
785f40df
EF
3299 ;; This package supports x86_64 and PowerPC64
3300 (supported-systems '("x86_64-linux"))
541dac8a 3301 (license license:lgpl2.1)))
bbc94ed0
PN
3302
3303(define-public inxi-minimal
3304 (let ((real-name "inxi"))
3305 (package
3306 (name "inxi-minimal")
30ae1e8c 3307 (version "3.0.38-1")
bbc94ed0
PN
3308 (source
3309 (origin
b740a305
TGR
3310 (method git-fetch)
3311 (uri (git-reference
3312 (url "https://github.com/smxi/inxi")
3313 (commit version)))
7458ceac 3314 (file-name (git-file-name real-name version))
bbc94ed0 3315 (sha256
30ae1e8c 3316 (base32 "1qw3sxgd3ly916bzzl3873s3flngwd3vh57slw0shsj7ivz8bfnm"))))
bbc94ed0
PN
3317 (build-system trivial-build-system)
3318 (inputs
a49bbaa6
EF
3319 `(("bash" ,bash-minimal)
3320 ("perl" ,perl)
3321 ("procps" ,procps)))
bbc94ed0 3322 (native-inputs
b740a305 3323 `(("gzip" ,gzip)))
bbc94ed0
PN
3324 (arguments
3325 `(#:modules
3326 ((guix build utils)
3327 (ice-9 match)
3328 (srfi srfi-26))
3329 #:builder
3330 (begin
3331 (use-modules (guix build utils)
3332 (ice-9 match)
3333 (srfi srfi-26))
3334 (setenv "PATH" (string-append
3335 (assoc-ref %build-inputs "bash") "/bin" ":"
3336 (assoc-ref %build-inputs "gzip") "/bin" ":"
b740a305
TGR
3337 (assoc-ref %build-inputs "perl") "/bin" ":"))
3338 (copy-recursively (assoc-ref %build-inputs "source")
3339 ,(string-append real-name "-" version))
bbc94ed0
PN
3340 (with-directory-excursion ,(string-append real-name "-" version)
3341 (with-fluids ((%default-port-encoding #f))
3342 (substitute* "inxi" (("/usr/bin/env perl") (which "perl"))))
3343 (let ((bin (string-append %output "/bin")))
3344 (install-file "inxi" bin)
3345 (wrap-program (string-append bin "/inxi")
3346 `("PATH" ":" =
3347 ("$PATH"
3348 ,@(map (lambda (input)
3349 (match input
3350 ((name . store)
3351 (let ((store-append
3352 (cut string-append store <>)))
3353 (cond
3354 ((member name '("util-linux"))
3355 (string-append (store-append "/bin") ":"
3356 (store-append "/sbin")))
3357 ((member name '("dmidecode" "iproute2"))
3358 (store-append "/sbin"))
3359 (else (store-append "/bin")))))))
3360 %build-inputs)))
3361 `("PERL5LIB" ":" =
3362 ,(delete
3363 ""
3364 (map (match-lambda
3365 (((? (cut string-prefix? "perl-" <>) name) . dir)
3366 (string-append dir "/lib/perl5/site_perl"))
3367 (_ ""))
3368 %build-inputs)))))
3369 (invoke "gzip" "inxi.1")
3370 (install-file "inxi.1.gz"
55f5556e 3371 (string-append %output "/share/man/man1")))
bbc94ed0
PN
3372 #t)))
3373 (home-page "https://smxi.org/docs/inxi.htm")
4ee41a6a 3374 (synopsis "Full-featured system information script")
bbc94ed0
PN
3375 (description "Inxi is a system information script that can display
3376various things about your hardware and software to users in an IRC chatroom or
4ee41a6a 3377support forum. It runs with the @code{/exec} command in most IRC clients.")
bbc94ed0
PN
3378 (license license:gpl3+))))
3379
3380(define-public inxi
3381 (package
3382 (inherit inxi-minimal)
3383 (name "inxi")
3384 (inputs
3385 `(("dmidecode" ,dmidecode)
3386 ("file" ,file)
3387 ("bind:utils" ,isc-bind "utils") ; dig
3388 ("gzip" ,gzip)
3389 ("iproute2" ,iproute) ; ip
3390 ("kmod" ,kmod) ; modinfo
3391 ("lm-sensors" ,lm-sensors)
3392 ("mesa-utils" ,mesa-utils)
3393 ("pciutils" ,pciutils)
bbc94ed0
PN
3394 ("tar" ,tar)
3395 ("tree" ,tree)
3396 ("util-linux" ,util-linux) ; lsblk
3397 ("usbutils" ,usbutils) ; lsusb
3398 ("wmctrl" ,wmctrl)
3399 ("xdpyinfo" ,xdpyinfo)
3400 ("xprop" ,xprop)
3401 ("xrandr" ,xrandr)
3402 ("coreutils" ,coreutils) ; uptime
3403 ("inetutils" ,inetutils) ; ifconfig
3404 ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
3405 ("perl-http-tiny" ,perl-http-tiny)
3406 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
3407 ("perl-json-xs" ,perl-json-xs)
3408 ("perl-time-hires" ,perl-time-hires)
3409 ;; TODO: Add more inputs:
3410 ;; ipmi-sensors
3411 ;; hddtemp
3412 ;; perl-xml-dumper
3413 ;; ipmitool
3414 ,@(package-inputs inxi-minimal)))))
b19f3337
OP
3415
3416(define-public pscircle
3417 (package
3418 (name "pscircle")
0b4ced58 3419 (version "1.3.1")
b19f3337
OP
3420 (source
3421 (origin
494b702a
TGR
3422 (method git-fetch)
3423 (uri (git-reference
3424 (url "https://gitlab.com/mildlyparallel/pscircle.git")
3425 (commit (string-append "v" version))))
3426 (file-name (git-file-name name version))
b19f3337 3427 (sha256
0b4ced58 3428 (base32 "1sm99423hh90kr4wdjqi9sdrrpk65j2vz2hzj65zcxfxyr6khjci"))))
b19f3337
OP
3429 (build-system meson-build-system)
3430 (native-inputs
3431 `(("pkg-config" ,pkg-config)))
3432 (inputs
3433 `(("cairo" ,cairo)
3434 ("libpng" ,libpng)
3435 ("libx11" ,libx11)))
3436 (home-page "https://gitlab.com/mildlyparallel/pscircle")
3437 (synopsis "Visualize Linux processes in a form of radial tree")
3438 (description
3439 "@code{pscircle} visualizes Linux processes in the form of a radial tree.")
3440 (license license:gpl2+)))
ac94ccb9
DM
3441
3442(define-public python-pyudev
3443 (package
3444 (name "python-pyudev")
78fca231 3445 (version "0.22.0")
ac94ccb9
DM
3446 (source
3447 (origin
3448 (method url-fetch)
3449 (uri (pypi-uri "pyudev" version))
3450 (sha256
3451 (base32
78fca231 3452 "0xmj6l08iih2js9skjqpv4w7y0dhxyg91zmrs6v5aa65gbmipfv9"))))
ac94ccb9
DM
3453 (build-system python-build-system)
3454 (arguments
3455 `(#:tests? #f ; Tests require /sys
3456 #:phases
3457 (modify-phases %standard-phases
3458 (add-after 'unpack 'patch-ctypes-udev
3459 (lambda* (#:key inputs outputs #:allow-other-keys)
3460 (let ((eudev (assoc-ref inputs "eudev")))
3461 (substitute* "src/pyudev/core.py"
3462 (("'udev'")
3463 (string-append "'" eudev "/lib/libudev.so'")))
3464 (substitute* "src/pyudev/_ctypeslib/utils.py"
3465 ;; Use absolute paths instead of keys.
3466 (("= find_library") "= "))
3467 #t))))))
3468 (inputs
3469 `(("eudev" ,eudev)))
cbb1b168
RJ
3470 (propagated-inputs
3471 `(("python-six" ,python-six)))
ac94ccb9
DM
3472 (native-inputs
3473 `(("python-docutils" ,python-docutils)
3474 ("python-hypothesis" ,python-hypothesis)
3475 ("python-mock" ,python-mock)
3476 ("python-pytest" ,python-pytest)
3477 ("python-sphinx" ,python-sphinx)))
a20ede32 3478 (home-page "https://pyudev.readthedocs.io/")
ac94ccb9
DM
3479 (synopsis "Python udev binding")
3480 (description "This package provides @code{udev} bindings for Python.")
3481 (license license:lgpl2.1)))
15c56e82
DM
3482
3483(define-public solaar
3484 (package
3485 (name "solaar")
3486 (version "0.9.2")
3487 (source (origin
3488 (method git-fetch)
3489 (uri (git-reference
3490 (url "https://github.com/pwr/Solaar.git")
3491 (commit version)))
3492 (file-name (git-file-name name version))
3493 (sha256
3494 (base32
3495 "085mfa13dap3wqik1dqlad0d7kff4rv7j4ljh99c7l8nhczkqgwm"))))
3496 (build-system python-build-system)
3497 (arguments
3498 `(#:phases
3499 (modify-phases %standard-phases
3500 (add-after 'unpack 'fix-prefix-detection
3501 (lambda _
3502 (substitute* "setup.py"
3503 (("'--prefix' in sys\\.argv")
3504 "len([x.startswith('--prefix=') for x in sys.argv]) > 0"))
3505 #t))
3506 (replace 'build
3507 (lambda _
3508 (invoke "python" "setup.py" "build")))
3509 (add-before 'check 'setenv-PATH
3510 (lambda _
3511 (setenv "PYTHONPATH" (string-append "lib:" (getenv "PYTHONPATH")))
3512 #t)))))
3513 (propagated-inputs
3514 `(("python-pygobject" ,python-pygobject)
3515 ("python-pyudev" ,python-pyudev)))
3516 (home-page "https://smxi.org/docs/inxi.htm")
3517 (synopsis "Linux devices manager for the Logitech Unifying Receiver")
3518 (description "This package provides tools to manage clients of the
3519Logitech Unifying Receiver.")
3520 (license license:gpl2)))
4d26987d
AI
3521
3522(define-public lynis
3523 (package
3524 (name "lynis")
112dc8eb 3525 ;; Also update the ‘lynis-sdk’ input to the commit matching this release.
248f218e 3526 (version "2.7.5")
4d26987d
AI
3527 (source
3528 (origin
3529 (method git-fetch)
3530 (uri (git-reference
3531 (url "https://github.com/CISOfy/lynis")
3532 (commit version)))
3533 (file-name (git-file-name name version))
3534 (sha256
248f218e 3535 (base32 "1lkkbvxm0rgrrlx0szaxmf8ghc3d26wal96sgqk84m37mvs1f7p0"))
4d26987d
AI
3536 (modules '((guix build utils)))
3537 (snippet
3538 '(begin
3539 ;; Remove proprietary plugins. As of now, all plugins supplied with
3540 ;; lynis are proprietary. In the future, if free plugins are
3541 ;; provided, whitelist them from deletion.
3542 (for-each delete-file (find-files "plugins"))
3543 #t))))
3544 (build-system gnu-build-system)
3545 (native-inputs
3546 `(;; For tests
3547 ("lynis-sdk"
3548 ,(origin
3549 (method git-fetch)
3550 (uri (git-reference
3551 (url "https://github.com/CISOfy/lynis-sdk")
248f218e 3552 (commit "bf1c1d95121da9ca79a9eac5a15ed8d81e34094d")))
4d26987d
AI
3553 (file-name (git-file-name "lynis-sdk" version))
3554 (sha256
248f218e 3555 (base32 "1ndz5v0039dqa87cva2dk55a8hkw0fibsw8hh2ddmny9qkr4l3dp"))))))
4d26987d
AI
3556 (arguments
3557 `(#:phases
3558 (modify-phases %standard-phases
3559 (replace 'configure
3560 (lambda* (#:key inputs outputs #:allow-other-keys)
3561 (substitute* "lynis"
3562 (("/usr/share/lynis")
3563 (string-append (assoc-ref outputs "out") "/share/lynis")))
3564 (substitute* "include/functions"
3565 (("/usr/local/etc/lynis")
3566 (string-append (assoc-ref outputs "out") "/etc/lynis")))
3567 #t))
3568 (delete 'build)
3569 (replace 'install
3570 (lambda* (#:key outputs #:allow-other-keys)
3571 (let ((out (assoc-ref outputs "out")))
3572 (install-file "lynis" (string-append out "/bin/"))
3573 (install-file "default.prf" (string-append out "/etc/lynis"))
3574 (for-each
3575 (lambda (dir)
3576 (copy-recursively dir (string-append out "/share/lynis/" dir)))
3577 (list "db" "include" "plugins"))
3578 (install-file "lynis.8" (string-append out "/share/man/man8"))
3579 #t)))
3580 (replace 'check
3581 (lambda* (#:key inputs #:allow-other-keys)
3582 (copy-recursively (assoc-ref inputs "lynis-sdk") "../lynis-sdk")
3583 (setenv "LANG" "en_US.UTF-8")
3584 (let ((lynis-dir (getcwd)))
3585 (with-directory-excursion "../lynis-sdk"
3586 (substitute* "config"
3587 (("\\.\\./lynis") lynis-dir))
3588 (substitute* "unit-tests/tests-language-translations.sh"
3589 (("\\.\\./lynis") lynis-dir))
3590 (invoke "sh" "lynis-devkit" "run" "unit-tests"))))))))
3591 (home-page "https://cisofy.com/lynis/")
3592 (synopsis "Security auditing tool")
3593 (description "Lynis is a security auditing tool. It performs an in-depth
3594security scan and runs on the system itself. The primary goal is to test
3595security defenses and provide tips for further system hardening. It will also
3596scan for general system information, vulnerable software packages, and
3597possible configuration issues.")
3598 (license license:gpl3+)))
2eddeeba
PN
3599
3600(define-public ngrep
3601 (package
3602 (name "ngrep")
3603 (version "1.47")
3604 (source
3605 (origin
3606 (method git-fetch)
3607 (uri (git-reference
3608 (url "https://github.com/jpr5/ngrep/")
3609 (commit (string-append "V" (string-replace-substring version "." "_")))))
3610 (file-name (git-file-name name version))
3611 (sha256
3612 (base32
3613 "1x2fyd7wdqlj1r76ilal06cl2wmbz0ws6i3ys204sbjh1cj6dcl7"))))
3614 (build-system gnu-build-system)
3615 (inputs
3616 `(("libpcap" ,libpcap)))
3617 (arguments
3618 `(#:tests? #f ;; No tests.
3619 #:configure-flags (list (string-append "--with-pcap-includes="
3620 (assoc-ref %build-inputs "libpcap")
3621 "/include/pcap"))))
3622 (home-page "https://github.com/jpr5/ngrep/")
3623 (synopsis "Grep-like utility to search for network packets on an interface")
3624 (description "@command{ngrep} is like GNU grep applied to the network
3625layer. It's a PCAP-based tool that allows you to specify an extended regular
3626or hexadecimal expression to match against data payloads of packets. It
3627understands many kinds of protocols, including IPv4/6, TCP, UDP, ICMPv4/6,
3628IGMP and Raw, across a wide variety of interface types, and understands BPF
3629filter logic in the same fashion as more common packet sniffing tools, such as
3630tcpdump and snoop.")
3631 (license license:bsd-3)))
cd2ce8ab
GLV
3632
3633(define-public pam-mount
3634 (package
3635 (name "pam-mount")
3636 (version "2.16")
3637 (source
3638 (origin
3639 (method url-fetch)
3640 (uri (string-append "mirror://sourceforge/pam-mount/pam_mount/"
3641 version "/pam_mount-" version ".tar.xz"))
3642 (sha256
3643 (base32
3644 "1rvi4irb7ylsbhvx1cr6islm2xxw1a4b19q6z4a9864ndkm0f0mf"))
3645 (patches
3646 ;; Patch adding support for encrypted volumes in LUKS2 format.
3647 ;; It comes from the Gentoo package definition for sys-auth/pam_mount.
3648 (search-patches "pam-mount-luks2-support.patch"))))
3649 (build-system gnu-build-system)
3650 (native-inputs
3651 `(("perl" ,perl)
3652 ("pkg-config" ,pkg-config)))
3653 (inputs
3654 `(("cryptsetup" ,cryptsetup)
3655 ("libhx" ,libhx)
3656 ("libxml2" ,libxml2)
3657 ("linux-pam" ,linux-pam)
3658 ("lvm2" ,lvm2)
3659 ("openssl" ,openssl)
3660 ("pcre" ,pcre)
bb93042c 3661 ("libmount" ,util-linux "lib")
cd2ce8ab
GLV
3662 ("util-linux" ,util-linux)))
3663 (arguments
3664 `(#:configure-flags
3665 (list (string-append "--with-slibdir=" %output "/lib")
3666 (string-append "--with-ssbindir=" %output "/sbin"))
3667 #:phases
3668 (modify-phases %standard-phases
3669 (add-after 'unpack 'fix-program-paths
3670 (lambda* (#:key inputs outputs #:allow-other-keys)
3671 (let ((util-linux (assoc-ref inputs "util-linux"))
3672 (out (assoc-ref outputs "out")))
3673 (substitute* "src/mtcrypt.c"
3674 (("\"mount\";")
3675 (string-append "\"" util-linux "/bin/mount\";"))
3676 (("\"umount\";")
3677 (string-append "\"" util-linux "/bin/umount\";"))
3678 (("\"fsck\",")
3679 (string-append "\"" util-linux "/sbin/fsck\",")))
3680 (substitute* "src/rdconf1.c"
3681 (("\"mount\", \"")
3682 (string-append "\"" util-linux "/bin/mount\", \""))
3683 (("\"umount\", \"")
3684 (string-append "\"" util-linux "/bin/umount\", \""))
3685 (("\"fsck\", \"")
3686 (string-append "\"" util-linux "/sbin/fsck\", \""))
3687 (("\"pmvarrun\", \"")
3688 (string-append "\"" out "/sbin/pmvarrun\", \""))))
3689 #t)))))
3690 (home-page "http://pam-mount.sourceforge.net")
3691 (synopsis "PAM module to mount volumes for a user session")
3692 (description
3693 "Pam-mount is a PAM module that can mount volumes when a user logs in.
3694It supports mounting local filesystems of any kind the normal mount utility
3695supports. It can also mount encrypted LUKS volumes using the password
3696supplied by the user when logging in.")
3697 (license (list license:gpl2+ license:lgpl2.1+))))