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