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