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