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 glib)
38 #:use-module (gnu packages pulseaudio)
39 #:use-module (gnu packages attr)
40 #:use-module (gnu packages xml)
41 #:use-module (gnu packages autotools)
42 #:use-module (gnu packages texinfo)
43 #:use-module (gnu packages check)
44 #:use-module (guix packages)
45 #:use-module (guix download)
46 #:use-module (guix build-system gnu)
47 #:use-module (guix build-system cmake)
48 #:use-module (guix build-system python)
49 #:use-module (guix build-system trivial))
51 (define-public (system->linux-architecture arch)
52 "Return the Linux architecture name for ARCH, a Guix system name such as
54 (let ((arch (car (string-split arch #\-))))
55 (cond ((string=? arch "i686") "i386")
56 ((string-prefix? "mips" arch) "mips")
57 ((string-prefix? "arm" arch) "arm")
60 (define (linux-libre-urls version)
61 "Return a list of URLs for Linux-Libre VERSION."
63 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
64 version "-gnu/linux-libre-" version "-gnu.tar.xz")
66 ;; XXX: Work around <http://bugs.gnu.org/14851>.
68 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
69 version "-gnu.tar.xz")
71 ;; Maybe this URL will become valid eventually.
73 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
74 version "-gnu.tar.xz")))
76 (define-public linux-libre-headers
77 (let* ((version "3.3.8")
81 (setenv "ARCH" ,(system->linux-architecture arch))
82 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
84 (and (zero? (system* "make" "defconfig"))
85 (zero? (system* "make" "mrproper" "headers_check"))))))
87 `(lambda* (#:key outputs #:allow-other-keys)
88 (let ((out (assoc-ref outputs "out")))
89 (and (zero? (system* "make"
90 (string-append "INSTALL_HDR_PATH=" out)
92 (mkdir (string-append out "/include/config"))
93 (call-with-output-file
95 "/include/config/kernel.release")
97 (format p "~a-default~%" ,version))))))))
99 (name "linux-libre-headers")
103 (uri (linux-libre-urls version))
106 "0jkfh0z1s6izvdnc3njm39dhzp1cg8i06jv06izwqz9w9qsprvnl"))))
107 (build-system gnu-build-system)
108 (native-inputs `(("perl" ,perl)))
110 `(#:modules ((guix build gnu-build-system)
113 #:phases (alist-replace
114 'build ,(build-phase (or (%current-target-system)
117 'install ,install-phase
118 (alist-delete 'configure %standard-phases)))
120 (synopsis "GNU Linux-Libre kernel headers")
121 (description "Headers of the Linux-Libre kernel.")
123 (home-page "http://www.gnu.org/software/linux-libre/"))))
125 (define-public module-init-tools
127 (name "module-init-tools")
132 "mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-"
136 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
138 (list (search-patch "module-init-tools-moduledir.patch")))))
139 (build-system gnu-build-system)
141 ;; FIXME: The upstream tarball lacks man pages, and building them would
142 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
143 ;; but they vanished. In the meantime, fake it.
144 '(#:phases (alist-cons-before
145 'configure 'fake-docbook
147 (substitute* "Makefile.in"
148 (("^DOCBOOKTOMAN.*$")
149 "DOCBOOKTOMAN = true\n")))
151 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
152 (synopsis "Tools for loading and managing Linux kernel modules")
154 "Tools for loading and managing Linux kernel modules, such as `modprobe',
155 `insmod', `lsmod', and more.")
158 (define-public linux-libre
159 (let* ((version "3.15")
161 '(lambda* (#:key system #:allow-other-keys #:rest args)
162 (let ((arch (car (string-split system #\-))))
164 (cond ((string=? arch "i686") "i386")
166 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
168 (let ((build (assoc-ref %standard-phases 'build)))
169 (and (zero? (system* "make" "defconfig"))
171 ;; Appending works even when the option wasn't in the
172 ;; file. The last one prevails if duplicated.
173 (let ((port (open-file ".config" "a")))
174 (display (string-append "CONFIG_NET_9P=m\n"
175 "CONFIG_NET_9P_VIRTIO=m\n"
176 "CONFIG_VIRTIO_BLK=m\n"
177 "CONFIG_SATA_SIS=y\n"
178 "CONFIG_VIRTIO_NET=m\n"
180 ;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
181 "CONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n"
182 "CONFIG_VIRTIO_PCI=m\n"
183 "CONFIG_VIRTIO_BALLOON=m\n"
184 "CONFIG_VIRTIO_MMIO=m\n"
192 (zero? (system* "make" "oldconfig")))
194 ;; Call the default `build' phase so `-j' is correctly
196 (apply build #:make-flags "all" args)))))
198 `(lambda* (#:key inputs outputs #:allow-other-keys)
199 (let* ((out (assoc-ref outputs "out"))
200 (moddir (string-append out "/lib/modules"))
201 (mit (assoc-ref inputs "module-init-tools")))
203 (for-each (lambda (file)
205 (string-append out "/" (basename file))))
206 (find-files "." "^(bzImage|System\\.map)$"))
207 (copy-file ".config" (string-append out "/config"))
208 (zero? (system* "make"
209 (string-append "DEPMOD=" mit "/sbin/depmod")
210 (string-append "MODULE_DIR=" moddir)
211 (string-append "INSTALL_PATH=" out)
212 (string-append "INSTALL_MOD_PATH=" out)
213 "modules_install"))))))
219 (uri (linux-libre-urls version))
222 "125n04rwqmr3bm9slk62w6xcg355hx85rwv2x16nl6qki70hsick"))))
223 (build-system gnu-build-system)
224 (native-inputs `(("perl" ,perl)
226 ("module-init-tools" ,module-init-tools)))
228 `(#:modules ((guix build gnu-build-system)
232 #:phases (alist-replace
235 'install ,install-phase
236 (alist-delete 'configure %standard-phases)))
238 (synopsis "100% free redistribution of a cleaned Linux kernel")
240 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
241 It has been modified to remove all non-free binary blobs.")
243 (home-page "http://www.gnu.org/software/linux-libre/"))))
247 ;;; Pluggable authentication modules (PAM).
250 (define-public linux-pam
257 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
259 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
260 version ".tar.bz2")))
263 "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s"))))
264 (build-system gnu-build-system)
268 ;; TODO: optional dependencies
269 ;; ("libxcrypt" ,libxcrypt)
270 ;; ("cracklib" ,cracklib)
273 '(;; Most users, such as `shadow', expect the headers to be under
275 #:configure-flags (list (string-append "--includedir="
276 (assoc-ref %outputs "out")
277 "/include/security"))
279 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
282 (home-page "http://www.linux-pam.org/")
283 (synopsis "Pluggable authentication modules for Linux")
285 "A *Free* project to implement OSF's RFC 86.0.
286 Pluggable authentication modules are small shared object files that can
287 be used through the PAM API to perform tasks, like authenticating a user
288 at login. Local and dynamic reconfiguration are its key features")
296 (define-public psmisc
303 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
307 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
308 (build-system gnu-build-system)
309 (inputs `(("ncurses" ,ncurses)))
310 (home-page "http://psmisc.sourceforge.net/")
312 "set of utilities that use the proc filesystem, such as fuser, killall, and pstree")
314 "This PSmisc package is a set of some small useful utilities that
315 use the proc filesystem. We're not about changing the world, but
316 providing the system administrator with some help in common tasks.")
319 (define-public util-linux
325 (uri (string-append "mirror://kernel.org/linux/utils/"
326 name "/v" version "/"
327 name "-" version ".2" ".tar.xz"))
330 "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir"))
331 (patches (list (search-patch "util-linux-perl.patch")))))
332 (build-system gnu-build-system)
334 `(#:configure-flags '("--disable-use-tty-group"
336 #:phases (alist-cons-after
337 'install 'patch-chkdupexe
338 (lambda* (#:key outputs #:allow-other-keys)
339 (let ((out (assoc-ref outputs "out")))
340 (substitute* (string-append out "/bin/chkdupexe")
341 ;; Allow 'patch-shebang' to do its work.
342 (("@PERL@") "/bin/perl"))))
344 (inputs `(("zlib" ,guix:zlib)
345 ("ncurses" ,ncurses)))
348 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
349 (synopsis "Collection of utilities for the Linux kernel")
351 "util-linux is a random collection of utilities for the Linux kernel.")
353 ;; Note that util-linux doesn't use the same license for all the
354 ;; code. GPLv2+ is the default license for a code without an
355 ;; explicitly defined license.
356 (license (list gpl3+ gpl2+ gpl2 lgpl2.0+
357 bsd-4 public-domain))))
359 (define-public procps
365 (uri (string-append "http://procps.sourceforge.net/procps-"
369 "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i"))
370 (patches (list (search-patch "procps-make-3.82.patch")))))
371 (build-system gnu-build-system)
372 (inputs `(("ncurses" ,ncurses)))
374 '(#:phases (alist-replace
376 (lambda* (#:key outputs #:allow-other-keys)
377 ;; No `configure', just a single Makefile.
378 (let ((out (assoc-ref outputs "out")))
379 (substitute* "Makefile"
381 (("--(owner|group) 0") "")
382 (("ldconfig") "true")
383 (("^LDFLAGS[[:blank:]]*:=(.*)$" _ value)
384 ;; Add libproc to the RPATH.
385 (string-append "LDFLAGS := -Wl,-rpath="
390 (lambda* (#:key outputs #:allow-other-keys)
391 (let ((out (assoc-ref outputs "out")))
393 (system* "make" "install"
394 (string-append "DESTDIR=" out)))
398 (system* (string-append out "/bin/ps")
402 ;; What did you expect? Tests?
404 (home-page "http://procps.sourceforge.net/")
405 (synopsis "Utilities that give information about processes")
407 "procps is the package that has a bunch of small useful utilities
408 that give information about processes using the Linux /proc file system.
409 The package includes the programs ps, top, vmstat, w, kill, free,
410 slabtop, and skill.")
413 (define-public usbutils
420 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
421 "usbutils-" version ".tar.xz"))
424 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
425 (build-system gnu-build-system)
427 `(("libusb" ,libusb)))
429 `(("pkg-config" ,pkg-config)))
430 (home-page "http://www.linux-usb.org/")
432 "Tools for working with USB devices, such as lsusb")
434 "Tools for working with USB devices, such as lsusb.")
437 (define-public e2fsprogs
443 (uri (string-append "mirror://sourceforge/e2fsprogs/e2fsprogs-"
447 "0ibkkvp6kan0hn0d1anq4n2md70j5gcm7mwna515w82xwyr02rfw"))))
448 (build-system gnu-build-system)
449 (inputs `(("util-linux" ,util-linux)))
450 (native-inputs `(("pkg-config" ,pkg-config)
451 ("texinfo" ,texinfo))) ; for the libext2fs Info manual
453 '(#:phases (alist-cons-before
454 'configure 'patch-shells
456 (substitute* "configure"
457 (("/bin/sh (.*)parse-types.sh" _ dir)
458 (string-append (which "sh") " " dir
460 (substitute* (find-files "." "^Makefile.in$")
462 (string-append "#!" (which "sh")))))
465 ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
466 ;; they fail because we get an extra line that says "Can't check if
467 ;; filesystem is mounted due to missing mtab file".
469 (home-page "http://e2fsprogs.sourceforge.net/")
470 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
472 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
473 (license (list gpl2 ; programs
477 (define-public e2fsck/static
479 (name "e2fsck-static")
480 (version (package-version e2fsprogs))
481 (build-system trivial-build-system)
484 `(#:modules ((guix build utils))
487 (use-modules (guix build utils)
491 (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs")
493 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
495 (with-directory-excursion bin
496 (for-each (lambda (file)
497 (copy-file (string-append source "/" file)
499 (remove-store-references file)
501 (scandir source (cut string-prefix? "fsck." <>))))))))
502 (inputs `(("e2fsprogs" ,(static-package e2fsprogs))))
503 (synopsis "Statically-linked fsck.* commands from e2fsprogs")
505 "This package provides statically-linked command of fsck.ext[234] taken
506 from the e2fsprogs package. It is meant to be used in initrds.")
507 (home-page (package-home-page e2fsprogs))
508 (license (package-license e2fsprogs))))
510 (define-public strace
516 (uri (string-append "mirror://sourceforge/strace/strace-"
520 "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
521 (build-system gnu-build-system)
522 (native-inputs `(("perl" ,perl)))
523 (home-page "http://strace.sourceforge.net/")
524 (synopsis "System call tracer for Linux")
526 "strace is a system call tracer, i.e. a debugging tool which prints out a
527 trace of all the system calls made by a another process/program.")
530 (define-public alsa-lib
537 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
541 "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9"))
542 (patches (list (search-patch "alsa-lib-mips-atomic-fix.patch")))))
543 (build-system gnu-build-system)
544 (home-page "http://www.alsa-project.org/")
545 (synopsis "The Advanced Linux Sound Architecture libraries")
547 "The Advanced Linux Sound Architecture (ALSA) provides audio and
548 MIDI functionality to the Linux-based operating system.")
551 (define-public alsa-utils
557 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-"
561 "1sjjngnq50jv5ilwsb4zys6smifni3bd6fn28gbnhfrg14wsrgq2"))))
562 (build-system gnu-build-system)
564 ;; XXX: Disable man page creation until we have DocBook.
565 '(#:configure-flags (list "--disable-xmlto"
566 (string-append "--with-udev-rules-dir="
567 (assoc-ref %outputs "out")
568 "/lib/udev/rules.d"))
569 #:phases (alist-cons-before
570 'install 'pre-install
572 ;; Don't try to mkdir /var/lib/alsa.
573 (substitute* "Makefile"
574 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
578 `(("libsamplerate" ,libsamplerate)
580 ("alsa-lib" ,alsa-lib)
582 ("gettext" ,gnu-gettext)))
583 (home-page "http://www.alsa-project.org/")
584 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
586 "The Advanced Linux Sound Architecture (ALSA) provides audio and
587 MIDI functionality to the Linux-based operating system.")
589 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
593 (define-public iptables
600 "http://www.netfilter.org/projects/iptables/files/iptables-"
604 "0vkg5lzkn4l3i1sm6v3x96zzvnv9g7mi0qgj6279ld383mzcws24"))))
605 (build-system gnu-build-system)
606 (arguments '(#:tests? #f)) ; no test suite
607 (home-page "http://www.netfilter.org/projects/iptables/index.html")
608 (synopsis "Program to configure the Linux IP packet filtering rules")
610 "iptables is the userspace command line program used to configure the
611 Linux 2.4.x and later IPv4 packet filtering ruleset. It is targeted towards
612 system administrators. Since Network Address Translation is also configured
613 from the packet filter ruleset, iptables is used for this, too. The iptables
614 package also includes ip6tables. ip6tables is used for configuring the IPv6
618 (define-public iproute
625 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
629 "04gi11gh087bg2nlxhj0lxrk8l9qxkpr88nsiil23917bm3h1xj4"))))
630 (build-system gnu-build-system)
632 `(#:tests? #f ; no test suite
633 #:make-flags (let ((out (assoc-ref %outputs "out")))
635 (string-append "LIBDIR=" out "/lib")
636 (string-append "SBINDIR=" out "/sbin")
637 (string-append "CONFDIR=" out "/etc")
638 (string-append "DOCDIR=" out "/share/doc/"
640 (string-append "MANDIR=" out "/share/man")))
641 #:phases (alist-cons-before
642 'install 'pre-install
644 ;; Don't attempt to create /var/lib/arpd.
645 (substitute* "Makefile"
646 (("^.*ARPDDIR.*$") "")))
649 `(("iptables" ,iptables)
652 `(("pkg-config" ,pkg-config)
656 "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
658 "A collection of utilities for controlling TCP/IP networking and traffic control in Linux")
660 "Iproute2 is a collection of utilities for controlling TCP/IP
661 networking and traffic with the Linux kernel.
663 Most network configuration manuals still refer to ifconfig and route as the
664 primary network configuration tools, but ifconfig is known to behave
665 inadequately in modern network environments. They should be deprecated, but
666 most distros still include them. Most network configuration systems make use
667 of ifconfig and thus provide a limited feature set. The /etc/net project aims
668 to support most modern network technologies, as it doesn't use ifconfig and
669 allows a system administrator to make use of all iproute2 features, including
672 iproute2 is usually shipped in a package called iproute or iproute2 and
673 consists of several tools, of which the most important are ip and tc. ip
674 controls IPv4 and IPv6 configuration and tc stands for traffic control. Both
675 tools print detailed usage messages and are accompanied by a set of
679 (define-public net-tools
680 ;; XXX: This package is basically unmaintained, but it provides a few
681 ;; commands not yet provided by Inetutils, such as 'route', so we have to
686 (home-page "http://www.tazenda.demon.co.uk/phil/net-tools/")
689 (uri (string-append home-page "/" name "-"
693 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))))
694 (build-system gnu-build-system)
696 '(#:phases (alist-cons-after
698 (lambda* (#:key inputs #:allow-other-keys)
699 (define (apply-patch file)
700 (zero? (system* "patch" "-p1" "--batch"
703 (let ((patch.gz (assoc-ref inputs "patch")))
704 (format #t "applying Debian patch set '~a'...~%"
706 (system (string-append "gunzip < " patch.gz " > the-patch"))
708 (and (apply-patch "the-patch")
709 (for-each apply-patch
710 (find-files "debian/patches"
714 (lambda* (#:key outputs #:allow-other-keys)
715 (let ((out (assoc-ref outputs "out")))
716 (mkdir-p (string-append out "/bin"))
717 (mkdir-p (string-append out "/sbin"))
719 ;; Pretend we have everything...
720 (system "yes | make config")
722 ;; ... except we don't have libdnet, so remove that
724 (substitute* '("config.make" "config.h")
725 (("^.*HAVE_AFDECnet.*$") ""))))
728 ;; Binaries that depend on libnet-tools.a don't declare that
729 ;; dependency, making it parallel-unsafe.
732 #:tests? #f ; no test suite
733 #:make-flags (let ((out (assoc-ref %outputs "out")))
735 (string-append "BASEDIR=" out)
736 (string-append "INSTALLNLSDIR=" out "/share/locale")
737 (string-append "mandir=/share/man")))))
739 ;; Use the big Debian patch set (the thing does not even compile out of
741 (inputs `(("patch" ,(origin
744 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
747 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
748 (native-inputs `(("gettext" ,gnu-gettext)))
750 (synopsis "Tools for controlling the network subsystem in Linux")
752 "This package includes the important tools for controlling the network
753 subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
754 netstat, rarp and route. Additionally, this package contains utilities
755 relating to particular network hardware types (plipconfig, slattach) and
756 advanced aspects of IP configuration (iptunnel, ipmaddr).")
759 (define-public libcap
766 ;; Tarballs used to be available from
767 ;; <https://www.kernel.org/pub/linux/libs/security/linux-privs/>
768 ;; but they never came back after kernel.org was compromised.
770 "mirror://debian/pool/main/libc/libcap2/libcap2_"
771 version ".orig.tar.gz"))
774 "07vjhkznm82p8dm4w6j8mmg7h5c70lp5s9bwwfdmgwpbixfydjp1"))))
775 (build-system gnu-build-system)
776 (arguments '(#:phases (alist-delete 'configure %standard-phases)
777 #:tests? #f ; no 'check' target
778 #:make-flags (list "lib=lib"
779 (string-append "prefix="
780 (assoc-ref %outputs "out"))
781 "RAISE_SETFCAP=no")))
782 (native-inputs `(("perl" ,perl)))
783 (inputs `(("attr" ,attr)))
784 (home-page "https://sites.google.com/site/fullycapable/")
785 (synopsis "Library for working with POSIX capabilities")
787 "libcap2 provides a programming interface to POSIX capabilities on
788 Linux-based operating systems.")
790 ;; License is BSD-3 or GPLv2, at the user's choice.
793 (define-public bridge-utils
795 (name "bridge-utils")
799 (uri (string-append "mirror://sourceforge/bridge/bridge-utils-"
803 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
804 (build-system gnu-build-system)
806 ;; The tarball lacks all the generated files.
807 (native-inputs `(("autoconf" ,autoconf)
808 ("automake" ,automake)))
810 '(#:phases (alist-cons-before
811 'configure 'bootstrap
813 (zero? (system* "autoreconf" "-vf")))
815 #:tests? #f)) ; no 'check' target
818 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
819 (synopsis "Manipulate Ethernet bridges")
821 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
822 to connect two Ethernet segments together in a protocol independent way.
823 Packets are forwarded based on Ethernet address, rather than IP address (like
824 a router). Since forwarding is done at Layer 2, all protocols can go
825 transparently through a bridge.")
835 "http://www.infradead.org/~tgr/libnl/files/libnl-"
839 "1ydw42lsd572qwrfgws97n76hyvjdpanwrxm03lysnhfxkna1ssd"))))
840 (build-system gnu-build-system)
841 (native-inputs `(("flex" ,flex) ("bison" ,bison)))
842 (home-page "http://www.infradead.org/~tgr/libnl/")
843 (synopsis "NetLink protocol library suite")
845 "The libnl suite is a collection of libraries providing APIs to netlink
846 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarly
847 between the kernel and user space processes. It was designed to be a more
848 flexible successor to ioctl to provide mainly networking related kernel
849 configuration and monitoring interfaces.")
851 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
852 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
855 (define-public powertop
863 "https://01.org/powertop/sites/default/files/downloads/powertop-"
867 "02rwqbpasdayl201v0549gbp2f82rd0hqiv3i111r7npanjhhb4b"))))
868 (build-system gnu-build-system)
870 ;; TODO: Add pciutils.
871 `(("zlib" ,guix:zlib)
872 ;; ("pciutils" ,pciutils)
876 `(("pkg-config" ,pkg-config)))
877 (home-page "https://01.org/powertop/")
878 (synopsis "Analyze power consumption on Intel-based laptops")
880 "PowerTOP is a Linux tool to diagnose issues with power consumption and
881 power management. In addition to being a diagnostic tool, PowerTOP also has
882 an interactive mode where the user can experiment various power management
883 settings for cases where the operating system has not enabled these
894 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
898 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
899 (build-system gnu-build-system)
900 (inputs `(("ncurses" ,ncurses)))
901 (home-page "http://www.jpj.net/~trevor/aumix.html")
902 (synopsis "Audio mixer for X and the console")
904 "Aumix adjusts an audio mixer from X, the console, a terminal,
905 the command line or a script.")
915 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
918 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
919 (build-system python-build-system)
921 ;; The setup.py script expects python-2.
923 ;; There are currently no checks in the package.
925 (native-inputs `(("python" ,python-2)))
926 (home-page "http://guichaz.free.fr/iotop/")
928 "Displays the IO activity of running processes")
930 "Iotop is a Python program with a top like user interface to show the
931 processes currently causing I/O.")
940 (uri (string-append "mirror://sourceforge/fuse/fuse-"
944 "071r6xjgssy8vwdn6m28qq1bqxsd2bphcd2mzhq0grf5ybm87sqb"))))
945 (build-system gnu-build-system)
946 (inputs `(("util-linux" ,util-linux)))
948 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
949 (assoc-ref %outputs "out")
951 (string-append "INIT_D_PATH="
952 (assoc-ref %outputs "out")
954 (string-append "UDEV_RULES_PATH="
955 (assoc-ref %outputs "out")
957 #:phases (alist-cons-before
958 'build 'set-file-names
959 (lambda* (#:key inputs #:allow-other-keys)
960 ;; libfuse calls out to mount(8) and umount(8). Make sure
961 ;; it refers to the right ones.
962 (substitute* '("lib/mount_util.c" "util/mount_util.c")
963 (("/bin/(u?)mount" _ maybe-u)
964 (string-append (assoc-ref inputs "util-linux")
965 "/bin/" maybe-u "mount")))
966 (substitute* '("util/mount.fuse.c")
970 ;; This hack leads libfuse to search for 'fusermount' in
971 ;; $PATH, where it may find a setuid-root binary, instead of
972 ;; trying solely $out/sbin/fusermount and failing because
974 (substitute* "lib/Makefile"
975 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
976 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
978 (home-page "http://fuse.sourceforge.net/")
979 (synopsis "Support file systems implemented in user space")
981 "As a consequence of its monolithic design, file system code for Linux
982 normally goes into the kernel itself---which is not only a robustness issue,
983 but also an impediment to system extensibility. FUSE, for \"file systems in
984 user space\", is a kernel module and user-space library that tries to address
985 part of this problem by allowing users to run file system implementations as
986 user-space processes.")
987 (license (list lgpl2.1 ; library
988 gpl2+)))) ; command-line utilities
990 (define-public unionfs-fuse
992 (name "unionfs-fuse")
997 "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-"
1001 "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d"))))
1002 (build-system cmake-build-system)
1003 (inputs `(("fuse" ,fuse)))
1004 (arguments '(#:tests? #f)) ; no tests
1005 (home-page "http://podgorny.cz/moin/UnionFsFuse")
1006 (synopsis "User-space union file system")
1008 "UnionFS-FUSE is a flexible union file system implementation in user
1009 space, using the FUSE library. Mounting a union file system allows you to
1010 \"aggregate\" the contents of several directories into a single mount point.
1011 UnionFS-FUSE additionally supports copy-on-write.")
1015 (package (inherit fuse)
1016 (name "fuse-static")
1017 (source (origin (inherit (package-source fuse))
1018 (modules '((guix build utils)))
1020 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1021 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1022 ;; it doesn't do that, allowing us to remove the dependency on
1023 ;; util-linux (something that is useful in initrds.)
1024 '(substitute* '("lib/mount_util.c"
1025 "util/mount_util.c")
1026 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1031 (define-public unionfs-fuse/static
1032 (package (inherit unionfs-fuse)
1033 (synopsis "User-space union file system (statically linked)")
1034 (name (string-append (package-name unionfs-fuse) "-static"))
1035 (source (origin (inherit (package-source unionfs-fuse))
1036 (modules '((guix build utils)))
1038 ;; Add -ldl to the libraries, because libfuse.a needs that.
1039 '(substitute* "src/CMakeLists.txt"
1040 (("target_link_libraries(.*)\\)" _ libs)
1041 (string-append "target_link_libraries"
1045 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")))
1046 (inputs `(("fuse" ,fuse-static)))))
1048 (define-public sshfs-fuse
1054 (uri (string-append "mirror://sourceforge/fuse/sshfs-fuse-"
1058 "0gp6qr33l2p0964j0kds0dfmvyyf5lpgsn11daf0n5fhwm9185z9"))))
1059 (build-system gnu-build-system)
1064 `(("pkg-config" ,pkg-config)))
1065 (home-page "http://fuse.sourceforge.net/sshfs.html")
1066 (synopsis "Mount remote file systems over SSH")
1068 "This is a file system client based on the SSH File Transfer Protocol.
1069 Since most SSH servers already support this protocol it is very easy to set
1070 up: on the server side there's nothing to do; on the client side mounting the
1071 file system is as easy as logging into the server with an SSH client.")
1074 (define-public numactl
1081 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1086 "073myxlyyhgxh1w3r757ajixb7s2k69czc3r0g12c3scq7k3784w"))))
1087 (build-system gnu-build-system)
1089 '(#:phases (alist-replace
1091 (lambda* (#:key outputs #:allow-other-keys)
1092 ;; There's no 'configure' script, just a raw makefile.
1093 (substitute* "Makefile"
1095 (string-append "prefix := " (assoc-ref outputs "out")
1098 ;; By default the thing tries to install under
1099 ;; $prefix/lib64 when on a 64-bit platform.
1100 (string-append "libdir := $(prefix)/lib\n"))))
1104 ;; By default the thing tries to use 'cc'.
1107 ;; Make sure programs have an RPATH so they can find
1109 (string-append "LDLIBS=-Wl,-rpath="
1110 (assoc-ref %outputs "out") "/lib"))
1112 ;; There's a 'test' target, but it requires NUMA support in the kernel
1113 ;; to run, which we can't assume to have.
1115 (home-page "http://oss.sgi.com/projects/libnuma/")
1116 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1118 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1119 memory is not all in one place. The numactl program allows you to run your
1120 application program on specific CPU's and memory nodes. It does this by
1121 supplying a NUMA memory policy to the operating system before running your
1124 The package contains other commands, such as numademo, numastat and memhog.
1125 The numademo command provides a quick overview of NUMA performance on your
1127 (license (list gpl2 ; programs
1128 lgpl2.1)))) ; library
1136 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1140 "0c34b0za2v0934acvgnva0vaqpghmmhz4zh7k0m9jd4mbc91byqm"))
1141 (modules '((guix build utils)))
1143 '(substitute* "tests/Makefile.in"
1144 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1146 "[@]VERSION[@]")))))
1147 (build-system gnu-build-system)
1149 '(#:phases (alist-cons-before
1151 (lambda* (#:key inputs #:allow-other-keys)
1152 (let ((gzip (assoc-ref %build-inputs "gzip"))
1153 (bzip2 (assoc-ref %build-inputs "bzip2")))
1154 (substitute* "src/libkeymap/findfile.c"
1156 (string-append gzip "/bin/gzip"))
1158 (string-append bzip2 "/bin/bzip2")))))
1160 (inputs `(("check" ,check)
1162 ("bzip2" ,guix:bzip2)
1163 ("pam" ,linux-pam)))
1164 (native-inputs `(("pkg-config" ,pkg-config)))
1165 (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/")
1166 (synopsis "Linux keyboard utilities and keyboard maps")
1168 "This package contains keytable files and keyboard utilities compatible
1169 for systems using the Linux kernel. This includes commands such as
1170 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1173 (define-public inotify-tools
1175 (name "inotify-tools")
1180 "mirror://sourceforge/inotify-tools/inotify-tools/"
1181 version "/inotify-tools-" version ".tar.gz"))
1184 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1185 (build-system gnu-build-system)
1186 (home-page "http://inotify-tools.sourceforge.net/")
1187 (synopsis "Monitor file accesses")
1189 "The inotify-tools packages provides a C library and command-line tools
1190 to use Linux' inotify mechanism, which allows file accesses to be monitored.")