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