Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
6869e5c9 | 2 | ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> |
233e7676 | 3 | ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> |
0d55c356 | 4 | ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> |
fd76c904 | 5 | ;;; |
233e7676 | 6 | ;;; This file is part of GNU Guix. |
fd76c904 | 7 | ;;; |
233e7676 | 8 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
fd76c904 LC |
9 | ;;; under the terms of the GNU General Public License as published by |
10 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
11 | ;;; your option) any later version. | |
12 | ;;; | |
233e7676 | 13 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
fd76c904 LC |
14 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | ;;; GNU General Public License for more details. | |
17 | ;;; | |
18 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 19 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
fd76c904 | 20 | |
1ffa7090 | 21 | (define-module (gnu packages linux) |
023fef7d LC |
22 | #:use-module ((guix licenses) |
23 | #:hide (zlib)) | |
59a43334 | 24 | #:use-module (gnu packages) |
1ffa7090 | 25 | #:use-module ((gnu packages compression) |
4a44e743 | 26 | #:renamer (symbol-prefix-proc 'guix:)) |
1ffa7090 | 27 | #:use-module (gnu packages flex) |
90a0048f | 28 | #:use-module (gnu packages bison) |
1ffa7090 LC |
29 | #:use-module (gnu packages libusb) |
30 | #:use-module (gnu packages ncurses) | |
90a0048f | 31 | #:use-module (gnu packages bdb) |
1ffa7090 LC |
32 | #:use-module (gnu packages perl) |
33 | #:use-module (gnu packages pkg-config) | |
7c0dbe78 | 34 | #:use-module (gnu packages python) |
e7b38500 | 35 | #:use-module (gnu packages algebra) |
1dba6407 | 36 | #:use-module (gnu packages gettext) |
17b293a0 | 37 | #:use-module (gnu packages pulseaudio) |
c762e82e | 38 | #:use-module (gnu packages attr) |
17b293a0 | 39 | #:use-module (gnu packages xml) |
215b6431 | 40 | #:use-module (gnu packages autotools) |
f57d2639 | 41 | #:use-module (gnu packages texinfo) |
b10e9ff6 | 42 | #:use-module (gnu packages check) |
02b80c3f NK |
43 | #:use-module (guix packages) |
44 | #:use-module (guix download) | |
7c0dbe78 | 45 | #:use-module (guix build-system gnu) |
220193ad | 46 | #:use-module (guix build-system cmake) |
e102f940 LC |
47 | #:use-module (guix build-system python) |
48 | #:use-module (guix build-system trivial)) | |
fd76c904 | 49 | |
aaf4cb20 LC |
50 | (define-public (system->linux-architecture arch) |
51 | "Return the Linux architecture name for ARCH, a Guix system name such as | |
52 | \"x86_64-linux\"." | |
618cea69 NK |
53 | (let ((arch (car (string-split arch #\-)))) |
54 | (cond ((string=? arch "i686") "i386") | |
55 | ((string-prefix? "mips" arch) "mips") | |
aaf4cb20 | 56 | ((string-prefix? "arm" arch) "arm") |
618cea69 NK |
57 | (else arch)))) |
58 | ||
6023cc74 LC |
59 | (define (linux-libre-urls version) |
60 | "Return a list of URLs for Linux-Libre VERSION." | |
61 | (list (string-append | |
62 | "http://linux-libre.fsfla.org/pub/linux-libre/releases/" | |
63 | version "-gnu/linux-libre-" version "-gnu.tar.xz") | |
64 | ||
65 | ;; XXX: Work around <http://bugs.gnu.org/14851>. | |
66 | (string-append | |
67 | "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-" | |
68 | version "-gnu.tar.xz") | |
69 | ||
70 | ;; Maybe this URL will become valid eventually. | |
71 | (string-append | |
72 | "mirror://gnu/linux-libre/" version "-gnu/linux-libre-" | |
73 | version "-gnu.tar.xz"))) | |
74 | ||
80fe5c60 | 75 | (define-public linux-libre-headers |
dfb52abb | 76 | (let* ((version "3.3.8") |
80fe5c60 | 77 | (build-phase |
618cea69 NK |
78 | (lambda (arch) |
79 | `(lambda _ | |
80 | (setenv "ARCH" ,(system->linux-architecture arch)) | |
81 | (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")) | |
45298f8f | 82 | |
618cea69 NK |
83 | (and (zero? (system* "make" "defconfig")) |
84 | (zero? (system* "make" "mrproper" "headers_check")))))) | |
80fe5c60 LC |
85 | (install-phase |
86 | `(lambda* (#:key outputs #:allow-other-keys) | |
87 | (let ((out (assoc-ref outputs "out"))) | |
88 | (and (zero? (system* "make" | |
89 | (string-append "INSTALL_HDR_PATH=" out) | |
90 | "headers_install")) | |
91 | (mkdir (string-append out "/include/config")) | |
92 | (call-with-output-file | |
93 | (string-append out | |
94 | "/include/config/kernel.release") | |
95 | (lambda (p) | |
dfb52abb | 96 | (format p "~a-default~%" ,version)))))))) |
80fe5c60 LC |
97 | (package |
98 | (name "linux-libre-headers") | |
dfb52abb | 99 | (version version) |
80fe5c60 LC |
100 | (source (origin |
101 | (method url-fetch) | |
6023cc74 | 102 | (uri (linux-libre-urls version)) |
80fe5c60 LC |
103 | (sha256 |
104 | (base32 | |
105 | "0jkfh0z1s6izvdnc3njm39dhzp1cg8i06jv06izwqz9w9qsprvnl")))) | |
106 | (build-system gnu-build-system) | |
107 | (native-inputs `(("perl" ,perl))) | |
108 | (arguments | |
109 | `(#:modules ((guix build gnu-build-system) | |
110 | (guix build utils) | |
56c092ce | 111 | (srfi srfi-1)) |
80fe5c60 | 112 | #:phases (alist-replace |
fb6c2fa8 LC |
113 | 'build ,(build-phase (or (%current-target-system) |
114 | (%current-system))) | |
80fe5c60 LC |
115 | (alist-replace |
116 | 'install ,install-phase | |
56c092ce | 117 | (alist-delete 'configure %standard-phases))) |
80fe5c60 LC |
118 | #:tests? #f)) |
119 | (synopsis "GNU Linux-Libre kernel headers") | |
120 | (description "Headers of the Linux-Libre kernel.") | |
38bbd61d | 121 | (license gpl2) |
80fe5c60 LC |
122 | (home-page "http://www.gnu.org/software/linux-libre/")))) |
123 | ||
b4fcb735 LC |
124 | (define-public module-init-tools |
125 | (package | |
126 | (name "module-init-tools") | |
127 | (version "3.16") | |
128 | (source (origin | |
129 | (method url-fetch) | |
130 | (uri (string-append | |
131 | "mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-" | |
132 | version ".tar.bz2")) | |
133 | (sha256 | |
134 | (base32 | |
135 | "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1")))) | |
136 | (build-system gnu-build-system) | |
b4fcb735 | 137 | (arguments |
5c413a9c LC |
138 | ;; FIXME: The upstream tarball lacks man pages, and building them would |
139 | ;; require DocBook & co. We used to use Gentoo's pre-built man pages, | |
140 | ;; but they vanished. In the meantime, fake it. | |
b4fcb735 | 141 | '(#:phases (alist-cons-before |
5c413a9c LC |
142 | 'configure 'fake-docbook |
143 | (lambda _ | |
144 | (substitute* "Makefile.in" | |
145 | (("^DOCBOOKTOMAN.*$") | |
146 | "DOCBOOKTOMAN = true\n"))) | |
b4fcb735 LC |
147 | %standard-phases))) |
148 | (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/") | |
149 | (synopsis "Tools for loading and managing Linux kernel modules") | |
150 | (description | |
151 | "Tools for loading and managing Linux kernel modules, such as `modprobe', | |
152 | `insmod', `lsmod', and more.") | |
153 | (license gpl2+))) | |
154 | ||
beacfcab | 155 | (define-public linux-libre |
d013fe50 | 156 | (let* ((version "3.13.7") |
beacfcab LC |
157 | (build-phase |
158 | '(lambda* (#:key system #:allow-other-keys #:rest args) | |
159 | (let ((arch (car (string-split system #\-)))) | |
160 | (setenv "ARCH" | |
161 | (cond ((string=? arch "i686") "i386") | |
162 | (else arch))) | |
163 | (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))) | |
164 | ||
165 | (let ((build (assoc-ref %standard-phases 'build))) | |
2e48455d LC |
166 | (and (zero? (system* "make" "defconfig")) |
167 | (begin | |
c0888b3f AE |
168 | ;; Appending works even when the option wasn't in the |
169 | ;; file. The last one prevails if duplicated. | |
882f034f | 170 | (let ((port (open-file ".config" "a"))) |
c0888b3f AE |
171 | (display (string-append "CONFIG_NET_9P=m\n" |
172 | "CONFIG_NET_9P_VIRTIO=m\n" | |
882f034f | 173 | "CONFIG_VIRTIO_BLK=m\n" |
be0d8af8 | 174 | "CONFIG_SATA_SIS=y\n" |
c0888b3f | 175 | "CONFIG_VIRTIO_NET=m\n" |
be0d8af8 AE |
176 | "CONFIG_SIS190=y\n" |
177 | ;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html | |
178 | "CONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n" | |
c0888b3f AE |
179 | "CONFIG_VIRTIO_PCI=m\n" |
180 | "CONFIG_VIRTIO_BALLOON=m\n" | |
181 | "CONFIG_VIRTIO_MMIO=m\n" | |
182 | "CONFIG_FUSE_FS=m\n" | |
183 | "CONFIG_CIFS=m\n" | |
184 | "CONFIG_9P_FS=m\n") | |
882f034f LC |
185 | port) |
186 | (close-port port)) | |
187 | ||
2e48455d | 188 | (zero? (system* "make" "oldconfig"))) |
beacfcab LC |
189 | |
190 | ;; Call the default `build' phase so `-j' is correctly | |
191 | ;; passed. | |
192 | (apply build #:make-flags "all" args))))) | |
193 | (install-phase | |
194 | `(lambda* (#:key inputs outputs #:allow-other-keys) | |
195 | (let* ((out (assoc-ref outputs "out")) | |
196 | (moddir (string-append out "/lib/modules")) | |
197 | (mit (assoc-ref inputs "module-init-tools"))) | |
198 | (mkdir-p moddir) | |
199 | (for-each (lambda (file) | |
200 | (copy-file file | |
201 | (string-append out "/" (basename file)))) | |
202 | (find-files "." "^(bzImage|System\\.map)$")) | |
203 | (copy-file ".config" (string-append out "/config")) | |
204 | (zero? (system* "make" | |
205 | (string-append "DEPMOD=" mit "/sbin/depmod") | |
206 | (string-append "MODULE_DIR=" moddir) | |
207 | (string-append "INSTALL_PATH=" out) | |
208 | (string-append "INSTALL_MOD_PATH=" out) | |
209 | "modules_install")))))) | |
210 | (package | |
211 | (name "linux-libre") | |
dfb52abb | 212 | (version version) |
beacfcab LC |
213 | (source (origin |
214 | (method url-fetch) | |
6023cc74 | 215 | (uri (linux-libre-urls version)) |
beacfcab LC |
216 | (sha256 |
217 | (base32 | |
d013fe50 | 218 | "0j28dg0zq4vlbk4ady4fq021i8dxx2h8h90n26mzigr9hky86n8d")))) |
beacfcab LC |
219 | (build-system gnu-build-system) |
220 | (native-inputs `(("perl" ,perl) | |
e7b38500 | 221 | ("bc" ,bc) |
beacfcab LC |
222 | ("module-init-tools" ,module-init-tools))) |
223 | (arguments | |
224 | `(#:modules ((guix build gnu-build-system) | |
225 | (guix build utils) | |
226 | (srfi srfi-1) | |
227 | (ice-9 match)) | |
228 | #:phases (alist-replace | |
229 | 'build ,build-phase | |
230 | (alist-replace | |
231 | 'install ,install-phase | |
232 | (alist-delete 'configure %standard-phases))) | |
233 | #:tests? #f)) | |
f50d2669 | 234 | (synopsis "100% free redistribution of a cleaned Linux kernel") |
a22dc0c4 | 235 | (description |
79c311b8 LC |
236 | "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel. |
237 | It has been modified to remove all non-free binary blobs.") | |
beacfcab LC |
238 | (license gpl2) |
239 | (home-page "http://www.gnu.org/software/linux-libre/")))) | |
240 | ||
c84d0eca LC |
241 | \f |
242 | ;;; | |
243 | ;;; Pluggable authentication modules (PAM). | |
244 | ;;; | |
245 | ||
fd76c904 LC |
246 | (define-public linux-pam |
247 | (package | |
248 | (name "linux-pam") | |
249 | (version "1.1.6") | |
250 | (source | |
251 | (origin | |
252 | (method url-fetch) | |
253 | (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-" | |
254 | version ".tar.bz2") | |
255 | (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-" | |
256 | version ".tar.bz2"))) | |
257 | (sha256 | |
258 | (base32 | |
259 | "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s")))) | |
260 | (build-system gnu-build-system) | |
c4c4cc05 | 261 | (native-inputs |
fd76c904 LC |
262 | `(("flex" ,flex) |
263 | ||
264 | ;; TODO: optional dependencies | |
265 | ;; ("libxcrypt" ,libxcrypt) | |
266 | ;; ("cracklib" ,cracklib) | |
267 | )) | |
268 | (arguments | |
c134056a LC |
269 | '(;; Most users, such as `shadow', expect the headers to be under |
270 | ;; `security'. | |
271 | #:configure-flags (list (string-append "--includedir=" | |
272 | (assoc-ref %outputs "out") | |
273 | "/include/security")) | |
274 | ||
275 | ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d | |
276 | ;; isn't available. | |
277 | #:tests? #f)) | |
fd76c904 LC |
278 | (home-page "http://www.linux-pam.org/") |
279 | (synopsis "Pluggable authentication modules for Linux") | |
280 | (description | |
281 | "A *Free* project to implement OSF's RFC 86.0. | |
282 | Pluggable authentication modules are small shared object files that can | |
283 | be used through the PAM API to perform tasks, like authenticating a user | |
284 | at login. Local and dynamic reconfiguration are its key features") | |
4a44e743 | 285 | (license bsd-3))) |
686f14e8 | 286 | |
c84d0eca LC |
287 | \f |
288 | ;;; | |
289 | ;;; Miscellaneous. | |
290 | ;;; | |
291 | ||
686f14e8 LC |
292 | (define-public psmisc |
293 | (package | |
294 | (name "psmisc") | |
295 | (version "22.20") | |
296 | (source | |
297 | (origin | |
298 | (method url-fetch) | |
299 | (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-" | |
300 | version ".tar.gz")) | |
301 | (sha256 | |
302 | (base32 | |
303 | "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi")))) | |
304 | (build-system gnu-build-system) | |
305 | (inputs `(("ncurses" ,ncurses))) | |
306 | (home-page "http://psmisc.sourceforge.net/") | |
307 | (synopsis | |
308 | "set of utilities that use the proc filesystem, such as fuser, killall, and pstree") | |
309 | (description | |
310 | "This PSmisc package is a set of some small useful utilities that | |
311 | use the proc filesystem. We're not about changing the world, but | |
312 | providing the system administrator with some help in common tasks.") | |
4a44e743 | 313 | (license gpl2+))) |
02b80c3f NK |
314 | |
315 | (define-public util-linux | |
316 | (package | |
317 | (name "util-linux") | |
318 | (version "2.21") | |
319 | (source | |
320 | (origin | |
321 | (method url-fetch) | |
322 | (uri (string-append "mirror://kernel.org/linux/utils/" | |
323 | name "/v" version "/" | |
324 | name "-" version ".2" ".tar.xz")) | |
325 | (sha256 | |
326 | (base32 | |
327 | "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir")))) | |
328 | (build-system gnu-build-system) | |
329 | (arguments | |
8b8476b8 AE |
330 | `(#:configure-flags '("--disable-use-tty-group" |
331 | "--enable-ddate") | |
02b80c3f NK |
332 | #:phases (alist-cons-after |
333 | 'install 'patch-chkdupexe | |
334 | (lambda* (#:key outputs #:allow-other-keys) | |
335 | (let ((out (assoc-ref outputs "out"))) | |
336 | (substitute* (string-append out "/bin/chkdupexe") | |
337 | ;; Allow 'patch-shebang' to do its work. | |
338 | (("@PERL@") "/bin/perl")))) | |
339 | %standard-phases))) | |
4a44e743 | 340 | (inputs `(("zlib" ,guix:zlib) |
c4c4cc05 JD |
341 | ("ncurses" ,ncurses))) |
342 | (native-inputs | |
343 | `(("perl" ,perl))) | |
02b80c3f | 344 | (home-page "https://www.kernel.org/pub/linux/utils/util-linux/") |
35ec07c7 | 345 | (synopsis "Collection of utilities for the Linux kernel") |
02b80c3f NK |
346 | (description |
347 | "util-linux is a random collection of utilities for the Linux kernel.") | |
fe8ccfcc | 348 | |
02b80c3f | 349 | ;; Note that util-linux doesn't use the same license for all the |
fe8ccfcc | 350 | ;; code. GPLv2+ is the default license for a code without an |
02b80c3f | 351 | ;; explicitly defined license. |
fe8ccfcc LC |
352 | (license (list gpl3+ gpl2+ gpl2 lgpl2.0+ |
353 | bsd-4 public-domain)))) | |
5d5c4278 | 354 | |
e47e3eff LC |
355 | (define-public procps |
356 | (package | |
357 | (name "procps") | |
358 | (version "3.2.8") | |
359 | (source (origin | |
360 | (method url-fetch) | |
361 | (uri (string-append "http://procps.sourceforge.net/procps-" | |
362 | version ".tar.gz")) | |
363 | (sha256 | |
364 | (base32 | |
01eafd38 LC |
365 | "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i")) |
366 | (patches (list (search-patch "procps-make-3.82.patch"))))) | |
e47e3eff | 367 | (build-system gnu-build-system) |
01eafd38 | 368 | (inputs `(("ncurses" ,ncurses))) |
e47e3eff | 369 | (arguments |
01eafd38 | 370 | '(#:phases (alist-replace |
e47e3eff LC |
371 | 'configure |
372 | (lambda* (#:key outputs #:allow-other-keys) | |
373 | ;; No `configure', just a single Makefile. | |
374 | (let ((out (assoc-ref outputs "out"))) | |
375 | (substitute* "Makefile" | |
376 | (("/usr/") "/") | |
377 | (("--(owner|group) 0") "") | |
378 | (("ldconfig") "true") | |
379 | (("^LDFLAGS[[:blank:]]*:=(.*)$" _ value) | |
380 | ;; Add libproc to the RPATH. | |
381 | (string-append "LDFLAGS := -Wl,-rpath=" | |
382 | out "/lib" value)))) | |
383 | (setenv "CC" "gcc")) | |
384 | (alist-replace | |
385 | 'install | |
386 | (lambda* (#:key outputs #:allow-other-keys) | |
387 | (let ((out (assoc-ref outputs "out"))) | |
388 | (and (zero? | |
389 | (system* "make" "install" | |
390 | (string-append "DESTDIR=" out))) | |
391 | ||
392 | ;; Sanity check. | |
393 | (zero? | |
394 | (system* (string-append out "/bin/ps") | |
395 | "--version"))))) | |
396 | %standard-phases)) | |
397 | ||
398 | ;; What did you expect? Tests? | |
399 | #:tests? #f)) | |
400 | (home-page "http://procps.sourceforge.net/") | |
35ec07c7 | 401 | (synopsis "Utilities that give information about processes") |
e47e3eff LC |
402 | (description |
403 | "procps is the package that has a bunch of small useful utilities | |
404 | that give information about processes using the Linux /proc file system. | |
405 | The package includes the programs ps, top, vmstat, w, kill, free, | |
406 | slabtop, and skill.") | |
407 | (license gpl2))) | |
408 | ||
5d5c4278 NK |
409 | (define-public usbutils |
410 | (package | |
411 | (name "usbutils") | |
412 | (version "006") | |
413 | (source | |
414 | (origin | |
415 | (method url-fetch) | |
416 | (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/" | |
417 | "usbutils-" version ".tar.xz")) | |
418 | (sha256 | |
419 | (base32 | |
420 | "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr")))) | |
421 | (build-system gnu-build-system) | |
422 | (inputs | |
c4c4cc05 JD |
423 | `(("libusb" ,libusb))) |
424 | (native-inputs | |
425 | `(("pkg-config" ,pkg-config))) | |
5d5c4278 NK |
426 | (home-page "http://www.linux-usb.org/") |
427 | (synopsis | |
428 | "Tools for working with USB devices, such as lsusb") | |
429 | (description | |
430 | "Tools for working with USB devices, such as lsusb.") | |
4050e5d6 | 431 | (license gpl2+))) |
0750452a LC |
432 | |
433 | (define-public e2fsprogs | |
434 | (package | |
435 | (name "e2fsprogs") | |
436 | (version "1.42.7") | |
437 | (source (origin | |
438 | (method url-fetch) | |
439 | (uri (string-append "mirror://sourceforge/e2fsprogs/e2fsprogs-" | |
440 | version ".tar.gz")) | |
441 | (sha256 | |
442 | (base32 | |
443 | "0ibkkvp6kan0hn0d1anq4n2md70j5gcm7mwna515w82xwyr02rfw")))) | |
444 | (build-system gnu-build-system) | |
c4c4cc05 | 445 | (inputs `(("util-linux" ,util-linux))) |
f57d2639 LC |
446 | (native-inputs `(("pkg-config" ,pkg-config) |
447 | ("texinfo" ,texinfo))) ; for the libext2fs Info manual | |
0750452a LC |
448 | (arguments |
449 | '(#:phases (alist-cons-before | |
450 | 'configure 'patch-shells | |
451 | (lambda _ | |
452 | (substitute* "configure" | |
453 | (("/bin/sh (.*)parse-types.sh" _ dir) | |
454 | (string-append (which "sh") " " dir | |
455 | "parse-types.sh"))) | |
456 | (substitute* (find-files "." "^Makefile.in$") | |
457 | (("#!/bin/sh") | |
458 | (string-append "#!" (which "sh"))))) | |
459 | %standard-phases) | |
460 | ||
461 | ;; FIXME: Tests work by comparing the stdout/stderr of programs, that | |
462 | ;; they fail because we get an extra line that says "Can't check if | |
463 | ;; filesystem is mounted due to missing mtab file". | |
464 | #:tests? #f)) | |
465 | (home-page "http://e2fsprogs.sourceforge.net/") | |
35ec07c7 | 466 | (synopsis "Creating and checking ext2/ext3/ext4 file systems") |
0750452a LC |
467 | (description |
468 | "This package provides tools for manipulating ext2/ext3/ext4 file systems.") | |
469 | (license (list gpl2 ; programs | |
470 | lgpl2.0 ; libext2fs | |
471 | x11)))) ; libuuid | |
d8482ad0 | 472 | |
e102f940 LC |
473 | (define-public e2fsck/static |
474 | (package | |
475 | (name "e2fsck-static") | |
0997771a | 476 | (version (package-version e2fsprogs)) |
e102f940 LC |
477 | (build-system trivial-build-system) |
478 | (source #f) | |
479 | (arguments | |
480 | `(#:modules ((guix build utils)) | |
481 | #:builder | |
482 | (begin | |
483 | (use-modules (guix build utils) | |
484 | (ice-9 ftw) | |
485 | (srfi srfi-26)) | |
486 | ||
487 | (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs") | |
488 | "/sbin")) | |
489 | (bin (string-append (assoc-ref %outputs "out") "/sbin"))) | |
490 | (mkdir-p bin) | |
491 | (with-directory-excursion bin | |
492 | (for-each (lambda (file) | |
493 | (copy-file (string-append source "/" file) | |
494 | file) | |
495 | (remove-store-references file) | |
496 | (chmod file #o555)) | |
497 | (scandir source (cut string-prefix? "fsck." <>)))))))) | |
0997771a | 498 | (inputs `(("e2fsprogs" ,(static-package e2fsprogs)))) |
e102f940 LC |
499 | (synopsis "Statically-linked fsck.* commands from e2fsprogs") |
500 | (description | |
501 | "This package provides statically-linked command of fsck.ext[234] taken | |
502 | from the e2fsprogs package. It is meant to be used in initrds.") | |
0997771a LC |
503 | (home-page (package-home-page e2fsprogs)) |
504 | (license (package-license e2fsprogs)))) | |
e102f940 | 505 | |
d8482ad0 LC |
506 | (define-public strace |
507 | (package | |
508 | (name "strace") | |
509 | (version "4.7") | |
510 | (source (origin | |
511 | (method url-fetch) | |
512 | (uri (string-append "mirror://sourceforge/strace/strace-" | |
513 | version ".tar.xz")) | |
514 | (sha256 | |
515 | (base32 | |
516 | "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764")))) | |
517 | (build-system gnu-build-system) | |
c4c4cc05 | 518 | (native-inputs `(("perl" ,perl))) |
d8482ad0 LC |
519 | (home-page "http://strace.sourceforge.net/") |
520 | (synopsis "System call tracer for Linux") | |
521 | (description | |
522 | "strace is a system call tracer, i.e. a debugging tool which prints out a | |
523 | trace of all the system calls made by a another process/program.") | |
524 | (license bsd-3))) | |
ba04571a LC |
525 | |
526 | (define-public alsa-lib | |
527 | (package | |
528 | (name "alsa-lib") | |
529 | (version "1.0.27.1") | |
530 | (source (origin | |
531 | (method url-fetch) | |
532 | (uri (string-append | |
533 | "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-" | |
534 | version ".tar.bz2")) | |
535 | (sha256 | |
536 | (base32 | |
bcd94e19 MW |
537 | "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9")) |
538 | (patches (list (search-patch "alsa-lib-mips-atomic-fix.patch"))))) | |
ba04571a LC |
539 | (build-system gnu-build-system) |
540 | (home-page "http://www.alsa-project.org/") | |
541 | (synopsis "The Advanced Linux Sound Architecture libraries") | |
542 | (description | |
543 | "The Advanced Linux Sound Architecture (ALSA) provides audio and | |
544 | MIDI functionality to the Linux-based operating system.") | |
545 | (license lgpl2.1+))) | |
10afdf50 | 546 | |
17b293a0 LC |
547 | (define-public alsa-utils |
548 | (package | |
549 | (name "alsa-utils") | |
550 | (version "1.0.27.2") | |
551 | (source (origin | |
552 | (method url-fetch) | |
553 | (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-" | |
554 | version ".tar.bz2")) | |
555 | (sha256 | |
556 | (base32 | |
557 | "1sjjngnq50jv5ilwsb4zys6smifni3bd6fn28gbnhfrg14wsrgq2")))) | |
558 | (build-system gnu-build-system) | |
559 | (arguments | |
560 | ;; XXX: Disable man page creation until we have DocBook. | |
561 | '(#:configure-flags (list "--disable-xmlto" | |
562 | (string-append "--with-udev-rules-dir=" | |
563 | (assoc-ref %outputs "out") | |
564 | "/lib/udev/rules.d")) | |
565 | #:phases (alist-cons-before | |
566 | 'install 'pre-install | |
567 | (lambda _ | |
568 | ;; Don't try to mkdir /var/lib/alsa. | |
569 | (substitute* "Makefile" | |
570 | (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*") | |
571 | "true\n"))) | |
572 | %standard-phases))) | |
573 | (inputs | |
574 | `(("libsamplerate" ,libsamplerate) | |
575 | ("ncurses" ,ncurses) | |
576 | ("alsa-lib" ,alsa-lib) | |
577 | ("xmlto" ,xmlto) | |
1dba6407 | 578 | ("gettext" ,gnu-gettext))) |
17b293a0 LC |
579 | (home-page "http://www.alsa-project.org/") |
580 | (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)") | |
581 | (description | |
582 | "The Advanced Linux Sound Architecture (ALSA) provides audio and | |
583 | MIDI functionality to the Linux-based operating system.") | |
584 | ||
585 | ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are | |
586 | ;; GPLv2-only. | |
587 | (license gpl2))) | |
588 | ||
10afdf50 LC |
589 | (define-public iptables |
590 | (package | |
591 | (name "iptables") | |
592 | (version "1.4.16.2") | |
593 | (source (origin | |
594 | (method url-fetch) | |
595 | (uri (string-append | |
596 | "http://www.netfilter.org/projects/iptables/files/iptables-" | |
597 | version ".tar.bz2")) | |
598 | (sha256 | |
599 | (base32 | |
600 | "0vkg5lzkn4l3i1sm6v3x96zzvnv9g7mi0qgj6279ld383mzcws24")))) | |
601 | (build-system gnu-build-system) | |
602 | (arguments '(#:tests? #f)) ; no test suite | |
603 | (home-page "http://www.netfilter.org/projects/iptables/index.html") | |
604 | (synopsis "Program to configure the Linux IP packet filtering rules") | |
605 | (description | |
606 | "iptables is the userspace command line program used to configure the | |
607 | Linux 2.4.x and later IPv4 packet filtering ruleset. It is targeted towards | |
608 | system administrators. Since Network Address Translation is also configured | |
609 | from the packet filter ruleset, iptables is used for this, too. The iptables | |
610 | package also includes ip6tables. ip6tables is used for configuring the IPv6 | |
611 | packet filter.") | |
612 | (license gpl2+))) | |
90a0048f LC |
613 | |
614 | (define-public iproute | |
615 | (package | |
616 | (name "iproute2") | |
5fd7f3e0 | 617 | (version "3.12.0") |
90a0048f LC |
618 | (source (origin |
619 | (method url-fetch) | |
620 | (uri (string-append | |
621 | "mirror://kernel.org/linux/utils/net/iproute2/iproute2-" | |
622 | version ".tar.xz")) | |
623 | (sha256 | |
624 | (base32 | |
5fd7f3e0 | 625 | "04gi11gh087bg2nlxhj0lxrk8l9qxkpr88nsiil23917bm3h1xj4")))) |
90a0048f LC |
626 | (build-system gnu-build-system) |
627 | (arguments | |
628 | `(#:tests? #f ; no test suite | |
629 | #:make-flags (let ((out (assoc-ref %outputs "out"))) | |
630 | (list "DESTDIR=" | |
631 | (string-append "LIBDIR=" out "/lib") | |
632 | (string-append "SBINDIR=" out "/sbin") | |
633 | (string-append "CONFDIR=" out "/etc") | |
634 | (string-append "DOCDIR=" out "/share/doc/" | |
635 | ,name "-" ,version) | |
636 | (string-append "MANDIR=" out "/share/man"))) | |
637 | #:phases (alist-cons-before | |
638 | 'install 'pre-install | |
639 | (lambda _ | |
640 | ;; Don't attempt to create /var/lib/arpd. | |
641 | (substitute* "Makefile" | |
642 | (("^.*ARPDDIR.*$") ""))) | |
643 | %standard-phases))) | |
644 | (inputs | |
645 | `(("iptables" ,iptables) | |
c4c4cc05 JD |
646 | ("db4" ,bdb))) |
647 | (native-inputs | |
648 | `(("pkg-config" ,pkg-config) | |
90a0048f LC |
649 | ("flex" ,flex) |
650 | ("bison" ,bison))) | |
651 | (home-page | |
652 | "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2") | |
653 | (synopsis | |
654 | "A collection of utilities for controlling TCP/IP networking and traffic control in Linux") | |
655 | (description | |
656 | "Iproute2 is a collection of utilities for controlling TCP/IP | |
657 | networking and traffic with the Linux kernel. | |
658 | ||
659 | Most network configuration manuals still refer to ifconfig and route as the | |
660 | primary network configuration tools, but ifconfig is known to behave | |
661 | inadequately in modern network environments. They should be deprecated, but | |
662 | most distros still include them. Most network configuration systems make use | |
663 | of ifconfig and thus provide a limited feature set. The /etc/net project aims | |
664 | to support most modern network technologies, as it doesn't use ifconfig and | |
665 | allows a system administrator to make use of all iproute2 features, including | |
666 | traffic control. | |
667 | ||
668 | iproute2 is usually shipped in a package called iproute or iproute2 and | |
669 | consists of several tools, of which the most important are ip and tc. ip | |
670 | controls IPv4 and IPv6 configuration and tc stands for traffic control. Both | |
671 | tools print detailed usage messages and are accompanied by a set of | |
672 | manpages.") | |
673 | (license gpl2+))) | |
85e0dc6a LC |
674 | |
675 | (define-public net-tools | |
676 | ;; XXX: This package is basically unmaintained, but it provides a few | |
677 | ;; commands not yet provided by Inetutils, such as 'route', so we have to | |
678 | ;; live with it. | |
679 | (package | |
680 | (name "net-tools") | |
681 | (version "1.60") | |
682 | (home-page "http://www.tazenda.demon.co.uk/phil/net-tools/") | |
683 | (source (origin | |
684 | (method url-fetch) | |
685 | (uri (string-append home-page "/" name "-" | |
686 | version ".tar.bz2")) | |
687 | (sha256 | |
688 | (base32 | |
689 | "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s")))) | |
690 | (build-system gnu-build-system) | |
691 | (arguments | |
cd143df0 LC |
692 | '(#:phases (alist-cons-after |
693 | 'unpack 'patch | |
85e0dc6a LC |
694 | (lambda* (#:key inputs #:allow-other-keys) |
695 | (define (apply-patch file) | |
696 | (zero? (system* "patch" "-p1" "--batch" | |
697 | "--input" file))) | |
698 | ||
699 | (let ((patch.gz (assoc-ref inputs "patch"))) | |
700 | (format #t "applying Debian patch set '~a'...~%" | |
701 | patch.gz) | |
702 | (system (string-append "gunzip < " patch.gz " > the-patch")) | |
703 | (pk 'here) | |
704 | (and (apply-patch "the-patch") | |
705 | (for-each apply-patch | |
706 | (find-files "debian/patches" | |
707 | "\\.patch"))))) | |
708 | (alist-replace | |
709 | 'configure | |
710 | (lambda* (#:key outputs #:allow-other-keys) | |
711 | (let ((out (assoc-ref outputs "out"))) | |
712 | (mkdir-p (string-append out "/bin")) | |
713 | (mkdir-p (string-append out "/sbin")) | |
714 | ||
715 | ;; Pretend we have everything... | |
716 | (system "yes | make config") | |
717 | ||
718 | ;; ... except we don't have libdnet, so remove that | |
719 | ;; definition. | |
720 | (substitute* '("config.make" "config.h") | |
721 | (("^.*HAVE_AFDECnet.*$") "")))) | |
722 | %standard-phases)) | |
723 | ||
724 | ;; Binaries that depend on libnet-tools.a don't declare that | |
725 | ;; dependency, making it parallel-unsafe. | |
726 | #:parallel-build? #f | |
727 | ||
728 | #:tests? #f ; no test suite | |
0d55c356 MW |
729 | #:make-flags (let ((out (assoc-ref %outputs "out"))) |
730 | (list "CC=gcc" | |
731 | (string-append "BASEDIR=" out) | |
732 | (string-append "INSTALLNLSDIR=" out "/share/locale") | |
733 | (string-append "mandir=/share/man"))))) | |
85e0dc6a LC |
734 | |
735 | ;; Use the big Debian patch set (the thing does not even compile out of | |
736 | ;; the box.) | |
737 | (inputs `(("patch" ,(origin | |
738 | (method url-fetch) | |
739 | (uri | |
740 | "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz") | |
741 | (sha256 | |
742 | (base32 | |
743 | "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p")))))) | |
1dba6407 | 744 | (native-inputs `(("gettext" ,gnu-gettext))) |
85e0dc6a LC |
745 | |
746 | (synopsis "Tools for controlling the network subsystem in Linux") | |
747 | (description | |
748 | "This package includes the important tools for controlling the network | |
749 | subsystem of the Linux kernel. This includes arp, hostname, ifconfig, | |
750 | netstat, rarp and route. Additionally, this package contains utilities | |
751 | relating to particular network hardware types (plipconfig, slattach) and | |
752 | advanced aspects of IP configuration (iptunnel, ipmaddr).") | |
753 | (license gpl2+))) | |
c762e82e LC |
754 | |
755 | (define-public libcap | |
756 | (package | |
757 | (name "libcap") | |
758 | (version "2.22") | |
759 | (source (origin | |
760 | (method url-fetch) | |
761 | ||
762 | ;; Tarballs used to be available from | |
763 | ;; <https://www.kernel.org/pub/linux/libs/security/linux-privs/> | |
764 | ;; but they never came back after kernel.org was compromised. | |
765 | (uri (string-append | |
766 | "mirror://debian/pool/main/libc/libcap2/libcap2_" | |
767 | version ".orig.tar.gz")) | |
768 | (sha256 | |
769 | (base32 | |
770 | "07vjhkznm82p8dm4w6j8mmg7h5c70lp5s9bwwfdmgwpbixfydjp1")))) | |
771 | (build-system gnu-build-system) | |
772 | (arguments '(#:phases (alist-delete 'configure %standard-phases) | |
773 | #:tests? #f ; no 'check' target | |
774 | #:make-flags (list "lib=lib" | |
775 | (string-append "prefix=" | |
776 | (assoc-ref %outputs "out")) | |
777 | "RAISE_SETFCAP=no"))) | |
778 | (native-inputs `(("perl" ,perl))) | |
779 | (inputs `(("attr" ,attr))) | |
780 | (home-page "https://sites.google.com/site/fullycapable/") | |
781 | (synopsis "Library for working with POSIX capabilities") | |
782 | (description | |
783 | "libcap2 provides a programming interface to POSIX capabilities on | |
784 | Linux-based operating systems.") | |
785 | ||
786 | ;; License is BSD-3 or GPLv2, at the user's choice. | |
787 | (license gpl2))) | |
215b6431 LC |
788 | |
789 | (define-public bridge-utils | |
790 | (package | |
791 | (name "bridge-utils") | |
792 | (version "1.5") | |
793 | (source (origin | |
794 | (method url-fetch) | |
795 | (uri (string-append "mirror://sourceforge/bridge/bridge-utils-" | |
796 | version ".tar.gz")) | |
797 | (sha256 | |
798 | (base32 | |
799 | "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2")))) | |
800 | (build-system gnu-build-system) | |
801 | ||
802 | ;; The tarball lacks all the generated files. | |
803 | (native-inputs `(("autoconf" ,autoconf) | |
804 | ("automake" ,automake))) | |
805 | (arguments | |
806 | '(#:phases (alist-cons-before | |
807 | 'configure 'bootstrap | |
808 | (lambda _ | |
809 | (zero? (system* "autoreconf" "-vf"))) | |
810 | %standard-phases) | |
811 | #:tests? #f)) ; no 'check' target | |
812 | ||
813 | (home-page | |
814 | "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge") | |
815 | (synopsis "Manipulate Ethernet bridges") | |
816 | (description | |
817 | "Utilities for Linux's Ethernet bridging facilities. A bridge is a way | |
818 | to connect two Ethernet segments together in a protocol independent way. | |
819 | Packets are forwarded based on Ethernet address, rather than IP address (like | |
820 | a router). Since forwarding is done at Layer 2, all protocols can go | |
821 | transparently through a bridge.") | |
822 | (license gpl2+))) | |
3cc20675 LC |
823 | |
824 | (define-public libnl | |
825 | (package | |
826 | (name "libnl") | |
827 | (version "3.2.13") | |
828 | (source (origin | |
829 | (method url-fetch) | |
830 | (uri (string-append | |
831 | "http://www.infradead.org/~tgr/libnl/files/libnl-" | |
832 | version ".tar.gz")) | |
833 | (sha256 | |
834 | (base32 | |
835 | "1ydw42lsd572qwrfgws97n76hyvjdpanwrxm03lysnhfxkna1ssd")))) | |
836 | (build-system gnu-build-system) | |
837 | (native-inputs `(("flex" ,flex) ("bison" ,bison))) | |
838 | (home-page "http://www.infradead.org/~tgr/libnl/") | |
839 | (synopsis "NetLink protocol library suite") | |
840 | (description | |
841 | "The libnl suite is a collection of libraries providing APIs to netlink | |
842 | protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarly | |
843 | between the kernel and user space processes. It was designed to be a more | |
844 | flexible successor to ioctl to provide mainly networking related kernel | |
845 | configuration and monitoring interfaces.") | |
846 | ||
847 | ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like | |
848 | ;; 'nl-addr-add.c'), so the result is GPLv2-only. | |
849 | (license gpl2))) | |
023fef7d LC |
850 | |
851 | (define-public powertop | |
852 | (package | |
853 | (name "powertop") | |
854 | (version "2.5") | |
855 | (source | |
856 | (origin | |
857 | (method url-fetch) | |
858 | (uri (string-append | |
859 | "https://01.org/powertop/sites/default/files/downloads/powertop-" | |
860 | version ".tar.gz")) | |
861 | (sha256 | |
862 | (base32 | |
863 | "02rwqbpasdayl201v0549gbp2f82rd0hqiv3i111r7npanjhhb4b")))) | |
864 | (build-system gnu-build-system) | |
865 | (inputs | |
866 | ;; TODO: Add pciutils. | |
867 | `(("zlib" ,guix:zlib) | |
023fef7d LC |
868 | ;; ("pciutils" ,pciutils) |
869 | ("ncurses" ,ncurses) | |
870 | ("libnl" ,libnl))) | |
c4c4cc05 JD |
871 | (native-inputs |
872 | `(("pkg-config" ,pkg-config))) | |
023fef7d LC |
873 | (home-page "https://01.org/powertop/") |
874 | (synopsis "Analyze power consumption on Intel-based laptops") | |
875 | (description | |
876 | "PowerTOP is a Linux tool to diagnose issues with power consumption and | |
877 | power management. In addition to being a diagnostic tool, PowerTOP also has | |
878 | an interactive mode where the user can experiment various power management | |
879 | settings for cases where the operating system has not enabled these | |
880 | settings.") | |
881 | (license gpl2))) | |
6869e5c9 LC |
882 | |
883 | (define-public aumix | |
884 | (package | |
885 | (name "aumix") | |
886 | (version "2.9.1") | |
887 | (source (origin | |
888 | (method url-fetch) | |
889 | (uri (string-append | |
890 | "http://www.jpj.net/~trevor/aumix/releases/aumix-" | |
891 | version ".tar.bz2")) | |
892 | (sha256 | |
893 | (base32 | |
894 | "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj")))) | |
895 | (build-system gnu-build-system) | |
896 | (inputs `(("ncurses" ,ncurses))) | |
897 | (home-page "http://www.jpj.net/~trevor/aumix.html") | |
898 | (synopsis "Audio mixer for X and the console") | |
899 | (description | |
900 | "Aumix adjusts an audio mixer from X, the console, a terminal, | |
901 | the command line or a script.") | |
902 | (license gpl2+))) | |
7c0dbe78 SHT |
903 | |
904 | (define-public iotop | |
905 | (package | |
906 | (name "iotop") | |
907 | (version "0.6") | |
908 | (source | |
909 | (origin | |
910 | (method url-fetch) | |
911 | (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-" | |
912 | version ".tar.gz")) | |
913 | (sha256 (base32 | |
914 | "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s")))) | |
915 | (build-system python-build-system) | |
916 | (arguments | |
35cebf01 | 917 | ;; The setup.py script expects python-2. |
7c0dbe78 | 918 | `(#:python ,python-2 |
35cebf01 | 919 | ;; There are currently no checks in the package. |
7c0dbe78 SHT |
920 | #:tests? #f)) |
921 | (native-inputs `(("python" ,python-2))) | |
922 | (home-page "http://guichaz.free.fr/iotop/") | |
923 | (synopsis | |
924 | "Displays the IO activity of running processes") | |
925 | (description | |
926 | "Iotop is a Python program with a top like user interface to show the | |
927 | processes currently causing I/O.") | |
35cebf01 | 928 | (license gpl2+))) |
e30835e2 LC |
929 | |
930 | (define-public fuse | |
931 | (package | |
932 | (name "fuse") | |
933 | (version "2.9.3") | |
934 | (source (origin | |
935 | (method url-fetch) | |
936 | (uri (string-append "mirror://sourceforge/fuse/fuse-" | |
937 | version ".tar.gz")) | |
938 | (sha256 | |
939 | (base32 | |
940 | "071r6xjgssy8vwdn6m28qq1bqxsd2bphcd2mzhq0grf5ybm87sqb")))) | |
941 | (build-system gnu-build-system) | |
b148bd71 | 942 | (inputs `(("util-linux" ,util-linux))) |
e30835e2 LC |
943 | (arguments |
944 | '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH=" | |
945 | (assoc-ref %outputs "out") | |
946 | "/sbin") | |
947 | (string-append "INIT_D_PATH=" | |
948 | (assoc-ref %outputs "out") | |
949 | "/etc/init.d") | |
950 | (string-append "UDEV_RULES_PATH=" | |
951 | (assoc-ref %outputs "out") | |
b148bd71 LC |
952 | "/etc/udev")) |
953 | #:phases (alist-cons-before | |
954 | 'build 'set-file-names | |
955 | (lambda* (#:key inputs #:allow-other-keys) | |
956 | ;; libfuse calls out to mount(8) and umount(8). Make sure | |
957 | ;; it refers to the right ones. | |
958 | (substitute* '("lib/mount_util.c" "util/mount_util.c") | |
959 | (("/bin/(u?)mount" _ maybe-u) | |
960 | (string-append (assoc-ref inputs "util-linux") | |
961 | "/bin/" maybe-u "mount"))) | |
962 | (substitute* '("util/mount.fuse.c") | |
963 | (("/bin/sh") | |
964 | (which "sh")))) | |
965 | %standard-phases))) | |
e30835e2 LC |
966 | (home-page "http://fuse.sourceforge.net/") |
967 | (synopsis "Support file systems implemented in user space") | |
968 | (description | |
969 | "As a consequence of its monolithic design, file system code for Linux | |
970 | normally goes into the kernel itself---which is not only a robustness issue, | |
971 | but also an impediment to system extensibility. FUSE, for \"file systems in | |
972 | user space\", is a kernel module and user-space library that tries to address | |
973 | part of this problem by allowing users to run file system implementations as | |
974 | user-space processes.") | |
975 | (license (list lgpl2.1 ; library | |
976 | gpl2+)))) ; command-line utilities | |
220193ad LC |
977 | |
978 | (define-public unionfs-fuse | |
979 | (package | |
980 | (name "unionfs-fuse") | |
981 | (version "0.26") | |
982 | (source (origin | |
983 | (method url-fetch) | |
984 | (uri (string-append | |
985 | "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-" | |
986 | version ".tar.xz")) | |
987 | (sha256 | |
988 | (base32 | |
989 | "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d")))) | |
990 | (build-system cmake-build-system) | |
991 | (inputs `(("fuse" ,fuse))) | |
992 | (arguments '(#:tests? #f)) ; no tests | |
993 | (home-page "http://podgorny.cz/moin/UnionFsFuse") | |
994 | (synopsis "User-space union file system") | |
995 | (description | |
996 | "UnionFS-FUSE is a flexible union file system implementation in user | |
997 | space, using the FUSE library. Mounting a union file system allows you to | |
998 | \"aggregate\" the contents of several directories into a single mount point. | |
999 | UnionFS-FUSE additionally supports copy-on-write.") | |
1000 | (license bsd-3))) | |
ed748588 | 1001 | |
0b7a0c20 LC |
1002 | (define fuse-static |
1003 | (package (inherit fuse) | |
1004 | (name "fuse-static") | |
1005 | (source (origin (inherit (package-source fuse)) | |
1006 | (modules '((guix build utils))) | |
1007 | (snippet | |
1008 | ;; Normally libfuse invokes mount(8) so that /etc/mtab is | |
1009 | ;; updated. Change calls to 'mtab_needs_update' to 0 so that | |
1010 | ;; it doesn't do that, allowing us to remove the dependency on | |
1011 | ;; util-linux (something that is useful in initrds.) | |
1012 | '(substitute* '("lib/mount_util.c" | |
1013 | "util/mount_util.c") | |
1014 | (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)") | |
1015 | "0") | |
1016 | (("/bin/") | |
1017 | ""))))))) | |
1018 | ||
ed748588 LC |
1019 | (define-public unionfs-fuse/static |
1020 | (package (inherit unionfs-fuse) | |
1021 | (synopsis "User-space union file system (statically linked)") | |
1022 | (name (string-append (package-name unionfs-fuse) "-static")) | |
1023 | (source (origin (inherit (package-source unionfs-fuse)) | |
1024 | (modules '((guix build utils))) | |
1025 | (snippet | |
1026 | ;; Add -ldl to the libraries, because libfuse.a needs that. | |
1027 | '(substitute* "src/CMakeLists.txt" | |
1028 | (("target_link_libraries(.*)\\)" _ libs) | |
1029 | (string-append "target_link_libraries" | |
1030 | libs " dl)")))))) | |
1031 | (arguments | |
1032 | '(#:tests? #f | |
0b7a0c20 LC |
1033 | #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static"))) |
1034 | (inputs `(("fuse" ,fuse-static))))) | |
67b66003 LC |
1035 | |
1036 | (define-public numactl | |
1037 | (package | |
1038 | (name "numactl") | |
1039 | (version "2.0.9") | |
1040 | (source (origin | |
1041 | (method url-fetch) | |
1042 | (uri (string-append | |
1043 | "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-" | |
1044 | version | |
1045 | ".tar.gz")) | |
1046 | (sha256 | |
1047 | (base32 | |
1048 | "073myxlyyhgxh1w3r757ajixb7s2k69czc3r0g12c3scq7k3784w")))) | |
1049 | (build-system gnu-build-system) | |
1050 | (arguments | |
1051 | '(#:phases (alist-replace | |
1052 | 'configure | |
1053 | (lambda* (#:key outputs #:allow-other-keys) | |
1054 | ;; There's no 'configure' script, just a raw makefile. | |
1055 | (substitute* "Makefile" | |
1056 | (("^prefix := .*$") | |
1057 | (string-append "prefix := " (assoc-ref outputs "out") | |
1058 | "\n")) | |
1059 | (("^libdir := .*$") | |
1060 | ;; By default the thing tries to install under | |
1061 | ;; $prefix/lib64 when on a 64-bit platform. | |
1062 | (string-append "libdir := $(prefix)/lib\n")))) | |
1063 | %standard-phases) | |
1064 | ||
1065 | #:make-flags (list | |
1066 | ;; By default the thing tries to use 'cc'. | |
1067 | "CC=gcc" | |
1068 | ||
1069 | ;; Make sure programs have an RPATH so they can find | |
1070 | ;; libnuma.so. | |
1071 | (string-append "LDLIBS=-Wl,-rpath=" | |
1072 | (assoc-ref %outputs "out") "/lib")) | |
1073 | ||
1074 | ;; There's a 'test' target, but it requires NUMA support in the kernel | |
1075 | ;; to run, which we can't assume to have. | |
1076 | #:tests? #f)) | |
1077 | (home-page "http://oss.sgi.com/projects/libnuma/") | |
1078 | (synopsis "Tools for non-uniform memory access (NUMA) machines") | |
1079 | (description | |
1080 | "NUMA stands for Non-Uniform Memory Access, in other words a system whose | |
1081 | memory is not all in one place. The numactl program allows you to run your | |
1082 | application program on specific CPU's and memory nodes. It does this by | |
1083 | supplying a NUMA memory policy to the operating system before running your | |
1084 | program. | |
1085 | ||
1086 | The package contains other commands, such as numademo, numastat and memhog. | |
1087 | The numademo command provides a quick overview of NUMA performance on your | |
1088 | system.") | |
1089 | (license (list gpl2 ; programs | |
1090 | lgpl2.1)))) ; library | |
b10e9ff6 LC |
1091 | |
1092 | (define-public kbd | |
1093 | (package | |
1094 | (name "kbd") | |
1095 | (version "2.0.1") | |
1096 | (source (origin | |
1097 | (method url-fetch) | |
1098 | (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-" | |
1099 | version ".tar.gz")) | |
1100 | (sha256 | |
1101 | (base32 | |
1102 | "0c34b0za2v0934acvgnva0vaqpghmmhz4zh7k0m9jd4mbc91byqm")))) | |
1103 | (build-system gnu-build-system) | |
1104 | (arguments | |
1105 | '(#:phases (alist-cons-before | |
1106 | 'build 'pre-build | |
1107 | (lambda* (#:key inputs #:allow-other-keys) | |
1108 | (let ((gzip (assoc-ref %build-inputs "gzip")) | |
1109 | (bzip2 (assoc-ref %build-inputs "bzip2"))) | |
1110 | (substitute* "src/libkeymap/findfile.c" | |
1111 | (("gzip") | |
1112 | (string-append gzip "/bin/gzip")) | |
1113 | (("bzip2") | |
1114 | (string-append bzip2 "/bin/bzip2"))))) | |
1115 | %standard-phases))) | |
1116 | (inputs `(("check" ,check) | |
1117 | ("gzip" ,guix:gzip) | |
1118 | ("bzip2" ,guix:bzip2) | |
1119 | ("pam" ,linux-pam))) | |
1120 | (native-inputs `(("pkg-config" ,pkg-config))) | |
1121 | (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/") | |
1122 | (synopsis "Linux keyboard utilities and keyboard maps") | |
1123 | (description | |
1124 | "This package contains keytable files and keyboard utilities compatible | |
1125 | for systems using the Linux kernel. This includes commands such as | |
1126 | 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.") | |
1127 | (license gpl2+))) | |
de0b620e LC |
1128 | |
1129 | (define-public inotify-tools | |
1130 | (package | |
1131 | (name "inotify-tools") | |
1132 | (version "3.13") | |
1133 | (source (origin | |
1134 | (method url-fetch) | |
1135 | (uri (string-append | |
1136 | "mirror://sourceforge/inotify-tools/inotify-tools/" | |
1137 | version "/inotify-tools-" version ".tar.gz")) | |
1138 | (sha256 | |
1139 | (base32 | |
1140 | "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6")))) | |
1141 | (build-system gnu-build-system) | |
1142 | (home-page "http://inotify-tools.sourceforge.net/") | |
1143 | (synopsis "Monitor file accesses") | |
1144 | (description | |
1145 | "The inotify-tools packages provides a C library and command-line tools | |
1146 | to use Linux' inotify mechanism, which allows file accesses to be monitored.") | |
1147 | (license gpl2+))) |