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>
7 ;;; This file is part of GNU Guix.
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.
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.
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/>.
22 (define-module (gnu packages linux)
23 #:use-module ((guix licenses)
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))
54 (define-public (system->linux-architecture arch)
55 "Return the Linux architecture name for ARCH, a Guix system name such as
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")
63 (define (linux-libre-urls version)
64 "Return a list of URLs for Linux-Libre VERSION."
66 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
67 version "-gnu/linux-libre-" version "-gnu.tar.xz")
69 ;; XXX: Work around <http://bugs.gnu.org/14851>.
71 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
72 version "-gnu.tar.xz")
74 ;; Maybe this URL will become valid eventually.
76 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
77 version "-gnu.tar.xz")))
79 (define-public linux-libre-headers
80 (let* ((version "3.3.8")
84 (setenv "ARCH" ,(system->linux-architecture arch))
85 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
87 (and (zero? (system* "make" "defconfig"))
88 (zero? (system* "make" "mrproper" "headers_check"))))))
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)
95 (mkdir (string-append out "/include/config"))
96 (call-with-output-file
98 "/include/config/kernel.release")
100 (format p "~a-default~%" ,version))))))))
102 (name "linux-libre-headers")
106 (uri (linux-libre-urls version))
109 "0jkfh0z1s6izvdnc3njm39dhzp1cg8i06jv06izwqz9w9qsprvnl"))))
110 (build-system gnu-build-system)
111 (native-inputs `(("perl" ,perl)))
113 `(#:modules ((guix build gnu-build-system)
116 #:phases (alist-replace
117 'build ,(build-phase (or (%current-target-system)
120 'install ,install-phase
121 (alist-delete 'configure %standard-phases)))
123 (synopsis "GNU Linux-Libre kernel headers")
124 (description "Headers of the Linux-Libre kernel.")
126 (home-page "http://www.gnu.org/software/linux-libre/"))))
128 (define-public module-init-tools
130 (name "module-init-tools")
135 "mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-"
139 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
141 (list (search-patch "module-init-tools-moduledir.patch")))))
142 (build-system gnu-build-system)
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
150 (substitute* "Makefile.in"
151 (("^DOCBOOKTOMAN.*$")
152 "DOCBOOKTOMAN = true\n")))
154 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
155 (synopsis "Tools for loading and managing Linux kernel modules")
157 "Tools for loading and managing Linux kernel modules, such as `modprobe',
158 `insmod', `lsmod', and more.")
161 (define %boot-logo-patch
162 ;; Linux-Libre boot logo featuring Freedo and a gnu.
165 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
166 "lemote/gnewsense/branches/3.15/100gnu+freedo.patch"))
169 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
171 (define-public linux-libre
172 (let* ((version "3.15")
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"))
179 (let ((arch (car (string-split system #\-))))
181 (cond ((string=? arch "i686") "i386")
183 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
185 (let ((build (assoc-ref %standard-phases 'build)))
186 (and (zero? (system* "make" "defconfig"))
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"
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"
209 (zero? (system* "make" "oldconfig")))
211 ;; Call the default `build' phase so `-j' is correctly
213 (apply build #:make-flags "all" args)))))
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")))
220 (for-each (lambda (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"))))))
236 (uri (linux-libre-urls version))
239 "125n04rwqmr3bm9slk62w6xcg355hx85rwv2x16nl6qki70hsick"))))
240 (build-system gnu-build-system)
241 (native-inputs `(("perl" ,perl)
243 ("module-init-tools" ,module-init-tools)
244 ("patch/freedo+gnu" ,%boot-logo-patch)))
246 `(#:modules ((guix build gnu-build-system)
250 #:phases (alist-replace
253 'install ,install-phase
254 (alist-delete 'configure %standard-phases)))
256 (synopsis "100% free redistribution of a cleaned Linux kernel")
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.")
261 (home-page "http://www.gnu.org/software/linux-libre/"))))
265 ;;; Pluggable authentication modules (PAM).
268 (define-public linux-pam
275 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
277 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
278 version ".tar.bz2")))
281 "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s"))))
282 (build-system gnu-build-system)
286 ;; TODO: optional dependencies
287 ;; ("libxcrypt" ,libxcrypt)
288 ;; ("cracklib" ,cracklib)
291 '(;; Most users, such as `shadow', expect the headers to be under
293 #:configure-flags (list (string-append "--includedir="
294 (assoc-ref %outputs "out")
295 "/include/security"))
297 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
300 (home-page "http://www.linux-pam.org/")
301 (synopsis "Pluggable authentication modules for Linux")
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")
314 (define-public psmisc
321 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
325 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
326 (build-system gnu-build-system)
327 (inputs `(("ncurses" ,ncurses)))
328 (home-page "http://psmisc.sourceforge.net/")
330 "set of utilities that use the proc filesystem, such as fuser, killall, and pstree")
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.")
337 (define-public util-linux
343 (uri (string-append "mirror://kernel.org/linux/utils/"
344 name "/v" version "/"
345 name "-" version ".2" ".tar.xz"))
348 "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir"))
349 (patches (list (search-patch "util-linux-perl.patch")))))
350 (build-system gnu-build-system)
352 `(#:configure-flags '("--disable-use-tty-group"
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"))))
362 (inputs `(("zlib" ,guix:zlib)
363 ("ncurses" ,ncurses)))
366 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
367 (synopsis "Collection of utilities for the Linux kernel")
369 "util-linux is a random collection of utilities for the Linux kernel.")
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))))
377 (define-public procps
383 (uri (string-append "http://procps.sourceforge.net/procps-"
387 "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i"))
388 (patches (list (search-patch "procps-make-3.82.patch")))))
389 (build-system gnu-build-system)
390 (inputs `(("ncurses" ,ncurses)))
392 '(#:phases (alist-replace
394 (lambda* (#:key outputs #:allow-other-keys)
395 ;; No `configure', just a single Makefile.
396 (let ((out (assoc-ref outputs "out")))
397 (substitute* "Makefile"
399 (("--(owner|group) 0") "")
400 (("ldconfig") "true")
401 (("^LDFLAGS[[:blank:]]*:=(.*)$" _ value)
402 ;; Add libproc to the RPATH.
403 (string-append "LDFLAGS := -Wl,-rpath="
408 (lambda* (#:key outputs #:allow-other-keys)
409 (let ((out (assoc-ref outputs "out")))
411 (system* "make" "install"
412 (string-append "DESTDIR=" out)))
416 (system* (string-append out "/bin/ps")
420 ;; What did you expect? Tests?
422 (home-page "http://procps.sourceforge.net/")
423 (synopsis "Utilities that give information about processes")
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.")
431 (define-public usbutils
438 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
439 "usbutils-" version ".tar.xz"))
442 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
443 (build-system gnu-build-system)
445 `(("libusb" ,libusb)))
447 `(("pkg-config" ,pkg-config)))
448 (home-page "http://www.linux-usb.org/")
450 "Tools for working with USB devices, such as lsusb")
452 "Tools for working with USB devices, such as lsusb.")
455 (define-public e2fsprogs
461 (uri (string-append "mirror://sourceforge/e2fsprogs/e2fsprogs-"
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
471 '(#:phases (alist-cons-before
472 'configure 'patch-shells
474 (substitute* "configure"
475 (("/bin/sh (.*)parse-types.sh" _ dir)
476 (string-append (which "sh") " " dir
478 (substitute* (find-files "." "^Makefile.in$")
480 (string-append "#!" (which "sh")))))
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".
487 (home-page "http://e2fsprogs.sourceforge.net/")
488 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
490 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
491 (license (list gpl2 ; programs
495 (define-public e2fsck/static
497 (name "e2fsck-static")
498 (version (package-version e2fsprogs))
499 (build-system trivial-build-system)
502 `(#:modules ((guix build utils))
505 (use-modules (guix build utils)
509 (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs")
511 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
513 (with-directory-excursion bin
514 (for-each (lambda (file)
515 (copy-file (string-append source "/" file)
517 (remove-store-references file)
519 (scandir source (cut string-prefix? "fsck." <>))))))))
520 (inputs `(("e2fsprogs" ,(static-package e2fsprogs))))
521 (synopsis "Statically-linked fsck.* commands from e2fsprogs")
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))))
528 (define-public strace
534 (uri (string-append "mirror://sourceforge/strace/strace-"
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")
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.")
548 (define-public alsa-lib
555 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
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")
565 "The Advanced Linux Sound Architecture (ALSA) provides audio and
566 MIDI functionality to the Linux-based operating system.")
569 (define-public alsa-utils
575 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-"
579 "1sjjngnq50jv5ilwsb4zys6smifni3bd6fn28gbnhfrg14wsrgq2"))))
580 (build-system gnu-build-system)
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
590 ;; Don't try to mkdir /var/lib/alsa.
591 (substitute* "Makefile"
592 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
596 `(("libsamplerate" ,libsamplerate)
598 ("alsa-lib" ,alsa-lib)
600 ("gettext" ,gnu-gettext)))
601 (home-page "http://www.alsa-project.org/")
602 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
604 "The Advanced Linux Sound Architecture (ALSA) provides audio and
605 MIDI functionality to the Linux-based operating system.")
607 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
611 (define-public iptables
618 "http://www.netfilter.org/projects/iptables/files/iptables-"
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")
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
636 (define-public iproute
643 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
647 "04gi11gh087bg2nlxhj0lxrk8l9qxkpr88nsiil23917bm3h1xj4"))))
648 (build-system gnu-build-system)
650 `(#:tests? #f ; no test suite
651 #:make-flags (let ((out (assoc-ref %outputs "out")))
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/"
658 (string-append "MANDIR=" out "/share/man")))
659 #:phases (alist-cons-before
660 'install 'pre-install
662 ;; Don't attempt to create /var/lib/arpd.
663 (substitute* "Makefile"
664 (("^.*ARPDDIR.*$") "")))
667 `(("iptables" ,iptables)
670 `(("pkg-config" ,pkg-config)
674 "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
676 "A collection of utilities for controlling TCP/IP networking and traffic control in Linux")
678 "Iproute2 is a collection of utilities for controlling TCP/IP
679 networking and traffic with the Linux kernel.
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
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
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
704 (home-page "http://www.tazenda.demon.co.uk/phil/net-tools/")
707 (uri (string-append home-page "/" name "-"
711 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))))
712 (build-system gnu-build-system)
714 '(#:phases (alist-cons-after
716 (lambda* (#:key inputs #:allow-other-keys)
717 (define (apply-patch file)
718 (zero? (system* "patch" "-p1" "--batch"
721 (let ((patch.gz (assoc-ref inputs "patch")))
722 (format #t "applying Debian patch set '~a'...~%"
724 (system (string-append "gunzip < " patch.gz " > the-patch"))
726 (and (apply-patch "the-patch")
727 (for-each apply-patch
728 (find-files "debian/patches"
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"))
737 ;; Pretend we have everything...
738 (system "yes | make config")
740 ;; ... except we don't have libdnet, so remove that
742 (substitute* '("config.make" "config.h")
743 (("^.*HAVE_AFDECnet.*$") ""))))
746 ;; Binaries that depend on libnet-tools.a don't declare that
747 ;; dependency, making it parallel-unsafe.
750 #:tests? #f ; no test suite
751 #:make-flags (let ((out (assoc-ref %outputs "out")))
753 (string-append "BASEDIR=" out)
754 (string-append "INSTALLNLSDIR=" out "/share/locale")
755 (string-append "mandir=/share/man")))))
757 ;; Use the big Debian patch set (the thing does not even compile out of
759 (inputs `(("patch" ,(origin
762 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
765 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
766 (native-inputs `(("gettext" ,gnu-gettext)))
768 (synopsis "Tools for controlling the network subsystem in Linux")
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).")
777 (define-public libcap
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.
788 "mirror://debian/pool/main/libc/libcap2/libcap2_"
789 version ".orig.tar.gz"))
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")
805 "libcap2 provides a programming interface to POSIX capabilities on
806 Linux-based operating systems.")
808 ;; License is BSD-3 or GPLv2, at the user's choice.
811 (define-public bridge-utils
813 (name "bridge-utils")
817 (uri (string-append "mirror://sourceforge/bridge/bridge-utils-"
821 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
822 (build-system gnu-build-system)
824 ;; The tarball lacks all the generated files.
825 (native-inputs `(("autoconf" ,autoconf)
826 ("automake" ,automake)))
828 '(#:phases (alist-cons-before
829 'configure 'bootstrap
831 (zero? (system* "autoreconf" "-vf")))
833 #:tests? #f)) ; no 'check' target
836 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
837 (synopsis "Manipulate Ethernet bridges")
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.")
853 "http://www.infradead.org/~tgr/libnl/files/libnl-"
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")
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.")
869 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
870 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
873 (define-public powertop
881 "https://01.org/powertop/sites/default/files/downloads/powertop-"
885 "02rwqbpasdayl201v0549gbp2f82rd0hqiv3i111r7npanjhhb4b"))))
886 (build-system gnu-build-system)
888 ;; TODO: Add pciutils.
889 `(("zlib" ,guix:zlib)
890 ;; ("pciutils" ,pciutils)
894 `(("pkg-config" ,pkg-config)))
895 (home-page "https://01.org/powertop/")
896 (synopsis "Analyze power consumption on Intel-based laptops")
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
912 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
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")
922 "Aumix adjusts an audio mixer from X, the console, a terminal,
923 the command line or a script.")
933 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
936 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
937 (build-system python-build-system)
939 ;; The setup.py script expects python-2.
941 ;; There are currently no checks in the package.
943 (native-inputs `(("python" ,python-2)))
944 (home-page "http://guichaz.free.fr/iotop/")
946 "Displays the IO activity of running processes")
948 "Iotop is a Python program with a top like user interface to show the
949 processes currently causing I/O.")
958 (uri (string-append "mirror://sourceforge/fuse/fuse-"
962 "071r6xjgssy8vwdn6m28qq1bqxsd2bphcd2mzhq0grf5ybm87sqb"))))
963 (build-system gnu-build-system)
964 (inputs `(("util-linux" ,util-linux)))
966 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
967 (assoc-ref %outputs "out")
969 (string-append "INIT_D_PATH="
970 (assoc-ref %outputs "out")
972 (string-append "UDEV_RULES_PATH="
973 (assoc-ref %outputs "out")
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")
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
992 (substitute* "lib/Makefile"
993 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
994 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
996 (home-page "http://fuse.sourceforge.net/")
997 (synopsis "Support file systems implemented in user space")
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
1008 (define-public unionfs-fuse
1010 (name "unionfs-fuse")
1015 "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-"
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")
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.")
1033 (package (inherit fuse)
1034 (name "fuse-static")
1035 (source (origin (inherit (package-source fuse))
1036 (modules '((guix build utils)))
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_]+\\)")
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)))
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"
1063 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")))
1064 (inputs `(("fuse" ,fuse-static)))))
1066 (define-public sshfs-fuse
1072 (uri (string-append "mirror://sourceforge/fuse/sshfs-fuse-"
1076 "0gp6qr33l2p0964j0kds0dfmvyyf5lpgsn11daf0n5fhwm9185z9"))))
1077 (build-system gnu-build-system)
1082 `(("pkg-config" ,pkg-config)))
1083 (home-page "http://fuse.sourceforge.net/sshfs.html")
1084 (synopsis "Mount remote file systems over SSH")
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.")
1092 (define-public numactl
1099 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1104 "073myxlyyhgxh1w3r757ajixb7s2k69czc3r0g12c3scq7k3784w"))))
1105 (build-system gnu-build-system)
1107 '(#:phases (alist-replace
1109 (lambda* (#:key outputs #:allow-other-keys)
1110 ;; There's no 'configure' script, just a raw makefile.
1111 (substitute* "Makefile"
1113 (string-append "prefix := " (assoc-ref outputs "out")
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"))))
1122 ;; By default the thing tries to use 'cc'.
1125 ;; Make sure programs have an RPATH so they can find
1127 (string-append "LDLIBS=-Wl,-rpath="
1128 (assoc-ref %outputs "out") "/lib"))
1130 ;; There's a 'test' target, but it requires NUMA support in the kernel
1131 ;; to run, which we can't assume to have.
1133 (home-page "http://oss.sgi.com/projects/libnuma/")
1134 (synopsis "Tools for non-uniform memory access (NUMA) machines")
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
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
1145 (license (list gpl2 ; programs
1146 lgpl2.1)))) ; library
1154 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1158 "0c34b0za2v0934acvgnva0vaqpghmmhz4zh7k0m9jd4mbc91byqm"))
1159 (modules '((guix build utils)))
1161 '(substitute* "tests/Makefile.in"
1162 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1164 "[@]VERSION[@]")))))
1165 (build-system gnu-build-system)
1167 '(#:phases (alist-cons-before
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"
1174 (string-append gzip "/bin/gzip"))
1176 (string-append bzip2 "/bin/bzip2")))))
1178 (inputs `(("check" ,check)
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")
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'.")
1191 (define-public inotify-tools
1193 (name "inotify-tools")
1198 "mirror://sourceforge/inotify-tools/inotify-tools/"
1199 version "/inotify-tools-" version ".tar.gz"))
1202 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1203 (build-system gnu-build-system)
1204 (home-page "http://inotify-tools.sourceforge.net/")
1205 (synopsis "Monitor file accesses")
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.")
1218 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1219 "kmod-" version ".tar.xz"))
1222 "1yid3a9b64a60ybj66fk2ysrq5klnl0ijl4g624cl16y8404g9rv"))
1223 (patches (list (search-patch "kmod-module-directory.patch")))))
1224 (build-system gnu-build-system)
1226 `(("pkg-config" ,pkg-config)))
1229 ("zlib" ,guix:zlib)))
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.
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+
1251 "mirror://kernel.org/linux/utils/kernel/hotplug/udev-"
1255 "1awp7p07gi083w0dwqhhbbas68a7fx2sbm1yf1ip2jwf7cpqkf5d"))
1256 (patches (list (search-patch "udev-gir-libtool.patch")))))
1257 (build-system gnu-build-system)
1259 `(#:configure-flags (list (string-append
1260 "--with-pci-ids-path="
1261 (assoc-ref %build-inputs "pciutils")
1262 "/share/pci.ids.gz")
1264 "--with-firmware-path=/no/firmware"
1266 ;; Work around undefined reference to
1267 ;; 'mq_getattr' in sc-daemon.c.
1270 `(("pkg-config" ,pkg-config)
1272 ("perl" ,perl) ; for the tests
1273 ("python" ,python-2))) ; ditto
1276 ("pciutils" ,pciutils)
1277 ("usbutils" ,usbutils)
1278 ("util-linux" ,util-linux)
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
1286 (license gpl2+))) ; libudev is under lgpl2.1+