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