1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
4 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages linux)
22 #:use-module ((guix licenses)
24 #:use-module (gnu packages)
25 #:use-module ((gnu packages compression)
26 #:renamer (symbol-prefix-proc 'guix:))
27 #:use-module (gnu packages flex)
28 #:use-module (gnu packages bison)
29 #:use-module (gnu packages libusb)
30 #:use-module (gnu packages ncurses)
31 #:use-module (gnu packages bdb)
32 #:use-module (gnu packages perl)
33 #:use-module (gnu packages pkg-config)
34 #:use-module (gnu packages python)
35 #:use-module (gnu packages algebra)
36 #:use-module (gnu packages gettext)
37 #:use-module (gnu packages pulseaudio)
38 #:use-module (gnu packages attr)
39 #:use-module (gnu packages xml)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages texinfo)
42 #:use-module (guix packages)
43 #:use-module (guix download)
44 #:use-module (guix build-system gnu)
45 #:use-module (guix build-system cmake)
46 #:use-module (guix build-system python)
47 #:use-module (guix build-system trivial))
49 (define-public (system->linux-architecture arch)
50 "Return the Linux architecture name for ARCH, a Guix system name such as
52 (let ((arch (car (string-split arch #\-))))
53 (cond ((string=? arch "i686") "i386")
54 ((string-prefix? "mips" arch) "mips")
55 ((string-prefix? "arm" arch) "arm")
58 (define (linux-libre-urls version)
59 "Return a list of URLs for Linux-Libre VERSION."
61 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
62 version "-gnu/linux-libre-" version "-gnu.tar.xz")
64 ;; XXX: Work around <http://bugs.gnu.org/14851>.
66 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
67 version "-gnu.tar.xz")
69 ;; Maybe this URL will become valid eventually.
71 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
72 version "-gnu.tar.xz")))
74 (define-public linux-libre-headers
75 (let* ((version "3.3.8")
79 (setenv "ARCH" ,(system->linux-architecture arch))
80 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
82 (and (zero? (system* "make" "defconfig"))
83 (zero? (system* "make" "mrproper" "headers_check"))))))
85 `(lambda* (#:key outputs #:allow-other-keys)
86 (let ((out (assoc-ref outputs "out")))
87 (and (zero? (system* "make"
88 (string-append "INSTALL_HDR_PATH=" out)
90 (mkdir (string-append out "/include/config"))
91 (call-with-output-file
93 "/include/config/kernel.release")
95 (format p "~a-default~%" ,version))))))))
97 (name "linux-libre-headers")
101 (uri (linux-libre-urls version))
104 "0jkfh0z1s6izvdnc3njm39dhzp1cg8i06jv06izwqz9w9qsprvnl"))))
105 (build-system gnu-build-system)
106 (native-inputs `(("perl" ,perl)))
108 `(#:modules ((guix build gnu-build-system)
111 #:phases (alist-replace
112 'build ,(build-phase (or (%current-target-system)
115 'install ,install-phase
116 (alist-delete 'configure %standard-phases)))
118 (synopsis "GNU Linux-Libre kernel headers")
119 (description "Headers of the Linux-Libre kernel.")
121 (home-page "http://www.gnu.org/software/linux-libre/"))))
123 (define-public module-init-tools
125 (name "module-init-tools")
130 "mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-"
134 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))))
135 (build-system gnu-build-system)
137 ;; FIXME: The upstream tarball lacks man pages, and building them would
138 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
139 ;; but they vanished. In the meantime, fake it.
140 '(#:phases (alist-cons-before
141 'configure 'fake-docbook
143 (substitute* "Makefile.in"
144 (("^DOCBOOKTOMAN.*$")
145 "DOCBOOKTOMAN = true\n")))
147 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
148 (synopsis "Tools for loading and managing Linux kernel modules")
150 "Tools for loading and managing Linux kernel modules, such as `modprobe',
151 `insmod', `lsmod', and more.")
154 (define-public linux-libre
155 (let* ((version "3.13.7")
157 '(lambda* (#:key system #:allow-other-keys #:rest args)
158 (let ((arch (car (string-split system #\-))))
160 (cond ((string=? arch "i686") "i386")
162 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
164 (let ((build (assoc-ref %standard-phases 'build)))
165 (and (zero? (system* "make" "defconfig"))
167 ;; Appending works even when the option wasn't in the
168 ;; file. The last one prevails if duplicated.
169 (let ((port (open-file ".config" "a")))
170 (display (string-append "CONFIG_NET_9P=m\n"
171 "CONFIG_NET_9P_VIRTIO=m\n"
172 "CONFIG_VIRTIO_BLK=m\n"
173 "CONFIG_SATA_SIS=y\n"
174 "CONFIG_VIRTIO_NET=m\n"
176 ;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
177 "CONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n"
178 "CONFIG_VIRTIO_PCI=m\n"
179 "CONFIG_VIRTIO_BALLOON=m\n"
180 "CONFIG_VIRTIO_MMIO=m\n"
187 (zero? (system* "make" "oldconfig")))
189 ;; Call the default `build' phase so `-j' is correctly
191 (apply build #:make-flags "all" args)))))
193 `(lambda* (#:key inputs outputs #:allow-other-keys)
194 (let* ((out (assoc-ref outputs "out"))
195 (moddir (string-append out "/lib/modules"))
196 (mit (assoc-ref inputs "module-init-tools")))
198 (for-each (lambda (file)
200 (string-append out "/" (basename file))))
201 (find-files "." "^(bzImage|System\\.map)$"))
202 (copy-file ".config" (string-append out "/config"))
203 (zero? (system* "make"
204 (string-append "DEPMOD=" mit "/sbin/depmod")
205 (string-append "MODULE_DIR=" moddir)
206 (string-append "INSTALL_PATH=" out)
207 (string-append "INSTALL_MOD_PATH=" out)
208 "modules_install"))))))
214 (uri (linux-libre-urls version))
217 "0j28dg0zq4vlbk4ady4fq021i8dxx2h8h90n26mzigr9hky86n8d"))))
218 (build-system gnu-build-system)
219 (native-inputs `(("perl" ,perl)
221 ("module-init-tools" ,module-init-tools)))
223 `(#:modules ((guix build gnu-build-system)
227 #:phases (alist-replace
230 'install ,install-phase
231 (alist-delete 'configure %standard-phases)))
233 (synopsis "100% free redistribution of a cleaned Linux kernel")
235 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
236 It has been modified to remove all non-free binary blobs.")
238 (home-page "http://www.gnu.org/software/linux-libre/"))))
242 ;;; Pluggable authentication modules (PAM).
245 (define-public linux-pam
252 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
254 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
255 version ".tar.bz2")))
258 "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s"))))
259 (build-system gnu-build-system)
263 ;; TODO: optional dependencies
264 ;; ("libxcrypt" ,libxcrypt)
265 ;; ("cracklib" ,cracklib)
268 '(;; Most users, such as `shadow', expect the headers to be under
270 #:configure-flags (list (string-append "--includedir="
271 (assoc-ref %outputs "out")
272 "/include/security"))
274 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
277 (home-page "http://www.linux-pam.org/")
278 (synopsis "Pluggable authentication modules for Linux")
280 "A *Free* project to implement OSF's RFC 86.0.
281 Pluggable authentication modules are small shared object files that can
282 be used through the PAM API to perform tasks, like authenticating a user
283 at login. Local and dynamic reconfiguration are its key features")
291 (define-public psmisc
298 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
302 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
303 (build-system gnu-build-system)
304 (inputs `(("ncurses" ,ncurses)))
305 (home-page "http://psmisc.sourceforge.net/")
307 "set of utilities that use the proc filesystem, such as fuser, killall, and pstree")
309 "This PSmisc package is a set of some small useful utilities that
310 use the proc filesystem. We're not about changing the world, but
311 providing the system administrator with some help in common tasks.")
314 (define-public util-linux
321 (uri (string-append "mirror://kernel.org/linux/utils/"
322 name "/v" version "/"
323 name "-" version ".2" ".tar.xz"))
326 "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir"))))
327 (build-system gnu-build-system)
329 `(#:configure-flags '("--disable-use-tty-group"
331 #:phases (alist-cons-after
332 'install 'patch-chkdupexe
333 (lambda* (#:key outputs #:allow-other-keys)
334 (let ((out (assoc-ref outputs "out")))
335 (substitute* (string-append out "/bin/chkdupexe")
336 ;; Allow 'patch-shebang' to do its work.
337 (("@PERL@") "/bin/perl"))))
339 (inputs `(("zlib" ,guix:zlib)
340 ("ncurses" ,ncurses)))
343 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
344 (synopsis "Collection of utilities for the Linux kernel")
346 "util-linux is a random collection of utilities for the Linux kernel.")
348 ;; Note that util-linux doesn't use the same license for all the
349 ;; code. GPLv2+ is the default license for a code without an
350 ;; explicitly defined license.
351 (license (list gpl3+ gpl2+ gpl2 lgpl2.0+
352 bsd-4 public-domain))))
354 (define-public procps
360 (uri (string-append "http://procps.sourceforge.net/procps-"
364 "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i"))
365 (patches (list (search-patch "procps-make-3.82.patch")))))
366 (build-system gnu-build-system)
367 (inputs `(("ncurses" ,ncurses)))
369 '(#:phases (alist-replace
371 (lambda* (#:key outputs #:allow-other-keys)
372 ;; No `configure', just a single Makefile.
373 (let ((out (assoc-ref outputs "out")))
374 (substitute* "Makefile"
376 (("--(owner|group) 0") "")
377 (("ldconfig") "true")
378 (("^LDFLAGS[[:blank:]]*:=(.*)$" _ value)
379 ;; Add libproc to the RPATH.
380 (string-append "LDFLAGS := -Wl,-rpath="
385 (lambda* (#:key outputs #:allow-other-keys)
386 (let ((out (assoc-ref outputs "out")))
388 (system* "make" "install"
389 (string-append "DESTDIR=" out)))
393 (system* (string-append out "/bin/ps")
397 ;; What did you expect? Tests?
399 (home-page "http://procps.sourceforge.net/")
400 (synopsis "Utilities that give information about processes")
402 "procps is the package that has a bunch of small useful utilities
403 that give information about processes using the Linux /proc file system.
404 The package includes the programs ps, top, vmstat, w, kill, free,
405 slabtop, and skill.")
408 (define-public usbutils
415 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
416 "usbutils-" version ".tar.xz"))
419 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
420 (build-system gnu-build-system)
422 `(("libusb" ,libusb)))
424 `(("pkg-config" ,pkg-config)))
425 (home-page "http://www.linux-usb.org/")
427 "Tools for working with USB devices, such as lsusb")
429 "Tools for working with USB devices, such as lsusb.")
432 (define-public e2fsprogs
438 (uri (string-append "mirror://sourceforge/e2fsprogs/e2fsprogs-"
442 "0ibkkvp6kan0hn0d1anq4n2md70j5gcm7mwna515w82xwyr02rfw"))))
443 (build-system gnu-build-system)
444 (inputs `(("util-linux" ,util-linux)))
445 (native-inputs `(("pkg-config" ,pkg-config)
446 ("texinfo" ,texinfo))) ; for the libext2fs Info manual
448 '(#:phases (alist-cons-before
449 'configure 'patch-shells
451 (substitute* "configure"
452 (("/bin/sh (.*)parse-types.sh" _ dir)
453 (string-append (which "sh") " " dir
455 (substitute* (find-files "." "^Makefile.in$")
457 (string-append "#!" (which "sh")))))
460 ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
461 ;; they fail because we get an extra line that says "Can't check if
462 ;; filesystem is mounted due to missing mtab file".
464 (home-page "http://e2fsprogs.sourceforge.net/")
465 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
467 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
468 (license (list gpl2 ; programs
472 (define-public e2fsck/static
474 (name "e2fsck-static")
475 (version (package-version e2fsprogs))
476 (build-system trivial-build-system)
479 `(#:modules ((guix build utils))
482 (use-modules (guix build utils)
486 (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs")
488 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
490 (with-directory-excursion bin
491 (for-each (lambda (file)
492 (copy-file (string-append source "/" file)
494 (remove-store-references file)
496 (scandir source (cut string-prefix? "fsck." <>))))))))
497 (inputs `(("e2fsprogs" ,(static-package e2fsprogs))))
498 (synopsis "Statically-linked fsck.* commands from e2fsprogs")
500 "This package provides statically-linked command of fsck.ext[234] taken
501 from the e2fsprogs package. It is meant to be used in initrds.")
502 (home-page (package-home-page e2fsprogs))
503 (license (package-license e2fsprogs))))
505 (define-public strace
511 (uri (string-append "mirror://sourceforge/strace/strace-"
515 "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
516 (build-system gnu-build-system)
517 (native-inputs `(("perl" ,perl)))
518 (home-page "http://strace.sourceforge.net/")
519 (synopsis "System call tracer for Linux")
521 "strace is a system call tracer, i.e. a debugging tool which prints out a
522 trace of all the system calls made by a another process/program.")
525 (define-public alsa-lib
532 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
536 "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9"))
537 (patches (list (search-patch "alsa-lib-mips-atomic-fix.patch")))))
538 (build-system gnu-build-system)
539 (home-page "http://www.alsa-project.org/")
540 (synopsis "The Advanced Linux Sound Architecture libraries")
542 "The Advanced Linux Sound Architecture (ALSA) provides audio and
543 MIDI functionality to the Linux-based operating system.")
546 (define-public alsa-utils
552 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-"
556 "1sjjngnq50jv5ilwsb4zys6smifni3bd6fn28gbnhfrg14wsrgq2"))))
557 (build-system gnu-build-system)
559 ;; XXX: Disable man page creation until we have DocBook.
560 '(#:configure-flags (list "--disable-xmlto"
561 (string-append "--with-udev-rules-dir="
562 (assoc-ref %outputs "out")
563 "/lib/udev/rules.d"))
564 #:phases (alist-cons-before
565 'install 'pre-install
567 ;; Don't try to mkdir /var/lib/alsa.
568 (substitute* "Makefile"
569 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
573 `(("libsamplerate" ,libsamplerate)
575 ("alsa-lib" ,alsa-lib)
577 ("gettext" ,gnu-gettext)))
578 (home-page "http://www.alsa-project.org/")
579 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
581 "The Advanced Linux Sound Architecture (ALSA) provides audio and
582 MIDI functionality to the Linux-based operating system.")
584 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
588 (define-public iptables
595 "http://www.netfilter.org/projects/iptables/files/iptables-"
599 "0vkg5lzkn4l3i1sm6v3x96zzvnv9g7mi0qgj6279ld383mzcws24"))))
600 (build-system gnu-build-system)
601 (arguments '(#:tests? #f)) ; no test suite
602 (home-page "http://www.netfilter.org/projects/iptables/index.html")
603 (synopsis "Program to configure the Linux IP packet filtering rules")
605 "iptables is the userspace command line program used to configure the
606 Linux 2.4.x and later IPv4 packet filtering ruleset. It is targeted towards
607 system administrators. Since Network Address Translation is also configured
608 from the packet filter ruleset, iptables is used for this, too. The iptables
609 package also includes ip6tables. ip6tables is used for configuring the IPv6
613 (define-public iproute
620 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
624 "04gi11gh087bg2nlxhj0lxrk8l9qxkpr88nsiil23917bm3h1xj4"))))
625 (build-system gnu-build-system)
627 `(#:tests? #f ; no test suite
628 #:make-flags (let ((out (assoc-ref %outputs "out")))
630 (string-append "LIBDIR=" out "/lib")
631 (string-append "SBINDIR=" out "/sbin")
632 (string-append "CONFDIR=" out "/etc")
633 (string-append "DOCDIR=" out "/share/doc/"
635 (string-append "MANDIR=" out "/share/man")))
636 #:phases (alist-cons-before
637 'install 'pre-install
639 ;; Don't attempt to create /var/lib/arpd.
640 (substitute* "Makefile"
641 (("^.*ARPDDIR.*$") "")))
644 `(("iptables" ,iptables)
647 `(("pkg-config" ,pkg-config)
651 "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
653 "A collection of utilities for controlling TCP/IP networking and traffic control in Linux")
655 "Iproute2 is a collection of utilities for controlling TCP/IP
656 networking and traffic with the Linux kernel.
658 Most network configuration manuals still refer to ifconfig and route as the
659 primary network configuration tools, but ifconfig is known to behave
660 inadequately in modern network environments. They should be deprecated, but
661 most distros still include them. Most network configuration systems make use
662 of ifconfig and thus provide a limited feature set. The /etc/net project aims
663 to support most modern network technologies, as it doesn't use ifconfig and
664 allows a system administrator to make use of all iproute2 features, including
667 iproute2 is usually shipped in a package called iproute or iproute2 and
668 consists of several tools, of which the most important are ip and tc. ip
669 controls IPv4 and IPv6 configuration and tc stands for traffic control. Both
670 tools print detailed usage messages and are accompanied by a set of
674 (define-public net-tools
675 ;; XXX: This package is basically unmaintained, but it provides a few
676 ;; commands not yet provided by Inetutils, such as 'route', so we have to
681 (home-page "http://www.tazenda.demon.co.uk/phil/net-tools/")
684 (uri (string-append home-page "/" name "-"
688 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))))
689 (build-system gnu-build-system)
691 '(#:phases (alist-cons-after
693 (lambda* (#:key inputs #:allow-other-keys)
694 (define (apply-patch file)
695 (zero? (system* "patch" "-p1" "--batch"
698 (let ((patch.gz (assoc-ref inputs "patch")))
699 (format #t "applying Debian patch set '~a'...~%"
701 (system (string-append "gunzip < " patch.gz " > the-patch"))
703 (and (apply-patch "the-patch")
704 (for-each apply-patch
705 (find-files "debian/patches"
709 (lambda* (#:key outputs #:allow-other-keys)
710 (let ((out (assoc-ref outputs "out")))
711 (mkdir-p (string-append out "/bin"))
712 (mkdir-p (string-append out "/sbin"))
714 ;; Pretend we have everything...
715 (system "yes | make config")
717 ;; ... except we don't have libdnet, so remove that
719 (substitute* '("config.make" "config.h")
720 (("^.*HAVE_AFDECnet.*$") ""))))
723 ;; Binaries that depend on libnet-tools.a don't declare that
724 ;; dependency, making it parallel-unsafe.
727 #:tests? #f ; no test suite
728 #:make-flags (let ((out (assoc-ref %outputs "out")))
730 (string-append "BASEDIR=" out)
731 (string-append "INSTALLNLSDIR=" out "/share/locale")
732 (string-append "mandir=/share/man")))))
734 ;; Use the big Debian patch set (the thing does not even compile out of
736 (inputs `(("patch" ,(origin
739 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
742 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
743 (native-inputs `(("gettext" ,gnu-gettext)))
745 (synopsis "Tools for controlling the network subsystem in Linux")
747 "This package includes the important tools for controlling the network
748 subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
749 netstat, rarp and route. Additionally, this package contains utilities
750 relating to particular network hardware types (plipconfig, slattach) and
751 advanced aspects of IP configuration (iptunnel, ipmaddr).")
754 (define-public libcap
761 ;; Tarballs used to be available from
762 ;; <https://www.kernel.org/pub/linux/libs/security/linux-privs/>
763 ;; but they never came back after kernel.org was compromised.
765 "mirror://debian/pool/main/libc/libcap2/libcap2_"
766 version ".orig.tar.gz"))
769 "07vjhkznm82p8dm4w6j8mmg7h5c70lp5s9bwwfdmgwpbixfydjp1"))))
770 (build-system gnu-build-system)
771 (arguments '(#:phases (alist-delete 'configure %standard-phases)
772 #:tests? #f ; no 'check' target
773 #:make-flags (list "lib=lib"
774 (string-append "prefix="
775 (assoc-ref %outputs "out"))
776 "RAISE_SETFCAP=no")))
777 (native-inputs `(("perl" ,perl)))
778 (inputs `(("attr" ,attr)))
779 (home-page "https://sites.google.com/site/fullycapable/")
780 (synopsis "Library for working with POSIX capabilities")
782 "libcap2 provides a programming interface to POSIX capabilities on
783 Linux-based operating systems.")
785 ;; License is BSD-3 or GPLv2, at the user's choice.
788 (define-public bridge-utils
790 (name "bridge-utils")
794 (uri (string-append "mirror://sourceforge/bridge/bridge-utils-"
798 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
799 (build-system gnu-build-system)
801 ;; The tarball lacks all the generated files.
802 (native-inputs `(("autoconf" ,autoconf)
803 ("automake" ,automake)))
805 '(#:phases (alist-cons-before
806 'configure 'bootstrap
808 (zero? (system* "autoreconf" "-vf")))
810 #:tests? #f)) ; no 'check' target
813 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
814 (synopsis "Manipulate Ethernet bridges")
816 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
817 to connect two Ethernet segments together in a protocol independent way.
818 Packets are forwarded based on Ethernet address, rather than IP address (like
819 a router). Since forwarding is done at Layer 2, all protocols can go
820 transparently through a bridge.")
830 "http://www.infradead.org/~tgr/libnl/files/libnl-"
834 "1ydw42lsd572qwrfgws97n76hyvjdpanwrxm03lysnhfxkna1ssd"))))
835 (build-system gnu-build-system)
836 (native-inputs `(("flex" ,flex) ("bison" ,bison)))
837 (home-page "http://www.infradead.org/~tgr/libnl/")
838 (synopsis "NetLink protocol library suite")
840 "The libnl suite is a collection of libraries providing APIs to netlink
841 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarly
842 between the kernel and user space processes. It was designed to be a more
843 flexible successor to ioctl to provide mainly networking related kernel
844 configuration and monitoring interfaces.")
846 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
847 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
850 (define-public powertop
858 "https://01.org/powertop/sites/default/files/downloads/powertop-"
862 "02rwqbpasdayl201v0549gbp2f82rd0hqiv3i111r7npanjhhb4b"))))
863 (build-system gnu-build-system)
865 ;; TODO: Add pciutils.
866 `(("zlib" ,guix:zlib)
867 ;; ("pciutils" ,pciutils)
871 `(("pkg-config" ,pkg-config)))
872 (home-page "https://01.org/powertop/")
873 (synopsis "Analyze power consumption on Intel-based laptops")
875 "PowerTOP is a Linux tool to diagnose issues with power consumption and
876 power management. In addition to being a diagnostic tool, PowerTOP also has
877 an interactive mode where the user can experiment various power management
878 settings for cases where the operating system has not enabled these
889 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
893 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
894 (build-system gnu-build-system)
895 (inputs `(("ncurses" ,ncurses)))
896 (home-page "http://www.jpj.net/~trevor/aumix.html")
897 (synopsis "Audio mixer for X and the console")
899 "Aumix adjusts an audio mixer from X, the console, a terminal,
900 the command line or a script.")
910 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
913 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
914 (build-system python-build-system)
916 ;; The setup.py script expects python-2.
918 ;; There are currently no checks in the package.
920 (native-inputs `(("python" ,python-2)))
921 (home-page "http://guichaz.free.fr/iotop/")
923 "Displays the IO activity of running processes")
925 "Iotop is a Python program with a top like user interface to show the
926 processes currently causing I/O.")
935 (uri (string-append "mirror://sourceforge/fuse/fuse-"
939 "071r6xjgssy8vwdn6m28qq1bqxsd2bphcd2mzhq0grf5ybm87sqb"))))
940 (build-system gnu-build-system)
941 (inputs `(("util-linux" ,util-linux)))
943 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
944 (assoc-ref %outputs "out")
946 (string-append "INIT_D_PATH="
947 (assoc-ref %outputs "out")
949 (string-append "UDEV_RULES_PATH="
950 (assoc-ref %outputs "out")
952 #:phases (alist-cons-before
953 'build 'set-file-names
954 (lambda* (#:key inputs #:allow-other-keys)
955 ;; libfuse calls out to mount(8) and umount(8). Make sure
956 ;; it refers to the right ones.
957 (substitute* '("lib/mount_util.c" "util/mount_util.c")
958 (("/bin/(u?)mount" _ maybe-u)
959 (string-append (assoc-ref inputs "util-linux")
960 "/bin/" maybe-u "mount")))
961 (substitute* '("util/mount.fuse.c")
965 (home-page "http://fuse.sourceforge.net/")
966 (synopsis "Support file systems implemented in user space")
968 "As a consequence of its monolithic design, file system code for Linux
969 normally goes into the kernel itself---which is not only a robustness issue,
970 but also an impediment to system extensibility. FUSE, for \"file systems in
971 user space\", is a kernel module and user-space library that tries to address
972 part of this problem by allowing users to run file system implementations as
973 user-space processes.")
974 (license (list lgpl2.1 ; library
975 gpl2+)))) ; command-line utilities
977 (define-public unionfs-fuse
979 (name "unionfs-fuse")
984 "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-"
988 "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d"))))
989 (build-system cmake-build-system)
990 (inputs `(("fuse" ,fuse)))
991 (arguments '(#:tests? #f)) ; no tests
992 (home-page "http://podgorny.cz/moin/UnionFsFuse")
993 (synopsis "User-space union file system")
995 "UnionFS-FUSE is a flexible union file system implementation in user
996 space, using the FUSE library. Mounting a union file system allows you to
997 \"aggregate\" the contents of several directories into a single mount point.
998 UnionFS-FUSE additionally supports copy-on-write.")
1002 (package (inherit fuse)
1003 (name "fuse-static")
1004 (source (origin (inherit (package-source fuse))
1005 (modules '((guix build utils)))
1007 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1008 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1009 ;; it doesn't do that, allowing us to remove the dependency on
1010 ;; util-linux (something that is useful in initrds.)
1011 '(substitute* '("lib/mount_util.c"
1012 "util/mount_util.c")
1013 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1018 (define-public unionfs-fuse/static
1019 (package (inherit unionfs-fuse)
1020 (synopsis "User-space union file system (statically linked)")
1021 (name (string-append (package-name unionfs-fuse) "-static"))
1022 (source (origin (inherit (package-source unionfs-fuse))
1023 (modules '((guix build utils)))
1025 ;; Add -ldl to the libraries, because libfuse.a needs that.
1026 '(substitute* "src/CMakeLists.txt"
1027 (("target_link_libraries(.*)\\)" _ libs)
1028 (string-append "target_link_libraries"
1032 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")))
1033 (inputs `(("fuse" ,fuse-static)))))