Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
fb9b7ce2 | 2 | ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> |
66269d47 | 3 | ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr> |
233e7676 | 4 | ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> |
bdac3d4b | 5 | ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> |
31aa4379 | 6 | ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch> |
e1e27737 | 7 | ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> |
fd76c904 | 8 | ;;; |
233e7676 | 9 | ;;; This file is part of GNU Guix. |
fd76c904 | 10 | ;;; |
233e7676 | 11 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
fd76c904 LC |
12 | ;;; under the terms of the GNU General Public License as published by |
13 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
14 | ;;; your option) any later version. | |
15 | ;;; | |
233e7676 | 16 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
fd76c904 LC |
17 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
18 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | ;;; GNU General Public License for more details. | |
20 | ;;; | |
21 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 22 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
fd76c904 | 23 | |
1ffa7090 | 24 | (define-module (gnu packages linux) |
023fef7d LC |
25 | #:use-module ((guix licenses) |
26 | #:hide (zlib)) | |
59a43334 | 27 | #:use-module (gnu packages) |
30016044 | 28 | #:use-module ((gnu packages compression) #:prefix guix:) |
3b027388 | 29 | #:use-module (gnu packages gcc) |
1ffa7090 | 30 | #:use-module (gnu packages flex) |
90a0048f | 31 | #:use-module (gnu packages bison) |
9f533d60 | 32 | #:use-module (gnu packages admin) |
d7d42d6b | 33 | #:use-module (gnu packages gperf) |
1ffa7090 LC |
34 | #:use-module (gnu packages libusb) |
35 | #:use-module (gnu packages ncurses) | |
d7d42d6b | 36 | #:use-module (gnu packages pciutils) |
5f96f303 | 37 | #:use-module (gnu packages databases) |
1ffa7090 LC |
38 | #:use-module (gnu packages perl) |
39 | #:use-module (gnu packages pkg-config) | |
7c0dbe78 | 40 | #:use-module (gnu packages python) |
b1fb4b23 | 41 | #:use-module (gnu packages slang) |
e7b38500 | 42 | #:use-module (gnu packages algebra) |
1dba6407 | 43 | #:use-module (gnu packages gettext) |
db288efa | 44 | #:use-module (gnu packages glib) |
17b293a0 | 45 | #:use-module (gnu packages pulseaudio) |
c762e82e | 46 | #:use-module (gnu packages attr) |
17b293a0 | 47 | #:use-module (gnu packages xml) |
215b6431 | 48 | #:use-module (gnu packages autotools) |
f57d2639 | 49 | #:use-module (gnu packages texinfo) |
b10e9ff6 | 50 | #:use-module (gnu packages check) |
30016044 MW |
51 | #:use-module (gnu packages maths) |
52 | #:use-module (gnu packages which) | |
53 | #:use-module (gnu packages rrdtool) | |
b62fe07f | 54 | #:use-module (gnu packages elf) |
b087d413 | 55 | #:use-module (gnu packages gtk) |
d7ece67a LC |
56 | #:use-module (gnu packages docbook) |
57 | #:use-module (gnu packages asciidoc) | |
02b80c3f NK |
58 | #:use-module (guix packages) |
59 | #:use-module (guix download) | |
dc2d59af | 60 | #:use-module (guix utils) |
7c0dbe78 | 61 | #:use-module (guix build-system gnu) |
220193ad | 62 | #:use-module (guix build-system cmake) |
e102f940 | 63 | #:use-module (guix build-system python) |
a94546ec LC |
64 | #:use-module (guix build-system trivial) |
65 | #:use-module (srfi srfi-26) | |
66 | #:use-module (ice-9 match)) | |
fd76c904 | 67 | |
aaf4cb20 LC |
68 | (define-public (system->linux-architecture arch) |
69 | "Return the Linux architecture name for ARCH, a Guix system name such as | |
70 | \"x86_64-linux\"." | |
618cea69 NK |
71 | (let ((arch (car (string-split arch #\-)))) |
72 | (cond ((string=? arch "i686") "i386") | |
73 | ((string-prefix? "mips" arch) "mips") | |
aaf4cb20 | 74 | ((string-prefix? "arm" arch) "arm") |
618cea69 NK |
75 | (else arch)))) |
76 | ||
6023cc74 LC |
77 | (define (linux-libre-urls version) |
78 | "Return a list of URLs for Linux-Libre VERSION." | |
79 | (list (string-append | |
80 | "http://linux-libre.fsfla.org/pub/linux-libre/releases/" | |
81 | version "-gnu/linux-libre-" version "-gnu.tar.xz") | |
82 | ||
83 | ;; XXX: Work around <http://bugs.gnu.org/14851>. | |
84 | (string-append | |
85 | "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-" | |
86 | version "-gnu.tar.xz") | |
87 | ||
88 | ;; Maybe this URL will become valid eventually. | |
89 | (string-append | |
90 | "mirror://gnu/linux-libre/" version "-gnu/linux-libre-" | |
91 | version "-gnu.tar.xz"))) | |
92 | ||
80fe5c60 | 93 | (define-public linux-libre-headers |
dfb52abb | 94 | (let* ((version "3.3.8") |
80fe5c60 | 95 | (build-phase |
618cea69 NK |
96 | (lambda (arch) |
97 | `(lambda _ | |
98 | (setenv "ARCH" ,(system->linux-architecture arch)) | |
99 | (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")) | |
45298f8f | 100 | |
618cea69 NK |
101 | (and (zero? (system* "make" "defconfig")) |
102 | (zero? (system* "make" "mrproper" "headers_check")))))) | |
80fe5c60 LC |
103 | (install-phase |
104 | `(lambda* (#:key outputs #:allow-other-keys) | |
105 | (let ((out (assoc-ref outputs "out"))) | |
106 | (and (zero? (system* "make" | |
107 | (string-append "INSTALL_HDR_PATH=" out) | |
108 | "headers_install")) | |
109 | (mkdir (string-append out "/include/config")) | |
110 | (call-with-output-file | |
111 | (string-append out | |
112 | "/include/config/kernel.release") | |
113 | (lambda (p) | |
dfb52abb | 114 | (format p "~a-default~%" ,version)))))))) |
80fe5c60 LC |
115 | (package |
116 | (name "linux-libre-headers") | |
dfb52abb | 117 | (version version) |
80fe5c60 LC |
118 | (source (origin |
119 | (method url-fetch) | |
6023cc74 | 120 | (uri (linux-libre-urls version)) |
80fe5c60 LC |
121 | (sha256 |
122 | (base32 | |
123 | "0jkfh0z1s6izvdnc3njm39dhzp1cg8i06jv06izwqz9w9qsprvnl")))) | |
124 | (build-system gnu-build-system) | |
125 | (native-inputs `(("perl" ,perl))) | |
126 | (arguments | |
127 | `(#:modules ((guix build gnu-build-system) | |
128 | (guix build utils) | |
56c092ce | 129 | (srfi srfi-1)) |
80fe5c60 | 130 | #:phases (alist-replace |
fb6c2fa8 LC |
131 | 'build ,(build-phase (or (%current-target-system) |
132 | (%current-system))) | |
80fe5c60 LC |
133 | (alist-replace |
134 | 'install ,install-phase | |
56c092ce | 135 | (alist-delete 'configure %standard-phases))) |
80fe5c60 LC |
136 | #:tests? #f)) |
137 | (synopsis "GNU Linux-Libre kernel headers") | |
138 | (description "Headers of the Linux-Libre kernel.") | |
38bbd61d | 139 | (license gpl2) |
80fe5c60 LC |
140 | (home-page "http://www.gnu.org/software/linux-libre/")))) |
141 | ||
b4fcb735 LC |
142 | (define-public module-init-tools |
143 | (package | |
144 | (name "module-init-tools") | |
145 | (version "3.16") | |
146 | (source (origin | |
147 | (method url-fetch) | |
148 | (uri (string-append | |
149 | "mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-" | |
150 | version ".tar.bz2")) | |
151 | (sha256 | |
152 | (base32 | |
d3bbe992 LC |
153 | "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1")) |
154 | (patches | |
155 | (list (search-patch "module-init-tools-moduledir.patch"))))) | |
b4fcb735 | 156 | (build-system gnu-build-system) |
b4fcb735 | 157 | (arguments |
5c413a9c LC |
158 | ;; FIXME: The upstream tarball lacks man pages, and building them would |
159 | ;; require DocBook & co. We used to use Gentoo's pre-built man pages, | |
160 | ;; but they vanished. In the meantime, fake it. | |
b4fcb735 | 161 | '(#:phases (alist-cons-before |
5c413a9c LC |
162 | 'configure 'fake-docbook |
163 | (lambda _ | |
164 | (substitute* "Makefile.in" | |
165 | (("^DOCBOOKTOMAN.*$") | |
166 | "DOCBOOKTOMAN = true\n"))) | |
b4fcb735 LC |
167 | %standard-phases))) |
168 | (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/") | |
169 | (synopsis "Tools for loading and managing Linux kernel modules") | |
170 | (description | |
171 | "Tools for loading and managing Linux kernel modules, such as `modprobe', | |
172 | `insmod', `lsmod', and more.") | |
173 | (license gpl2+))) | |
174 | ||
ac47a7c2 LC |
175 | (define %boot-logo-patch |
176 | ;; Linux-Libre boot logo featuring Freedo and a gnu. | |
177 | (origin | |
178 | (method url-fetch) | |
179 | (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/" | |
74dde9e9 | 180 | "lemote/gnewsense/branches/3.16/100gnu+freedo.patch")) |
ac47a7c2 LC |
181 | (sha256 |
182 | (base32 | |
183 | "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06")))) | |
184 | ||
a94546ec LC |
185 | (define (kernel-config system) |
186 | "Return the absolute file name of the Linux-Libre build configuration file | |
1650dd8a | 187 | for SYSTEM, or #f if there is no configuration for SYSTEM." |
a94546ec LC |
188 | (define (lookup file) |
189 | (let ((file (string-append "gnu/packages/" file))) | |
190 | (search-path %load-path file))) | |
191 | ||
192 | (match system | |
193 | ("i686-linux" | |
194 | (lookup "linux-libre-i686.conf")) | |
195 | ("x86_64-linux" | |
196 | (lookup "linux-libre-x86_64.conf")) | |
197 | (_ | |
1650dd8a | 198 | #f))) |
a94546ec | 199 | |
beacfcab | 200 | (define-public linux-libre |
8722166c | 201 | (let* ((version "3.18.7") |
beacfcab | 202 | (build-phase |
ac47a7c2 LC |
203 | '(lambda* (#:key system inputs #:allow-other-keys #:rest args) |
204 | ;; Apply the neat patch. | |
9a224ac2 | 205 | (system* "patch" "-p1" "--force" |
ac47a7c2 LC |
206 | "-i" (assoc-ref inputs "patch/freedo+gnu")) |
207 | ||
beacfcab LC |
208 | (let ((arch (car (string-split system #\-)))) |
209 | (setenv "ARCH" | |
210 | (cond ((string=? arch "i686") "i386") | |
211 | (else arch))) | |
212 | (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))) | |
213 | ||
a94546ec LC |
214 | (let ((build (assoc-ref %standard-phases 'build)) |
215 | (config (assoc-ref inputs "kconfig"))) | |
1650dd8a LC |
216 | |
217 | ;; Use the architecture-specific config if available, and | |
218 | ;; 'defconfig' otherwise. | |
219 | (if config | |
220 | (begin | |
221 | (copy-file config ".config") | |
222 | (chmod ".config" #o666)) | |
223 | (system* "make" "defconfig")) | |
a94546ec LC |
224 | |
225 | ;; Appending works even when the option wasn't in the | |
226 | ;; file. The last one prevails if duplicated. | |
227 | (let ((port (open-file ".config" "a"))) | |
228 | (display (string-append "CONFIG_NET_9P=m\n" | |
229 | "CONFIG_NET_9P_VIRTIO=m\n" | |
230 | "CONFIG_VIRTIO_BLK=m\n" | |
231 | "CONFIG_VIRTIO_NET=m\n" | |
232 | ;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html | |
233 | "CONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n" | |
234 | "CONFIG_VIRTIO_PCI=m\n" | |
235 | "CONFIG_VIRTIO_BALLOON=m\n" | |
236 | "CONFIG_VIRTIO_MMIO=m\n" | |
237 | "CONFIG_FUSE_FS=m\n" | |
238 | "CONFIG_CIFS=m\n" | |
239 | "CONFIG_9P_FS=m\n") | |
240 | port) | |
241 | (close-port port)) | |
242 | ||
243 | (zero? (system* "make" "oldconfig")) | |
244 | ||
245 | ;; Call the default `build' phase so `-j' is correctly | |
246 | ;; passed. | |
247 | (apply build #:make-flags "all" args)))) | |
beacfcab LC |
248 | (install-phase |
249 | `(lambda* (#:key inputs outputs #:allow-other-keys) | |
250 | (let* ((out (assoc-ref outputs "out")) | |
251 | (moddir (string-append out "/lib/modules")) | |
252 | (mit (assoc-ref inputs "module-init-tools"))) | |
253 | (mkdir-p moddir) | |
254 | (for-each (lambda (file) | |
255 | (copy-file file | |
256 | (string-append out "/" (basename file)))) | |
257 | (find-files "." "^(bzImage|System\\.map)$")) | |
258 | (copy-file ".config" (string-append out "/config")) | |
259 | (zero? (system* "make" | |
260 | (string-append "DEPMOD=" mit "/sbin/depmod") | |
261 | (string-append "MODULE_DIR=" moddir) | |
262 | (string-append "INSTALL_PATH=" out) | |
263 | (string-append "INSTALL_MOD_PATH=" out) | |
cda3d81e | 264 | "INSTALL_MOD_STRIP=1" |
beacfcab LC |
265 | "modules_install")))))) |
266 | (package | |
267 | (name "linux-libre") | |
dfb52abb | 268 | (version version) |
beacfcab LC |
269 | (source (origin |
270 | (method url-fetch) | |
6023cc74 | 271 | (uri (linux-libre-urls version)) |
beacfcab LC |
272 | (sha256 |
273 | (base32 | |
8722166c | 274 | "113r2dzmiwlchp5b3hyjyx91jysx5j4hhxjw45gaky5nj9pax2rh")))) |
beacfcab LC |
275 | (build-system gnu-build-system) |
276 | (native-inputs `(("perl" ,perl) | |
e7b38500 | 277 | ("bc" ,bc) |
ac47a7c2 | 278 | ("module-init-tools" ,module-init-tools) |
a94546ec | 279 | ("patch/freedo+gnu" ,%boot-logo-patch) |
1650dd8a LC |
280 | |
281 | ,@(let ((conf (kernel-config (or (%current-target-system) | |
282 | (%current-system))))) | |
283 | (if conf | |
284 | `(("kconfig" ,conf)) | |
285 | '())))) | |
3b027388 LC |
286 | |
287 | ;; XXX: Work around an ICE with our patched GCC 4.8.3 while compiling | |
288 | ;; 'drivers/staging/vt6656/michael.o': <http://hydra.gnu.org/build/96389/>. | |
289 | (inputs `(("gcc" ,gcc-4.9))) | |
290 | ||
beacfcab LC |
291 | (arguments |
292 | `(#:modules ((guix build gnu-build-system) | |
293 | (guix build utils) | |
294 | (srfi srfi-1) | |
295 | (ice-9 match)) | |
296 | #:phases (alist-replace | |
297 | 'build ,build-phase | |
298 | (alist-replace | |
299 | 'install ,install-phase | |
300 | (alist-delete 'configure %standard-phases))) | |
301 | #:tests? #f)) | |
f50d2669 | 302 | (synopsis "100% free redistribution of a cleaned Linux kernel") |
a22dc0c4 | 303 | (description |
79c311b8 LC |
304 | "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel. |
305 | It has been modified to remove all non-free binary blobs.") | |
beacfcab LC |
306 | (license gpl2) |
307 | (home-page "http://www.gnu.org/software/linux-libre/")))) | |
308 | ||
c84d0eca LC |
309 | \f |
310 | ;;; | |
311 | ;;; Pluggable authentication modules (PAM). | |
312 | ;;; | |
313 | ||
fd76c904 LC |
314 | (define-public linux-pam |
315 | (package | |
316 | (name "linux-pam") | |
317 | (version "1.1.6") | |
318 | (source | |
319 | (origin | |
320 | (method url-fetch) | |
321 | (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-" | |
322 | version ".tar.bz2") | |
323 | (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-" | |
324 | version ".tar.bz2"))) | |
325 | (sha256 | |
326 | (base32 | |
327 | "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s")))) | |
328 | (build-system gnu-build-system) | |
c4c4cc05 | 329 | (native-inputs |
fd76c904 LC |
330 | `(("flex" ,flex) |
331 | ||
332 | ;; TODO: optional dependencies | |
333 | ;; ("libxcrypt" ,libxcrypt) | |
334 | ;; ("cracklib" ,cracklib) | |
335 | )) | |
336 | (arguments | |
c134056a LC |
337 | '(;; Most users, such as `shadow', expect the headers to be under |
338 | ;; `security'. | |
339 | #:configure-flags (list (string-append "--includedir=" | |
340 | (assoc-ref %outputs "out") | |
341 | "/include/security")) | |
342 | ||
343 | ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d | |
344 | ;; isn't available. | |
345 | #:tests? #f)) | |
fd76c904 LC |
346 | (home-page "http://www.linux-pam.org/") |
347 | (synopsis "Pluggable authentication modules for Linux") | |
348 | (description | |
349 | "A *Free* project to implement OSF's RFC 86.0. | |
350 | Pluggable authentication modules are small shared object files that can | |
351 | be used through the PAM API to perform tasks, like authenticating a user | |
352 | at login. Local and dynamic reconfiguration are its key features") | |
4a44e743 | 353 | (license bsd-3))) |
686f14e8 | 354 | |
c84d0eca LC |
355 | \f |
356 | ;;; | |
357 | ;;; Miscellaneous. | |
358 | ;;; | |
359 | ||
686f14e8 LC |
360 | (define-public psmisc |
361 | (package | |
362 | (name "psmisc") | |
363 | (version "22.20") | |
364 | (source | |
365 | (origin | |
366 | (method url-fetch) | |
367 | (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-" | |
368 | version ".tar.gz")) | |
369 | (sha256 | |
370 | (base32 | |
371 | "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi")))) | |
372 | (build-system gnu-build-system) | |
373 | (inputs `(("ncurses" ,ncurses))) | |
374 | (home-page "http://psmisc.sourceforge.net/") | |
375 | (synopsis | |
35b9e423 | 376 | "Small utilities that use the proc filesystem") |
686f14e8 LC |
377 | (description |
378 | "This PSmisc package is a set of some small useful utilities that | |
35b9e423 | 379 | use the proc filesystem. We're not about changing the world, but |
686f14e8 | 380 | providing the system administrator with some help in common tasks.") |
4a44e743 | 381 | (license gpl2+))) |
02b80c3f NK |
382 | |
383 | (define-public util-linux | |
384 | (package | |
385 | (name "util-linux") | |
9f533d60 | 386 | (version "2.25.2") |
5a6a3ba4 LC |
387 | (source (origin |
388 | (method url-fetch) | |
389 | (uri (string-append "mirror://kernel.org/linux/utils/" | |
9f533d60 LC |
390 | name "/v" (version-major+minor version) "/" |
391 | name "-" version ".tar.xz")) | |
5a6a3ba4 LC |
392 | (sha256 |
393 | (base32 | |
9f533d60 LC |
394 | "1miwwdq1zwvhf0smrxx3fjddq3mz22s8rc5cw54s7x3kbdqpyig0")) |
395 | (patches (list (search-patch "util-linux-tests.patch"))) | |
9d77da2a LC |
396 | (modules '((guix build utils))) |
397 | (snippet | |
ec2da92c LC |
398 | ;; We take the 'logger' program from GNU Inetutils and 'kill' |
399 | ;; from GNU Coreutils. | |
9f533d60 | 400 | '(substitute* "configure" |
ec2da92c LC |
401 | (("build_logger=yes") "build_logger=no") |
402 | (("build_kill=yes") "build_kill=no"))))) | |
02b80c3f NK |
403 | (build-system gnu-build-system) |
404 | (arguments | |
8b8476b8 AE |
405 | `(#:configure-flags '("--disable-use-tty-group" |
406 | "--enable-ddate") | |
9f533d60 LC |
407 | #:phases (alist-cons-before |
408 | 'check 'pre-check | |
409 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
410 | (let ((out (assoc-ref outputs "out")) | |
411 | (net (assoc-ref inputs "net-base"))) | |
412 | ;; Change the test to refer to the right file. | |
413 | (substitute* "tests/ts/misc/mcookie" | |
414 | (("/etc/services") | |
415 | (string-append net "/etc/services"))) | |
416 | #t)) | |
02b80c3f | 417 | %standard-phases))) |
4a44e743 | 418 | (inputs `(("zlib" ,guix:zlib) |
c4c4cc05 JD |
419 | ("ncurses" ,ncurses))) |
420 | (native-inputs | |
9f533d60 LC |
421 | `(("perl" ,perl) |
422 | ("net-base" ,net-base))) ;for tests | |
02b80c3f | 423 | (home-page "https://www.kernel.org/pub/linux/utils/util-linux/") |
35ec07c7 | 424 | (synopsis "Collection of utilities for the Linux kernel") |
02b80c3f | 425 | (description |
35b9e423 | 426 | "Util-linux is a random collection of utilities for the Linux kernel.") |
fe8ccfcc | 427 | |
02b80c3f | 428 | ;; Note that util-linux doesn't use the same license for all the |
fe8ccfcc | 429 | ;; code. GPLv2+ is the default license for a code without an |
02b80c3f | 430 | ;; explicitly defined license. |
fe8ccfcc LC |
431 | (license (list gpl3+ gpl2+ gpl2 lgpl2.0+ |
432 | bsd-4 public-domain)))) | |
5d5c4278 | 433 | |
e47e3eff LC |
434 | (define-public procps |
435 | (package | |
436 | (name "procps") | |
437 | (version "3.2.8") | |
438 | (source (origin | |
439 | (method url-fetch) | |
440 | (uri (string-append "http://procps.sourceforge.net/procps-" | |
441 | version ".tar.gz")) | |
442 | (sha256 | |
443 | (base32 | |
01eafd38 LC |
444 | "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i")) |
445 | (patches (list (search-patch "procps-make-3.82.patch"))))) | |
e47e3eff | 446 | (build-system gnu-build-system) |
01eafd38 | 447 | (inputs `(("ncurses" ,ncurses))) |
e47e3eff | 448 | (arguments |
80393eed LC |
449 | '(#:modules ((guix build utils) |
450 | (guix build gnu-build-system) | |
451 | (srfi srfi-1) | |
452 | (srfi srfi-26)) | |
453 | #:phases (alist-replace | |
e47e3eff LC |
454 | 'configure |
455 | (lambda* (#:key outputs #:allow-other-keys) | |
456 | ;; No `configure', just a single Makefile. | |
457 | (let ((out (assoc-ref outputs "out"))) | |
458 | (substitute* "Makefile" | |
459 | (("/usr/") "/") | |
460 | (("--(owner|group) 0") "") | |
461 | (("ldconfig") "true") | |
462 | (("^LDFLAGS[[:blank:]]*:=(.*)$" _ value) | |
463 | ;; Add libproc to the RPATH. | |
464 | (string-append "LDFLAGS := -Wl,-rpath=" | |
465 | out "/lib" value)))) | |
466 | (setenv "CC" "gcc")) | |
467 | (alist-replace | |
468 | 'install | |
469 | (lambda* (#:key outputs #:allow-other-keys) | |
470 | (let ((out (assoc-ref outputs "out"))) | |
471 | (and (zero? | |
472 | (system* "make" "install" | |
473 | (string-append "DESTDIR=" out))) | |
474 | ||
80393eed LC |
475 | ;; Remove commands and man pages redundant with |
476 | ;; Coreutils. | |
477 | (let ((dup (append-map (cut find-files out <>) | |
478 | '("^kill" "^uptime")))) | |
479 | (for-each delete-file dup) | |
480 | #t) | |
481 | ||
e47e3eff LC |
482 | ;; Sanity check. |
483 | (zero? | |
484 | (system* (string-append out "/bin/ps") | |
485 | "--version"))))) | |
486 | %standard-phases)) | |
487 | ||
488 | ;; What did you expect? Tests? | |
489 | #:tests? #f)) | |
490 | (home-page "http://procps.sourceforge.net/") | |
35ec07c7 | 491 | (synopsis "Utilities that give information about processes") |
e47e3eff | 492 | (description |
35b9e423 | 493 | "Procps is the package that has a bunch of small useful utilities |
e47e3eff LC |
494 | that give information about processes using the Linux /proc file system. |
495 | The package includes the programs ps, top, vmstat, w, kill, free, | |
496 | slabtop, and skill.") | |
497 | (license gpl2))) | |
498 | ||
5d5c4278 NK |
499 | (define-public usbutils |
500 | (package | |
501 | (name "usbutils") | |
502 | (version "006") | |
503 | (source | |
504 | (origin | |
505 | (method url-fetch) | |
506 | (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/" | |
507 | "usbutils-" version ".tar.xz")) | |
508 | (sha256 | |
509 | (base32 | |
510 | "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr")))) | |
511 | (build-system gnu-build-system) | |
512 | (inputs | |
c4c4cc05 JD |
513 | `(("libusb" ,libusb))) |
514 | (native-inputs | |
515 | `(("pkg-config" ,pkg-config))) | |
5d5c4278 NK |
516 | (home-page "http://www.linux-usb.org/") |
517 | (synopsis | |
518 | "Tools for working with USB devices, such as lsusb") | |
519 | (description | |
520 | "Tools for working with USB devices, such as lsusb.") | |
4050e5d6 | 521 | (license gpl2+))) |
0750452a LC |
522 | |
523 | (define-public e2fsprogs | |
524 | (package | |
525 | (name "e2fsprogs") | |
61bce2f9 | 526 | (version "1.42.11") |
0750452a LC |
527 | (source (origin |
528 | (method url-fetch) | |
529 | (uri (string-append "mirror://sourceforge/e2fsprogs/e2fsprogs-" | |
530 | version ".tar.gz")) | |
531 | (sha256 | |
532 | (base32 | |
61bce2f9 | 533 | "0xhbj7494g3y2w2miyrzdz6nciaffxajrs6wqm73yp4jnrqagn2b")) |
7c594a2c LC |
534 | (modules '((guix build utils))) |
535 | (snippet | |
536 | '(substitute* "MCONFIG.in" | |
537 | (("INSTALL_SYMLINK = /bin/sh") | |
538 | "INSTALL_SYMLINK = sh"))))) | |
0750452a | 539 | (build-system gnu-build-system) |
c4c4cc05 | 540 | (inputs `(("util-linux" ,util-linux))) |
f57d2639 | 541 | (native-inputs `(("pkg-config" ,pkg-config) |
7c594a2c | 542 | ("texinfo" ,texinfo))) ;for the libext2fs Info manual |
0750452a | 543 | (arguments |
c44ed26c LC |
544 | '(;; util-linux is not the preferred source for some of the libraries and |
545 | ;; commands, so disable them (see, e.g., | |
ddfc2fd8 | 546 | ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b336339909c90559b7db40b455f172>.) |
c44ed26c LC |
547 | #:configure-flags '("--disable-libblkid" |
548 | "--disable-libuuid" "--disable-uuidd" | |
549 | "--disable-fsck" | |
7c594a2c LC |
550 | |
551 | ;; Install libext2fs et al. | |
552 | "--enable-elf-shlibs") | |
553 | ||
554 | #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" | |
555 | (assoc-ref %outputs "out") | |
556 | "/lib")) | |
ddfc2fd8 LC |
557 | |
558 | #:phases (alist-cons-before | |
0750452a LC |
559 | 'configure 'patch-shells |
560 | (lambda _ | |
561 | (substitute* "configure" | |
562 | (("/bin/sh (.*)parse-types.sh" _ dir) | |
563 | (string-append (which "sh") " " dir | |
564 | "parse-types.sh"))) | |
565 | (substitute* (find-files "." "^Makefile.in$") | |
566 | (("#!/bin/sh") | |
567 | (string-append "#!" (which "sh"))))) | |
1c975f60 LC |
568 | (alist-cons-after |
569 | 'install 'install-libs | |
570 | (lambda _ | |
571 | (zero? (system* "make" "install-libs"))) | |
572 | %standard-phases)) | |
0750452a LC |
573 | |
574 | ;; FIXME: Tests work by comparing the stdout/stderr of programs, that | |
575 | ;; they fail because we get an extra line that says "Can't check if | |
576 | ;; filesystem is mounted due to missing mtab file". | |
577 | #:tests? #f)) | |
578 | (home-page "http://e2fsprogs.sourceforge.net/") | |
35ec07c7 | 579 | (synopsis "Creating and checking ext2/ext3/ext4 file systems") |
0750452a LC |
580 | (description |
581 | "This package provides tools for manipulating ext2/ext3/ext4 file systems.") | |
582 | (license (list gpl2 ; programs | |
583 | lgpl2.0 ; libext2fs | |
584 | x11)))) ; libuuid | |
d8482ad0 | 585 | |
e48977e7 LC |
586 | (define e2fsprogs/static |
587 | (static-package | |
588 | (package (inherit e2fsprogs) | |
589 | (arguments | |
590 | ;; Do not build shared libraries. | |
591 | (substitute-keyword-arguments (package-arguments e2fsprogs) | |
592 | ((#:configure-flags _) | |
593 | '(list "--disable-blkid")) | |
594 | ((#:make-flags _) | |
595 | '(list))))))) | |
596 | ||
e102f940 LC |
597 | (define-public e2fsck/static |
598 | (package | |
599 | (name "e2fsck-static") | |
0997771a | 600 | (version (package-version e2fsprogs)) |
e102f940 LC |
601 | (build-system trivial-build-system) |
602 | (source #f) | |
603 | (arguments | |
604 | `(#:modules ((guix build utils)) | |
605 | #:builder | |
606 | (begin | |
607 | (use-modules (guix build utils) | |
608 | (ice-9 ftw) | |
609 | (srfi srfi-26)) | |
610 | ||
611 | (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs") | |
612 | "/sbin")) | |
613 | (bin (string-append (assoc-ref %outputs "out") "/sbin"))) | |
614 | (mkdir-p bin) | |
615 | (with-directory-excursion bin | |
616 | (for-each (lambda (file) | |
617 | (copy-file (string-append source "/" file) | |
618 | file) | |
619 | (remove-store-references file) | |
620 | (chmod file #o555)) | |
621 | (scandir source (cut string-prefix? "fsck." <>)))))))) | |
e48977e7 | 622 | (inputs `(("e2fsprogs" ,e2fsprogs/static))) |
e102f940 LC |
623 | (synopsis "Statically-linked fsck.* commands from e2fsprogs") |
624 | (description | |
625 | "This package provides statically-linked command of fsck.ext[234] taken | |
626 | from the e2fsprogs package. It is meant to be used in initrds.") | |
0997771a LC |
627 | (home-page (package-home-page e2fsprogs)) |
628 | (license (package-license e2fsprogs)))) | |
e102f940 | 629 | |
1c975f60 LC |
630 | (define-public zerofree |
631 | (package | |
632 | (name "zerofree") | |
633 | (version "1.0.3") | |
634 | (home-page "http://intgat.tigress.co.uk/rmy/uml/") | |
635 | (source (origin | |
636 | (method url-fetch) | |
637 | (uri (string-append home-page name "-" version | |
638 | ".tgz")) | |
639 | (sha256 | |
640 | (base32 | |
641 | "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs")))) | |
642 | (build-system gnu-build-system) | |
643 | (arguments | |
644 | '(#:phases (alist-replace | |
645 | 'install | |
646 | (lambda* (#:key outputs #:allow-other-keys) | |
647 | (let* ((out (assoc-ref outputs "out")) | |
648 | (bin (string-append out "/bin"))) | |
649 | (mkdir-p bin) | |
650 | (copy-file "zerofree" | |
651 | (string-append bin "/zerofree")) | |
652 | (chmod (string-append bin "/zerofree") | |
653 | #o555) | |
654 | #t)) | |
655 | (alist-delete 'configure %standard-phases)) | |
656 | #:tests? #f)) ;no tests | |
657 | (inputs `(("libext2fs" ,e2fsprogs))) | |
658 | (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems") | |
659 | (description | |
660 | "The zerofree command scans the free blocks in an ext2 file system and | |
661 | fills any non-zero blocks with zeroes. This is a useful way to make disk | |
662 | images more compressible.") | |
663 | (license gpl2))) | |
664 | ||
d8482ad0 LC |
665 | (define-public strace |
666 | (package | |
667 | (name "strace") | |
668 | (version "4.7") | |
669 | (source (origin | |
670 | (method url-fetch) | |
671 | (uri (string-append "mirror://sourceforge/strace/strace-" | |
672 | version ".tar.xz")) | |
673 | (sha256 | |
674 | (base32 | |
675 | "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764")))) | |
676 | (build-system gnu-build-system) | |
c4c4cc05 | 677 | (native-inputs `(("perl" ,perl))) |
d8482ad0 LC |
678 | (home-page "http://strace.sourceforge.net/") |
679 | (synopsis "System call tracer for Linux") | |
680 | (description | |
681 | "strace is a system call tracer, i.e. a debugging tool which prints out a | |
682 | trace of all the system calls made by a another process/program.") | |
683 | (license bsd-3))) | |
ba04571a | 684 | |
e1e27737 TUBK |
685 | (define-public ltrace |
686 | (package | |
687 | (name "ltrace") | |
688 | (version "0.7.3") | |
689 | (source (origin | |
690 | (method url-fetch) | |
691 | (uri (string-append "http://www.ltrace.org/ltrace_" version | |
692 | ".orig.tar.bz2")) | |
693 | (sha256 | |
694 | (base32 | |
695 | "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf")))) | |
696 | (build-system gnu-build-system) | |
697 | (inputs `(("libelf" ,libelf))) | |
698 | (arguments | |
699 | ;; Compilation uses -Werror by default, but it fails. | |
700 | '(#:configure-flags '("--disable-werror"))) | |
701 | (home-page "http://www.ltrace.org/") | |
702 | (synopsis "Library call tracer for Linux") | |
703 | (description | |
704 | "ltrace intercepts and records dynamic library calls which are called by | |
705 | an executed process and the signals received by that process. It can also | |
706 | intercept and print the system calls executed by the program.") | |
707 | (license gpl2+))) | |
708 | ||
ba04571a LC |
709 | (define-public alsa-lib |
710 | (package | |
711 | (name "alsa-lib") | |
712 | (version "1.0.27.1") | |
713 | (source (origin | |
714 | (method url-fetch) | |
715 | (uri (string-append | |
716 | "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-" | |
717 | version ".tar.bz2")) | |
718 | (sha256 | |
719 | (base32 | |
bcd94e19 MW |
720 | "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9")) |
721 | (patches (list (search-patch "alsa-lib-mips-atomic-fix.patch"))))) | |
ba04571a LC |
722 | (build-system gnu-build-system) |
723 | (home-page "http://www.alsa-project.org/") | |
724 | (synopsis "The Advanced Linux Sound Architecture libraries") | |
725 | (description | |
726 | "The Advanced Linux Sound Architecture (ALSA) provides audio and | |
727 | MIDI functionality to the Linux-based operating system.") | |
728 | (license lgpl2.1+))) | |
10afdf50 | 729 | |
17b293a0 LC |
730 | (define-public alsa-utils |
731 | (package | |
732 | (name "alsa-utils") | |
733 | (version "1.0.27.2") | |
734 | (source (origin | |
735 | (method url-fetch) | |
736 | (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-" | |
737 | version ".tar.bz2")) | |
738 | (sha256 | |
739 | (base32 | |
740 | "1sjjngnq50jv5ilwsb4zys6smifni3bd6fn28gbnhfrg14wsrgq2")))) | |
741 | (build-system gnu-build-system) | |
742 | (arguments | |
743 | ;; XXX: Disable man page creation until we have DocBook. | |
744 | '(#:configure-flags (list "--disable-xmlto" | |
f2817d43 LC |
745 | |
746 | ;; The udev rule is responsible for restoring | |
747 | ;; the volume. | |
17b293a0 LC |
748 | (string-append "--with-udev-rules-dir=" |
749 | (assoc-ref %outputs "out") | |
750 | "/lib/udev/rules.d")) | |
751 | #:phases (alist-cons-before | |
752 | 'install 'pre-install | |
753 | (lambda _ | |
754 | ;; Don't try to mkdir /var/lib/alsa. | |
755 | (substitute* "Makefile" | |
756 | (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*") | |
757 | "true\n"))) | |
758 | %standard-phases))) | |
759 | (inputs | |
760 | `(("libsamplerate" ,libsamplerate) | |
761 | ("ncurses" ,ncurses) | |
762 | ("alsa-lib" ,alsa-lib) | |
763 | ("xmlto" ,xmlto) | |
1dba6407 | 764 | ("gettext" ,gnu-gettext))) |
17b293a0 LC |
765 | (home-page "http://www.alsa-project.org/") |
766 | (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)") | |
767 | (description | |
768 | "The Advanced Linux Sound Architecture (ALSA) provides audio and | |
769 | MIDI functionality to the Linux-based operating system.") | |
770 | ||
771 | ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are | |
772 | ;; GPLv2-only. | |
773 | (license gpl2))) | |
774 | ||
10afdf50 LC |
775 | (define-public iptables |
776 | (package | |
777 | (name "iptables") | |
778 | (version "1.4.16.2") | |
779 | (source (origin | |
780 | (method url-fetch) | |
781 | (uri (string-append | |
782 | "http://www.netfilter.org/projects/iptables/files/iptables-" | |
783 | version ".tar.bz2")) | |
784 | (sha256 | |
785 | (base32 | |
786 | "0vkg5lzkn4l3i1sm6v3x96zzvnv9g7mi0qgj6279ld383mzcws24")))) | |
787 | (build-system gnu-build-system) | |
788 | (arguments '(#:tests? #f)) ; no test suite | |
789 | (home-page "http://www.netfilter.org/projects/iptables/index.html") | |
790 | (synopsis "Program to configure the Linux IP packet filtering rules") | |
791 | (description | |
792 | "iptables is the userspace command line program used to configure the | |
793 | Linux 2.4.x and later IPv4 packet filtering ruleset. It is targeted towards | |
794 | system administrators. Since Network Address Translation is also configured | |
795 | from the packet filter ruleset, iptables is used for this, too. The iptables | |
796 | package also includes ip6tables. ip6tables is used for configuring the IPv6 | |
797 | packet filter.") | |
798 | (license gpl2+))) | |
90a0048f LC |
799 | |
800 | (define-public iproute | |
801 | (package | |
802 | (name "iproute2") | |
5fd7f3e0 | 803 | (version "3.12.0") |
90a0048f LC |
804 | (source (origin |
805 | (method url-fetch) | |
806 | (uri (string-append | |
807 | "mirror://kernel.org/linux/utils/net/iproute2/iproute2-" | |
808 | version ".tar.xz")) | |
809 | (sha256 | |
810 | (base32 | |
5fd7f3e0 | 811 | "04gi11gh087bg2nlxhj0lxrk8l9qxkpr88nsiil23917bm3h1xj4")))) |
90a0048f LC |
812 | (build-system gnu-build-system) |
813 | (arguments | |
814 | `(#:tests? #f ; no test suite | |
815 | #:make-flags (let ((out (assoc-ref %outputs "out"))) | |
816 | (list "DESTDIR=" | |
817 | (string-append "LIBDIR=" out "/lib") | |
818 | (string-append "SBINDIR=" out "/sbin") | |
819 | (string-append "CONFDIR=" out "/etc") | |
820 | (string-append "DOCDIR=" out "/share/doc/" | |
821 | ,name "-" ,version) | |
822 | (string-append "MANDIR=" out "/share/man"))) | |
823 | #:phases (alist-cons-before | |
824 | 'install 'pre-install | |
825 | (lambda _ | |
826 | ;; Don't attempt to create /var/lib/arpd. | |
827 | (substitute* "Makefile" | |
828 | (("^.*ARPDDIR.*$") ""))) | |
829 | %standard-phases))) | |
830 | (inputs | |
831 | `(("iptables" ,iptables) | |
c4c4cc05 JD |
832 | ("db4" ,bdb))) |
833 | (native-inputs | |
834 | `(("pkg-config" ,pkg-config) | |
90a0048f LC |
835 | ("flex" ,flex) |
836 | ("bison" ,bison))) | |
837 | (home-page | |
838 | "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2") | |
839 | (synopsis | |
9e771e3b | 840 | "Utilities for controlling TCP/IP networking and traffic in Linux") |
90a0048f LC |
841 | (description |
842 | "Iproute2 is a collection of utilities for controlling TCP/IP | |
843 | networking and traffic with the Linux kernel. | |
844 | ||
845 | Most network configuration manuals still refer to ifconfig and route as the | |
846 | primary network configuration tools, but ifconfig is known to behave | |
847 | inadequately in modern network environments. They should be deprecated, but | |
848 | most distros still include them. Most network configuration systems make use | |
849 | of ifconfig and thus provide a limited feature set. The /etc/net project aims | |
850 | to support most modern network technologies, as it doesn't use ifconfig and | |
851 | allows a system administrator to make use of all iproute2 features, including | |
852 | traffic control. | |
853 | ||
854 | iproute2 is usually shipped in a package called iproute or iproute2 and | |
855 | consists of several tools, of which the most important are ip and tc. ip | |
856 | controls IPv4 and IPv6 configuration and tc stands for traffic control. Both | |
857 | tools print detailed usage messages and are accompanied by a set of | |
858 | manpages.") | |
859 | (license gpl2+))) | |
85e0dc6a LC |
860 | |
861 | (define-public net-tools | |
862 | ;; XXX: This package is basically unmaintained, but it provides a few | |
863 | ;; commands not yet provided by Inetutils, such as 'route', so we have to | |
864 | ;; live with it. | |
865 | (package | |
866 | (name "net-tools") | |
867 | (version "1.60") | |
868 | (home-page "http://www.tazenda.demon.co.uk/phil/net-tools/") | |
869 | (source (origin | |
870 | (method url-fetch) | |
871 | (uri (string-append home-page "/" name "-" | |
872 | version ".tar.bz2")) | |
873 | (sha256 | |
874 | (base32 | |
177088a3 LC |
875 | "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s")) |
876 | (patches | |
877 | (list (search-patch "net-tools-bitrot.patch"))))) | |
85e0dc6a LC |
878 | (build-system gnu-build-system) |
879 | (arguments | |
c9e0a44e LC |
880 | '(#:modules ((guix build gnu-build-system) |
881 | (guix build utils) | |
882 | (srfi srfi-1) | |
883 | (srfi srfi-26)) | |
884 | #:phases (alist-cons-after | |
cd143df0 | 885 | 'unpack 'patch |
85e0dc6a LC |
886 | (lambda* (#:key inputs #:allow-other-keys) |
887 | (define (apply-patch file) | |
9a224ac2 | 888 | (zero? (system* "patch" "-p1" "--force" |
85e0dc6a LC |
889 | "--input" file))) |
890 | ||
891 | (let ((patch.gz (assoc-ref inputs "patch"))) | |
892 | (format #t "applying Debian patch set '~a'...~%" | |
893 | patch.gz) | |
894 | (system (string-append "gunzip < " patch.gz " > the-patch")) | |
85e0dc6a LC |
895 | (and (apply-patch "the-patch") |
896 | (for-each apply-patch | |
897 | (find-files "debian/patches" | |
898 | "\\.patch"))))) | |
899 | (alist-replace | |
900 | 'configure | |
901 | (lambda* (#:key outputs #:allow-other-keys) | |
902 | (let ((out (assoc-ref outputs "out"))) | |
903 | (mkdir-p (string-append out "/bin")) | |
904 | (mkdir-p (string-append out "/sbin")) | |
905 | ||
906 | ;; Pretend we have everything... | |
907 | (system "yes | make config") | |
908 | ||
909 | ;; ... except we don't have libdnet, so remove that | |
910 | ;; definition. | |
911 | (substitute* '("config.make" "config.h") | |
912 | (("^.*HAVE_AFDECnet.*$") "")))) | |
c9e0a44e LC |
913 | (alist-cons-after |
914 | 'install 'remove-redundant-commands | |
915 | (lambda* (#:key outputs #:allow-other-keys) | |
916 | ;; Remove commands and man pages redundant with | |
917 | ;; Inetutils. | |
918 | (let* ((out (assoc-ref outputs "out")) | |
919 | (dup (append-map (cut find-files out <>) | |
920 | '("^hostname" | |
921 | "^(yp|nis|dns)?domainname")))) | |
922 | (for-each delete-file dup) | |
923 | #t)) | |
924 | %standard-phases))) | |
85e0dc6a LC |
925 | |
926 | ;; Binaries that depend on libnet-tools.a don't declare that | |
927 | ;; dependency, making it parallel-unsafe. | |
928 | #:parallel-build? #f | |
929 | ||
930 | #:tests? #f ; no test suite | |
0d55c356 MW |
931 | #:make-flags (let ((out (assoc-ref %outputs "out"))) |
932 | (list "CC=gcc" | |
933 | (string-append "BASEDIR=" out) | |
934 | (string-append "INSTALLNLSDIR=" out "/share/locale") | |
935 | (string-append "mandir=/share/man"))))) | |
85e0dc6a LC |
936 | |
937 | ;; Use the big Debian patch set (the thing does not even compile out of | |
938 | ;; the box.) | |
939 | (inputs `(("patch" ,(origin | |
940 | (method url-fetch) | |
941 | (uri | |
942 | "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz") | |
943 | (sha256 | |
944 | (base32 | |
945 | "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p")))))) | |
1dba6407 | 946 | (native-inputs `(("gettext" ,gnu-gettext))) |
85e0dc6a LC |
947 | |
948 | (synopsis "Tools for controlling the network subsystem in Linux") | |
949 | (description | |
950 | "This package includes the important tools for controlling the network | |
951 | subsystem of the Linux kernel. This includes arp, hostname, ifconfig, | |
952 | netstat, rarp and route. Additionally, this package contains utilities | |
953 | relating to particular network hardware types (plipconfig, slattach) and | |
954 | advanced aspects of IP configuration (iptunnel, ipmaddr).") | |
955 | (license gpl2+))) | |
c762e82e LC |
956 | |
957 | (define-public libcap | |
958 | (package | |
959 | (name "libcap") | |
960 | (version "2.22") | |
961 | (source (origin | |
962 | (method url-fetch) | |
963 | ||
964 | ;; Tarballs used to be available from | |
965 | ;; <https://www.kernel.org/pub/linux/libs/security/linux-privs/> | |
966 | ;; but they never came back after kernel.org was compromised. | |
967 | (uri (string-append | |
968 | "mirror://debian/pool/main/libc/libcap2/libcap2_" | |
969 | version ".orig.tar.gz")) | |
970 | (sha256 | |
971 | (base32 | |
972 | "07vjhkznm82p8dm4w6j8mmg7h5c70lp5s9bwwfdmgwpbixfydjp1")))) | |
973 | (build-system gnu-build-system) | |
974 | (arguments '(#:phases (alist-delete 'configure %standard-phases) | |
975 | #:tests? #f ; no 'check' target | |
976 | #:make-flags (list "lib=lib" | |
977 | (string-append "prefix=" | |
978 | (assoc-ref %outputs "out")) | |
979 | "RAISE_SETFCAP=no"))) | |
980 | (native-inputs `(("perl" ,perl))) | |
981 | (inputs `(("attr" ,attr))) | |
982 | (home-page "https://sites.google.com/site/fullycapable/") | |
983 | (synopsis "Library for working with POSIX capabilities") | |
984 | (description | |
35b9e423 | 985 | "Libcap2 provides a programming interface to POSIX capabilities on |
c762e82e LC |
986 | Linux-based operating systems.") |
987 | ||
988 | ;; License is BSD-3 or GPLv2, at the user's choice. | |
989 | (license gpl2))) | |
215b6431 LC |
990 | |
991 | (define-public bridge-utils | |
992 | (package | |
993 | (name "bridge-utils") | |
994 | (version "1.5") | |
995 | (source (origin | |
996 | (method url-fetch) | |
997 | (uri (string-append "mirror://sourceforge/bridge/bridge-utils-" | |
998 | version ".tar.gz")) | |
999 | (sha256 | |
1000 | (base32 | |
1001 | "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2")))) | |
1002 | (build-system gnu-build-system) | |
1003 | ||
1004 | ;; The tarball lacks all the generated files. | |
1005 | (native-inputs `(("autoconf" ,autoconf) | |
1006 | ("automake" ,automake))) | |
1007 | (arguments | |
1008 | '(#:phases (alist-cons-before | |
1009 | 'configure 'bootstrap | |
1010 | (lambda _ | |
1011 | (zero? (system* "autoreconf" "-vf"))) | |
1012 | %standard-phases) | |
1013 | #:tests? #f)) ; no 'check' target | |
1014 | ||
1015 | (home-page | |
1016 | "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge") | |
1017 | (synopsis "Manipulate Ethernet bridges") | |
1018 | (description | |
1019 | "Utilities for Linux's Ethernet bridging facilities. A bridge is a way | |
1020 | to connect two Ethernet segments together in a protocol independent way. | |
1021 | Packets are forwarded based on Ethernet address, rather than IP address (like | |
1022 | a router). Since forwarding is done at Layer 2, all protocols can go | |
1023 | transparently through a bridge.") | |
1024 | (license gpl2+))) | |
3cc20675 LC |
1025 | |
1026 | (define-public libnl | |
1027 | (package | |
1028 | (name "libnl") | |
bdac3d4b | 1029 | (version "3.2.25") |
3cc20675 LC |
1030 | (source (origin |
1031 | (method url-fetch) | |
1032 | (uri (string-append | |
1033 | "http://www.infradead.org/~tgr/libnl/files/libnl-" | |
1034 | version ".tar.gz")) | |
1035 | (sha256 | |
1036 | (base32 | |
bdac3d4b | 1037 | "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb")))) |
3cc20675 LC |
1038 | (build-system gnu-build-system) |
1039 | (native-inputs `(("flex" ,flex) ("bison" ,bison))) | |
1040 | (home-page "http://www.infradead.org/~tgr/libnl/") | |
1041 | (synopsis "NetLink protocol library suite") | |
1042 | (description | |
1043 | "The libnl suite is a collection of libraries providing APIs to netlink | |
1044 | protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarly | |
1045 | between the kernel and user space processes. It was designed to be a more | |
1046 | flexible successor to ioctl to provide mainly networking related kernel | |
1047 | configuration and monitoring interfaces.") | |
1048 | ||
1049 | ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like | |
1050 | ;; 'nl-addr-add.c'), so the result is GPLv2-only. | |
1051 | (license gpl2))) | |
023fef7d | 1052 | |
65cd77db MW |
1053 | (define-public iw |
1054 | (package | |
1055 | (name "iw") | |
1056 | (version "3.17") | |
1057 | (source (origin | |
1058 | (method url-fetch) | |
1059 | (uri (string-append | |
1060 | "https://www.kernel.org/pub/software/network/iw/iw-" | |
1061 | version ".tar.xz")) | |
1062 | (sha256 | |
1063 | (base32 | |
1064 | "14zsapqhivk0ws5z21y1ys2c2czi05mzk7bl2yb7qxcfrnsjx9j8")))) | |
1065 | (build-system gnu-build-system) | |
1066 | (native-inputs `(("pkg-config" ,pkg-config))) | |
1067 | (inputs `(("libnl" ,libnl))) | |
1068 | (arguments | |
1069 | `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) | |
1070 | "CC=gcc") | |
1071 | #:phases (alist-delete 'configure %standard-phases))) | |
1072 | (home-page "http://wireless.kernel.org/en/users/Documentation/iw") | |
1073 | (synopsis "Tool for configuring wireless devices") | |
1074 | (description | |
1075 | "iw is a new nl80211 based CLI configuration utility for wireless | |
1076 | devices. It replaces 'iwconfig', which is deprecated.") | |
1077 | (license isc))) | |
1078 | ||
023fef7d LC |
1079 | (define-public powertop |
1080 | (package | |
1081 | (name "powertop") | |
1082 | (version "2.5") | |
1083 | (source | |
1084 | (origin | |
1085 | (method url-fetch) | |
1086 | (uri (string-append | |
1087 | "https://01.org/powertop/sites/default/files/downloads/powertop-" | |
1088 | version ".tar.gz")) | |
1089 | (sha256 | |
1090 | (base32 | |
1091 | "02rwqbpasdayl201v0549gbp2f82rd0hqiv3i111r7npanjhhb4b")))) | |
1092 | (build-system gnu-build-system) | |
1093 | (inputs | |
1094 | ;; TODO: Add pciutils. | |
1095 | `(("zlib" ,guix:zlib) | |
023fef7d LC |
1096 | ;; ("pciutils" ,pciutils) |
1097 | ("ncurses" ,ncurses) | |
1098 | ("libnl" ,libnl))) | |
c4c4cc05 JD |
1099 | (native-inputs |
1100 | `(("pkg-config" ,pkg-config))) | |
023fef7d LC |
1101 | (home-page "https://01.org/powertop/") |
1102 | (synopsis "Analyze power consumption on Intel-based laptops") | |
1103 | (description | |
1104 | "PowerTOP is a Linux tool to diagnose issues with power consumption and | |
1105 | power management. In addition to being a diagnostic tool, PowerTOP also has | |
1106 | an interactive mode where the user can experiment various power management | |
1107 | settings for cases where the operating system has not enabled these | |
1108 | settings.") | |
1109 | (license gpl2))) | |
6869e5c9 LC |
1110 | |
1111 | (define-public aumix | |
1112 | (package | |
1113 | (name "aumix") | |
1114 | (version "2.9.1") | |
1115 | (source (origin | |
1116 | (method url-fetch) | |
1117 | (uri (string-append | |
1118 | "http://www.jpj.net/~trevor/aumix/releases/aumix-" | |
1119 | version ".tar.bz2")) | |
1120 | (sha256 | |
1121 | (base32 | |
1122 | "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj")))) | |
1123 | (build-system gnu-build-system) | |
1124 | (inputs `(("ncurses" ,ncurses))) | |
1125 | (home-page "http://www.jpj.net/~trevor/aumix.html") | |
1126 | (synopsis "Audio mixer for X and the console") | |
1127 | (description | |
1128 | "Aumix adjusts an audio mixer from X, the console, a terminal, | |
1129 | the command line or a script.") | |
1130 | (license gpl2+))) | |
7c0dbe78 SHT |
1131 | |
1132 | (define-public iotop | |
1133 | (package | |
1134 | (name "iotop") | |
1135 | (version "0.6") | |
1136 | (source | |
1137 | (origin | |
1138 | (method url-fetch) | |
1139 | (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-" | |
1140 | version ".tar.gz")) | |
1141 | (sha256 (base32 | |
1142 | "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s")))) | |
1143 | (build-system python-build-system) | |
1144 | (arguments | |
35cebf01 | 1145 | ;; The setup.py script expects python-2. |
7c0dbe78 | 1146 | `(#:python ,python-2 |
35cebf01 | 1147 | ;; There are currently no checks in the package. |
7c0dbe78 SHT |
1148 | #:tests? #f)) |
1149 | (native-inputs `(("python" ,python-2))) | |
1150 | (home-page "http://guichaz.free.fr/iotop/") | |
1151 | (synopsis | |
1152 | "Displays the IO activity of running processes") | |
1153 | (description | |
1154 | "Iotop is a Python program with a top like user interface to show the | |
1155 | processes currently causing I/O.") | |
35cebf01 | 1156 | (license gpl2+))) |
e30835e2 LC |
1157 | |
1158 | (define-public fuse | |
1159 | (package | |
1160 | (name "fuse") | |
1161 | (version "2.9.3") | |
1162 | (source (origin | |
1163 | (method url-fetch) | |
1164 | (uri (string-append "mirror://sourceforge/fuse/fuse-" | |
1165 | version ".tar.gz")) | |
1166 | (sha256 | |
1167 | (base32 | |
1168 | "071r6xjgssy8vwdn6m28qq1bqxsd2bphcd2mzhq0grf5ybm87sqb")))) | |
1169 | (build-system gnu-build-system) | |
b148bd71 | 1170 | (inputs `(("util-linux" ,util-linux))) |
e30835e2 LC |
1171 | (arguments |
1172 | '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH=" | |
1173 | (assoc-ref %outputs "out") | |
1174 | "/sbin") | |
1175 | (string-append "INIT_D_PATH=" | |
1176 | (assoc-ref %outputs "out") | |
1177 | "/etc/init.d") | |
9a4efac9 LC |
1178 | |
1179 | ;; The rule makes /dev/fuse 666. | |
e30835e2 LC |
1180 | (string-append "UDEV_RULES_PATH=" |
1181 | (assoc-ref %outputs "out") | |
9a4efac9 | 1182 | "/lib/udev/rules.d")) |
b148bd71 LC |
1183 | #:phases (alist-cons-before |
1184 | 'build 'set-file-names | |
1185 | (lambda* (#:key inputs #:allow-other-keys) | |
1186 | ;; libfuse calls out to mount(8) and umount(8). Make sure | |
1187 | ;; it refers to the right ones. | |
1188 | (substitute* '("lib/mount_util.c" "util/mount_util.c") | |
1189 | (("/bin/(u?)mount" _ maybe-u) | |
1190 | (string-append (assoc-ref inputs "util-linux") | |
1191 | "/bin/" maybe-u "mount"))) | |
1192 | (substitute* '("util/mount.fuse.c") | |
1193 | (("/bin/sh") | |
bd663902 LC |
1194 | (which "sh"))) |
1195 | ||
1196 | ;; This hack leads libfuse to search for 'fusermount' in | |
1197 | ;; $PATH, where it may find a setuid-root binary, instead of | |
1198 | ;; trying solely $out/sbin/fusermount and failing because | |
1199 | ;; it's not setuid. | |
1200 | (substitute* "lib/Makefile" | |
1201 | (("-DFUSERMOUNT_DIR=[[:graph:]]+") | |
1202 | "-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))) | |
b148bd71 | 1203 | %standard-phases))) |
e30835e2 LC |
1204 | (home-page "http://fuse.sourceforge.net/") |
1205 | (synopsis "Support file systems implemented in user space") | |
1206 | (description | |
1207 | "As a consequence of its monolithic design, file system code for Linux | |
1208 | normally goes into the kernel itself---which is not only a robustness issue, | |
1209 | but also an impediment to system extensibility. FUSE, for \"file systems in | |
1210 | user space\", is a kernel module and user-space library that tries to address | |
1211 | part of this problem by allowing users to run file system implementations as | |
1212 | user-space processes.") | |
1213 | (license (list lgpl2.1 ; library | |
1214 | gpl2+)))) ; command-line utilities | |
220193ad LC |
1215 | |
1216 | (define-public unionfs-fuse | |
1217 | (package | |
1218 | (name "unionfs-fuse") | |
1219 | (version "0.26") | |
1220 | (source (origin | |
1221 | (method url-fetch) | |
1222 | (uri (string-append | |
1223 | "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-" | |
1224 | version ".tar.xz")) | |
1225 | (sha256 | |
1226 | (base32 | |
1227 | "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d")))) | |
1228 | (build-system cmake-build-system) | |
1229 | (inputs `(("fuse" ,fuse))) | |
1230 | (arguments '(#:tests? #f)) ; no tests | |
1231 | (home-page "http://podgorny.cz/moin/UnionFsFuse") | |
1232 | (synopsis "User-space union file system") | |
1233 | (description | |
1234 | "UnionFS-FUSE is a flexible union file system implementation in user | |
1235 | space, using the FUSE library. Mounting a union file system allows you to | |
1236 | \"aggregate\" the contents of several directories into a single mount point. | |
1237 | UnionFS-FUSE additionally supports copy-on-write.") | |
1238 | (license bsd-3))) | |
ed748588 | 1239 | |
0b7a0c20 LC |
1240 | (define fuse-static |
1241 | (package (inherit fuse) | |
1242 | (name "fuse-static") | |
1243 | (source (origin (inherit (package-source fuse)) | |
1244 | (modules '((guix build utils))) | |
1245 | (snippet | |
1246 | ;; Normally libfuse invokes mount(8) so that /etc/mtab is | |
1247 | ;; updated. Change calls to 'mtab_needs_update' to 0 so that | |
1248 | ;; it doesn't do that, allowing us to remove the dependency on | |
1249 | ;; util-linux (something that is useful in initrds.) | |
1250 | '(substitute* '("lib/mount_util.c" | |
1251 | "util/mount_util.c") | |
1252 | (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)") | |
1253 | "0") | |
1254 | (("/bin/") | |
1255 | ""))))))) | |
1256 | ||
ed748588 LC |
1257 | (define-public unionfs-fuse/static |
1258 | (package (inherit unionfs-fuse) | |
1259 | (synopsis "User-space union file system (statically linked)") | |
1260 | (name (string-append (package-name unionfs-fuse) "-static")) | |
1261 | (source (origin (inherit (package-source unionfs-fuse)) | |
1262 | (modules '((guix build utils))) | |
1263 | (snippet | |
1264 | ;; Add -ldl to the libraries, because libfuse.a needs that. | |
1265 | '(substitute* "src/CMakeLists.txt" | |
1266 | (("target_link_libraries(.*)\\)" _ libs) | |
1267 | (string-append "target_link_libraries" | |
1268 | libs " dl)")))))) | |
1269 | (arguments | |
1270 | '(#:tests? #f | |
1456cff1 LC |
1271 | #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static") |
1272 | #:phases (alist-cons-after | |
1273 | 'install 'post-install | |
1274 | (lambda* (#:key outputs #:allow-other-keys) | |
1275 | (let* ((out (assoc-ref outputs "out")) | |
1276 | (exe (string-append out "/bin/unionfs"))) | |
1277 | ;; By default, 'unionfs' keeps references to | |
1278 | ;; $glibc/share/locale and similar stuff. Remove them. | |
1279 | (remove-store-references exe))) | |
1280 | %standard-phases))) | |
0b7a0c20 | 1281 | (inputs `(("fuse" ,fuse-static))))) |
67b66003 | 1282 | |
db288efa LC |
1283 | (define-public sshfs-fuse |
1284 | (package | |
1285 | (name "sshfs-fuse") | |
1286 | (version "2.5") | |
1287 | (source (origin | |
1288 | (method url-fetch) | |
1289 | (uri (string-append "mirror://sourceforge/fuse/sshfs-fuse-" | |
1290 | version ".tar.gz")) | |
1291 | (sha256 | |
1292 | (base32 | |
1293 | "0gp6qr33l2p0964j0kds0dfmvyyf5lpgsn11daf0n5fhwm9185z9")))) | |
1294 | (build-system gnu-build-system) | |
1295 | (inputs | |
1296 | `(("fuse" ,fuse) | |
1297 | ("glib" ,glib))) | |
1298 | (native-inputs | |
1299 | `(("pkg-config" ,pkg-config))) | |
1300 | (home-page "http://fuse.sourceforge.net/sshfs.html") | |
1301 | (synopsis "Mount remote file systems over SSH") | |
1302 | (description | |
1303 | "This is a file system client based on the SSH File Transfer Protocol. | |
1304 | Since most SSH servers already support this protocol it is very easy to set | |
1305 | up: on the server side there's nothing to do; on the client side mounting the | |
1306 | file system is as easy as logging into the server with an SSH client.") | |
1307 | (license gpl2+))) | |
1308 | ||
67b66003 LC |
1309 | (define-public numactl |
1310 | (package | |
1311 | (name "numactl") | |
1312 | (version "2.0.9") | |
1313 | (source (origin | |
1314 | (method url-fetch) | |
1315 | (uri (string-append | |
1316 | "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-" | |
1317 | version | |
1318 | ".tar.gz")) | |
1319 | (sha256 | |
1320 | (base32 | |
1321 | "073myxlyyhgxh1w3r757ajixb7s2k69czc3r0g12c3scq7k3784w")))) | |
1322 | (build-system gnu-build-system) | |
1323 | (arguments | |
1324 | '(#:phases (alist-replace | |
1325 | 'configure | |
1326 | (lambda* (#:key outputs #:allow-other-keys) | |
1327 | ;; There's no 'configure' script, just a raw makefile. | |
1328 | (substitute* "Makefile" | |
1329 | (("^prefix := .*$") | |
1330 | (string-append "prefix := " (assoc-ref outputs "out") | |
1331 | "\n")) | |
1332 | (("^libdir := .*$") | |
1333 | ;; By default the thing tries to install under | |
1334 | ;; $prefix/lib64 when on a 64-bit platform. | |
1335 | (string-append "libdir := $(prefix)/lib\n")))) | |
1336 | %standard-phases) | |
1337 | ||
1338 | #:make-flags (list | |
1339 | ;; By default the thing tries to use 'cc'. | |
1340 | "CC=gcc" | |
1341 | ||
1342 | ;; Make sure programs have an RPATH so they can find | |
1343 | ;; libnuma.so. | |
1344 | (string-append "LDLIBS=-Wl,-rpath=" | |
1345 | (assoc-ref %outputs "out") "/lib")) | |
1346 | ||
1347 | ;; There's a 'test' target, but it requires NUMA support in the kernel | |
1348 | ;; to run, which we can't assume to have. | |
1349 | #:tests? #f)) | |
1350 | (home-page "http://oss.sgi.com/projects/libnuma/") | |
1351 | (synopsis "Tools for non-uniform memory access (NUMA) machines") | |
1352 | (description | |
1353 | "NUMA stands for Non-Uniform Memory Access, in other words a system whose | |
1354 | memory is not all in one place. The numactl program allows you to run your | |
1355 | application program on specific CPU's and memory nodes. It does this by | |
1356 | supplying a NUMA memory policy to the operating system before running your | |
1357 | program. | |
1358 | ||
1359 | The package contains other commands, such as numademo, numastat and memhog. | |
1360 | The numademo command provides a quick overview of NUMA performance on your | |
1361 | system.") | |
1362 | (license (list gpl2 ; programs | |
1363 | lgpl2.1)))) ; library | |
b10e9ff6 LC |
1364 | |
1365 | (define-public kbd | |
1366 | (package | |
1367 | (name "kbd") | |
1368 | (version "2.0.1") | |
1369 | (source (origin | |
1370 | (method url-fetch) | |
1371 | (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-" | |
1372 | version ".tar.gz")) | |
1373 | (sha256 | |
1374 | (base32 | |
c8f60748 LC |
1375 | "0c34b0za2v0934acvgnva0vaqpghmmhz4zh7k0m9jd4mbc91byqm")) |
1376 | (modules '((guix build utils))) | |
1377 | (snippet | |
f2cdcafb LC |
1378 | '(begin |
1379 | (substitute* "tests/Makefile.in" | |
1380 | ;; The '%: %.in' rule incorrectly uses @VERSION@. | |
1381 | (("@VERSION@") | |
1382 | "[@]VERSION[@]")) | |
1383 | (substitute* '("src/unicode_start" "src/unicode_stop") | |
1384 | ;; Assume the Coreutils are in $PATH. | |
1385 | (("/usr/bin/tty") | |
1386 | "tty")))))) | |
b10e9ff6 LC |
1387 | (build-system gnu-build-system) |
1388 | (arguments | |
1389 | '(#:phases (alist-cons-before | |
1390 | 'build 'pre-build | |
1391 | (lambda* (#:key inputs #:allow-other-keys) | |
1392 | (let ((gzip (assoc-ref %build-inputs "gzip")) | |
1393 | (bzip2 (assoc-ref %build-inputs "bzip2"))) | |
1394 | (substitute* "src/libkeymap/findfile.c" | |
1395 | (("gzip") | |
1396 | (string-append gzip "/bin/gzip")) | |
1397 | (("bzip2") | |
1398 | (string-append bzip2 "/bin/bzip2"))))) | |
f2cdcafb LC |
1399 | (alist-cons-after |
1400 | 'install 'post-install | |
1401 | (lambda* (#:key outputs #:allow-other-keys) | |
1402 | ;; Make sure these programs find their comrades. | |
1403 | (let* ((out (assoc-ref outputs "out")) | |
1404 | (bin (string-append out "/bin"))) | |
1405 | (for-each (lambda (prog) | |
1406 | (wrap-program (string-append bin "/" prog) | |
1407 | `("PATH" ":" prefix (,bin)))) | |
1408 | '("unicode_start" "unicode_stop")))) | |
1409 | %standard-phases)))) | |
b10e9ff6 LC |
1410 | (inputs `(("check" ,check) |
1411 | ("gzip" ,guix:gzip) | |
1412 | ("bzip2" ,guix:bzip2) | |
1413 | ("pam" ,linux-pam))) | |
1414 | (native-inputs `(("pkg-config" ,pkg-config))) | |
1415 | (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/") | |
1416 | (synopsis "Linux keyboard utilities and keyboard maps") | |
1417 | (description | |
1418 | "This package contains keytable files and keyboard utilities compatible | |
1419 | for systems using the Linux kernel. This includes commands such as | |
1420 | 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.") | |
1421 | (license gpl2+))) | |
de0b620e LC |
1422 | |
1423 | (define-public inotify-tools | |
1424 | (package | |
1425 | (name "inotify-tools") | |
1426 | (version "3.13") | |
1427 | (source (origin | |
1428 | (method url-fetch) | |
1429 | (uri (string-append | |
1430 | "mirror://sourceforge/inotify-tools/inotify-tools/" | |
1431 | version "/inotify-tools-" version ".tar.gz")) | |
1432 | (sha256 | |
1433 | (base32 | |
1434 | "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6")))) | |
1435 | (build-system gnu-build-system) | |
1436 | (home-page "http://inotify-tools.sourceforge.net/") | |
1437 | (synopsis "Monitor file accesses") | |
1438 | (description | |
1439 | "The inotify-tools packages provides a C library and command-line tools | |
1440 | to use Linux' inotify mechanism, which allows file accesses to be monitored.") | |
1441 | (license gpl2+))) | |
e062d542 AE |
1442 | |
1443 | (define-public kmod | |
1444 | (package | |
1445 | (name "kmod") | |
1446 | (version "17") | |
1447 | (source (origin | |
1448 | (method url-fetch) | |
1449 | (uri | |
1450 | (string-append "mirror://kernel.org/linux/utils/kernel/kmod/" | |
1451 | "kmod-" version ".tar.xz")) | |
1452 | (sha256 | |
1453 | (base32 | |
528b6a3d LC |
1454 | "1yid3a9b64a60ybj66fk2ysrq5klnl0ijl4g624cl16y8404g9rv")) |
1455 | (patches (list (search-patch "kmod-module-directory.patch"))))) | |
e062d542 AE |
1456 | (build-system gnu-build-system) |
1457 | (native-inputs | |
1458 | `(("pkg-config" ,pkg-config))) | |
1459 | (inputs | |
1460 | `(("xz" ,guix:xz) | |
1461 | ("zlib" ,guix:zlib))) | |
1462 | (arguments | |
1463 | `(#:tests? #f ; FIXME: Investigate test failures | |
4a8b4c25 LC |
1464 | #:configure-flags '("--with-xz" "--with-zlib") |
1465 | #:phases (alist-cons-after | |
1466 | 'install 'install-modprobe&co | |
1467 | (lambda* (#:key outputs #:allow-other-keys) | |
1468 | (let* ((out (assoc-ref outputs "out")) | |
1469 | (bin (string-append out "/bin"))) | |
1470 | (for-each (lambda (tool) | |
1471 | (symlink "kmod" | |
1472 | (string-append bin "/" tool))) | |
1473 | '("insmod" "rmmod" "lsmod" "modprobe" | |
1474 | "modinfo" "depmod")))) | |
1475 | %standard-phases))) | |
e062d542 AE |
1476 | (home-page "https://www.kernel.org/") |
1477 | (synopsis "Kernel module tools") | |
35b9e423 | 1478 | (description "Kmod is a set of tools to handle common tasks with Linux |
e062d542 AE |
1479 | kernel modules like insert, remove, list, check properties, resolve |
1480 | dependencies and aliases. | |
1481 | ||
1482 | These tools are designed on top of libkmod, a library that is shipped with | |
1483 | kmod. The aim is to be compatible with tools, configurations and indices | |
1484 | from the module-init-tools project.") | |
1485 | (license gpl2+))) ; library under lgpl2.1+ | |
d7d42d6b | 1486 | |
7fa715e7 LC |
1487 | (define-public eudev |
1488 | ;; The post-systemd fork, maintained by Gentoo. | |
fe32c7f7 | 1489 | (package |
7fa715e7 | 1490 | (name "eudev") |
b6e5e1b7 | 1491 | (version "2.1.1") |
7fa715e7 LC |
1492 | (source (origin |
1493 | (method url-fetch) | |
1494 | (uri (string-append | |
1495 | "http://dev.gentoo.org/~blueness/eudev/eudev-" | |
1496 | version ".tar.gz")) | |
1497 | (sha256 | |
1498 | (base32 | |
b6e5e1b7 | 1499 | "0shf5vqiz9fdxl95aa1a8vh0xjxwim3psc39wr2xr8lnahf11vva")) |
eb564fc3 LC |
1500 | (patches (list (search-patch "eudev-rules-directory.patch"))) |
1501 | (modules '((guix build utils))) | |
1502 | (snippet | |
1503 | ;; 'configure' checks uses <linux/btrfs.h> as an indication of | |
1504 | ;; whether Linux headers are available, but it doesn't actually | |
1505 | ;; use it, and our 'linux-libre-headers' package doesn't | |
1506 | ;; provide it. So just remove that. | |
1507 | '(substitute* "configure" | |
1508 | (("linux/btrfs\\.h") | |
1509 | ""))))) | |
fe32c7f7 MW |
1510 | (build-system gnu-build-system) |
1511 | (native-inputs | |
1512 | `(("pkg-config" ,pkg-config) | |
1513 | ("gperf" ,gperf) | |
1514 | ("glib" ,glib "bin") ; glib-genmarshal, etc. | |
1515 | ("perl" ,perl) ; for the tests | |
1516 | ("python" ,python-2))) ; ditto | |
1517 | (inputs | |
1518 | `(("kmod" ,kmod) | |
1519 | ("pciutils" ,pciutils) | |
1520 | ("usbutils" ,usbutils) | |
1521 | ("util-linux" ,util-linux) | |
1522 | ("glib" ,glib) | |
1523 | ("gobject-introspection" ,gobject-introspection))) | |
dc2d59af | 1524 | (arguments |
fe32c7f7 MW |
1525 | `(#:configure-flags (list "--enable-libkmod" |
1526 | ||
1527 | (string-append | |
1528 | "--with-pci-ids-path=" | |
1529 | (assoc-ref %build-inputs "pciutils") | |
1530 | "/share/pci.ids.gz") | |
1531 | ||
1532 | "--with-firmware-path=/no/firmware" | |
1533 | ||
1534 | ;; Work around undefined reference to | |
1535 | ;; 'mq_getattr' in sc-daemon.c. | |
31aa4379 FB |
1536 | "LDFLAGS=-lrt") |
1537 | #:phases | |
1538 | (alist-cons-before | |
1539 | 'build 'pre-build | |
1540 | ;; The program 'g-ir-scanner' (part of the package | |
1541 | ;; 'gobject-introspection'), to generate .gir files, makes some | |
1542 | ;; library pre-processing. During that phase it looks for the C | |
1543 | ;; compiler as either 'cc' or as defined by the environment variable | |
1544 | ;; 'CC' (with code in 'giscanner/dumper.py'). | |
1545 | (lambda* _ | |
1546 | (setenv "CC" "gcc")) | |
1547 | %standard-phases))) | |
fe32c7f7 MW |
1548 | (home-page "http://www.gentoo.org/proj/en/eudev/") |
1549 | (synopsis "Userspace device management") | |
1550 | (description "Udev is a daemon which dynamically creates and removes | |
1551 | device nodes from /dev/, handles hotplug events and loads drivers at boot | |
1552 | time.") | |
1553 | (license gpl2+))) | |
7fa715e7 | 1554 | |
66269d47 LC |
1555 | (define-public lvm2 |
1556 | (package | |
1557 | (name "lvm2") | |
1558 | (version "2.02.109") | |
1559 | (source (origin | |
1560 | (method url-fetch) | |
1561 | (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2." | |
1562 | version ".tgz")) | |
1563 | (sha256 | |
1564 | (base32 | |
1565 | "1rv5ivg0l1w3nwzwdkqixm96h5bzg7ib4rr196ysb2lw42jmpjbv")) | |
1566 | (modules '((guix build utils))) | |
1567 | (snippet | |
1568 | '(begin | |
1569 | (use-modules (guix build utils)) | |
1570 | ||
1571 | ;; Honor sysconfdir. | |
1572 | (substitute* "make.tmpl.in" | |
1573 | (("confdir = .*$") | |
1574 | "confdir = @sysconfdir@\n") | |
1575 | (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@") | |
1576 | "DEFAULT_SYS_DIR = @sysconfdir@")))))) | |
1577 | (build-system gnu-build-system) | |
1578 | (native-inputs | |
1579 | `(("pkg-config" ,pkg-config) | |
1580 | ("procps" ,procps))) ;tests use 'pgrep' | |
1581 | (inputs | |
8fcaf8b1 | 1582 | `(("udev" ,eudev))) |
66269d47 LC |
1583 | (arguments |
1584 | '(#:phases (alist-cons-after | |
1585 | 'configure 'set-makefile-shell | |
1586 | (lambda _ | |
1587 | ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as | |
1588 | ;; expected. | |
1589 | (setenv "SHELL" (which "sh")) | |
1590 | ||
1591 | ;; Replace /bin/sh with the right file name. | |
1592 | (patch-makefile-SHELL "make.tmpl")) | |
1593 | %standard-phases) | |
1594 | ||
1595 | #:configure-flags (list (string-append "--sysconfdir=" | |
1596 | (assoc-ref %outputs "out") | |
1597 | "/etc/lvm") | |
1598 | "--enable-udev_sync" | |
f2817d43 LC |
1599 | "--enable-udev_rules" |
1600 | ||
1601 | ;; Make sure programs such as 'dmsetup' can | |
1602 | ;; find libdevmapper.so. | |
1603 | (string-append "LDFLAGS=-Wl,-rpath=" | |
1604 | (assoc-ref %outputs "out") | |
1605 | "/lib")) | |
66269d47 LC |
1606 | |
1607 | ;; The tests use 'mknod', which requires root access. | |
1608 | #:tests? #f)) | |
1609 | (home-page "http://sourceware.org/lvm2/") | |
1610 | (synopsis "Logical volume management for Linux") | |
1611 | (description | |
1612 | "LVM2 is the logical volume management tool set for Linux-based systems. | |
1613 | This package includes the user-space libraries and tools, including the device | |
1614 | mapper. Kernel components are part of Linux-libre.") | |
1615 | ||
1616 | ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1. | |
1617 | ;; Command-line tools are GPLv2. | |
1618 | (license (list gpl2 lgpl2.1)))) | |
1619 | ||
000f7559 DT |
1620 | (define-public wireless-tools |
1621 | (package | |
1622 | (name "wireless-tools") | |
1623 | (version "30.pre9") | |
1624 | (source (origin | |
1625 | (method url-fetch) | |
1626 | (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools." | |
1627 | version ".tar.gz")) | |
1628 | (sha256 | |
1629 | (base32 | |
ec01f22d SB |
1630 | "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb")) |
1631 | (modules '((guix build utils))) | |
1632 | (snippet | |
1633 | ;; Install the manual pages in the right place. | |
1634 | '(substitute* "Makefile" | |
1635 | (("INSTALL_MAN= .*") | |
1636 | "INSTALL_MAN= $(PREFIX)/share/man"))))) | |
000f7559 DT |
1637 | (build-system gnu-build-system) |
1638 | (arguments | |
1639 | `(#:phases (alist-replace | |
1640 | 'configure | |
1641 | (lambda* (#:key outputs #:allow-other-keys) | |
1642 | (setenv "PREFIX" (assoc-ref outputs "out"))) | |
1643 | %standard-phases) | |
1644 | #:tests? #f)) | |
1645 | (synopsis "Tools for manipulating Linux Wireless Extensions") | |
fb9b7ce2 LC |
1646 | (description "Wireless Tools are used to manipulate the now-deprecated |
1647 | Linux Wireless Extensions; consider using 'iw' instead. The Wireless | |
1648 | Extension was an interface allowing you to set Wireless LAN specific | |
1649 | parameters and get the specific stats. It is deprecated in favor the nl80211 | |
1650 | interface.") | |
000f7559 DT |
1651 | (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html") |
1652 | (license gpl2+))) | |
30016044 MW |
1653 | |
1654 | (define-public lm-sensors | |
1655 | (package | |
1656 | (name "lm-sensors") | |
1657 | (version "3.3.5") | |
1658 | (source (origin | |
1659 | (method url-fetch) | |
1660 | (uri (string-append | |
1661 | "http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-" | |
1662 | version ".tar.bz2")) | |
1663 | (sha256 | |
1664 | (base32 | |
1665 | "1ksgrynxgrq590nb2fwxrl1gwzisjkqlyg3ljfd1al0ibrk6mbjx")) | |
1666 | (patches (list (search-patch "lm-sensors-hwmon-attrs.patch"))))) | |
1667 | (build-system gnu-build-system) | |
1668 | (inputs `(("rrdtool" ,rrdtool) | |
1669 | ("perl" ,perl) | |
1670 | ("kmod" ,kmod) | |
1671 | ("gnuplot" ,gnuplot))) | |
1672 | (native-inputs `(("pkg-config" ,pkg-config) | |
1673 | ("flex" ,flex) | |
1674 | ("bison" ,bison) | |
1675 | ("which" ,which))) | |
1676 | (arguments | |
1677 | `(#:tests? #f ; no 'check' target | |
1678 | #:make-flags (list (string-append "PREFIX=" %output) | |
1679 | (string-append "ETCDIR=" %output "/etc") | |
1680 | (string-append "MANDIR=" %output "/share/man")) | |
1681 | #:phases | |
1682 | (alist-delete | |
1683 | 'configure | |
1684 | (alist-cons-before | |
1685 | 'build 'patch-exec-paths | |
1686 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1687 | (substitute* "prog/detect/sensors-detect" | |
1688 | (("`uname") | |
1689 | (string-append "`" (assoc-ref inputs "coreutils") | |
1690 | "/bin/uname")) | |
1691 | (("(`|\")modprobe" all open-quote) | |
1692 | (string-append open-quote | |
1693 | (assoc-ref inputs "kmod") | |
1694 | "/bin/modprobe"))) | |
1695 | (substitute* '("prog/pwm/pwmconfig" | |
1696 | "prog/pwm/fancontrol") | |
1697 | (("gnuplot") | |
1698 | (string-append (assoc-ref inputs "gnuplot") | |
1699 | "/bin/gnuplot")) | |
1700 | (("cat ") | |
1701 | (string-append (assoc-ref inputs "coreutils") | |
1702 | "/bin/cat ")) | |
1703 | (("egrep ") | |
1704 | (string-append (assoc-ref inputs "grep") | |
1705 | "/bin/egrep ")) | |
1706 | (("sed -e") | |
1707 | (string-append (assoc-ref inputs "sed") | |
1708 | "/bin/sed -e")) | |
1709 | (("cut -d") | |
1710 | (string-append (assoc-ref inputs "coreutils") | |
1711 | "/bin/cut -d")) | |
1712 | (("sleep ") | |
1713 | (string-append (assoc-ref inputs "coreutils") | |
1714 | "/bin/sleep ")) | |
1715 | (("readlink -f") | |
1716 | (string-append (assoc-ref inputs "coreutils") | |
1717 | "/bin/readlink -f")))) | |
1718 | %standard-phases)))) | |
1719 | (home-page "http://www.lm-sensors.org/") | |
1720 | (synopsis "Utilities to read temperature/voltage/fan sensors") | |
1721 | (description | |
35b9e423 | 1722 | "Lm-sensors is a hardware health monitoring package for Linux. It allows |
30016044 MW |
1723 | you to access information from temperature, voltage, and fan speed sensors. |
1724 | It works with most newer systems.") | |
1725 | (license gpl2+))) | |
b087d413 MW |
1726 | |
1727 | (define-public xsensors | |
1728 | (package | |
1729 | (name "xsensors") | |
1730 | (version "0.70") | |
1731 | (source (origin | |
1732 | (method url-fetch) | |
1733 | (uri (string-append | |
1734 | "http://www.linuxhardware.org/xsensors/xsensors-" | |
1735 | version ".tar.gz")) | |
1736 | (sha256 | |
1737 | (base32 | |
1738 | "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh")))) | |
1739 | (build-system gnu-build-system) | |
1740 | (inputs `(("lm-sensors" ,lm-sensors) | |
1741 | ("gtk" ,gtk+-2))) | |
1742 | (native-inputs `(("pkg-config" ,pkg-config))) | |
1743 | (arguments | |
1744 | `(#:phases (alist-cons-before | |
1745 | 'configure 'enable-deprecated | |
1746 | (lambda _ | |
1747 | (substitute* "src/Makefile.in" | |
1748 | (("-DGDK_DISABLE_DEPRECATED") "") | |
1749 | (("-DGTK_DISABLE_DEPRECATED") ""))) | |
1750 | (alist-cons-before | |
1751 | 'configure 'remove-Werror | |
1752 | (lambda _ | |
1753 | (substitute* '("configure" "src/Makefile.in") | |
1754 | (("-Werror") ""))) | |
1755 | %standard-phases)))) | |
1756 | (home-page "http://www.linuxhardware.org/xsensors/") | |
1757 | (synopsis "Hardware health information viewer") | |
1758 | (description | |
35b9e423 | 1759 | "Xsensors reads data from the libsensors library regarding hardware |
b087d413 MW |
1760 | health such as temperature, voltage and fan speed and displays the information |
1761 | in a digital read-out.") | |
1762 | (license gpl2+))) | |
b62fe07f LC |
1763 | |
1764 | (define-public perf | |
1765 | (package | |
1766 | (name "perf") | |
1767 | (version (package-version linux-libre)) | |
1768 | (source (package-source linux-libre)) | |
1769 | (build-system gnu-build-system) | |
1770 | (arguments | |
1771 | '(#:phases (alist-replace | |
1772 | 'configure | |
1773 | (lambda* (#:key inputs #:allow-other-keys) | |
1774 | (setenv "SHELL_PATH" (which "bash")) | |
1775 | (chdir "tools/perf")) | |
1776 | %standard-phases) | |
1777 | #:make-flags (list (string-append "DESTDIR=" | |
1778 | (assoc-ref %outputs "out")) | |
2af29d23 LC |
1779 | "WERROR=0" |
1780 | ||
1781 | ;; By default, 'config/Makefile' uses lib64 on | |
1782 | ;; x86_64. Work around that. | |
1783 | "lib=lib") | |
b62fe07f LC |
1784 | #:tests? #f)) ;no tests |
1785 | (native-inputs | |
1786 | `(("pkg-config" ,pkg-config) | |
1787 | ("bison" ,bison) | |
1788 | ("flex" ,flex) | |
1789 | ||
1790 | ;; There are build scripts written in these languages. | |
1791 | ("perl" ,perl) | |
1792 | ("python" ,python-2))) | |
1793 | (inputs | |
b1fb4b23 | 1794 | `(("slang" ,slang) ;for the interactive TUI |
b62fe07f | 1795 | ;; ("newt" ,newt) |
6c030d10 | 1796 | ("python" ,python-2) ;'perf' links against libpython |
b62fe07f LC |
1797 | ("elfutils" ,elfutils) |
1798 | ||
d7ece67a LC |
1799 | ;; Documentation. |
1800 | ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES | |
1801 | ("libxslt" ,libxslt) | |
1802 | ("docbook-xml" ,docbook-xml) | |
1803 | ("docbook-xsl" ,docbook-xsl) | |
1804 | ("xmlto" ,xmlto) | |
1805 | ("asciidoc" ,asciidoc))) | |
b62fe07f LC |
1806 | (home-page "https://perf.wiki.kernel.org/") |
1807 | (synopsis "Linux profiling with performance counters") | |
1808 | (description | |
1809 | "perf is a tool suite for profiling using hardware performance counters, | |
1810 | with support in the Linux kernel. perf can instrument CPU performance | |
1811 | counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable | |
1812 | of lightweight profiling. This package contains the user-land tools and in | |
1813 | particular the 'perf' command.") | |
1814 | (license (package-license linux-libre)))) | |
c09e60e4 DT |
1815 | |
1816 | (define-public pflask | |
1817 | (package | |
1818 | (name "pflask") | |
1819 | (version "0.2") | |
1820 | (source (origin | |
1821 | (method url-fetch) | |
1822 | (uri (string-append "https://github.com/ghedo/pflask/archive/v" | |
1823 | version ".tar.gz")) | |
1824 | (sha256 | |
1825 | (base32 | |
1826 | "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys")))) | |
1827 | (build-system cmake-build-system) | |
1828 | (arguments | |
1829 | '(#:tests? #f)) ; no tests | |
1830 | (home-page "http://ghedo.github.io/pflask/") | |
1831 | (synopsis "Simple tool for creating Linux namespace containers") | |
1832 | (description "pflask is a simple tool for creating Linux namespace | |
1833 | containers. It can be used for running a command or even booting an OS inside | |
1834 | an isolated container, created with the help of Linux namespaces. It is | |
1835 | similar in functionality to chroot, although pflask provides better isolation | |
1836 | thanks to the use of namespaces.") | |
1837 | (license bsd-2))) | |
288084d5 MW |
1838 | |
1839 | (define-public hdparm | |
1840 | (package | |
1841 | (name "hdparm") | |
1842 | (version "9.45") | |
1843 | (source (origin | |
1844 | (method url-fetch) | |
1845 | (uri (string-append "mirror://sourceforge/" name "/" | |
1846 | name "-" version ".tar.gz")) | |
1847 | (sha256 | |
1848 | (base32 | |
1849 | "0sc6yf3k6sd7n6a2ig2my9fjlqpak3znlyw7jw4cz5d9asm1rc13")))) | |
1850 | (build-system gnu-build-system) | |
1851 | (arguments | |
1852 | `(#:make-flags (let ((out (assoc-ref %outputs "out"))) | |
1853 | (list (string-append "binprefix=" out) | |
1854 | (string-append "manprefix=" out) | |
1855 | "CC=gcc")) | |
1856 | #:phases (alist-delete 'configure %standard-phases) | |
1857 | #:tests? #f)) ; no test suite | |
1858 | (home-page "http://sourceforge.net/projects/hdparm/") | |
1859 | (synopsis "tune hard disk parameters for high performance") | |
1860 | (description | |
1861 | "Get/set device parameters for Linux SATA/IDE drives. It's primary use | |
1862 | is for enabling irq-unmasking and IDE multiplemode.") | |
1863 | (license (bsd-style "file://LICENSE.TXT")))) | |
1864 | ||
57a516d3 LC |
1865 | (define-public acpid |
1866 | (package | |
1867 | (name "acpid") | |
1868 | (version "2.0.23") | |
1869 | (source (origin | |
1870 | (method url-fetch) | |
1871 | (uri (string-append "mirror://sourceforge/acpid2/acpid-" | |
1872 | version ".tar.xz")) | |
1873 | (sha256 | |
1874 | (base32 | |
1875 | "1vl7c6vc724v4jwki17czgj6lnrknnj1a6llm8gkl32i2gnam5j3")))) | |
1876 | (build-system gnu-build-system) | |
1877 | (home-page "http://sourceforge.net/projects/acpid2/") | |
1878 | (synopsis "Daemon for delivering ACPI events to user-space programs") | |
1879 | (description | |
1880 | "acpid is designed to notify user-space programs of Advanced | |
1881 | Configuration and Power Interface (ACPI) events. acpid should be started | |
1882 | during the system boot, and will run as a background process. When an ACPI | |
1883 | event is received from the kernel, acpid will examine the list of rules | |
1884 | specified in /etc/acpi/events and execute the rules that match the event.") | |
1885 | (license gpl2+))) |