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