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