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