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