1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
5 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
7 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
8 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
10 ;;; Copyright © 2016 Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>
11 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages linux)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages compression)
32 #:use-module (gnu packages gcc)
33 #:use-module (gnu packages flex)
34 #:use-module (gnu packages bison)
35 #:use-module (gnu packages admin)
36 #:use-module (gnu packages gperf)
37 #:use-module (gnu packages libusb)
38 #:use-module (gnu packages ncurses)
39 #:use-module (gnu packages pciutils)
40 #:use-module (gnu packages databases)
41 #:use-module (gnu packages perl)
42 #:use-module (gnu packages pkg-config)
43 #:use-module (gnu packages python)
44 #:use-module (gnu packages slang)
45 #:use-module (gnu packages algebra)
46 #:use-module (gnu packages gettext)
47 #:use-module (gnu packages glib)
48 #:use-module (gnu packages pulseaudio)
49 #:use-module (gnu packages attr)
50 #:use-module (gnu packages xml)
51 #:use-module (gnu packages autotools)
52 #:use-module (gnu packages texinfo)
53 #:use-module (gnu packages check)
54 #:use-module (gnu packages maths)
55 #:use-module (gnu packages base)
56 #:use-module (gnu packages rrdtool)
57 #:use-module (gnu packages elf)
58 #:use-module (gnu packages gtk)
59 #:use-module (gnu packages docbook)
60 #:use-module (gnu packages asciidoc)
61 #:use-module (gnu packages readline)
62 #:use-module (gnu packages calendar)
63 #:use-module (gnu packages tls)
64 #:use-module (guix packages)
65 #:use-module (guix download)
66 #:use-module (guix utils)
67 #:use-module (guix build-system gnu)
68 #:use-module (guix build-system cmake)
69 #:use-module (guix build-system python)
70 #:use-module (guix build-system trivial)
71 #:use-module (srfi srfi-1)
72 #:use-module (srfi srfi-2)
73 #:use-module (srfi srfi-26)
74 #:use-module (ice-9 match))
76 (define-public (system->linux-architecture arch)
77 "Return the Linux architecture name for ARCH, a Guix system name such as
79 (let ((arch (car (string-split arch #\-))))
80 (cond ((string=? arch "i686") "i386")
81 ((string-prefix? "mips" arch) "mips")
82 ((string-prefix? "arm" arch) "arm")
85 (define (linux-libre-urls version)
86 "Return a list of URLs for Linux-Libre VERSION."
88 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
89 version "-gnu/linux-libre-" version "-gnu.tar.xz")
91 ;; XXX: Work around <http://bugs.gnu.org/14851>.
93 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
94 version "-gnu.tar.xz")
96 ;; Maybe this URL will become valid eventually.
98 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
99 version "-gnu.tar.xz")))
101 (define-public linux-libre-headers
102 (let* ((version "3.14.37")
106 (setenv "ARCH" ,(system->linux-architecture arch))
107 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
109 (and (zero? (system* "make" "defconfig"))
110 (zero? (system* "make" "mrproper" "headers_check"))))))
112 `(lambda* (#:key outputs #:allow-other-keys)
113 (let ((out (assoc-ref outputs "out")))
114 (and (zero? (system* "make"
115 (string-append "INSTALL_HDR_PATH=" out)
118 (mkdir (string-append out "/include/config"))
119 (call-with-output-file
121 "/include/config/kernel.release")
123 (format p "~a-default~%" ,version)))
125 ;; Remove the '.install' and '..install.cmd' files; the
126 ;; latter contains store paths, which pulls in bootstrap
127 ;; binaries in the build environment, and prevents bit
128 ;; reproducibility for the bootstrap binaries.
129 (for-each delete-file (find-files out "\\.install"))
133 (name "linux-libre-headers")
137 (uri (linux-libre-urls version))
140 "1blxr2bsvfqi9khj4cpspv434bmx252zak2wsbi2mgl60zh77gza"))))
141 (build-system gnu-build-system)
142 (native-inputs `(("perl" ,perl)))
144 `(#:modules ((guix build gnu-build-system)
147 #:phases (alist-replace
148 'build ,(build-phase (or (%current-target-system)
151 'install ,install-phase
152 (alist-delete 'configure %standard-phases)))
153 #:allowed-references ()
155 (synopsis "GNU Linux-Libre kernel headers")
156 (description "Headers of the Linux-Libre kernel.")
157 (license license:gpl2)
158 (home-page "http://www.gnu.org/software/linux-libre/"))))
160 (define-public module-init-tools
162 (name "module-init-tools")
167 "mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-"
171 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
173 (list (search-patch "module-init-tools-moduledir.patch")))))
174 (build-system gnu-build-system)
176 ;; FIXME: The upstream tarball lacks man pages, and building them would
177 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
178 ;; but they vanished. In the meantime, fake it.
179 '(#:phases (alist-cons-before
180 'configure 'fake-docbook
182 (substitute* "Makefile.in"
183 (("^DOCBOOKTOMAN.*$")
184 "DOCBOOKTOMAN = true\n")))
186 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
187 (synopsis "Tools for loading and managing Linux kernel modules")
189 "Tools for loading and managing Linux kernel modules, such as `modprobe',
190 `insmod', `lsmod', and more.")
191 (license license:gpl2+)))
193 (define %boot-logo-patch
194 ;; Linux-Libre boot logo featuring Freedo and a gnu.
197 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
198 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
201 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
203 (define* (kernel-config system #:key variant)
204 "Return the absolute file name of the Linux-Libre build configuration file
205 for SYSTEM and optionally VARIANT, or #f if there is no such configuration."
206 (and-let* ((arch (match system
213 (name (string-append "linux-libre-"
215 (string-append variant "-")
219 (file (string-append "gnu/packages/" name)))
220 (search-path %load-path file)))
222 (define-public linux-libre
223 (let* ((version "4.4.5")
225 '(lambda* (#:key system inputs #:allow-other-keys #:rest args)
226 ;; Apply the neat patch.
227 (system* "patch" "-p1" "--force"
228 "-i" (assoc-ref inputs "patch/freedo+gnu"))
230 (let ((arch (car (string-split system #\-))))
232 (cond ((string=? arch "i686") "i386")
233 ((string=? arch "mips64el") "mips")
235 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
237 (let ((build (assoc-ref %standard-phases 'build))
238 (config (assoc-ref inputs "kconfig")))
240 ;; Use the architecture-specific config if available, and
241 ;; 'defconfig' otherwise.
244 (copy-file config ".config")
245 (chmod ".config" #o666))
246 (system* "make" "defconfig"))
248 ;; Appending works even when the option wasn't in the
249 ;; file. The last one prevails if duplicated.
250 (let ((port (open-file ".config" "a")))
251 (display (string-append "CONFIG_NET_9P=m\n"
252 "CONFIG_NET_9P_VIRTIO=m\n"
253 "CONFIG_VIRTIO_BLK=m\n"
254 "CONFIG_VIRTIO_NET=m\n"
255 ;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
256 "CONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n"
257 "CONFIG_VIRTIO_PCI=m\n"
258 "CONFIG_VIRTIO_BALLOON=m\n"
259 "CONFIG_VIRTIO_MMIO=m\n"
266 (zero? (system* "make" "oldconfig"))
268 ;; Call the default `build' phase so `-j' is correctly
270 (apply build #:make-flags "all" args))))
272 `(lambda* (#:key inputs outputs #:allow-other-keys)
273 (let* ((out (assoc-ref outputs "out"))
274 (moddir (string-append out "/lib/modules"))
275 (mit (assoc-ref inputs "module-init-tools")))
277 (for-each (lambda (file)
279 (string-append out "/" (basename file))))
280 (find-files "." "^(bzImage|vmlinuz|System\\.map)$"))
281 (copy-file ".config" (string-append out "/config"))
282 (zero? (system* "make"
283 (string-append "DEPMOD=" mit "/sbin/depmod")
284 (string-append "MODULE_DIR=" moddir)
285 (string-append "INSTALL_PATH=" out)
286 (string-append "INSTALL_MOD_PATH=" out)
287 "INSTALL_MOD_STRIP=1"
288 "modules_install"))))))
294 (uri (linux-libre-urls version))
297 "19yyw6yssyxr9k5y3whgz2p731mb1pnq3xajpv8g01m13cxs32dd"))))
298 (build-system gnu-build-system)
299 (supported-systems '("x86_64-linux" "i686-linux"))
300 (native-inputs `(("perl" ,perl)
303 ("module-init-tools" ,module-init-tools)
304 ("patch/freedo+gnu" ,%boot-logo-patch)
306 ,@(let ((conf (kernel-config (or (%current-target-system)
307 (%current-system)))))
312 `(#:modules ((guix build gnu-build-system)
316 #:phases (alist-replace
319 'install ,install-phase
320 (alist-delete 'configure %standard-phases)))
322 (synopsis "100% free redistribution of a cleaned Linux kernel")
324 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
325 It has been modified to remove all non-free binary blobs.")
326 (license license:gpl2)
327 (home-page "http://www.gnu.org/software/linux-libre/"))))
329 (define-public linux-libre-4.1
331 (inherit linux-libre)
335 (uri (linux-libre-urls version))
338 "0xkj94xmnmxr768qp6n68r1g68ix1sds95nv6zfg4x8fc7fzn8km"))))
340 (let ((conf (kernel-config (or (%current-target-system)
343 `(,@(alist-delete "kconfig" (package-native-inputs linux-libre))
344 ("kconfig" ,conf))))))
348 ;;; Pluggable authentication modules (PAM).
351 (define-public linux-pam
358 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
360 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
361 version ".tar.bz2")))
364 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))))
365 (build-system gnu-build-system)
369 ;; TODO: optional dependencies
370 ;; ("libxcrypt" ,libxcrypt)
371 ;; ("cracklib" ,cracklib)
374 '(;; Most users, such as `shadow', expect the headers to be under
376 #:configure-flags (list (string-append "--includedir="
377 (assoc-ref %outputs "out")
378 "/include/security"))
380 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
383 (home-page "http://www.linux-pam.org/")
384 (synopsis "Pluggable authentication modules for Linux")
386 "A *Free* project to implement OSF's RFC 86.0.
387 Pluggable authentication modules are small shared object files that can
388 be used through the PAM API to perform tasks, like authenticating a user
389 at login. Local and dynamic reconfiguration are its key features.")
390 (license license:bsd-3)))
397 (define-public psmisc
404 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
408 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
409 (build-system gnu-build-system)
410 (inputs `(("ncurses" ,ncurses)))
411 (home-page "http://psmisc.sourceforge.net/")
413 "Small utilities that use the proc filesystem")
415 "This PSmisc package is a set of some small useful utilities that
416 use the proc filesystem. We're not about changing the world, but
417 providing the system administrator with some help in common tasks.")
418 (license license:gpl2+)))
420 (define-public util-linux
426 (uri (string-append "mirror://kernel.org/linux/utils/"
427 name "/v" (version-major+minor version) "/"
428 name "-" version ".tar.xz"))
431 "1ivdx1bhjbakf77agm9dn3wyxia1wgz9lzxgd61zqxw3xzih9gzw"))
432 (patches (list (search-patch "util-linux-tests.patch")))
433 (modules '((guix build utils)))
435 ;; We take the 'logger' program from GNU Inetutils and 'kill'
436 ;; from GNU Coreutils.
438 (substitute* "configure"
439 (("build_logger=yes") "build_logger=no")
440 (("build_kill=yes") "build_kill=no"))
442 (build-system gnu-build-system)
444 `(#:configure-flags (list "--disable-use-tty-group"
446 ;; Do not build .a files to save 2 MiB.
449 ;; Install completions where our
450 ;; bash-completion package expects them.
451 (string-append "--with-bashcompletiondir="
452 (assoc-ref %outputs "out")
453 "/etc/bash_completion.d"))
454 #:phases (modify-phases %standard-phases
456 'build 'set-umount-file-name
457 (lambda* (#:key outputs #:allow-other-keys)
458 ;; Tell 'eject' the right file name of 'umount'.
459 (let ((out (assoc-ref outputs "out")))
460 (substitute* "sys-utils/eject.c"
462 (string-append "\"" out "/bin/umount\"")))
466 (lambda* (#:key inputs outputs #:allow-other-keys)
467 (let ((out (assoc-ref outputs "out"))
468 (net (assoc-ref inputs "net-base")))
469 ;; Change the test to refer to the right file.
470 (substitute* "tests/ts/misc/mcookie"
472 (string-append net "/etc/services")))
474 (inputs `(("zlib" ,zlib)
475 ("ncurses" ,ncurses)))
478 ("net-base" ,net-base))) ;for tests
479 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
480 (synopsis "Collection of utilities for the Linux kernel")
481 (description "Util-linux is a diverse collection of Linux kernel
482 utilities. It provides dmesg and includes tools for working with filesystems,
483 block devices, UUIDs, TTYs, and many other tools.")
485 ;; Note that util-linux doesn't use the same license for all the
486 ;; code. GPLv2+ is the default license for a code without an
487 ;; explicitly defined license.
488 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
489 license:bsd-4 license:public-domain))))
491 (define-public procps
497 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
498 "procps-ng-" version ".tar.xz"))
501 "1va4n0mpsq327ca9dqp4hnrpgs6821rp0f2m0jyc1bfjl9lk2jg9"))))
502 (build-system gnu-build-system)
504 '(#:modules ((guix build utils)
505 (guix build gnu-build-system)
509 (modify-phases %standard-phases
511 'install 'post-install
512 ;; Remove commands and man pages redudant with
514 (lambda* (#:key outputs #:allow-other-keys)
515 (let* ((out (assoc-ref outputs "out"))
516 (dup (append-map (cut find-files out <>)
517 '("^kill" "^uptime"))))
518 (for-each delete-file dup)
520 (inputs `(("ncurses" ,ncurses)))
521 (home-page "https://gitlab.com/procps-ng/procps/")
522 (synopsis "Utilities that give information about processes")
524 "Procps is the package that has a bunch of small useful utilities
525 that give information about processes using the Linux /proc file system.
526 The package includes the programs ps, top, vmstat, w, kill, free,
527 slabtop, and skill.")
528 (license license:gpl2)))
530 (define-public usbutils
537 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
538 "usbutils-" version ".tar.xz"))
541 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
542 (build-system gnu-build-system)
544 `(("libusb" ,libusb)))
546 `(("pkg-config" ,pkg-config)))
547 (home-page "http://www.linux-usb.org/")
549 "Tools for working with USB devices, such as lsusb")
551 "Tools for working with USB devices, such as lsusb.")
552 (license license:gpl2+)))
554 (define-public e2fsprogs
561 "mirror://kernel.org/linux/kernel/people/tytso/"
562 name "/v" version "/"
563 name "-" version ".tar.xz"))
566 "1ix0b83zgw5n0p2grh2961c6796m92yr2jqc2sbr23x3lfsp8r71"))
567 (modules '((guix build utils)))
569 '(substitute* "MCONFIG.in"
570 (("INSTALL_SYMLINK = /bin/sh")
571 "INSTALL_SYMLINK = sh")))))
572 (build-system gnu-build-system)
573 (inputs `(("util-linux" ,util-linux)))
574 (native-inputs `(("pkg-config" ,pkg-config)
575 ("texinfo" ,texinfo))) ;for the libext2fs Info manual
577 '(;; util-linux is not the preferred source for some of the libraries and
578 ;; commands, so disable them (see, e.g.,
579 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
580 #:configure-flags '("--disable-libblkid"
581 "--disable-libuuid" "--disable-uuidd"
584 ;; Install libext2fs et al.
585 "--enable-elf-shlibs")
587 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
588 (assoc-ref %outputs "out")
591 #:phases (alist-cons-before
592 'configure 'patch-shells
594 (substitute* "configure"
595 (("/bin/sh (.*)parse-types.sh" _ dir)
596 (string-append (which "sh") " " dir
598 (substitute* (find-files "." "^Makefile.in$")
600 (string-append "#!" (which "sh")))))
602 'install 'install-libs
603 (lambda* (#:key outputs #:allow-other-keys)
604 (let* ((out (assoc-ref outputs "out"))
605 (lib (string-append out "/lib")))
606 (and (zero? (system* "make" "install-libs"))
608 ;; Make the .a writable so that 'strip' works.
609 ;; Failing to do that, due to debug symbols, we
610 ;; retain a reference to the final
611 ;; linux-libre-headers, which refer to the
612 ;; bootstrap binaries.
613 (let ((archives (find-files lib "\\.a$")))
614 (for-each (lambda (file)
620 ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
621 ;; they fail because we get an extra line that says "Can't check if
622 ;; filesystem is mounted due to missing mtab file".
624 (home-page "http://e2fsprogs.sourceforge.net/")
625 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
627 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
628 (license (list license:gpl2 ;programs
629 license:lgpl2.0 ;libext2fs
630 license:x11)))) ;libuuid
632 (define e2fsprogs/static
634 (package (inherit e2fsprogs)
636 ;; Do not build shared libraries.
637 (substitute-keyword-arguments (package-arguments e2fsprogs)
638 ((#:configure-flags _)
639 '(list "--disable-blkid"))
643 (define-public e2fsck/static
645 (name "e2fsck-static")
646 (version (package-version e2fsprogs))
647 (build-system trivial-build-system)
650 `(#:modules ((guix build utils))
653 (use-modules (guix build utils)
657 (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs")
659 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
661 (with-directory-excursion bin
662 (for-each (lambda (file)
663 (copy-file (string-append source "/" file)
665 (remove-store-references file)
667 (scandir source (cut string-prefix? "fsck." <>))))))))
668 (inputs `(("e2fsprogs" ,e2fsprogs/static)))
669 (synopsis "Statically-linked fsck.* commands from e2fsprogs")
671 "This package provides statically-linked command of fsck.ext[234] taken
672 from the e2fsprogs package. It is meant to be used in initrds.")
673 (home-page (package-home-page e2fsprogs))
674 (license (package-license e2fsprogs))))
676 (define-public extundelete
682 (uri (string-append "mirror://sourceforge/extundelete/"
683 version "/extundelete-" version ".tar.bz2"))
686 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
687 (build-system gnu-build-system)
688 (inputs `(("e2fsprogs" ,e2fsprogs)))
689 (home-page "http://extundelete.sourceforge.net/")
690 (synopsis "Recover deleted files from ext2/3/4 partitions")
692 "Extundelete is a set of tools that can recover deleted files from an
693 ext3 or ext4 partition.")
694 (license license:gpl2)))
696 (define-public zerofree
700 (home-page "http://intgat.tigress.co.uk/rmy/uml/")
703 (uri (string-append home-page name "-" version
707 "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs"))))
708 (build-system gnu-build-system)
710 '(#:phases (alist-replace
712 (lambda* (#:key outputs #:allow-other-keys)
713 (let* ((out (assoc-ref outputs "out"))
714 (bin (string-append out "/bin")))
716 (copy-file "zerofree"
717 (string-append bin "/zerofree"))
718 (chmod (string-append bin "/zerofree")
721 (alist-delete 'configure %standard-phases))
722 #:tests? #f)) ;no tests
723 (inputs `(("libext2fs" ,e2fsprogs)))
724 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
726 "The zerofree command scans the free blocks in an ext2 file system and
727 fills any non-zero blocks with zeroes. This is a useful way to make disk
728 images more compressible.")
729 (license license:gpl2)))
731 (define-public strace
737 (uri (string-append "mirror://sourceforge/strace/strace-"
741 "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
742 (build-system gnu-build-system)
743 (native-inputs `(("perl" ,perl)))
744 (home-page "http://strace.sourceforge.net/")
745 (synopsis "System call tracer for Linux")
747 "strace is a system call tracer, i.e. a debugging tool which prints out a
748 trace of all the system calls made by a another process/program.")
749 (license license:bsd-3)))
751 (define-public ltrace
757 (uri (string-append "http://www.ltrace.org/ltrace_" version
761 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
762 (build-system gnu-build-system)
763 (inputs `(("libelf" ,libelf)))
765 ;; Compilation uses -Werror by default, but it fails.
766 '(#:configure-flags '("--disable-werror")))
767 (home-page "http://www.ltrace.org/")
768 (synopsis "Library call tracer for Linux")
770 "ltrace intercepts and records dynamic library calls which are called by
771 an executed process and the signals received by that process. It can also
772 intercept and print the system calls executed by the program.")
773 (license license:gpl2+)))
775 (define-public alsa-lib
782 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
786 "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9"))
787 (patches (list (search-patch "alsa-lib-mips-atomic-fix.patch")))))
788 (build-system gnu-build-system)
789 (home-page "http://www.alsa-project.org/")
790 (synopsis "The Advanced Linux Sound Architecture libraries")
792 "The Advanced Linux Sound Architecture (ALSA) provides audio and
793 MIDI functionality to the Linux-based operating system.")
794 (license license:lgpl2.1+)))
796 (define-public alsa-utils
802 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
803 name "-" version ".tar.bz2"))
806 "1wa88wvqcfhak9x3y65wzzwxmmyxb5bv2gyj7lnm653fnwsk271v"))))
807 (build-system gnu-build-system)
809 ;; XXX: Disable man page creation until we have DocBook.
810 '(#:configure-flags (list "--disable-xmlto"
812 ;; The udev rule is responsible for restoring
814 (string-append "--with-udev-rules-dir="
815 (assoc-ref %outputs "out")
816 "/lib/udev/rules.d"))
817 #:phases (alist-cons-before
818 'install 'pre-install
820 ;; Don't try to mkdir /var/lib/alsa.
821 (substitute* "Makefile"
822 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
826 `(("libsamplerate" ,libsamplerate)
828 ("alsa-lib" ,alsa-lib)
830 ("gettext" ,gnu-gettext)))
831 (home-page "http://www.alsa-project.org/")
832 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
834 "The Advanced Linux Sound Architecture (ALSA) provides audio and
835 MIDI functionality to the Linux-based operating system.")
837 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
839 (license license:gpl2)))
841 (define-public iptables
848 "http://www.netfilter.org/projects/iptables/files/iptables-"
852 "0vkg5lzkn4l3i1sm6v3x96zzvnv9g7mi0qgj6279ld383mzcws24"))))
853 (build-system gnu-build-system)
855 '(#:tests? #f ; no test suite
856 #:configure-flags ; add $libdir to the RUNPATH of executables
857 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
858 (home-page "http://www.netfilter.org/projects/iptables/index.html")
859 (synopsis "Program to configure the Linux IP packet filtering rules")
861 "iptables is the userspace command line program used to configure the
862 Linux 2.4.x and later IPv4 packet filtering ruleset. It is targeted towards
863 system administrators. Since Network Address Translation is also configured
864 from the packet filter ruleset, iptables is used for this, too. The iptables
865 package also includes ip6tables. ip6tables is used for configuring the IPv6
867 (license license:gpl2+)))
869 (define-public iproute
876 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
880 "05351m4m0whsivlblvs3m0nz5q9v6r06ik80z27gf6ca51kw74dw"))))
881 (build-system gnu-build-system)
883 `(#:tests? #f ; no test suite
884 #:make-flags (let ((out (assoc-ref %outputs "out")))
886 (string-append "LIBDIR=" out "/lib")
887 (string-append "SBINDIR=" out "/sbin")
888 (string-append "CONFDIR=" out "/etc")
889 (string-append "DOCDIR=" out "/share/doc/"
891 (string-append "MANDIR=" out "/share/man")))
892 #:phases (modify-phases %standard-phases
893 (add-before 'install 'pre-install
895 ;; Don't attempt to create /var/lib/arpd.
896 (substitute* "Makefile"
897 (("^.*ARPDDIR.*$") "")))))))
899 `(("iptables" ,iptables)
902 `(("pkg-config" ,pkg-config)
906 "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
908 "Utilities for controlling TCP/IP networking and traffic in Linux")
910 "Iproute2 is a collection of utilities for controlling TCP/IP
911 networking and traffic with the Linux kernel.
913 Most network configuration manuals still refer to ifconfig and route as the
914 primary network configuration tools, but ifconfig is known to behave
915 inadequately in modern network environments. They should be deprecated, but
916 most distros still include them. Most network configuration systems make use
917 of ifconfig and thus provide a limited feature set. The /etc/net project aims
918 to support most modern network technologies, as it doesn't use ifconfig and
919 allows a system administrator to make use of all iproute2 features, including
922 iproute2 is usually shipped in a package called iproute or iproute2 and
923 consists of several tools, of which the most important are ip and tc. ip
924 controls IPv4 and IPv6 configuration and tc stands for traffic control. Both
925 tools print detailed usage messages and are accompanied by a set of
927 (license license:gpl2+)))
929 (define-public net-tools
930 ;; XXX: This package is basically unmaintained, but it provides a few
931 ;; commands not yet provided by Inetutils, such as 'route', so we have to
936 (home-page "http://net-tools.sourceforge.net/")
939 (uri (list (string-append
940 "mirror://sourceforge/net-tools/net-tools-"
943 "http://distro.ibiblio.org/rootlinux/rootlinux-ports"
944 "/base/net-tools/net-tools-1.60.tar.bz2")))
947 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
949 (list (search-patch "net-tools-bitrot.patch")))))
950 (build-system gnu-build-system)
952 '(#:modules ((guix build gnu-build-system)
956 #:phases (alist-cons-after
958 (lambda* (#:key inputs #:allow-other-keys)
959 (define (apply-patch file)
960 (zero? (system* "patch" "-p1" "--force"
963 (let ((patch.gz (assoc-ref inputs "patch")))
964 (format #t "applying Debian patch set '~a'...~%"
966 (system (string-append "gunzip < " patch.gz " > the-patch"))
967 (and (apply-patch "the-patch")
968 (for-each apply-patch
969 (find-files "debian/patches"
973 (lambda* (#:key outputs #:allow-other-keys)
974 (let ((out (assoc-ref outputs "out")))
975 (mkdir-p (string-append out "/bin"))
976 (mkdir-p (string-append out "/sbin"))
978 ;; Pretend we have everything...
979 (system "yes | make config")
981 ;; ... except for the things we don't have.
982 ;; HAVE_AFDECnet requires libdnet, which we don't have.
983 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
984 ;; that have been removed.
985 (substitute* '("config.make" "config.h")
986 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") ""))))
988 'install 'remove-redundant-commands
989 (lambda* (#:key outputs #:allow-other-keys)
990 ;; Remove commands and man pages redundant with
992 (let* ((out (assoc-ref outputs "out"))
993 (dup (append-map (cut find-files out <>)
995 "^(yp|nis|dns)?domainname"))))
996 (for-each delete-file dup)
1000 ;; Binaries that depend on libnet-tools.a don't declare that
1001 ;; dependency, making it parallel-unsafe.
1002 #:parallel-build? #f
1004 #:tests? #f ; no test suite
1005 #:make-flags (let ((out (assoc-ref %outputs "out")))
1007 (string-append "BASEDIR=" out)
1008 (string-append "INSTALLNLSDIR=" out "/share/locale")
1009 (string-append "mandir=/share/man")))))
1011 ;; Use the big Debian patch set (the thing does not even compile out of
1013 (inputs `(("patch" ,(origin
1016 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
1019 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
1020 (native-inputs `(("gettext" ,gnu-gettext)))
1022 (synopsis "Tools for controlling the network subsystem in Linux")
1024 "This package includes the important tools for controlling the network
1025 subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
1026 netstat, rarp and route. Additionally, this package contains utilities
1027 relating to particular network hardware types (plipconfig, slattach) and
1028 advanced aspects of IP configuration (iptunnel, ipmaddr).")
1029 (license license:gpl2+)))
1031 (define-public libcap
1038 "mirror://kernel.org/linux/libs/security/linux-privs/"
1039 "libcap2/libcap-" version ".tar.xz"))
1042 "0rbc9qbqs5bp9am9s9g83wxj5k4ixps2agy9dxr1v1fwg27mdr6f"))))
1043 (build-system gnu-build-system)
1044 (arguments '(#:phases
1045 (modify-phases %standard-phases
1047 ;; Add $libdir to the RUNPATH of executables.
1049 (substitute* "Make.Rules"
1051 (string-append "LDFLAGS := -Wl,-rpath="
1052 %output "/lib"))))))
1053 #:tests? #f ; no 'check' target
1054 #:make-flags (list "lib=lib"
1055 (string-append "prefix="
1056 (assoc-ref %outputs "out"))
1057 "RAISE_SETFCAP=no")))
1058 (native-inputs `(("perl" ,perl)))
1059 (inputs `(("attr" ,attr)))
1060 (home-page "https://sites.google.com/site/fullycapable/")
1061 (synopsis "Library for working with POSIX capabilities")
1063 "Libcap2 provides a programming interface to POSIX capabilities on
1064 Linux-based operating systems.")
1066 ;; License is BSD-3 or GPLv2, at the user's choice.
1067 (license license:gpl2)))
1069 (define-public bridge-utils
1071 (name "bridge-utils")
1075 (uri (string-append "mirror://sourceforge/bridge/bridge-utils-"
1079 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1080 (build-system gnu-build-system)
1082 ;; The tarball lacks all the generated files.
1083 (native-inputs `(("autoconf" ,autoconf)
1084 ("automake" ,automake)))
1086 '(#:phases (alist-cons-after
1089 ;; Fix "field ‘ip6’ has incomplete type" errors.
1090 (substitute* "libbridge/libbridge.h"
1091 (("#include <linux/if_bridge.h>")
1092 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1094 ;; Ensure that the entire build fails if one of the
1095 ;; sub-Makefiles fails.
1096 (substitute* "Makefile.in"
1097 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1098 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1100 (zero? (system* "autoreconf" "-vf")))
1102 #:tests? #f)) ; no 'check' target
1105 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1106 (synopsis "Manipulate Ethernet bridges")
1108 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1109 to connect two Ethernet segments together in a protocol independent way.
1110 Packets are forwarded based on Ethernet address, rather than IP address (like
1111 a router). Since forwarding is done at Layer 2, all protocols can go
1112 transparently through a bridge.")
1113 (license license:gpl2+)))
1115 (define-public libnl
1122 "http://www.infradead.org/~tgr/libnl/files/libnl-"
1126 "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb"))))
1127 (build-system gnu-build-system)
1128 (native-inputs `(("flex" ,flex) ("bison" ,bison)))
1129 (home-page "http://www.infradead.org/~tgr/libnl/")
1130 (synopsis "NetLink protocol library suite")
1132 "The libnl suite is a collection of libraries providing APIs to netlink
1133 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1134 between the kernel and user space processes. It was designed to be a more
1135 flexible successor to ioctl to provide mainly networking related kernel
1136 configuration and monitoring interfaces.")
1138 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1139 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1140 (license license:gpl2)))
1149 "https://www.kernel.org/pub/software/network/iw/iw-"
1153 "14zsapqhivk0ws5z21y1ys2c2czi05mzk7bl2yb7qxcfrnsjx9j8"))))
1154 (build-system gnu-build-system)
1155 (native-inputs `(("pkg-config" ,pkg-config)))
1156 (inputs `(("libnl" ,libnl)))
1158 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1160 #:phases (alist-delete 'configure %standard-phases)))
1161 (home-page "http://wireless.kernel.org/en/users/Documentation/iw")
1162 (synopsis "Tool for configuring wireless devices")
1164 "iw is a new nl80211 based CLI configuration utility for wireless
1165 devices. It replaces 'iwconfig', which is deprecated.")
1166 (license license:isc)))
1168 (define-public powertop
1176 "https://01.org/sites/default/files/downloads/powertop/powertop-"
1180 "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8"))))
1181 (build-system gnu-build-system)
1184 ("pciutils" ,pciutils)
1185 ("ncurses" ,ncurses)
1188 `(("pkg-config" ,pkg-config)))
1189 (home-page "https://01.org/powertop/")
1190 (synopsis "Analyze power consumption on Intel-based laptops")
1192 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1193 power management. In addition to being a diagnostic tool, PowerTOP also has
1194 an interactive mode where the user can experiment various power management
1195 settings for cases where the operating system has not enabled these
1197 (license license:gpl2)))
1199 (define-public aumix
1206 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1207 version ".tar.bz2"))
1210 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1211 (build-system gnu-build-system)
1212 (inputs `(("ncurses" ,ncurses)))
1213 (home-page "http://www.jpj.net/~trevor/aumix.html")
1214 (synopsis "Audio mixer for X and the console")
1216 "Aumix adjusts an audio mixer from X, the console, a terminal,
1217 the command line or a script.")
1218 (license license:gpl2+)))
1220 (define-public iotop
1227 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1230 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1231 (build-system python-build-system)
1233 ;; The setup.py script expects python-2.
1234 `(#:python ,python-2
1235 ;; There are currently no checks in the package.
1237 (native-inputs `(("python" ,python-2)))
1238 (home-page "http://guichaz.free.fr/iotop/")
1240 "Displays the IO activity of running processes")
1242 "Iotop is a Python program with a top like user interface to show the
1243 processes currently causing I/O.")
1244 (license license:gpl2+)))
1252 (uri (let ((version-with-underscores
1253 (string-join (string-split version #\.) "_")))
1255 "https://github.com/libfuse/libfuse/"
1256 "releases/download/fuse_" version-with-underscores
1257 "/fuse-" version ".tar.gz")))
1260 "1dfvbi1p57svbv2sfnbqwpnsk219spvjnlapf35azhgzqlf3g7sp"))))
1261 (build-system gnu-build-system)
1262 (inputs `(("util-linux" ,util-linux)))
1264 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1265 (assoc-ref %outputs "out")
1267 (string-append "INIT_D_PATH="
1268 (assoc-ref %outputs "out")
1271 ;; The rule makes /dev/fuse 666.
1272 (string-append "UDEV_RULES_PATH="
1273 (assoc-ref %outputs "out")
1274 "/lib/udev/rules.d"))
1275 #:phases (alist-cons-before
1276 'build 'set-file-names
1277 (lambda* (#:key inputs #:allow-other-keys)
1278 ;; libfuse calls out to mount(8) and umount(8). Make sure
1279 ;; it refers to the right ones.
1280 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1281 (("/bin/(u?)mount" _ maybe-u)
1282 (string-append (assoc-ref inputs "util-linux")
1283 "/bin/" maybe-u "mount")))
1284 (substitute* '("util/mount.fuse.c")
1288 ;; This hack leads libfuse to search for 'fusermount' in
1289 ;; $PATH, where it may find a setuid-root binary, instead of
1290 ;; trying solely $out/sbin/fusermount and failing because
1292 (substitute* "lib/Makefile"
1293 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1294 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
1296 (home-page "http://fuse.sourceforge.net/")
1297 (synopsis "Support file systems implemented in user space")
1299 "As a consequence of its monolithic design, file system code for Linux
1300 normally goes into the kernel itself---which is not only a robustness issue,
1301 but also an impediment to system extensibility. FUSE, for \"file systems in
1302 user space\", is a kernel module and user-space library that tries to address
1303 part of this problem by allowing users to run file system implementations as
1304 user-space processes.")
1305 (license (list license:lgpl2.1 ;library
1306 license:gpl2+)))) ;command-line utilities
1308 (define-public unionfs-fuse
1310 (name "unionfs-fuse")
1315 "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-"
1319 "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d"))))
1320 (build-system cmake-build-system)
1321 (inputs `(("fuse" ,fuse)))
1322 (arguments '(#:tests? #f)) ; no tests
1323 (home-page "http://podgorny.cz/moin/UnionFsFuse")
1324 (synopsis "User-space union file system")
1326 "UnionFS-FUSE is a flexible union file system implementation in user
1327 space, using the FUSE library. Mounting a union file system allows you to
1328 \"aggregate\" the contents of several directories into a single mount point.
1329 UnionFS-FUSE additionally supports copy-on-write.")
1330 (license license:bsd-3)))
1333 (package (inherit fuse)
1334 (name "fuse-static")
1335 (source (origin (inherit (package-source fuse))
1336 (modules '((guix build utils)))
1338 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1339 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1340 ;; it doesn't do that, allowing us to remove the dependency on
1341 ;; util-linux (something that is useful in initrds.)
1342 '(substitute* '("lib/mount_util.c"
1343 "util/mount_util.c")
1344 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1349 (define-public unionfs-fuse/static
1350 (package (inherit unionfs-fuse)
1351 (synopsis "User-space union file system (statically linked)")
1352 (name (string-append (package-name unionfs-fuse) "-static"))
1353 (source (origin (inherit (package-source unionfs-fuse))
1354 (modules '((guix build utils)))
1356 ;; Add -ldl to the libraries, because libfuse.a needs that.
1357 '(substitute* "src/CMakeLists.txt"
1358 (("target_link_libraries(.*)\\)" _ libs)
1359 (string-append "target_link_libraries"
1363 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1364 #:phases (alist-cons-after
1365 'install 'post-install
1366 (lambda* (#:key outputs #:allow-other-keys)
1367 (let* ((out (assoc-ref outputs "out"))
1368 (exe (string-append out "/bin/unionfs")))
1369 ;; By default, 'unionfs' keeps references to
1370 ;; $glibc/share/locale and similar stuff. Remove them.
1371 (remove-store-references exe)))
1373 (inputs `(("fuse" ,fuse-static)))))
1375 (define-public sshfs-fuse
1381 (uri (let ((version-with-underscores
1382 (string-join (string-split version #\.) "_")))
1383 (string-append "https://github.com/libfuse/sshfs/releases/"
1384 "download/sshfs_" version-with-underscores
1385 "/sshfs-fuse-" version ".tar.gz")))
1388 "0gp6qr33l2p0964j0kds0dfmvyyf5lpgsn11daf0n5fhwm9185z9"))))
1389 (build-system gnu-build-system)
1394 `(("pkg-config" ,pkg-config)))
1395 (home-page "http://fuse.sourceforge.net/sshfs.html")
1396 (synopsis "Mount remote file systems over SSH")
1398 "This is a file system client based on the SSH File Transfer Protocol.
1399 Since most SSH servers already support this protocol it is very easy to set
1400 up: on the server side there's nothing to do; on the client side mounting the
1401 file system is as easy as logging into the server with an SSH client.")
1402 (license license:gpl2+)))
1404 (define-public numactl
1411 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1416 "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325"))))
1417 (build-system gnu-build-system)
1419 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1420 ;; to run, which we can't assume to have.
1423 ;; NUMA is apparently not supported on armhf, see
1424 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1425 (supported-systems (delete "armhf-linux" %supported-systems))
1426 (home-page "http://oss.sgi.com/projects/libnuma/")
1427 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1429 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1430 memory is not all in one place. The numactl program allows you to run your
1431 application program on specific CPU's and memory nodes. It does this by
1432 supplying a NUMA memory policy to the operating system before running your
1435 The package contains other commands, such as numademo, numastat and memhog.
1436 The numademo command provides a quick overview of NUMA performance on your
1438 (license (list license:gpl2 ;programs
1439 license:lgpl2.1)))) ;library
1447 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1451 "04mrms12nm5sas0nxs94yrr3hz7gmqhnmfgb9ff34bh1jszxmzcx"))
1452 (modules '((guix build utils)))
1455 (substitute* "tests/Makefile.in"
1456 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1459 (substitute* '("src/unicode_start" "src/unicode_stop")
1460 ;; Assume the Coreutils are in $PATH.
1463 (build-system gnu-build-system)
1465 '(#:phases (alist-cons-before
1467 (lambda* (#:key inputs #:allow-other-keys)
1468 (let ((gzip (assoc-ref %build-inputs "gzip"))
1469 (bzip2 (assoc-ref %build-inputs "bzip2")))
1470 (substitute* "src/libkeymap/findfile.c"
1472 (string-append gzip "/bin/gzip"))
1474 (string-append bzip2 "/bin/bzip2")))))
1476 'install 'post-install
1477 (lambda* (#:key outputs #:allow-other-keys)
1478 ;; Make sure these programs find their comrades.
1479 (let* ((out (assoc-ref outputs "out"))
1480 (bin (string-append out "/bin")))
1481 (for-each (lambda (prog)
1482 (wrap-program (string-append bin "/" prog)
1483 `("PATH" ":" prefix (,bin))))
1484 '("unicode_start" "unicode_stop"))))
1485 %standard-phases))))
1486 (inputs `(("check" ,check)
1489 ("pam" ,linux-pam)))
1490 (native-inputs `(("pkg-config" ,pkg-config)))
1491 (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/")
1492 (synopsis "Linux keyboard utilities and keyboard maps")
1494 "This package contains keytable files and keyboard utilities compatible
1495 for systems using the Linux kernel. This includes commands such as
1496 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1497 (license license:gpl2+)))
1499 (define-public inotify-tools
1501 (name "inotify-tools")
1506 "mirror://sourceforge/inotify-tools/inotify-tools/"
1507 version "/inotify-tools-" version ".tar.gz"))
1510 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1511 (build-system gnu-build-system)
1512 (home-page "http://inotify-tools.sourceforge.net/")
1513 (synopsis "Monitor file accesses")
1515 "The inotify-tools packages provides a C library and command-line tools
1516 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1517 (license license:gpl2+)))
1526 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1527 "kmod-" version ".tar.xz"))
1530 "1yid3a9b64a60ybj66fk2ysrq5klnl0ijl4g624cl16y8404g9rv"))
1531 (patches (list (search-patch "kmod-module-directory.patch")))))
1532 (build-system gnu-build-system)
1534 `(("pkg-config" ,pkg-config)))
1539 `(#:tests? #f ; FIXME: Investigate test failures
1540 #:configure-flags '("--with-xz" "--with-zlib")
1541 #:phases (alist-cons-after
1542 'install 'install-modprobe&co
1543 (lambda* (#:key outputs #:allow-other-keys)
1544 (let* ((out (assoc-ref outputs "out"))
1545 (bin (string-append out "/bin")))
1546 (for-each (lambda (tool)
1548 (string-append bin "/" tool)))
1549 '("insmod" "rmmod" "lsmod" "modprobe"
1550 "modinfo" "depmod"))))
1552 (home-page "https://www.kernel.org/")
1553 (synopsis "Kernel module tools")
1554 (description "Kmod is a set of tools to handle common tasks with Linux
1555 kernel modules like insert, remove, list, check properties, resolve
1556 dependencies and aliases.
1558 These tools are designed on top of libkmod, a library that is shipped with
1559 kmod. The aim is to be compatible with tools, configurations and indices
1560 from the module-init-tools project.")
1561 (license license:gpl2+))) ; library under lgpl2.1+
1563 (define-public eudev
1564 ;; The post-systemd fork, maintained by Gentoo.
1565 ;; TODO: Merge with 'eudev-with-blkid' below at an opportune time.
1572 "http://dev.gentoo.org/~blueness/eudev/eudev-"
1576 "0akg9gcc3c2p56xbhlvbybqavcprly5q0bvk655zwl6d62j8an7p"))
1577 (patches (list (search-patch "eudev-rules-directory.patch")))))
1578 (build-system gnu-build-system)
1580 `(("pkg-config" ,pkg-config)
1585 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
1586 (synopsis "Userspace device management")
1587 (description "Udev is a daemon which dynamically creates and removes
1588 device nodes from /dev/, handles hotplug events and loads drivers at boot
1590 (license license:gpl2+)))
1592 (define-public eudev-with-blkid
1593 ;; TODO: Merge with 'eudev' above at an opportune time.
1596 (name "eudev-with-blkid")
1598 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
1599 ;; and similar; it also installs the '60-persistent-storage.rules' file,
1600 ;; which contains the rules to do that.
1601 `(("util-linux" ,util-linux) ;for blkid
1602 ,@(package-inputs eudev)))))
1607 (version "2.02.109")
1610 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
1614 "1rv5ivg0l1w3nwzwdkqixm96h5bzg7ib4rr196ysb2lw42jmpjbv"))
1615 (modules '((guix build utils)))
1618 (use-modules (guix build utils))
1620 ;; Honor sysconfdir.
1621 (substitute* "make.tmpl.in"
1623 "confdir = @sysconfdir@\n")
1624 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
1625 "DEFAULT_SYS_DIR = @sysconfdir@"))))))
1626 (build-system gnu-build-system)
1628 `(("pkg-config" ,pkg-config)
1629 ("procps" ,procps))) ;tests use 'pgrep'
1633 '(#:phases (alist-cons-after
1634 'configure 'set-makefile-shell
1636 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
1638 (setenv "SHELL" (which "sh"))
1640 ;; Replace /bin/sh with the right file name.
1641 (patch-makefile-SHELL "make.tmpl"))
1644 #:configure-flags (list (string-append "--sysconfdir="
1645 (assoc-ref %outputs "out")
1647 "--enable-udev_sync"
1648 "--enable-udev_rules"
1650 ;; Make sure programs such as 'dmsetup' can
1651 ;; find libdevmapper.so.
1652 (string-append "LDFLAGS=-Wl,-rpath="
1653 (assoc-ref %outputs "out")
1656 ;; The tests use 'mknod', which requires root access.
1658 (home-page "http://sourceware.org/lvm2/")
1659 (synopsis "Logical volume management for Linux")
1661 "LVM2 is the logical volume management tool set for Linux-based systems.
1662 This package includes the user-space libraries and tools, including the device
1663 mapper. Kernel components are part of Linux-libre.")
1665 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
1666 ;; Command-line tools are GPLv2.
1667 (license (list license:gpl2 license:lgpl2.1))))
1669 (define-public wireless-tools
1671 (name "wireless-tools")
1675 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
1679 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
1682 ;; Remove the older header files that are not free software.
1683 (for-each (lambda (n)
1684 (delete-file (format #f "wireless.~a.h" n)))
1685 '(10 11 12 13 14 15 16 17 18 19 20))
1687 (build-system gnu-build-system)
1690 (list (string-append "PREFIX=" %output)
1691 (string-append "INSTALL_MAN=" %output "/share/man")
1692 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
1694 #:phases (modify-phases %standard-phases
1695 (delete 'configure))
1697 (synopsis "Tools for manipulating Linux Wireless Extensions")
1698 (description "Wireless Tools are used to manipulate the now-deprecated
1699 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
1700 Extension was an interface allowing you to set Wireless LAN specific
1701 parameters and get the specific stats. It is deprecated in favor the nl80211
1703 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
1704 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
1705 ;; other files are distributed under gpl2.
1706 (license (list license:gpl2 license:lgpl2.1+))))
1714 (uri (string-append "mirror://kernel.org/software/network/crda/"
1715 "crda-" version ".tar.xz"))
1718 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
1719 (patches (list (search-patch "crda-optional-gcrypt.patch")))))
1720 (build-system gnu-build-system)
1722 '(#:phases (modify-phases %standard-phases
1725 'build 'no-werror-no-ldconfig
1727 (substitute* "Makefile"
1729 (("ldconfig") "true"))
1732 'build 'set-regulator-db-file-name
1733 (lambda* (#:key inputs #:allow-other-keys)
1734 ;; Tell CRDA where to find our database.
1735 (let ((regdb (assoc-ref inputs "wireless-regdb")))
1736 (substitute* "crda.c"
1737 (("\"/lib/crda/regulatory.bin\"")
1738 (string-append "\"" regdb
1739 "/lib/crda/regulatory.bin\"")))
1741 #:test-target "verify"
1742 #:make-flags (let ((out (assoc-ref %outputs "out"))
1743 (regdb (assoc-ref %build-inputs "wireless-regdb")))
1744 (list "CC=gcc" "V=1"
1746 ;; Disable signature-checking on 'regulatory.bin'.
1747 ;; The reason is that this simplifies maintenance
1748 ;; on our side (no need to manage a distro key
1749 ;; pair), and we can guarantee integrity of
1750 ;; 'regulatory.bin' by other means anyway, such as
1751 ;; 'guix gc --verify'. See
1752 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
1756 (string-append "PREFIX=" out)
1757 (string-append "SBINDIR=" out "/sbin/")
1758 (string-append "UDEV_RULE_DIR="
1759 out "/lib/udev/rules.d")
1760 (string-append "LDFLAGS=-Wl,-rpath="
1762 (string-append "REG_BIN=" regdb
1763 "/lib/crda/regulatory.bin")))))
1764 (native-inputs `(("pkg-config" ,pkg-config)
1765 ("python" ,python-2)
1766 ("wireless-regdb" ,wireless-regdb)))
1767 (inputs `(("libnl" ,libnl)))
1769 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
1770 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
1772 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
1773 communication between the kernel Linux and user space for regulatory
1775 (license license:copyleft-next)))
1777 (define-public wireless-regdb
1779 (name "wireless-regdb")
1780 (version "2015.04.06")
1784 "mirror://kernel.org/software/network/wireless-regdb/"
1785 "wireless-regdb-" version ".tar.xz"))
1788 "0czi83k311fp27z42hxjm8vi88fsbc23mhavv96lkb4pmari0jjc"))
1790 ;; We're building 'regulatory.bin' by ourselves.
1791 (snippet '(delete-file "regulatory.bin"))))
1792 (build-system gnu-build-system)
1794 '(#:phases (modify-phases %standard-phases
1795 (delete 'configure))
1797 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
1798 ;; is computed and can be equal to 'maintainer-clean'; when that
1799 ;; happens, we can end up deleting the 'regulatory.bin' file that we
1800 ;; just built. Thus, build things sequentially.
1801 #:parallel-build? #f
1803 #:tests? #f ;no tests
1804 #:make-flags (let ((out (assoc-ref %outputs "out")))
1805 (list (string-append "PREFIX=" out)
1806 (string-append "LSB_ID=GuixSD")
1807 (string-append "DISTRO_PUBKEY=/dev/null")
1808 (string-append "DISTRO_PRIVKEY=/dev/null")
1809 (string-append "REGDB_PUBKEY=/dev/null")
1811 ;; Leave that empty so that db2bin.py doesn't try
1812 ;; to sign 'regulatory.bin'. This allows us to
1813 ;; avoid managing a key pair for the whole distro.
1814 (string-append "REGDB_PRIVKEY=")))))
1815 (native-inputs `(("python" ,python-2)))
1817 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
1818 (synopsis "Wireless regulatory database")
1820 "This package contains the wireless regulatory database Central
1821 Regulatory Database Agent (CRDA) daemon. The database contains information on
1822 country-specific regulations for the wireless spectrum.")
1823 (license license:isc)))
1825 (define-public lm-sensors
1832 "ftp://ftp.netroedge.com/pub/lm-sensors/lm_sensors-"
1833 version ".tar.bz2"))
1836 "1ksgrynxgrq590nb2fwxrl1gwzisjkqlyg3ljfd1al0ibrk6mbjx"))
1837 (patches (list (search-patch "lm-sensors-hwmon-attrs.patch")))))
1838 (build-system gnu-build-system)
1839 (inputs `(("rrdtool" ,rrdtool)
1842 ("gnuplot" ,gnuplot)))
1843 (native-inputs `(("pkg-config" ,pkg-config)
1848 `(#:tests? #f ; no 'check' target
1849 #:make-flags (list (string-append "PREFIX=" %output)
1850 (string-append "ETCDIR=" %output "/etc")
1851 (string-append "MANDIR=" %output "/share/man"))
1856 'build 'patch-exec-paths
1857 (lambda* (#:key inputs outputs #:allow-other-keys)
1858 (substitute* "prog/detect/sensors-detect"
1860 (string-append "`" (assoc-ref inputs "coreutils")
1862 (("(`|\")modprobe" all open-quote)
1863 (string-append open-quote
1864 (assoc-ref inputs "kmod")
1866 (substitute* '("prog/pwm/pwmconfig"
1867 "prog/pwm/fancontrol")
1869 (string-append (assoc-ref inputs "gnuplot")
1872 (string-append (assoc-ref inputs "coreutils")
1875 (string-append (assoc-ref inputs "grep")
1878 (string-append (assoc-ref inputs "sed")
1881 (string-append (assoc-ref inputs "coreutils")
1884 (string-append (assoc-ref inputs "coreutils")
1887 (string-append (assoc-ref inputs "coreutils")
1888 "/bin/readlink -f"))))
1889 %standard-phases))))
1890 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
1891 (synopsis "Utilities to read temperature/voltage/fan sensors")
1893 "Lm-sensors is a hardware health monitoring package for Linux. It allows
1894 you to access information from temperature, voltage, and fan speed sensors.
1895 It works with most newer systems.")
1896 (license license:gpl2+)))
1898 (define-public i2c-tools
1905 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
1906 version ".tar.bz2"))
1909 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
1910 (build-system gnu-build-system)
1912 `(#:tests? #f ; no 'check' target
1913 #:make-flags (list (string-append "prefix=" %output)
1915 ;; no configure script
1916 #:phases (alist-delete 'configure %standard-phases)))
1919 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
1920 (synopsis "I2C tools for Linux")
1922 "The i2c-tools package contains a heterogeneous set of I2C tools for
1923 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
1924 EEPROM decoding scripts, EEPROM programming tools, and a python module for
1926 (license license:gpl2+)))
1928 (define-public xsensors
1935 "http://www.linuxhardware.org/xsensors/xsensors-"
1939 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
1940 (build-system gnu-build-system)
1941 (inputs `(("lm-sensors" ,lm-sensors)
1943 (native-inputs `(("pkg-config" ,pkg-config)))
1945 `(#:phases (alist-cons-before
1946 'configure 'enable-deprecated
1948 (substitute* "src/Makefile.in"
1949 (("-DGDK_DISABLE_DEPRECATED") "")
1950 (("-DGTK_DISABLE_DEPRECATED") "")))
1952 'configure 'remove-Werror
1954 (substitute* '("configure" "src/Makefile.in")
1956 %standard-phases))))
1957 (home-page "http://www.linuxhardware.org/xsensors/")
1958 (synopsis "Hardware health information viewer")
1960 "Xsensors reads data from the libsensors library regarding hardware
1961 health such as temperature, voltage and fan speed and displays the information
1962 in a digital read-out.")
1963 (license license:gpl2+)))
1968 (version (package-version linux-libre))
1969 (source (package-source linux-libre))
1970 (build-system gnu-build-system)
1972 '(#:phases (alist-replace
1974 (lambda* (#:key inputs #:allow-other-keys)
1975 (setenv "SHELL_PATH" (which "bash"))
1976 (chdir "tools/perf"))
1978 #:make-flags (list (string-append "DESTDIR="
1979 (assoc-ref %outputs "out"))
1982 ;; By default, 'config/Makefile' uses lib64 on
1983 ;; x86_64. Work around that.
1985 #:tests? #f)) ;no tests
1987 `(("pkg-config" ,pkg-config)
1991 ;; There are build scripts written in these languages.
1993 ("python" ,python-2)))
1995 `(("slang" ,slang) ;for the interactive TUI
1997 ("python" ,python-2) ;'perf' links against libpython
1998 ("elfutils" ,elfutils)
2001 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2002 ("libxslt" ,libxslt)
2003 ("docbook-xml" ,docbook-xml)
2004 ("docbook-xsl" ,docbook-xsl)
2006 ("asciidoc" ,asciidoc)))
2007 (home-page "https://perf.wiki.kernel.org/")
2008 (synopsis "Linux profiling with performance counters")
2010 "perf is a tool suite for profiling using hardware performance counters,
2011 with support in the Linux kernel. perf can instrument CPU performance
2012 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2013 of lightweight profiling. This package contains the user-land tools and in
2014 particular the 'perf' command.")
2015 (license (package-license linux-libre))))
2017 (define-public pflask
2023 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2025 (file-name (string-append name "-" version ".tar.gz"))
2028 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2029 (build-system cmake-build-system)
2031 '(#:tests? #f)) ; no tests
2032 (home-page "http://ghedo.github.io/pflask/")
2033 (synopsis "Simple tool for creating Linux namespace containers")
2034 (description "pflask is a simple tool for creating Linux namespace
2035 containers. It can be used for running a command or even booting an OS inside
2036 an isolated container, created with the help of Linux namespaces. It is
2037 similar in functionality to chroot, although pflask provides better isolation
2038 thanks to the use of namespaces.")
2039 (license license:bsd-2)))
2041 (define-public hdparm
2047 (uri (string-append "mirror://sourceforge/" name "/"
2048 name "-" version ".tar.gz"))
2051 "0sc6yf3k6sd7n6a2ig2my9fjlqpak3znlyw7jw4cz5d9asm1rc13"))))
2052 (build-system gnu-build-system)
2054 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2055 (list (string-append "binprefix=" out)
2056 (string-append "manprefix=" out)
2058 #:phases (alist-delete 'configure %standard-phases)
2059 #:tests? #f)) ; no test suite
2060 (home-page "http://sourceforge.net/projects/hdparm/")
2061 (synopsis "Tune hard disk parameters for high performance")
2063 "Get/set device parameters for Linux SATA/IDE drives. It's primary use
2064 is for enabling irq-unmasking and IDE multiple-mode.")
2065 (license (license:non-copyleft "file://LICENSE.TXT"))))
2067 (define-public rfkill
2073 (uri (string-append "mirror://kernel.org/software/network/"
2074 name "/" name "-" version ".tar.xz"))
2077 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2078 (build-system gnu-build-system)
2080 `(#:make-flags (list "CC=gcc"
2081 (string-append "PREFIX=" %output))
2082 #:phases (modify-phases %standard-phases
2083 (delete 'configure))
2085 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2086 (synopsis "Tool for enabling and disabling wireless devices")
2088 "rfkill is a simple tool for accessing the rfkill device interface,
2089 which is used to enable and disable wireless networking devices, typically
2090 WLAN, Bluetooth and mobile broadband.")
2091 (license (license:non-copyleft "file://COPYING"
2092 "See COPYING in the distribution."))))
2094 (define-public acpid
2100 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2104 "1vl7c6vc724v4jwki17czgj6lnrknnj1a6llm8gkl32i2gnam5j3"))))
2105 (build-system gnu-build-system)
2106 (home-page "http://sourceforge.net/projects/acpid2/")
2107 (synopsis "Daemon for delivering ACPI events to user-space programs")
2109 "acpid is designed to notify user-space programs of Advanced
2110 Configuration and Power Interface (ACPI) events. acpid should be started
2111 during the system boot, and will run as a background process. When an ACPI
2112 event is received from the kernel, acpid will examine the list of rules
2113 specified in /etc/acpi/events and execute the rules that match the event.")
2114 (license license:gpl2+)))
2116 (define-public sysfsutils
2125 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2128 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2129 (build-system gnu-build-system)
2130 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2131 (synopsis "System utilities based on Linux sysfs")
2133 "These are a set of utilities built upon sysfs, a virtual filesystem in
2134 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2135 also contains the libsysfs library.")
2136 ;; The library is under lgpl2.1+ (all files say "or any later version").
2137 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2138 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2140 (define-public sysfsutils-1
2142 (inherit sysfsutils)
2149 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2150 "/sysfsutils-" version ".tar.gz"))
2152 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2153 (modules '((guix build utils)))
2156 (substitute* "Makefile.in"
2157 (("includedir = /usr/include/sysfs")
2158 "includedir = @includedir@"))
2159 (substitute* "configure"
2160 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2161 (string-append "includedir='" orig "/sysfs'")))))))
2162 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2164 (define-public cpufrequtils
2166 (name "cpufrequtils")
2173 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2176 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2177 (patches (list (search-patch "cpufrequtils-fix-aclocal.patch")))))
2178 (build-system gnu-build-system)
2180 `(("sysfsutils" ,sysfsutils-1)))
2182 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2183 (assoc-ref %outputs "out") "/lib"))))
2184 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2185 (synopsis "Utilities to get and set CPU frequency on Linux")
2187 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2188 information, and set the CPU frequency if supported, using the cpufreq
2189 capabilities of the Linux kernel.")
2190 (license license:gpl2)))
2192 (define-public libraw1394
2199 "mirror://kernel.org/linux/libs/ieee1394/"
2200 name "-" version ".tar.xz"))
2203 "0kwnf4ha45c04mhc4yla672aqmvqqihxix1gvblns5cd2pc2cc8b"))))
2204 (build-system gnu-build-system)
2205 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2206 (synopsis "Interface library for the Linux IEEE1394 drivers")
2208 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2209 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2210 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2211 send to and receive from other nodes without requiring a kernel driver for the
2212 protocol in question.")
2213 (license license:lgpl2.1+)))
2215 (define-public libavc1394
2221 (uri (string-append "mirror://sourceforge/libavc1394/"
2222 name "-" version ".tar.gz"))
2225 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2226 (build-system gnu-build-system)
2228 `(("pkg-config" ,pkg-config)))
2230 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2231 (home-page "http://sourceforge.net/projects/libavc1394/")
2232 (synopsis "AV/C protocol library for IEEE 1394")
2234 "Libavc1394 is a programming interface to the AV/C specification from
2235 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2236 (license license:lgpl2.1+)))
2238 (define-public libiec61883
2240 (name "libiec61883")
2245 "mirror://kernel.org/linux/libs/ieee1394/"
2246 name "-" version ".tar.xz"))
2249 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2250 (build-system gnu-build-system)
2252 `(("pkg-config" ,pkg-config)))
2254 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2255 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2256 (synopsis "Isochronous streaming media library for IEEE 1394")
2258 "The libiec61883 library provides a higher level API for streaming DV,
2259 MPEG-2 and audio over Linux IEEE 1394.")
2260 (license license:lgpl2.1+)))
2262 (define-public mdadm
2269 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2273 "132vdvh3myjgcjn6i9w90ck16ddjxjcszklzkyvr4f5ifqd7wfhg"))
2274 (patches (list (search-patch "mdadm-gcc-4.9-fix.patch")))))
2275 (build-system gnu-build-system)
2279 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2280 (list "INSTALL=install"
2282 ;; TODO: tell it where to find 'sendmail'
2283 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2284 (string-append "BINDIR=" out "/sbin")
2285 (string-append "MANDIR=" out "/share/man")
2286 (string-append "UDEVDIR=" out "/lib/udev")))
2287 #:phases (alist-cons-before
2288 'build 'patch-program-paths
2289 (lambda* (#:key inputs #:allow-other-keys)
2290 (let ((coreutils (assoc-ref inputs "coreutils")))
2291 (substitute* "udev-md-raid-arrays.rules"
2292 (("/usr/bin/(readlink|basename)" all program)
2293 (string-append coreutils "/bin/" program)))))
2294 (alist-delete 'configure %standard-phases))
2295 ;;tests must be done as root
2297 (home-page "http://neil.brown.name/blog/mdadm")
2298 (synopsis "Tool for managing Linux Software RAID arrays")
2300 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2301 assemble, report on, and monitor arrays. It can also move spares between raid
2302 arrays when needed.")
2303 (license license:gpl2+)))
2305 (define-public libaio
2312 (string-append "mirror://debian/pool/main/liba/libaio/"
2313 name "_" version ".orig.tar.gz")
2314 (string-append "https://fedorahosted.org/releases/l/i/libaio/"
2315 name "-" version ".tar.gz")))
2318 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
2319 (build-system gnu-build-system)
2322 (list "CC=gcc" (string-append "prefix=" %output))
2323 #:test-target "partcheck" ; need root for a full 'check'
2325 (alist-delete 'configure %standard-phases))) ; no configure script
2326 (home-page "http://lse.sourceforge.net/io/aio.html")
2327 (synopsis "Linux-native asynchronous I/O access library")
2329 "This library enables userspace to use Linux kernel asynchronous I/O
2330 system calls, important for the performance of databases and other advanced
2332 (license license:lgpl2.1+)))
2334 (define-public bluez
2341 "https://www.kernel.org/pub/linux/bluetooth/bluez-"
2345 "1wkqwmi5krr37mxcqqlp5m2xnw7vw70v3ww7j09vvlskxcdflhx3"))))
2346 (build-system gnu-build-system)
2349 (let ((out (assoc-ref %outputs "out")))
2350 (list "--enable-library"
2352 ;; Install dbus/udev files to the correct location.
2353 (string-append "--with-dbusconfdir=" out "/etc")
2354 (string-append "--with-udevdir=" out "/lib/udev")))))
2356 `(("pkg-config" ,pkg-config)
2357 ("gettext" ,gnu-gettext)))
2362 ("libical" ,libical)
2363 ("readline" ,readline)))
2364 (home-page "http://www.bluez.org/")
2365 (synopsis "Linux Bluetooth protocol stack")
2367 "BlueZ provides support for the core Bluetooth layers and protocols. It
2368 is flexible, efficient and uses a modular implementation.")
2369 (license license:gpl2+)))
2371 (define-public fuse-exfat
2377 (uri "https://docs.google.com/uc?export=download&\
2378 id=0B7CLI-REKbE3VTdaa0EzTkhYdU0")
2381 "0glmgwrf0nv09am54i6s35ksbvrywrwc51w6q32mv5by8475530r"))
2382 (file-name (string-append name "-" version ".tar.gz"))))
2383 (build-system gnu-build-system)
2386 ("pkg-config" ,pkg-config)))
2390 '(#:tests? #f ;no test suite
2392 ;; XXX: Factorize with 'exfat-utils'.
2393 #:phases (modify-phases %standard-phases
2395 (add-after 'unpack 'scons-propagate-environment
2397 ;; Modify the SConstruct file to arrange for
2398 ;; environment variables to be propagated.
2399 (substitute* "SConstruct"
2400 (("^env = Environment\\(")
2401 "env = Environment(ENV=os.environ, "))))
2404 (zero? (system* "scons"))))
2406 (lambda* (#:key outputs #:allow-other-keys)
2407 (let* ((out (assoc-ref outputs "out"))
2408 (bin (string-append out "/bin"))
2409 (man8 (string-append out
2410 "/share/man/man8")))
2413 (for-each (lambda (file)
2416 (string-append man8 "/"
2418 (find-files "." "\\.8$"))
2419 (zero? (system* "scons" "install"
2420 (string-append "DESTDIR="
2422 (home-page "http://code.google.com/p/exfat/")
2423 (synopsis "Mount exFAT file systems")
2425 "This package provides a FUSE-based file system that provides read and
2426 write access to exFAT devices.")
2427 (license license:gpl2+)))
2436 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
2437 version ".tar.bz2"))
2440 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
2441 (build-system gnu-build-system)
2443 '(#:phases (modify-phases %standard-phases
2444 (add-before 'configure 'bootstrap
2446 ;; The tarball was not generated with 'make dist' so we
2447 ;; need to bootstrap things ourselves.
2448 (and (zero? (system* "./autogen.sh"))
2450 (patch-makefile-SHELL "Makefile.include.in")
2453 ;; Make sure programs find libgpm.so.
2454 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2455 (assoc-ref %outputs "out")
2458 `(("texinfo" ,texinfo)
2461 ("autoconf" ,autoconf)
2462 ("automake" ,automake)
2463 ("libtool" ,libtool)))
2464 (home-page "http://www.nico.schottelius.org/software/gpm/")
2465 (synopsis "Mouse support for the Linux console")
2467 "The GPM (general-purpose mouse) daemon is a mouse server for
2468 applications running on the Linux console. It allows users to select items
2469 and copy/paste text in the console and in xterm.")
2470 (license license:gpl2+)))
2472 (define-public btrfs-progs
2474 (name "btrfs-progs")
2478 (uri (string-append "mirror://kernel.org/linux/kernel/"
2479 "people/kdave/btrfs-progs/"
2480 "btrfs-progs-v" version ".tar.xz"))
2483 "1z5882zx9jx02vyg067siws0irsl8pg37myx17hr4imn9ypf6r4r"))))
2484 (build-system gnu-build-system)
2486 '(#:test-target "test"
2487 #:parallel-tests? #f)) ; tests fail when run in parallel
2488 (inputs `(("e2fsprogs" ,e2fsprogs)
2489 ("libblkid" ,util-linux)
2490 ("libuuid" ,util-linux)
2493 (native-inputs `(("pkg-config" ,pkg-config)
2494 ("asciidoc" ,asciidoc)
2496 ;; For building documentation
2497 ("libxml2" ,libxml2)
2498 ("docbook-xml" ,docbook-xml)
2499 ("docbook-xsl" ,docbook-xsl)))
2500 (home-page "https://btrfs.wiki.kernel.org/")
2501 (synopsis "Create and manage btrfs copy-on-write file systems")
2502 (description "Btrfs is a copy-on-write (CoW) filesystem for Linux aimed at
2503 implementing advanced features while focusing on fault tolerance, repair and
2504 easy administration.")
2505 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
2506 ;; GPL2: Everything else.
2507 (license (list license:gpl2 license:gpl2+))))