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