gnu: libcap: Update to 2.24.
[jackhill/guix/guix.git] / gnu / packages / linux.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
5 ;;; Copyright © 2014, 2015 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 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
15 ;;;
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
20 ;;;
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24 (define-module (gnu packages linux)
25 #:use-module ((guix licenses)
26 #:hide (zlib))
27 #:use-module (gnu packages)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages gcc)
30 #:use-module (gnu packages flex)
31 #:use-module (gnu packages bison)
32 #:use-module (gnu packages admin)
33 #:use-module (gnu packages gperf)
34 #:use-module (gnu packages libusb)
35 #:use-module (gnu packages ncurses)
36 #:use-module (gnu packages pciutils)
37 #:use-module (gnu packages databases)
38 #:use-module (gnu packages perl)
39 #:use-module (gnu packages pkg-config)
40 #:use-module (gnu packages python)
41 #:use-module (gnu packages slang)
42 #:use-module (gnu packages algebra)
43 #:use-module (gnu packages gettext)
44 #:use-module (gnu packages glib)
45 #:use-module (gnu packages pulseaudio)
46 #:use-module (gnu packages attr)
47 #:use-module (gnu packages xml)
48 #:use-module (gnu packages autotools)
49 #:use-module (gnu packages texinfo)
50 #:use-module (gnu packages check)
51 #:use-module (gnu packages maths)
52 #:use-module (gnu packages base)
53 #:use-module (gnu packages rrdtool)
54 #:use-module (gnu packages elf)
55 #:use-module (gnu packages gtk)
56 #:use-module (gnu packages docbook)
57 #:use-module (gnu packages asciidoc)
58 #:use-module (gnu packages readline)
59 #:use-module (gnu packages calendar)
60 #:use-module (guix packages)
61 #:use-module (guix download)
62 #:use-module (guix utils)
63 #:use-module (guix build-system gnu)
64 #:use-module (guix build-system cmake)
65 #:use-module (guix build-system python)
66 #:use-module (guix build-system trivial)
67 #:use-module (srfi srfi-26)
68 #:use-module (ice-9 match))
69
70 (define-public (system->linux-architecture arch)
71 "Return the Linux architecture name for ARCH, a Guix system name such as
72 \"x86_64-linux\"."
73 (let ((arch (car (string-split arch #\-))))
74 (cond ((string=? arch "i686") "i386")
75 ((string-prefix? "mips" arch) "mips")
76 ((string-prefix? "arm" arch) "arm")
77 (else arch))))
78
79 (define (linux-libre-urls version)
80 "Return a list of URLs for Linux-Libre VERSION."
81 (list (string-append
82 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
83 version "-gnu/linux-libre-" version "-gnu.tar.xz")
84
85 ;; XXX: Work around <http://bugs.gnu.org/14851>.
86 (string-append
87 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
88 version "-gnu.tar.xz")
89
90 ;; Maybe this URL will become valid eventually.
91 (string-append
92 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
93 version "-gnu.tar.xz")))
94
95 (define-public linux-libre-headers
96 (let* ((version "3.14.37")
97 (build-phase
98 (lambda (arch)
99 `(lambda _
100 (setenv "ARCH" ,(system->linux-architecture arch))
101 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
102
103 (and (zero? (system* "make" "defconfig"))
104 (zero? (system* "make" "mrproper" "headers_check"))))))
105 (install-phase
106 `(lambda* (#:key outputs #:allow-other-keys)
107 (let ((out (assoc-ref outputs "out")))
108 (and (zero? (system* "make"
109 (string-append "INSTALL_HDR_PATH=" out)
110 "headers_install"))
111 (begin
112 (mkdir (string-append out "/include/config"))
113 (call-with-output-file
114 (string-append out
115 "/include/config/kernel.release")
116 (lambda (p)
117 (format p "~a-default~%" ,version)))
118
119 ;; Remove the '.install' and '..install.cmd' files; the
120 ;; latter contains store paths, which pulls in bootstrap
121 ;; binaries in the build environment, and prevents bit
122 ;; reproducibility for the bootstrap binaries.
123 (for-each delete-file (find-files out "\\.install"))
124
125 #t))))))
126 (package
127 (name "linux-libre-headers")
128 (version version)
129 (source (origin
130 (method url-fetch)
131 (uri (linux-libre-urls version))
132 (sha256
133 (base32
134 "1blxr2bsvfqi9khj4cpspv434bmx252zak2wsbi2mgl60zh77gza"))))
135 (build-system gnu-build-system)
136 (native-inputs `(("perl" ,perl)))
137 (arguments
138 `(#:modules ((guix build gnu-build-system)
139 (guix build utils)
140 (srfi srfi-1))
141 #:phases (alist-replace
142 'build ,(build-phase (or (%current-target-system)
143 (%current-system)))
144 (alist-replace
145 'install ,install-phase
146 (alist-delete 'configure %standard-phases)))
147 #:allowed-references ()
148 #:tests? #f))
149 (synopsis "GNU Linux-Libre kernel headers")
150 (description "Headers of the Linux-Libre kernel.")
151 (license gpl2)
152 (home-page "http://www.gnu.org/software/linux-libre/"))))
153
154 (define-public module-init-tools
155 (package
156 (name "module-init-tools")
157 (version "3.16")
158 (source (origin
159 (method url-fetch)
160 (uri (string-append
161 "mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-"
162 version ".tar.bz2"))
163 (sha256
164 (base32
165 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
166 (patches
167 (list (search-patch "module-init-tools-moduledir.patch")))))
168 (build-system gnu-build-system)
169 (arguments
170 ;; FIXME: The upstream tarball lacks man pages, and building them would
171 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
172 ;; but they vanished. In the meantime, fake it.
173 '(#:phases (alist-cons-before
174 'configure 'fake-docbook
175 (lambda _
176 (substitute* "Makefile.in"
177 (("^DOCBOOKTOMAN.*$")
178 "DOCBOOKTOMAN = true\n")))
179 %standard-phases)))
180 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
181 (synopsis "Tools for loading and managing Linux kernel modules")
182 (description
183 "Tools for loading and managing Linux kernel modules, such as `modprobe',
184 `insmod', `lsmod', and more.")
185 (license gpl2+)))
186
187 (define %boot-logo-patch
188 ;; Linux-Libre boot logo featuring Freedo and a gnu.
189 (origin
190 (method url-fetch)
191 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
192 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
193 (sha256
194 (base32
195 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
196
197 (define (kernel-config system)
198 "Return the absolute file name of the Linux-Libre build configuration file
199 for SYSTEM, or #f if there is no configuration for SYSTEM."
200 (define (lookup file)
201 (let ((file (string-append "gnu/packages/" file)))
202 (search-path %load-path file)))
203
204 (match system
205 ("i686-linux"
206 (lookup "linux-libre-i686.conf"))
207 ("x86_64-linux"
208 (lookup "linux-libre-x86_64.conf"))
209 (_
210 #f)))
211
212 (define-public linux-libre
213 (let* ((version "4.1.6")
214 (build-phase
215 '(lambda* (#:key system inputs #:allow-other-keys #:rest args)
216 ;; Apply the neat patch.
217 (system* "patch" "-p1" "--force"
218 "-i" (assoc-ref inputs "patch/freedo+gnu"))
219
220 (let ((arch (car (string-split system #\-))))
221 (setenv "ARCH"
222 (cond ((string=? arch "i686") "i386")
223 (else arch)))
224 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
225
226 (let ((build (assoc-ref %standard-phases 'build))
227 (config (assoc-ref inputs "kconfig")))
228
229 ;; Use the architecture-specific config if available, and
230 ;; 'defconfig' otherwise.
231 (if config
232 (begin
233 (copy-file config ".config")
234 (chmod ".config" #o666))
235 (system* "make" "defconfig"))
236
237 ;; Appending works even when the option wasn't in the
238 ;; file. The last one prevails if duplicated.
239 (let ((port (open-file ".config" "a")))
240 (display (string-append "CONFIG_NET_9P=m\n"
241 "CONFIG_NET_9P_VIRTIO=m\n"
242 "CONFIG_VIRTIO_BLK=m\n"
243 "CONFIG_VIRTIO_NET=m\n"
244 ;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
245 "CONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n"
246 "CONFIG_VIRTIO_PCI=m\n"
247 "CONFIG_VIRTIO_BALLOON=m\n"
248 "CONFIG_VIRTIO_MMIO=m\n"
249 "CONFIG_FUSE_FS=m\n"
250 "CONFIG_CIFS=m\n"
251 "CONFIG_9P_FS=m\n")
252 port)
253 (close-port port))
254
255 (zero? (system* "make" "oldconfig"))
256
257 ;; Call the default `build' phase so `-j' is correctly
258 ;; passed.
259 (apply build #:make-flags "all" args))))
260 (install-phase
261 `(lambda* (#:key inputs outputs #:allow-other-keys)
262 (let* ((out (assoc-ref outputs "out"))
263 (moddir (string-append out "/lib/modules"))
264 (mit (assoc-ref inputs "module-init-tools")))
265 (mkdir-p moddir)
266 (for-each (lambda (file)
267 (copy-file file
268 (string-append out "/" (basename file))))
269 (find-files "." "^(bzImage|System\\.map)$"))
270 (copy-file ".config" (string-append out "/config"))
271 (zero? (system* "make"
272 (string-append "DEPMOD=" mit "/sbin/depmod")
273 (string-append "MODULE_DIR=" moddir)
274 (string-append "INSTALL_PATH=" out)
275 (string-append "INSTALL_MOD_PATH=" out)
276 "INSTALL_MOD_STRIP=1"
277 "modules_install"))))))
278 (package
279 (name "linux-libre")
280 (version version)
281 (source (origin
282 (method url-fetch)
283 (uri (linux-libre-urls version))
284 (sha256
285 (base32
286 "07gmpy32v90bx78bm1khc1hw7x0akdh2sxpkxkavwj4fjc6f732v"))))
287 (build-system gnu-build-system)
288 (native-inputs `(("perl" ,perl)
289 ("bc" ,bc)
290 ("module-init-tools" ,module-init-tools)
291 ("patch/freedo+gnu" ,%boot-logo-patch)
292
293 ,@(let ((conf (kernel-config (or (%current-target-system)
294 (%current-system)))))
295 (if conf
296 `(("kconfig" ,conf))
297 '()))))
298 (arguments
299 `(#:modules ((guix build gnu-build-system)
300 (guix build utils)
301 (srfi srfi-1)
302 (ice-9 match))
303 #:phases (alist-replace
304 'build ,build-phase
305 (alist-replace
306 'install ,install-phase
307 (alist-delete 'configure %standard-phases)))
308 #:tests? #f))
309 (synopsis "100% free redistribution of a cleaned Linux kernel")
310 (description
311 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
312 It has been modified to remove all non-free binary blobs.")
313 (license gpl2)
314 (home-page "http://www.gnu.org/software/linux-libre/"))))
315
316 \f
317 ;;;
318 ;;; Pluggable authentication modules (PAM).
319 ;;;
320
321 (define-public linux-pam
322 (package
323 (name "linux-pam")
324 (version "1.1.6")
325 (source
326 (origin
327 (method url-fetch)
328 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
329 version ".tar.bz2")
330 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
331 version ".tar.bz2")))
332 (sha256
333 (base32
334 "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s"))))
335 (build-system gnu-build-system)
336 (native-inputs
337 `(("flex" ,flex)
338
339 ;; TODO: optional dependencies
340 ;; ("libxcrypt" ,libxcrypt)
341 ;; ("cracklib" ,cracklib)
342 ))
343 (arguments
344 '(;; Most users, such as `shadow', expect the headers to be under
345 ;; `security'.
346 #:configure-flags (list (string-append "--includedir="
347 (assoc-ref %outputs "out")
348 "/include/security"))
349
350 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
351 ;; isn't available.
352 #:tests? #f))
353 (home-page "http://www.linux-pam.org/")
354 (synopsis "Pluggable authentication modules for Linux")
355 (description
356 "A *Free* project to implement OSF's RFC 86.0.
357 Pluggable authentication modules are small shared object files that can
358 be used through the PAM API to perform tasks, like authenticating a user
359 at login. Local and dynamic reconfiguration are its key features.")
360 (license bsd-3)))
361
362
363 ;;;
364 ;;; Miscellaneous.
365 ;;;
366
367 (define-public psmisc
368 (package
369 (name "psmisc")
370 (version "22.20")
371 (source
372 (origin
373 (method url-fetch)
374 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
375 version ".tar.gz"))
376 (sha256
377 (base32
378 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
379 (build-system gnu-build-system)
380 (inputs `(("ncurses" ,ncurses)))
381 (home-page "http://psmisc.sourceforge.net/")
382 (synopsis
383 "Small utilities that use the proc filesystem")
384 (description
385 "This PSmisc package is a set of some small useful utilities that
386 use the proc filesystem. We're not about changing the world, but
387 providing the system administrator with some help in common tasks.")
388 (license gpl2+)))
389
390 (define-public util-linux
391 (package
392 (name "util-linux")
393 (version "2.25.2")
394 (source (origin
395 (method url-fetch)
396 (uri (string-append "mirror://kernel.org/linux/utils/"
397 name "/v" (version-major+minor version) "/"
398 name "-" version ".tar.xz"))
399 (sha256
400 (base32
401 "1miwwdq1zwvhf0smrxx3fjddq3mz22s8rc5cw54s7x3kbdqpyig0"))
402 (patches (list (search-patch "util-linux-tests.patch")))
403 (modules '((guix build utils)))
404 (snippet
405 ;; We take the 'logger' program from GNU Inetutils and 'kill'
406 ;; from GNU Coreutils.
407 '(substitute* "configure"
408 (("build_logger=yes") "build_logger=no")
409 (("build_kill=yes") "build_kill=no")))))
410 (build-system gnu-build-system)
411 (arguments
412 `(#:configure-flags (list "--disable-use-tty-group"
413 "--enable-ddate"
414
415 ;; Install completions where our
416 ;; bash-completion package expects them.
417 (string-append "--with-bashcompletiondir="
418 (assoc-ref %outputs "out")
419 "/etc/bash_completion.d"))
420 #:phases (modify-phases %standard-phases
421 (add-before
422 'build 'set-umount-file-name
423 (lambda* (#:key outputs #:allow-other-keys)
424 ;; Tell 'eject' the right file name of 'umount'.
425 (let ((out (assoc-ref outputs "out")))
426 (substitute* "sys-utils/eject.c"
427 (("\"/bin/umount\"")
428 (string-append "\"" out "/bin/umount\"")))
429 #t)))
430 (add-before
431 'check 'pre-check
432 (lambda* (#:key inputs outputs #:allow-other-keys)
433 (let ((out (assoc-ref outputs "out"))
434 (net (assoc-ref inputs "net-base")))
435 ;; Change the test to refer to the right file.
436 (substitute* "tests/ts/misc/mcookie"
437 (("/etc/services")
438 (string-append net "/etc/services")))
439 #t))))))
440 (inputs `(("zlib" ,zlib)
441 ("ncurses" ,ncurses)))
442 (native-inputs
443 `(("perl" ,perl)
444 ("net-base" ,net-base))) ;for tests
445 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
446 (synopsis "Collection of utilities for the Linux kernel")
447 (description
448 "Util-linux is a random collection of utilities for the Linux kernel.")
449
450 ;; Note that util-linux doesn't use the same license for all the
451 ;; code. GPLv2+ is the default license for a code without an
452 ;; explicitly defined license.
453 (license (list gpl3+ gpl2+ gpl2 lgpl2.0+
454 bsd-4 public-domain))))
455
456 (define-public procps
457 (package
458 (name "procps")
459 (version "3.2.8")
460 (source (origin
461 (method url-fetch)
462 ;; A mirror://sourceforge URI doesn't work, presumably becuase
463 ;; the SourceForge project is misconfigured.
464 (uri (string-append "http://procps.sourceforge.net/procps-"
465 version ".tar.gz"))
466 (sha256
467 (base32
468 "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i"))
469 (patches (list (search-patch "procps-make-3.82.patch")))))
470 (build-system gnu-build-system)
471 (inputs `(("ncurses" ,ncurses)))
472 (arguments
473 '(#:modules ((guix build utils)
474 (guix build gnu-build-system)
475 (srfi srfi-1)
476 (srfi srfi-26))
477 #:phases (alist-replace
478 'configure
479 (lambda* (#:key outputs #:allow-other-keys)
480 ;; No `configure', just a single Makefile.
481 (let ((out (assoc-ref outputs "out")))
482 (substitute* "Makefile"
483 (("/usr/") "/")
484 (("--(owner|group) 0") "")
485 (("ldconfig") "true")
486 (("^LDFLAGS[[:blank:]]*:=(.*)$" _ value)
487 ;; Add libproc to the RPATH.
488 (string-append "LDFLAGS := -Wl,-rpath="
489 out "/lib" value))))
490 (setenv "CC" "gcc"))
491 (alist-replace
492 'install
493 (lambda* (#:key outputs #:allow-other-keys)
494 (let ((out (assoc-ref outputs "out")))
495 (and (zero?
496 (system* "make" "install"
497 (string-append "DESTDIR=" out)))
498
499 ;; Remove commands and man pages redundant with
500 ;; Coreutils.
501 (let ((dup (append-map (cut find-files out <>)
502 '("^kill" "^uptime"))))
503 (for-each delete-file dup)
504 #t)
505
506 ;; Sanity check.
507 (zero?
508 (system* (string-append out "/bin/ps")
509 "--version")))))
510 %standard-phases))
511
512 ;; What did you expect? Tests?
513 #:tests? #f))
514 (home-page "http://procps.sourceforge.net/")
515 (synopsis "Utilities that give information about processes")
516 (description
517 "Procps is the package that has a bunch of small useful utilities
518 that give information about processes using the Linux /proc file system.
519 The package includes the programs ps, top, vmstat, w, kill, free,
520 slabtop, and skill.")
521 (license gpl2)))
522
523 (define-public usbutils
524 (package
525 (name "usbutils")
526 (version "006")
527 (source
528 (origin
529 (method url-fetch)
530 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
531 "usbutils-" version ".tar.xz"))
532 (sha256
533 (base32
534 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
535 (build-system gnu-build-system)
536 (inputs
537 `(("libusb" ,libusb)))
538 (native-inputs
539 `(("pkg-config" ,pkg-config)))
540 (home-page "http://www.linux-usb.org/")
541 (synopsis
542 "Tools for working with USB devices, such as lsusb")
543 (description
544 "Tools for working with USB devices, such as lsusb.")
545 (license gpl2+)))
546
547 (define-public e2fsprogs
548 (package
549 (name "e2fsprogs")
550 (version "1.42.13")
551 (source (origin
552 (method url-fetch)
553 (uri (string-append
554 "mirror://kernel.org/linux/kernel/people/tytso/"
555 name "/v" version "/"
556 name "-" version ".tar.xz"))
557 (sha256
558 (base32
559 "1ix0b83zgw5n0p2grh2961c6796m92yr2jqc2sbr23x3lfsp8r71"))
560 (modules '((guix build utils)))
561 (snippet
562 '(substitute* "MCONFIG.in"
563 (("INSTALL_SYMLINK = /bin/sh")
564 "INSTALL_SYMLINK = sh")))))
565 (build-system gnu-build-system)
566 (inputs `(("util-linux" ,util-linux)))
567 (native-inputs `(("pkg-config" ,pkg-config)
568 ("texinfo" ,texinfo))) ;for the libext2fs Info manual
569 (arguments
570 '(;; util-linux is not the preferred source for some of the libraries and
571 ;; commands, so disable them (see, e.g.,
572 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b336339909c90559b7db40b455f172>.)
573 #:configure-flags '("--disable-libblkid"
574 "--disable-libuuid" "--disable-uuidd"
575 "--disable-fsck"
576
577 ;; Install libext2fs et al.
578 "--enable-elf-shlibs")
579
580 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
581 (assoc-ref %outputs "out")
582 "/lib"))
583
584 #:phases (alist-cons-before
585 'configure 'patch-shells
586 (lambda _
587 (substitute* "configure"
588 (("/bin/sh (.*)parse-types.sh" _ dir)
589 (string-append (which "sh") " " dir
590 "parse-types.sh")))
591 (substitute* (find-files "." "^Makefile.in$")
592 (("#!/bin/sh")
593 (string-append "#!" (which "sh")))))
594 (alist-cons-after
595 'install 'install-libs
596 (lambda* (#:key outputs #:allow-other-keys)
597 (let* ((out (assoc-ref outputs "out"))
598 (lib (string-append out "/lib")))
599 (and (zero? (system* "make" "install-libs"))
600
601 ;; Make the .a writable so that 'strip' works.
602 ;; Failing to do that, due to debug symbols, we
603 ;; retain a reference to the final
604 ;; linux-libre-headers, which refer to the
605 ;; bootstrap binaries.
606 (let ((archives (find-files lib "\\.a$")))
607 (for-each (lambda (file)
608 (chmod file #o666))
609 archives)
610 #t))))
611 %standard-phases))
612
613 ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
614 ;; they fail because we get an extra line that says "Can't check if
615 ;; filesystem is mounted due to missing mtab file".
616 #:tests? #f))
617 (home-page "http://e2fsprogs.sourceforge.net/")
618 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
619 (description
620 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
621 (license (list gpl2 ; programs
622 lgpl2.0 ; libext2fs
623 x11)))) ; libuuid
624
625 (define e2fsprogs/static
626 (static-package
627 (package (inherit e2fsprogs)
628 (arguments
629 ;; Do not build shared libraries.
630 (substitute-keyword-arguments (package-arguments e2fsprogs)
631 ((#:configure-flags _)
632 '(list "--disable-blkid"))
633 ((#:make-flags _)
634 '(list)))))))
635
636 (define-public e2fsck/static
637 (package
638 (name "e2fsck-static")
639 (version (package-version e2fsprogs))
640 (build-system trivial-build-system)
641 (source #f)
642 (arguments
643 `(#:modules ((guix build utils))
644 #:builder
645 (begin
646 (use-modules (guix build utils)
647 (ice-9 ftw)
648 (srfi srfi-26))
649
650 (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs")
651 "/sbin"))
652 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
653 (mkdir-p bin)
654 (with-directory-excursion bin
655 (for-each (lambda (file)
656 (copy-file (string-append source "/" file)
657 file)
658 (remove-store-references file)
659 (chmod file #o555))
660 (scandir source (cut string-prefix? "fsck." <>))))))))
661 (inputs `(("e2fsprogs" ,e2fsprogs/static)))
662 (synopsis "Statically-linked fsck.* commands from e2fsprogs")
663 (description
664 "This package provides statically-linked command of fsck.ext[234] taken
665 from the e2fsprogs package. It is meant to be used in initrds.")
666 (home-page (package-home-page e2fsprogs))
667 (license (package-license e2fsprogs))))
668
669 (define-public extundelete
670 (package
671 (name "extundelete")
672 (version "0.2.4")
673 (source (origin
674 (method url-fetch)
675 (uri (string-append "mirror://sourceforge/extundelete/"
676 version "/extundelete-" version ".tar.bz2"))
677 (sha256
678 (base32
679 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
680 (build-system gnu-build-system)
681 (inputs `(("e2fsprogs" ,e2fsprogs)))
682 (home-page "http://extundelete.sourceforge.net/")
683 (synopsis "Recover deleted files from ext2/3/4 partitions")
684 (description
685 "Extundelete is a set of tools that can recover deleted files from an
686 ext3 or ext4 partition.")
687 (license gpl2)))
688
689 (define-public zerofree
690 (package
691 (name "zerofree")
692 (version "1.0.3")
693 (home-page "http://intgat.tigress.co.uk/rmy/uml/")
694 (source (origin
695 (method url-fetch)
696 (uri (string-append home-page name "-" version
697 ".tgz"))
698 (sha256
699 (base32
700 "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs"))))
701 (build-system gnu-build-system)
702 (arguments
703 '(#:phases (alist-replace
704 'install
705 (lambda* (#:key outputs #:allow-other-keys)
706 (let* ((out (assoc-ref outputs "out"))
707 (bin (string-append out "/bin")))
708 (mkdir-p bin)
709 (copy-file "zerofree"
710 (string-append bin "/zerofree"))
711 (chmod (string-append bin "/zerofree")
712 #o555)
713 #t))
714 (alist-delete 'configure %standard-phases))
715 #:tests? #f)) ;no tests
716 (inputs `(("libext2fs" ,e2fsprogs)))
717 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
718 (description
719 "The zerofree command scans the free blocks in an ext2 file system and
720 fills any non-zero blocks with zeroes. This is a useful way to make disk
721 images more compressible.")
722 (license gpl2)))
723
724 (define-public strace
725 (package
726 (name "strace")
727 (version "4.7")
728 (source (origin
729 (method url-fetch)
730 (uri (string-append "mirror://sourceforge/strace/strace-"
731 version ".tar.xz"))
732 (sha256
733 (base32
734 "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
735 (build-system gnu-build-system)
736 (native-inputs `(("perl" ,perl)))
737 (home-page "http://strace.sourceforge.net/")
738 (synopsis "System call tracer for Linux")
739 (description
740 "strace is a system call tracer, i.e. a debugging tool which prints out a
741 trace of all the system calls made by a another process/program.")
742 (license bsd-3)))
743
744 (define-public ltrace
745 (package
746 (name "ltrace")
747 (version "0.7.3")
748 (source (origin
749 (method url-fetch)
750 (uri (string-append "http://www.ltrace.org/ltrace_" version
751 ".orig.tar.bz2"))
752 (sha256
753 (base32
754 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
755 (build-system gnu-build-system)
756 (inputs `(("libelf" ,libelf)))
757 (arguments
758 ;; Compilation uses -Werror by default, but it fails.
759 '(#:configure-flags '("--disable-werror")))
760 (home-page "http://www.ltrace.org/")
761 (synopsis "Library call tracer for Linux")
762 (description
763 "ltrace intercepts and records dynamic library calls which are called by
764 an executed process and the signals received by that process. It can also
765 intercept and print the system calls executed by the program.")
766 (license gpl2+)))
767
768 (define-public alsa-lib
769 (package
770 (name "alsa-lib")
771 (version "1.0.27.1")
772 (source (origin
773 (method url-fetch)
774 (uri (string-append
775 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
776 version ".tar.bz2"))
777 (sha256
778 (base32
779 "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9"))
780 (patches (list (search-patch "alsa-lib-mips-atomic-fix.patch")))))
781 (build-system gnu-build-system)
782 (home-page "http://www.alsa-project.org/")
783 (synopsis "The Advanced Linux Sound Architecture libraries")
784 (description
785 "The Advanced Linux Sound Architecture (ALSA) provides audio and
786 MIDI functionality to the Linux-based operating system.")
787 (license lgpl2.1+)))
788
789 (define-public alsa-utils
790 (package
791 (name "alsa-utils")
792 (version "1.0.27.2")
793 (source (origin
794 (method url-fetch)
795 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-"
796 version ".tar.bz2"))
797 (sha256
798 (base32
799 "1sjjngnq50jv5ilwsb4zys6smifni3bd6fn28gbnhfrg14wsrgq2"))))
800 (build-system gnu-build-system)
801 (arguments
802 ;; XXX: Disable man page creation until we have DocBook.
803 '(#:configure-flags (list "--disable-xmlto"
804
805 ;; The udev rule is responsible for restoring
806 ;; the volume.
807 (string-append "--with-udev-rules-dir="
808 (assoc-ref %outputs "out")
809 "/lib/udev/rules.d"))
810 #:phases (alist-cons-before
811 'install 'pre-install
812 (lambda _
813 ;; Don't try to mkdir /var/lib/alsa.
814 (substitute* "Makefile"
815 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
816 "true\n")))
817 %standard-phases)))
818 (inputs
819 `(("libsamplerate" ,libsamplerate)
820 ("ncurses" ,ncurses)
821 ("alsa-lib" ,alsa-lib)
822 ("xmlto" ,xmlto)
823 ("gettext" ,gnu-gettext)))
824 (home-page "http://www.alsa-project.org/")
825 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
826 (description
827 "The Advanced Linux Sound Architecture (ALSA) provides audio and
828 MIDI functionality to the Linux-based operating system.")
829
830 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
831 ;; GPLv2-only.
832 (license gpl2)))
833
834 (define-public iptables
835 (package
836 (name "iptables")
837 (version "1.4.16.2")
838 (source (origin
839 (method url-fetch)
840 (uri (string-append
841 "http://www.netfilter.org/projects/iptables/files/iptables-"
842 version ".tar.bz2"))
843 (sha256
844 (base32
845 "0vkg5lzkn4l3i1sm6v3x96zzvnv9g7mi0qgj6279ld383mzcws24"))))
846 (build-system gnu-build-system)
847 (arguments
848 '(#:tests? #f ; no test suite
849 #:configure-flags ; add $libdir to the RUNPATH of executables
850 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
851 (home-page "http://www.netfilter.org/projects/iptables/index.html")
852 (synopsis "Program to configure the Linux IP packet filtering rules")
853 (description
854 "iptables is the userspace command line program used to configure the
855 Linux 2.4.x and later IPv4 packet filtering ruleset. It is targeted towards
856 system administrators. Since Network Address Translation is also configured
857 from the packet filter ruleset, iptables is used for this, too. The iptables
858 package also includes ip6tables. ip6tables is used for configuring the IPv6
859 packet filter.")
860 (license gpl2+)))
861
862 (define-public iproute
863 (package
864 (name "iproute2")
865 (version "3.12.0")
866 (source (origin
867 (method url-fetch)
868 (uri (string-append
869 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
870 version ".tar.xz"))
871 (sha256
872 (base32
873 "04gi11gh087bg2nlxhj0lxrk8l9qxkpr88nsiil23917bm3h1xj4"))))
874 (build-system gnu-build-system)
875 (arguments
876 `(#:tests? #f ; no test suite
877 #:make-flags (let ((out (assoc-ref %outputs "out")))
878 (list "DESTDIR="
879 (string-append "LIBDIR=" out "/lib")
880 (string-append "SBINDIR=" out "/sbin")
881 (string-append "CONFDIR=" out "/etc")
882 (string-append "DOCDIR=" out "/share/doc/"
883 ,name "-" ,version)
884 (string-append "MANDIR=" out "/share/man")))
885 #:phases (alist-cons-before
886 'install 'pre-install
887 (lambda _
888 ;; Don't attempt to create /var/lib/arpd.
889 (substitute* "Makefile"
890 (("^.*ARPDDIR.*$") "")))
891 %standard-phases)))
892 (inputs
893 `(("iptables" ,iptables)
894 ("db4" ,bdb)))
895 (native-inputs
896 `(("pkg-config" ,pkg-config)
897 ("flex" ,flex)
898 ("bison" ,bison)))
899 (home-page
900 "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
901 (synopsis
902 "Utilities for controlling TCP/IP networking and traffic in Linux")
903 (description
904 "Iproute2 is a collection of utilities for controlling TCP/IP
905 networking and traffic with the Linux kernel.
906
907 Most network configuration manuals still refer to ifconfig and route as the
908 primary network configuration tools, but ifconfig is known to behave
909 inadequately in modern network environments. They should be deprecated, but
910 most distros still include them. Most network configuration systems make use
911 of ifconfig and thus provide a limited feature set. The /etc/net project aims
912 to support most modern network technologies, as it doesn't use ifconfig and
913 allows a system administrator to make use of all iproute2 features, including
914 traffic control.
915
916 iproute2 is usually shipped in a package called iproute or iproute2 and
917 consists of several tools, of which the most important are ip and tc. ip
918 controls IPv4 and IPv6 configuration and tc stands for traffic control. Both
919 tools print detailed usage messages and are accompanied by a set of
920 manpages.")
921 (license gpl2+)))
922
923 (define-public net-tools
924 ;; XXX: This package is basically unmaintained, but it provides a few
925 ;; commands not yet provided by Inetutils, such as 'route', so we have to
926 ;; live with it.
927 (package
928 (name "net-tools")
929 (version "1.60")
930 (home-page "http://www.tazenda.demon.co.uk/phil/net-tools/")
931 (source (origin
932 (method url-fetch)
933 (uri (string-append home-page "/" name "-"
934 version ".tar.bz2"))
935 (sha256
936 (base32
937 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
938 (patches
939 (list (search-patch "net-tools-bitrot.patch")))))
940 (build-system gnu-build-system)
941 (arguments
942 '(#:modules ((guix build gnu-build-system)
943 (guix build utils)
944 (srfi srfi-1)
945 (srfi srfi-26))
946 #:phases (alist-cons-after
947 'unpack 'patch
948 (lambda* (#:key inputs #:allow-other-keys)
949 (define (apply-patch file)
950 (zero? (system* "patch" "-p1" "--force"
951 "--input" file)))
952
953 (let ((patch.gz (assoc-ref inputs "patch")))
954 (format #t "applying Debian patch set '~a'...~%"
955 patch.gz)
956 (system (string-append "gunzip < " patch.gz " > the-patch"))
957 (and (apply-patch "the-patch")
958 (for-each apply-patch
959 (find-files "debian/patches"
960 "\\.patch")))))
961 (alist-replace
962 'configure
963 (lambda* (#:key outputs #:allow-other-keys)
964 (let ((out (assoc-ref outputs "out")))
965 (mkdir-p (string-append out "/bin"))
966 (mkdir-p (string-append out "/sbin"))
967
968 ;; Pretend we have everything...
969 (system "yes | make config")
970
971 ;; ... except for the things we don't have.
972 ;; HAVE_AFDECnet requires libdnet, which we don't have.
973 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
974 ;; that have been removed.
975 (substitute* '("config.make" "config.h")
976 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") ""))))
977 (alist-cons-after
978 'install 'remove-redundant-commands
979 (lambda* (#:key outputs #:allow-other-keys)
980 ;; Remove commands and man pages redundant with
981 ;; Inetutils.
982 (let* ((out (assoc-ref outputs "out"))
983 (dup (append-map (cut find-files out <>)
984 '("^hostname"
985 "^(yp|nis|dns)?domainname"))))
986 (for-each delete-file dup)
987 #t))
988 %standard-phases)))
989
990 ;; Binaries that depend on libnet-tools.a don't declare that
991 ;; dependency, making it parallel-unsafe.
992 #:parallel-build? #f
993
994 #:tests? #f ; no test suite
995 #:make-flags (let ((out (assoc-ref %outputs "out")))
996 (list "CC=gcc"
997 (string-append "BASEDIR=" out)
998 (string-append "INSTALLNLSDIR=" out "/share/locale")
999 (string-append "mandir=/share/man")))))
1000
1001 ;; Use the big Debian patch set (the thing does not even compile out of
1002 ;; the box.)
1003 (inputs `(("patch" ,(origin
1004 (method url-fetch)
1005 (uri
1006 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
1007 (sha256
1008 (base32
1009 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
1010 (native-inputs `(("gettext" ,gnu-gettext)))
1011
1012 (synopsis "Tools for controlling the network subsystem in Linux")
1013 (description
1014 "This package includes the important tools for controlling the network
1015 subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
1016 netstat, rarp and route. Additionally, this package contains utilities
1017 relating to particular network hardware types (plipconfig, slattach) and
1018 advanced aspects of IP configuration (iptunnel, ipmaddr).")
1019 (license gpl2+)))
1020
1021 (define-public libcap
1022 (package
1023 (name "libcap")
1024 (version "2.24")
1025 (source (origin
1026 (method url-fetch)
1027 (uri (string-append
1028 "mirror://kernel.org/linux/libs/security/linux-privs/"
1029 "libcap2/libcap-" version ".tar.xz"))
1030 (sha256
1031 (base32
1032 "0rbc9qbqs5bp9am9s9g83wxj5k4ixps2agy9dxr1v1fwg27mdr6f"))))
1033 (build-system gnu-build-system)
1034 (arguments '(#:phases
1035 (modify-phases %standard-phases
1036 (replace 'configure
1037 ;; Add $libdir to the RUNPATH of executables.
1038 (lambda _
1039 (substitute* "Make.Rules"
1040 (("LDFLAGS := #-g")
1041 (string-append "LDFLAGS := -Wl,-rpath="
1042 %output "/lib"))))))
1043 #:tests? #f ; no 'check' target
1044 #:make-flags (list "lib=lib"
1045 (string-append "prefix="
1046 (assoc-ref %outputs "out"))
1047 "RAISE_SETFCAP=no")))
1048 (native-inputs `(("perl" ,perl)))
1049 (inputs `(("attr" ,attr)))
1050 (home-page "https://sites.google.com/site/fullycapable/")
1051 (synopsis "Library for working with POSIX capabilities")
1052 (description
1053 "Libcap2 provides a programming interface to POSIX capabilities on
1054 Linux-based operating systems.")
1055
1056 ;; License is BSD-3 or GPLv2, at the user's choice.
1057 (license gpl2)))
1058
1059 (define-public bridge-utils
1060 (package
1061 (name "bridge-utils")
1062 (version "1.5")
1063 (source (origin
1064 (method url-fetch)
1065 (uri (string-append "mirror://sourceforge/bridge/bridge-utils-"
1066 version ".tar.gz"))
1067 (sha256
1068 (base32
1069 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1070 (build-system gnu-build-system)
1071
1072 ;; The tarball lacks all the generated files.
1073 (native-inputs `(("autoconf" ,autoconf)
1074 ("automake" ,automake)))
1075 (arguments
1076 '(#:phases (alist-cons-after
1077 'unpack 'bootstrap
1078 (lambda _
1079 ;; Fix "field ‘ip6’ has incomplete type" errors.
1080 (substitute* "libbridge/libbridge.h"
1081 (("#include <linux/if_bridge.h>")
1082 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1083
1084 ;; Ensure that the entire build fails if one of the
1085 ;; sub-Makefiles fails.
1086 (substitute* "Makefile.in"
1087 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1088 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1089
1090 (zero? (system* "autoreconf" "-vf")))
1091 %standard-phases)
1092 #:tests? #f)) ; no 'check' target
1093
1094 (home-page
1095 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1096 (synopsis "Manipulate Ethernet bridges")
1097 (description
1098 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1099 to connect two Ethernet segments together in a protocol independent way.
1100 Packets are forwarded based on Ethernet address, rather than IP address (like
1101 a router). Since forwarding is done at Layer 2, all protocols can go
1102 transparently through a bridge.")
1103 (license gpl2+)))
1104
1105 (define-public libnl
1106 (package
1107 (name "libnl")
1108 (version "3.2.25")
1109 (source (origin
1110 (method url-fetch)
1111 (uri (string-append
1112 "http://www.infradead.org/~tgr/libnl/files/libnl-"
1113 version ".tar.gz"))
1114 (sha256
1115 (base32
1116 "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb"))))
1117 (build-system gnu-build-system)
1118 (native-inputs `(("flex" ,flex) ("bison" ,bison)))
1119 (home-page "http://www.infradead.org/~tgr/libnl/")
1120 (synopsis "NetLink protocol library suite")
1121 (description
1122 "The libnl suite is a collection of libraries providing APIs to netlink
1123 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1124 between the kernel and user space processes. It was designed to be a more
1125 flexible successor to ioctl to provide mainly networking related kernel
1126 configuration and monitoring interfaces.")
1127
1128 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1129 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1130 (license gpl2)))
1131
1132 (define-public iw
1133 (package
1134 (name "iw")
1135 (version "3.17")
1136 (source (origin
1137 (method url-fetch)
1138 (uri (string-append
1139 "https://www.kernel.org/pub/software/network/iw/iw-"
1140 version ".tar.xz"))
1141 (sha256
1142 (base32
1143 "14zsapqhivk0ws5z21y1ys2c2czi05mzk7bl2yb7qxcfrnsjx9j8"))))
1144 (build-system gnu-build-system)
1145 (native-inputs `(("pkg-config" ,pkg-config)))
1146 (inputs `(("libnl" ,libnl)))
1147 (arguments
1148 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1149 "CC=gcc")
1150 #:phases (alist-delete 'configure %standard-phases)))
1151 (home-page "http://wireless.kernel.org/en/users/Documentation/iw")
1152 (synopsis "Tool for configuring wireless devices")
1153 (description
1154 "iw is a new nl80211 based CLI configuration utility for wireless
1155 devices. It replaces 'iwconfig', which is deprecated.")
1156 (license isc)))
1157
1158 (define-public powertop
1159 (package
1160 (name "powertop")
1161 (version "2.5")
1162 (source
1163 (origin
1164 (method url-fetch)
1165 (uri (string-append
1166 "https://01.org/powertop/sites/default/files/downloads/powertop-"
1167 version ".tar.gz"))
1168 (sha256
1169 (base32
1170 "02rwqbpasdayl201v0549gbp2f82rd0hqiv3i111r7npanjhhb4b"))))
1171 (build-system gnu-build-system)
1172 (inputs
1173 ;; TODO: Add pciutils.
1174 `(("zlib" ,zlib)
1175 ;; ("pciutils" ,pciutils)
1176 ("ncurses" ,ncurses)
1177 ("libnl" ,libnl)))
1178 (native-inputs
1179 `(("pkg-config" ,pkg-config)))
1180 (home-page "https://01.org/powertop/")
1181 (synopsis "Analyze power consumption on Intel-based laptops")
1182 (description
1183 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1184 power management. In addition to being a diagnostic tool, PowerTOP also has
1185 an interactive mode where the user can experiment various power management
1186 settings for cases where the operating system has not enabled these
1187 settings.")
1188 (license gpl2)))
1189
1190 (define-public aumix
1191 (package
1192 (name "aumix")
1193 (version "2.9.1")
1194 (source (origin
1195 (method url-fetch)
1196 (uri (string-append
1197 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1198 version ".tar.bz2"))
1199 (sha256
1200 (base32
1201 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1202 (build-system gnu-build-system)
1203 (inputs `(("ncurses" ,ncurses)))
1204 (home-page "http://www.jpj.net/~trevor/aumix.html")
1205 (synopsis "Audio mixer for X and the console")
1206 (description
1207 "Aumix adjusts an audio mixer from X, the console, a terminal,
1208 the command line or a script.")
1209 (license gpl2+)))
1210
1211 (define-public iotop
1212 (package
1213 (name "iotop")
1214 (version "0.6")
1215 (source
1216 (origin
1217 (method url-fetch)
1218 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1219 version ".tar.gz"))
1220 (sha256 (base32
1221 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1222 (build-system python-build-system)
1223 (arguments
1224 ;; The setup.py script expects python-2.
1225 `(#:python ,python-2
1226 ;; There are currently no checks in the package.
1227 #:tests? #f))
1228 (native-inputs `(("python" ,python-2)))
1229 (home-page "http://guichaz.free.fr/iotop/")
1230 (synopsis
1231 "Displays the IO activity of running processes")
1232 (description
1233 "Iotop is a Python program with a top like user interface to show the
1234 processes currently causing I/O.")
1235 (license gpl2+)))
1236
1237 (define-public fuse
1238 (package
1239 (name "fuse")
1240 (version "2.9.3")
1241 (source (origin
1242 (method url-fetch)
1243 (uri (string-append "mirror://sourceforge/fuse/fuse-"
1244 version ".tar.gz"))
1245 (sha256
1246 (base32
1247 "071r6xjgssy8vwdn6m28qq1bqxsd2bphcd2mzhq0grf5ybm87sqb"))
1248 (patches (list (search-patch "fuse-CVE-2015-3202.patch")))))
1249 (build-system gnu-build-system)
1250 (inputs `(("util-linux" ,util-linux)))
1251 (arguments
1252 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1253 (assoc-ref %outputs "out")
1254 "/sbin")
1255 (string-append "INIT_D_PATH="
1256 (assoc-ref %outputs "out")
1257 "/etc/init.d")
1258
1259 ;; The rule makes /dev/fuse 666.
1260 (string-append "UDEV_RULES_PATH="
1261 (assoc-ref %outputs "out")
1262 "/lib/udev/rules.d"))
1263 #:phases (alist-cons-before
1264 'build 'set-file-names
1265 (lambda* (#:key inputs #:allow-other-keys)
1266 ;; libfuse calls out to mount(8) and umount(8). Make sure
1267 ;; it refers to the right ones.
1268 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1269 (("/bin/(u?)mount" _ maybe-u)
1270 (string-append (assoc-ref inputs "util-linux")
1271 "/bin/" maybe-u "mount")))
1272 (substitute* '("util/mount.fuse.c")
1273 (("/bin/sh")
1274 (which "sh")))
1275
1276 ;; This hack leads libfuse to search for 'fusermount' in
1277 ;; $PATH, where it may find a setuid-root binary, instead of
1278 ;; trying solely $out/sbin/fusermount and failing because
1279 ;; it's not setuid.
1280 (substitute* "lib/Makefile"
1281 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1282 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
1283 %standard-phases)))
1284 (home-page "http://fuse.sourceforge.net/")
1285 (synopsis "Support file systems implemented in user space")
1286 (description
1287 "As a consequence of its monolithic design, file system code for Linux
1288 normally goes into the kernel itself---which is not only a robustness issue,
1289 but also an impediment to system extensibility. FUSE, for \"file systems in
1290 user space\", is a kernel module and user-space library that tries to address
1291 part of this problem by allowing users to run file system implementations as
1292 user-space processes.")
1293 (license (list lgpl2.1 ; library
1294 gpl2+)))) ; command-line utilities
1295
1296 (define-public unionfs-fuse
1297 (package
1298 (name "unionfs-fuse")
1299 (version "0.26")
1300 (source (origin
1301 (method url-fetch)
1302 (uri (string-append
1303 "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-"
1304 version ".tar.xz"))
1305 (sha256
1306 (base32
1307 "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d"))))
1308 (build-system cmake-build-system)
1309 (inputs `(("fuse" ,fuse)))
1310 (arguments '(#:tests? #f)) ; no tests
1311 (home-page "http://podgorny.cz/moin/UnionFsFuse")
1312 (synopsis "User-space union file system")
1313 (description
1314 "UnionFS-FUSE is a flexible union file system implementation in user
1315 space, using the FUSE library. Mounting a union file system allows you to
1316 \"aggregate\" the contents of several directories into a single mount point.
1317 UnionFS-FUSE additionally supports copy-on-write.")
1318 (license bsd-3)))
1319
1320 (define fuse-static
1321 (package (inherit fuse)
1322 (name "fuse-static")
1323 (source (origin (inherit (package-source fuse))
1324 (modules '((guix build utils)))
1325 (snippet
1326 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1327 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1328 ;; it doesn't do that, allowing us to remove the dependency on
1329 ;; util-linux (something that is useful in initrds.)
1330 '(substitute* '("lib/mount_util.c"
1331 "util/mount_util.c")
1332 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1333 "0")
1334 (("/bin/")
1335 "")))))))
1336
1337 (define-public unionfs-fuse/static
1338 (package (inherit unionfs-fuse)
1339 (synopsis "User-space union file system (statically linked)")
1340 (name (string-append (package-name unionfs-fuse) "-static"))
1341 (source (origin (inherit (package-source unionfs-fuse))
1342 (modules '((guix build utils)))
1343 (snippet
1344 ;; Add -ldl to the libraries, because libfuse.a needs that.
1345 '(substitute* "src/CMakeLists.txt"
1346 (("target_link_libraries(.*)\\)" _ libs)
1347 (string-append "target_link_libraries"
1348 libs " dl)"))))))
1349 (arguments
1350 '(#:tests? #f
1351 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1352 #:phases (alist-cons-after
1353 'install 'post-install
1354 (lambda* (#:key outputs #:allow-other-keys)
1355 (let* ((out (assoc-ref outputs "out"))
1356 (exe (string-append out "/bin/unionfs")))
1357 ;; By default, 'unionfs' keeps references to
1358 ;; $glibc/share/locale and similar stuff. Remove them.
1359 (remove-store-references exe)))
1360 %standard-phases)))
1361 (inputs `(("fuse" ,fuse-static)))))
1362
1363 (define-public sshfs-fuse
1364 (package
1365 (name "sshfs-fuse")
1366 (version "2.5")
1367 (source (origin
1368 (method url-fetch)
1369 (uri (string-append "mirror://sourceforge/fuse/sshfs-fuse-"
1370 version ".tar.gz"))
1371 (sha256
1372 (base32
1373 "0gp6qr33l2p0964j0kds0dfmvyyf5lpgsn11daf0n5fhwm9185z9"))))
1374 (build-system gnu-build-system)
1375 (inputs
1376 `(("fuse" ,fuse)
1377 ("glib" ,glib)))
1378 (native-inputs
1379 `(("pkg-config" ,pkg-config)))
1380 (home-page "http://fuse.sourceforge.net/sshfs.html")
1381 (synopsis "Mount remote file systems over SSH")
1382 (description
1383 "This is a file system client based on the SSH File Transfer Protocol.
1384 Since most SSH servers already support this protocol it is very easy to set
1385 up: on the server side there's nothing to do; on the client side mounting the
1386 file system is as easy as logging into the server with an SSH client.")
1387 (license gpl2+)))
1388
1389 (define-public numactl
1390 (package
1391 (name "numactl")
1392 (version "2.0.9")
1393 (source (origin
1394 (method url-fetch)
1395 (uri (string-append
1396 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1397 version
1398 ".tar.gz"))
1399 (sha256
1400 (base32
1401 "073myxlyyhgxh1w3r757ajixb7s2k69czc3r0g12c3scq7k3784w"))))
1402 (build-system gnu-build-system)
1403 (arguments
1404 '(#:phases (alist-replace
1405 'configure
1406 (lambda* (#:key outputs #:allow-other-keys)
1407 ;; There's no 'configure' script, just a raw makefile.
1408 (substitute* "Makefile"
1409 (("^prefix := .*$")
1410 (string-append "prefix := " (assoc-ref outputs "out")
1411 "\n"))
1412 (("^libdir := .*$")
1413 ;; By default the thing tries to install under
1414 ;; $prefix/lib64 when on a 64-bit platform.
1415 (string-append "libdir := $(prefix)/lib\n"))))
1416 %standard-phases)
1417
1418 #:make-flags (list
1419 ;; By default the thing tries to use 'cc'.
1420 "CC=gcc"
1421
1422 ;; Make sure programs have an RPATH so they can find
1423 ;; libnuma.so.
1424 (string-append "LDLIBS=-Wl,-rpath="
1425 (assoc-ref %outputs "out") "/lib"))
1426
1427 ;; There's a 'test' target, but it requires NUMA support in the kernel
1428 ;; to run, which we can't assume to have.
1429 #:tests? #f))
1430 (home-page "http://oss.sgi.com/projects/libnuma/")
1431 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1432 (description
1433 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1434 memory is not all in one place. The numactl program allows you to run your
1435 application program on specific CPU's and memory nodes. It does this by
1436 supplying a NUMA memory policy to the operating system before running your
1437 program.
1438
1439 The package contains other commands, such as numademo, numastat and memhog.
1440 The numademo command provides a quick overview of NUMA performance on your
1441 system.")
1442 (license (list gpl2 ; programs
1443 lgpl2.1)))) ; library
1444
1445 (define-public kbd
1446 (package
1447 (name "kbd")
1448 (version "2.0.2")
1449 (source (origin
1450 (method url-fetch)
1451 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1452 version ".tar.xz"))
1453 (sha256
1454 (base32
1455 "04mrms12nm5sas0nxs94yrr3hz7gmqhnmfgb9ff34bh1jszxmzcx"))
1456 (modules '((guix build utils)))
1457 (snippet
1458 '(begin
1459 (substitute* "tests/Makefile.in"
1460 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1461 (("@VERSION@")
1462 "[@]VERSION[@]"))
1463 (substitute* '("src/unicode_start" "src/unicode_stop")
1464 ;; Assume the Coreutils are in $PATH.
1465 (("/usr/bin/tty")
1466 "tty"))))))
1467 (build-system gnu-build-system)
1468 (arguments
1469 '(#:phases (alist-cons-before
1470 'build 'pre-build
1471 (lambda* (#:key inputs #:allow-other-keys)
1472 (let ((gzip (assoc-ref %build-inputs "gzip"))
1473 (bzip2 (assoc-ref %build-inputs "bzip2")))
1474 (substitute* "src/libkeymap/findfile.c"
1475 (("gzip")
1476 (string-append gzip "/bin/gzip"))
1477 (("bzip2")
1478 (string-append bzip2 "/bin/bzip2")))))
1479 (alist-cons-after
1480 'install 'post-install
1481 (lambda* (#:key outputs #:allow-other-keys)
1482 ;; Make sure these programs find their comrades.
1483 (let* ((out (assoc-ref outputs "out"))
1484 (bin (string-append out "/bin")))
1485 (for-each (lambda (prog)
1486 (wrap-program (string-append bin "/" prog)
1487 `("PATH" ":" prefix (,bin))))
1488 '("unicode_start" "unicode_stop"))))
1489 %standard-phases))))
1490 (inputs `(("check" ,check)
1491 ("gzip" ,gzip)
1492 ("bzip2" ,bzip2)
1493 ("pam" ,linux-pam)))
1494 (native-inputs `(("pkg-config" ,pkg-config)))
1495 (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/")
1496 (synopsis "Linux keyboard utilities and keyboard maps")
1497 (description
1498 "This package contains keytable files and keyboard utilities compatible
1499 for systems using the Linux kernel. This includes commands such as
1500 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1501 (license gpl2+)))
1502
1503 (define-public inotify-tools
1504 (package
1505 (name "inotify-tools")
1506 (version "3.13")
1507 (source (origin
1508 (method url-fetch)
1509 (uri (string-append
1510 "mirror://sourceforge/inotify-tools/inotify-tools/"
1511 version "/inotify-tools-" version ".tar.gz"))
1512 (sha256
1513 (base32
1514 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1515 (build-system gnu-build-system)
1516 (home-page "http://inotify-tools.sourceforge.net/")
1517 (synopsis "Monitor file accesses")
1518 (description
1519 "The inotify-tools packages provides a C library and command-line tools
1520 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1521 (license gpl2+)))
1522
1523 (define-public kmod
1524 (package
1525 (name "kmod")
1526 (version "17")
1527 (source (origin
1528 (method url-fetch)
1529 (uri
1530 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1531 "kmod-" version ".tar.xz"))
1532 (sha256
1533 (base32
1534 "1yid3a9b64a60ybj66fk2ysrq5klnl0ijl4g624cl16y8404g9rv"))
1535 (patches (list (search-patch "kmod-module-directory.patch")))))
1536 (build-system gnu-build-system)
1537 (native-inputs
1538 `(("pkg-config" ,pkg-config)))
1539 (inputs
1540 `(("xz" ,xz)
1541 ("zlib" ,zlib)))
1542 (arguments
1543 `(#:tests? #f ; FIXME: Investigate test failures
1544 #:configure-flags '("--with-xz" "--with-zlib")
1545 #:phases (alist-cons-after
1546 'install 'install-modprobe&co
1547 (lambda* (#:key outputs #:allow-other-keys)
1548 (let* ((out (assoc-ref outputs "out"))
1549 (bin (string-append out "/bin")))
1550 (for-each (lambda (tool)
1551 (symlink "kmod"
1552 (string-append bin "/" tool)))
1553 '("insmod" "rmmod" "lsmod" "modprobe"
1554 "modinfo" "depmod"))))
1555 %standard-phases)))
1556 (home-page "https://www.kernel.org/")
1557 (synopsis "Kernel module tools")
1558 (description "Kmod is a set of tools to handle common tasks with Linux
1559 kernel modules like insert, remove, list, check properties, resolve
1560 dependencies and aliases.
1561
1562 These tools are designed on top of libkmod, a library that is shipped with
1563 kmod. The aim is to be compatible with tools, configurations and indices
1564 from the module-init-tools project.")
1565 (license gpl2+))) ; library under lgpl2.1+
1566
1567 (define-public eudev
1568 ;; The post-systemd fork, maintained by Gentoo.
1569 (package
1570 (name "eudev")
1571 (version "2.1.1")
1572 (source (origin
1573 (method url-fetch)
1574 (uri (string-append
1575 "http://dev.gentoo.org/~blueness/eudev/eudev-"
1576 version ".tar.gz"))
1577 (sha256
1578 (base32
1579 "0shf5vqiz9fdxl95aa1a8vh0xjxwim3psc39wr2xr8lnahf11vva"))
1580 (patches (list (search-patch "eudev-rules-directory.patch")))
1581 (modules '((guix build utils)))
1582 (snippet
1583 ;; 'configure' checks uses <linux/btrfs.h> as an indication of
1584 ;; whether Linux headers are available, but it doesn't actually
1585 ;; use it, and our 'linux-libre-headers' package doesn't
1586 ;; provide it. So just remove that.
1587 '(substitute* "configure"
1588 (("linux/btrfs\\.h")
1589 "")))))
1590 (build-system gnu-build-system)
1591 (native-inputs
1592 `(("pkg-config" ,pkg-config)
1593 ("gperf" ,gperf)
1594 ("glib" ,glib "bin") ; glib-genmarshal, etc.
1595 ("perl" ,perl) ; for the tests
1596 ("python" ,python-2))) ; ditto
1597 (inputs
1598 `(("kmod" ,kmod)
1599 ("pciutils" ,pciutils)
1600 ("usbutils" ,usbutils)
1601 ("util-linux" ,util-linux)
1602 ("glib" ,glib)
1603 ("gobject-introspection" ,gobject-introspection)))
1604 (arguments
1605 `(#:configure-flags (list "--enable-libkmod"
1606
1607 (string-append
1608 "--with-pci-ids-path="
1609 (assoc-ref %build-inputs "pciutils")
1610 "/share/pci.ids.gz")
1611
1612 "--with-firmware-path=/no/firmware"
1613
1614 ;; Work around undefined reference to
1615 ;; 'mq_getattr' in sc-daemon.c.
1616 "LDFLAGS=-lrt")
1617 #:phases
1618 (alist-cons-before
1619 'build 'pre-build
1620 ;; The program 'g-ir-scanner' (part of the package
1621 ;; 'gobject-introspection'), to generate .gir files, makes some
1622 ;; library pre-processing. During that phase it looks for the C
1623 ;; compiler as either 'cc' or as defined by the environment variable
1624 ;; 'CC' (with code in 'giscanner/dumper.py').
1625 (lambda* _
1626 (setenv "CC" "gcc"))
1627 %standard-phases)))
1628 (home-page "http://www.gentoo.org/proj/en/eudev/")
1629 (synopsis "Userspace device management")
1630 (description "Udev is a daemon which dynamically creates and removes
1631 device nodes from /dev/, handles hotplug events and loads drivers at boot
1632 time.")
1633 (license gpl2+)))
1634
1635 (define-public lvm2
1636 (package
1637 (name "lvm2")
1638 (version "2.02.109")
1639 (source (origin
1640 (method url-fetch)
1641 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
1642 version ".tgz"))
1643 (sha256
1644 (base32
1645 "1rv5ivg0l1w3nwzwdkqixm96h5bzg7ib4rr196ysb2lw42jmpjbv"))
1646 (modules '((guix build utils)))
1647 (snippet
1648 '(begin
1649 (use-modules (guix build utils))
1650
1651 ;; Honor sysconfdir.
1652 (substitute* "make.tmpl.in"
1653 (("confdir = .*$")
1654 "confdir = @sysconfdir@\n")
1655 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
1656 "DEFAULT_SYS_DIR = @sysconfdir@"))))))
1657 (build-system gnu-build-system)
1658 (native-inputs
1659 `(("pkg-config" ,pkg-config)
1660 ("procps" ,procps))) ;tests use 'pgrep'
1661 (inputs
1662 `(("udev" ,eudev)))
1663 (arguments
1664 '(#:phases (alist-cons-after
1665 'configure 'set-makefile-shell
1666 (lambda _
1667 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
1668 ;; expected.
1669 (setenv "SHELL" (which "sh"))
1670
1671 ;; Replace /bin/sh with the right file name.
1672 (patch-makefile-SHELL "make.tmpl"))
1673 %standard-phases)
1674
1675 #:configure-flags (list (string-append "--sysconfdir="
1676 (assoc-ref %outputs "out")
1677 "/etc/lvm")
1678 "--enable-udev_sync"
1679 "--enable-udev_rules"
1680
1681 ;; Make sure programs such as 'dmsetup' can
1682 ;; find libdevmapper.so.
1683 (string-append "LDFLAGS=-Wl,-rpath="
1684 (assoc-ref %outputs "out")
1685 "/lib"))
1686
1687 ;; The tests use 'mknod', which requires root access.
1688 #:tests? #f))
1689 (home-page "http://sourceware.org/lvm2/")
1690 (synopsis "Logical volume management for Linux")
1691 (description
1692 "LVM2 is the logical volume management tool set for Linux-based systems.
1693 This package includes the user-space libraries and tools, including the device
1694 mapper. Kernel components are part of Linux-libre.")
1695
1696 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
1697 ;; Command-line tools are GPLv2.
1698 (license (list gpl2 lgpl2.1))))
1699
1700 (define-public wireless-tools
1701 (package
1702 (name "wireless-tools")
1703 (version "30.pre9")
1704 (source (origin
1705 (method url-fetch)
1706 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
1707 version ".tar.gz"))
1708 (sha256
1709 (base32
1710 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
1711 (snippet
1712 '(begin
1713 ;; Remove the older header files that are not free software.
1714 (for-each (lambda (n)
1715 (delete-file (format #f "wireless.~a.h" n)))
1716 '(10 11 12 13 14 15 16 17 18 19 20))
1717 #t))))
1718 (build-system gnu-build-system)
1719 (arguments
1720 `(#:make-flags
1721 (list (string-append "PREFIX=" %output)
1722 (string-append "INSTALL_MAN=" %output "/share/man")
1723 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
1724 "BUILD_STATIC=")
1725 #:phases (modify-phases %standard-phases
1726 (delete 'configure))
1727 #:tests? #f))
1728 (synopsis "Tools for manipulating Linux Wireless Extensions")
1729 (description "Wireless Tools are used to manipulate the now-deprecated
1730 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
1731 Extension was an interface allowing you to set Wireless LAN specific
1732 parameters and get the specific stats. It is deprecated in favor the nl80211
1733 interface.")
1734 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
1735 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
1736 ;; other files are distributed under gpl2.
1737 (license (list gpl2 lgpl2.1+))))
1738
1739 (define-public crda
1740 (package
1741 (name "crda")
1742 (version "3.18")
1743 (source (origin
1744 (method url-fetch)
1745 (uri (string-append "mirror://kernel.org/software/network/crda/"
1746 "crda-" version ".tar.xz"))
1747 (sha256
1748 (base32
1749 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
1750 (patches (list (search-patch "crda-optional-gcrypt.patch")))))
1751 (build-system gnu-build-system)
1752 (arguments
1753 '(#:phases (modify-phases %standard-phases
1754 (delete 'configure)
1755 (add-before
1756 'build 'no-werror-no-ldconfig
1757 (lambda _
1758 (substitute* "Makefile"
1759 (("-Werror") "")
1760 (("ldconfig") "true"))
1761 #t))
1762 (add-before
1763 'build 'set-regulator-db-file-name
1764 (lambda* (#:key inputs #:allow-other-keys)
1765 ;; Tell CRDA where to find our database.
1766 (let ((regdb (assoc-ref inputs "wireless-regdb")))
1767 (substitute* "crda.c"
1768 (("\"/lib/crda/regulatory.bin\"")
1769 (string-append "\"" regdb
1770 "/lib/crda/regulatory.bin\"")))
1771 #t))))
1772 #:test-target "verify"
1773 #:make-flags (let ((out (assoc-ref %outputs "out"))
1774 (regdb (assoc-ref %build-inputs "wireless-regdb")))
1775 (list "CC=gcc" "V=1"
1776
1777 ;; Disable signature-checking on 'regulatory.bin'.
1778 ;; The reason is that this simplifies maintenance
1779 ;; on our side (no need to manage a distro key
1780 ;; pair), and we can guarantee integrity of
1781 ;; 'regulatory.bin' by other means anyway, such as
1782 ;; 'guix gc --verify'. See
1783 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
1784 ;; for a discssion.
1785 "USE_OPENSSL=0"
1786
1787 (string-append "PREFIX=" out)
1788 (string-append "SBINDIR=" out "/sbin/")
1789 (string-append "UDEV_RULE_DIR="
1790 out "/lib/udev/rules.d")
1791 (string-append "LDFLAGS=-Wl,-rpath="
1792 out "/lib -L.")
1793 (string-append "REG_BIN=" regdb
1794 "/lib/crda/regulatory.bin")))))
1795 (native-inputs `(("pkg-config" ,pkg-config)
1796 ("python" ,python-2)
1797 ("wireless-regdb" ,wireless-regdb)))
1798 (inputs `(("libnl" ,libnl)))
1799 (home-page
1800 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
1801 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
1802 (description
1803 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
1804 communication between the kernel Linux and user space for regulatory
1805 compliance.")
1806 (license copyleft-next)))
1807
1808 (define-public wireless-regdb
1809 (package
1810 (name "wireless-regdb")
1811 (version "2015.04.06")
1812 (source (origin
1813 (method url-fetch)
1814 (uri (string-append
1815 "mirror://kernel.org/software/network/wireless-regdb/"
1816 "wireless-regdb-" version ".tar.xz"))
1817 (sha256
1818 (base32
1819 "0czi83k311fp27z42hxjm8vi88fsbc23mhavv96lkb4pmari0jjc"))))
1820 (build-system gnu-build-system)
1821 (arguments
1822 '(#:phases (modify-phases %standard-phases
1823 (delete 'configure))
1824 #:tests? #f ;no tests
1825 #:make-flags (let ((out (assoc-ref %outputs "out")))
1826 (list (string-append "PREFIX=" out)
1827 (string-append "LSB_ID=GuixSD")
1828 (string-append "DISTRO_PUBKEY=/dev/null")
1829 (string-append "DISTRO_PRIVKEY=/dev/null")
1830 (string-append "REGDB_PUBKEY=/dev/null")
1831
1832 ;; Leave that empty so that db2bin.py doesn't try
1833 ;; to sign 'regulatory.bin'. This allows us to
1834 ;; avoid managing a key pair for the whole distro.
1835 (string-append "REGDB_PRIVKEY=")))))
1836 (native-inputs `(("python" ,python-2)))
1837 (home-page
1838 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
1839 (synopsis "Wireless regulatory database")
1840 (description
1841 "This package contains the wireless regulatory database Central
1842 Regulatory Database Agent (CRDA) daemon. The database contains information on
1843 country-specific regulations for the wireless spectrum.")
1844 (license isc)))
1845
1846 (define-public lm-sensors
1847 (package
1848 (name "lm-sensors")
1849 (version "3.3.5")
1850 (source (origin
1851 (method url-fetch)
1852 (uri (string-append
1853 "http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-"
1854 version ".tar.bz2"))
1855 (sha256
1856 (base32
1857 "1ksgrynxgrq590nb2fwxrl1gwzisjkqlyg3ljfd1al0ibrk6mbjx"))
1858 (patches (list (search-patch "lm-sensors-hwmon-attrs.patch")))))
1859 (build-system gnu-build-system)
1860 (inputs `(("rrdtool" ,rrdtool)
1861 ("perl" ,perl)
1862 ("kmod" ,kmod)
1863 ("gnuplot" ,gnuplot)))
1864 (native-inputs `(("pkg-config" ,pkg-config)
1865 ("flex" ,flex)
1866 ("bison" ,bison)
1867 ("which" ,which)))
1868 (arguments
1869 `(#:tests? #f ; no 'check' target
1870 #:make-flags (list (string-append "PREFIX=" %output)
1871 (string-append "ETCDIR=" %output "/etc")
1872 (string-append "MANDIR=" %output "/share/man"))
1873 #:phases
1874 (alist-delete
1875 'configure
1876 (alist-cons-before
1877 'build 'patch-exec-paths
1878 (lambda* (#:key inputs outputs #:allow-other-keys)
1879 (substitute* "prog/detect/sensors-detect"
1880 (("`uname")
1881 (string-append "`" (assoc-ref inputs "coreutils")
1882 "/bin/uname"))
1883 (("(`|\")modprobe" all open-quote)
1884 (string-append open-quote
1885 (assoc-ref inputs "kmod")
1886 "/bin/modprobe")))
1887 (substitute* '("prog/pwm/pwmconfig"
1888 "prog/pwm/fancontrol")
1889 (("gnuplot")
1890 (string-append (assoc-ref inputs "gnuplot")
1891 "/bin/gnuplot"))
1892 (("cat ")
1893 (string-append (assoc-ref inputs "coreutils")
1894 "/bin/cat "))
1895 (("egrep ")
1896 (string-append (assoc-ref inputs "grep")
1897 "/bin/egrep "))
1898 (("sed -e")
1899 (string-append (assoc-ref inputs "sed")
1900 "/bin/sed -e"))
1901 (("cut -d")
1902 (string-append (assoc-ref inputs "coreutils")
1903 "/bin/cut -d"))
1904 (("sleep ")
1905 (string-append (assoc-ref inputs "coreutils")
1906 "/bin/sleep "))
1907 (("readlink -f")
1908 (string-append (assoc-ref inputs "coreutils")
1909 "/bin/readlink -f"))))
1910 %standard-phases))))
1911 (home-page "http://www.lm-sensors.org/")
1912 (synopsis "Utilities to read temperature/voltage/fan sensors")
1913 (description
1914 "Lm-sensors is a hardware health monitoring package for Linux. It allows
1915 you to access information from temperature, voltage, and fan speed sensors.
1916 It works with most newer systems.")
1917 (license gpl2+)))
1918
1919 (define-public i2c-tools
1920 (package
1921 (name "i2c-tools")
1922 (version "3.1.1")
1923 (source (origin
1924 (method url-fetch)
1925 (uri (string-append
1926 "http://dl.lm-sensors.org/i2c-tools/releases/i2c-tools-"
1927 version ".tar.bz2"))
1928 (sha256
1929 (base32
1930 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
1931 (build-system gnu-build-system)
1932 (arguments
1933 `(#:tests? #f ; no 'check' target
1934 #:make-flags (list (string-append "prefix=" %output)
1935 "CC=gcc")
1936 ;; no configure script
1937 #:phases (alist-delete 'configure %standard-phases)))
1938 (inputs
1939 `(("perl" ,perl)))
1940 (home-page "http://www.lm-sensors.org/wiki/I2CTools")
1941 (synopsis "I2C tools for Linux")
1942 (description
1943 "The i2c-tools package contains a heterogeneous set of I2C tools for
1944 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
1945 EEPROM decoding scripts, EEPROM programming tools, and a python module for
1946 SMBus access.")
1947 (license gpl2+)))
1948
1949 (define-public xsensors
1950 (package
1951 (name "xsensors")
1952 (version "0.70")
1953 (source (origin
1954 (method url-fetch)
1955 (uri (string-append
1956 "http://www.linuxhardware.org/xsensors/xsensors-"
1957 version ".tar.gz"))
1958 (sha256
1959 (base32
1960 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
1961 (build-system gnu-build-system)
1962 (inputs `(("lm-sensors" ,lm-sensors)
1963 ("gtk" ,gtk+-2)))
1964 (native-inputs `(("pkg-config" ,pkg-config)))
1965 (arguments
1966 `(#:phases (alist-cons-before
1967 'configure 'enable-deprecated
1968 (lambda _
1969 (substitute* "src/Makefile.in"
1970 (("-DGDK_DISABLE_DEPRECATED") "")
1971 (("-DGTK_DISABLE_DEPRECATED") "")))
1972 (alist-cons-before
1973 'configure 'remove-Werror
1974 (lambda _
1975 (substitute* '("configure" "src/Makefile.in")
1976 (("-Werror") "")))
1977 %standard-phases))))
1978 (home-page "http://www.linuxhardware.org/xsensors/")
1979 (synopsis "Hardware health information viewer")
1980 (description
1981 "Xsensors reads data from the libsensors library regarding hardware
1982 health such as temperature, voltage and fan speed and displays the information
1983 in a digital read-out.")
1984 (license gpl2+)))
1985
1986 (define-public perf
1987 (package
1988 (name "perf")
1989 (version (package-version linux-libre))
1990 (source (package-source linux-libre))
1991 (build-system gnu-build-system)
1992 (arguments
1993 '(#:phases (alist-replace
1994 'configure
1995 (lambda* (#:key inputs #:allow-other-keys)
1996 (setenv "SHELL_PATH" (which "bash"))
1997 (chdir "tools/perf"))
1998 %standard-phases)
1999 #:make-flags (list (string-append "DESTDIR="
2000 (assoc-ref %outputs "out"))
2001 "WERROR=0"
2002
2003 ;; By default, 'config/Makefile' uses lib64 on
2004 ;; x86_64. Work around that.
2005 "lib=lib")
2006 #:tests? #f)) ;no tests
2007 (native-inputs
2008 `(("pkg-config" ,pkg-config)
2009 ("bison" ,bison)
2010 ("flex" ,flex)
2011
2012 ;; There are build scripts written in these languages.
2013 ("perl" ,perl)
2014 ("python" ,python-2)))
2015 (inputs
2016 `(("slang" ,slang) ;for the interactive TUI
2017 ;; ("newt" ,newt)
2018 ("python" ,python-2) ;'perf' links against libpython
2019 ("elfutils" ,elfutils)
2020
2021 ;; Documentation.
2022 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2023 ("libxslt" ,libxslt)
2024 ("docbook-xml" ,docbook-xml)
2025 ("docbook-xsl" ,docbook-xsl)
2026 ("xmlto" ,xmlto)
2027 ("asciidoc" ,asciidoc)))
2028 (home-page "https://perf.wiki.kernel.org/")
2029 (synopsis "Linux profiling with performance counters")
2030 (description
2031 "perf is a tool suite for profiling using hardware performance counters,
2032 with support in the Linux kernel. perf can instrument CPU performance
2033 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2034 of lightweight profiling. This package contains the user-land tools and in
2035 particular the 'perf' command.")
2036 (license (package-license linux-libre))))
2037
2038 (define-public pflask
2039 (package
2040 (name "pflask")
2041 (version "0.2")
2042 (source (origin
2043 (method url-fetch)
2044 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2045 version ".tar.gz"))
2046 (file-name (string-append name "-" version ".tar.gz"))
2047 (sha256
2048 (base32
2049 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2050 (build-system cmake-build-system)
2051 (arguments
2052 '(#:tests? #f)) ; no tests
2053 (home-page "http://ghedo.github.io/pflask/")
2054 (synopsis "Simple tool for creating Linux namespace containers")
2055 (description "pflask is a simple tool for creating Linux namespace
2056 containers. It can be used for running a command or even booting an OS inside
2057 an isolated container, created with the help of Linux namespaces. It is
2058 similar in functionality to chroot, although pflask provides better isolation
2059 thanks to the use of namespaces.")
2060 (license bsd-2)))
2061
2062 (define-public hdparm
2063 (package
2064 (name "hdparm")
2065 (version "9.45")
2066 (source (origin
2067 (method url-fetch)
2068 (uri (string-append "mirror://sourceforge/" name "/"
2069 name "-" version ".tar.gz"))
2070 (sha256
2071 (base32
2072 "0sc6yf3k6sd7n6a2ig2my9fjlqpak3znlyw7jw4cz5d9asm1rc13"))))
2073 (build-system gnu-build-system)
2074 (arguments
2075 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2076 (list (string-append "binprefix=" out)
2077 (string-append "manprefix=" out)
2078 "CC=gcc"))
2079 #:phases (alist-delete 'configure %standard-phases)
2080 #:tests? #f)) ; no test suite
2081 (home-page "http://sourceforge.net/projects/hdparm/")
2082 (synopsis "Tune hard disk parameters for high performance")
2083 (description
2084 "Get/set device parameters for Linux SATA/IDE drives. It's primary use
2085 is for enabling irq-unmasking and IDE multiple-mode.")
2086 (license (non-copyleft "file://LICENSE.TXT"))))
2087
2088 (define-public rfkill
2089 (package
2090 (name "rfkill")
2091 (version "0.5")
2092 (source (origin
2093 (method url-fetch)
2094 (uri (string-append "mirror://kernel.org/software/network/"
2095 name "/" name "-" version ".tar.xz"))
2096 (sha256
2097 (base32
2098 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2099 (build-system gnu-build-system)
2100 (arguments
2101 `(#:make-flags (list "CC=gcc"
2102 (string-append "PREFIX=" %output))
2103 #:phases (modify-phases %standard-phases
2104 (delete 'configure))
2105 #:tests? #f))
2106 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2107 (synopsis "Tool for enabling and disabling wireless devices")
2108 (description
2109 "rfkill is a simple tool for accessing the rfkill device interface,
2110 which is used to enable and disable wireless networking devices, typically
2111 WLAN, Bluetooth and mobile broadband.")
2112 (license (non-copyleft "file://COPYING"
2113 "See COPYING in the distribution."))))
2114
2115 (define-public acpid
2116 (package
2117 (name "acpid")
2118 (version "2.0.23")
2119 (source (origin
2120 (method url-fetch)
2121 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2122 version ".tar.xz"))
2123 (sha256
2124 (base32
2125 "1vl7c6vc724v4jwki17czgj6lnrknnj1a6llm8gkl32i2gnam5j3"))))
2126 (build-system gnu-build-system)
2127 (home-page "http://sourceforge.net/projects/acpid2/")
2128 (synopsis "Daemon for delivering ACPI events to user-space programs")
2129 (description
2130 "acpid is designed to notify user-space programs of Advanced
2131 Configuration and Power Interface (ACPI) events. acpid should be started
2132 during the system boot, and will run as a background process. When an ACPI
2133 event is received from the kernel, acpid will examine the list of rules
2134 specified in /etc/acpi/events and execute the rules that match the event.")
2135 (license gpl2+)))
2136
2137 (define-public sysfsutils
2138 (package
2139 (name "sysfsutils")
2140 (version "2.1.0")
2141 (source
2142 (origin
2143 (method url-fetch)
2144 (uri
2145 (string-append
2146 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2147 version ".tar.gz"))
2148 (sha256
2149 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2150 (build-system gnu-build-system)
2151 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2152 (synopsis "System utilities based on Linux sysfs")
2153 (description
2154 "These are a set of utilities built upon sysfs, a virtual filesystem in
2155 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2156 also contains the libsysfs library.")
2157 ;; The library is under lgpl2.1+ (all files say "or any later version").
2158 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2159 (license (list gpl2 gpl2+ lgpl2.1+))))
2160
2161 (define-public sysfsutils-1
2162 (package
2163 (inherit sysfsutils)
2164 (version "1.3.0")
2165 (source
2166 (origin
2167 (method url-fetch)
2168 (uri
2169 (string-append
2170 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2171 "/sysfsutils-" version ".tar.gz"))
2172 (sha256
2173 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2174 (modules '((guix build utils)))
2175 (snippet
2176 '(begin
2177 (substitute* "Makefile.in"
2178 (("includedir = /usr/include/sysfs")
2179 "includedir = @includedir@"))
2180 (substitute* "configure"
2181 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2182 (string-append "includedir='" orig "/sysfs'")))))))
2183 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2184
2185 (define-public cpufrequtils
2186 (package
2187 (name "cpufrequtils")
2188 (version "0.3")
2189 (source
2190 (origin
2191 (method url-fetch)
2192 (uri
2193 (string-append
2194 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2195 version ".tar.gz"))
2196 (sha256
2197 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2198 (patches (list (search-patch "cpufrequtils-fix-aclocal.patch")))))
2199 (build-system gnu-build-system)
2200 (native-inputs
2201 `(("sysfsutils" ,sysfsutils-1)))
2202 (arguments
2203 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2204 (assoc-ref %outputs "out") "/lib"))))
2205 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2206 (synopsis "Utilities to get and set CPU frequency on Linux")
2207 (description
2208 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2209 information, and set the CPU frequency if supported, using the cpufreq
2210 capabilities of the Linux kernel.")
2211 (license gpl2)))
2212
2213 (define-public libraw1394
2214 (package
2215 (name "libraw1394")
2216 (version "2.1.0")
2217 (source (origin
2218 (method url-fetch)
2219 (uri (string-append
2220 "mirror://kernel.org/linux/libs/ieee1394/"
2221 name "-" version ".tar.xz"))
2222 (sha256
2223 (base32
2224 "0kwnf4ha45c04mhc4yla672aqmvqqihxix1gvblns5cd2pc2cc8b"))))
2225 (build-system gnu-build-system)
2226 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2227 (synopsis "Interface library for the Linux IEEE1394 drivers")
2228 (description
2229 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2230 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2231 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2232 send to and receive from other nodes without requiring a kernel driver for the
2233 protocol in question.")
2234 (license lgpl2.1+)))
2235
2236 (define-public libavc1394
2237 (package
2238 (name "libavc1394")
2239 (version "0.5.4")
2240 (source (origin
2241 (method url-fetch)
2242 (uri (string-append "mirror://sourceforge/libavc1394/"
2243 name "-" version ".tar.gz"))
2244 (sha256
2245 (base32
2246 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2247 (build-system gnu-build-system)
2248 (native-inputs
2249 `(("pkg-config" ,pkg-config)))
2250 (propagated-inputs
2251 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2252 (home-page "http://sourceforge.net/projects/libavc1394/")
2253 (synopsis "AV/C protocol library for IEEE 1394")
2254 (description
2255 "Libavc1394 is a programming interface to the AV/C specification from
2256 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2257 (license lgpl2.1+)))
2258
2259 (define-public libiec61883
2260 (package
2261 (name "libiec61883")
2262 (version "1.2.0")
2263 (source (origin
2264 (method url-fetch)
2265 (uri (string-append
2266 "mirror://kernel.org/linux/libs/ieee1394/"
2267 name "-" version ".tar.xz"))
2268 (sha256
2269 (base32
2270 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2271 (build-system gnu-build-system)
2272 (native-inputs
2273 `(("pkg-config" ,pkg-config)))
2274 (propagated-inputs
2275 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2276 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2277 (synopsis "Isochronous streaming media library for IEEE 1394")
2278 (description
2279 "The libiec61883 library provides a higher level API for streaming DV,
2280 MPEG-2 and audio over Linux IEEE 1394.")
2281 (license lgpl2.1+)))
2282
2283 (define-public mdadm
2284 (package
2285 (name "mdadm")
2286 (version "3.3.2")
2287 (source (origin
2288 (method url-fetch)
2289 (uri (string-append
2290 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2291 version ".tar.xz"))
2292 (sha256
2293 (base32
2294 "132vdvh3myjgcjn6i9w90ck16ddjxjcszklzkyvr4f5ifqd7wfhg"))
2295 (patches (list (search-patch "mdadm-gcc-4.9-fix.patch")))))
2296 (build-system gnu-build-system)
2297 (inputs
2298 `(("udev" ,eudev)))
2299 (arguments
2300 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2301 (list "INSTALL=install"
2302 "CHECK_RUN_DIR=0"
2303 ;; TODO: tell it where to find 'sendmail'
2304 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2305 (string-append "BINDIR=" out "/sbin")
2306 (string-append "MANDIR=" out "/share/man")
2307 (string-append "UDEVDIR=" out "/lib/udev")))
2308 #:phases (alist-cons-before
2309 'build 'patch-program-paths
2310 (lambda* (#:key inputs #:allow-other-keys)
2311 (let ((coreutils (assoc-ref inputs "coreutils")))
2312 (substitute* "udev-md-raid-arrays.rules"
2313 (("/usr/bin/(readlink|basename)" all program)
2314 (string-append coreutils "/bin/" program)))))
2315 (alist-delete 'configure %standard-phases))
2316 ;;tests must be done as root
2317 #:tests? #f))
2318 (home-page "http://neil.brown.name/blog/mdadm")
2319 (synopsis "Tool for managing Linux Software RAID arrays")
2320 (description
2321 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2322 assemble, report on, and monitor arrays. It can also move spares between raid
2323 arrays when needed.")
2324 (license gpl2+)))
2325
2326 (define-public libaio
2327 (package
2328 (name "libaio")
2329 (version "0.3.110")
2330 (source (origin
2331 (method url-fetch)
2332 (uri (list
2333 (string-append "mirror://debian/pool/main/liba/libaio/"
2334 name "_" version ".orig.tar.gz")
2335 (string-append "https://fedorahosted.org/releases/l/i/libaio/"
2336 name "-" version ".tar.gz")))
2337 (sha256
2338 (base32
2339 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
2340 (build-system gnu-build-system)
2341 (arguments
2342 '(#:make-flags
2343 (list "CC=gcc" (string-append "prefix=" %output))
2344 #:test-target "partcheck" ; need root for a full 'check'
2345 #:phases
2346 (alist-delete 'configure %standard-phases))) ; no configure script
2347 (home-page "http://lse.sourceforge.net/io/aio.html")
2348 (synopsis "Linux-native asynchronous I/O access library")
2349 (description
2350 "This library enables userspace to use Linux kernel asynchronous I/O
2351 system calls, important for the performance of databases and other advanced
2352 applications.")
2353 (license lgpl2.1+)))
2354
2355 (define-public bluez
2356 (package
2357 (name "bluez")
2358 (version "5.30")
2359 (source (origin
2360 (method url-fetch)
2361 (uri (string-append
2362 "https://www.kernel.org/pub/linux/bluetooth/bluez-"
2363 version ".tar.xz"))
2364 (sha256
2365 (base32
2366 "0b1qbnq1xzcdw5rajg9yyg31bf21jnff0n6gnf1snz89bbdllfhy"))))
2367 (build-system gnu-build-system)
2368 (arguments
2369 '(#:configure-flags
2370 (let ((out (assoc-ref %outputs "out")))
2371 (list "--enable-library"
2372 "--disable-systemd"
2373 ;; Install dbus/udev files to the correct location.
2374 (string-append "--with-dbusconfdir=" out "/etc")
2375 (string-append "--with-udevdir=" out "/lib/udev")))))
2376 (native-inputs
2377 `(("pkg-config" ,pkg-config)
2378 ("gettext" ,gnu-gettext)))
2379 (inputs
2380 `(("glib" ,glib)
2381 ("dbus" ,dbus)
2382 ("eudev" ,eudev)
2383 ("libical" ,libical)
2384 ("readline" ,readline)))
2385 (home-page "http://www.bluez.org/")
2386 (synopsis "Linux Bluetooth protocol stack")
2387 (description
2388 "BlueZ provides support for the core Bluetooth layers and protocols. It
2389 is flexible, efficient and uses a modular implementation.")
2390 (license gpl2+)))
2391
2392 (define-public fuse-exfat
2393 (package
2394 (name "fuse-exfat")
2395 (version "1.1.0")
2396 (source (origin
2397 (method url-fetch)
2398 (uri "https://docs.google.com/uc?export=download&\
2399 id=0B7CLI-REKbE3VTdaa0EzTkhYdU0")
2400 (sha256
2401 (base32
2402 "0glmgwrf0nv09am54i6s35ksbvrywrwc51w6q32mv5by8475530r"))
2403 (file-name (string-append name "-" version ".tar.gz"))))
2404 (build-system gnu-build-system)
2405 (native-inputs
2406 `(("scons" ,scons)
2407 ("pkg-config" ,pkg-config)))
2408 (inputs
2409 `(("fuse" ,fuse)))
2410 (arguments
2411 '(#:tests? #f ;no test suite
2412
2413 ;; XXX: Factorize with 'exfat-utils'.
2414 #:phases (modify-phases %standard-phases
2415 (delete 'configure)
2416 (add-after 'unpack 'scons-propagate-environment
2417 (lambda _
2418 ;; Modify the SConstruct file to arrange for
2419 ;; environment variables to be propagated.
2420 (substitute* "SConstruct"
2421 (("^env = Environment\\(")
2422 "env = Environment(ENV=os.environ, "))))
2423 (replace 'build
2424 (lambda _
2425 (zero? (system* "scons"))))
2426 (replace 'install
2427 (lambda* (#:key outputs #:allow-other-keys)
2428 (let* ((out (assoc-ref outputs "out"))
2429 (bin (string-append out "/bin"))
2430 (man8 (string-append out
2431 "/share/man/man8")))
2432 (mkdir-p bin)
2433 (mkdir-p man8)
2434 (for-each (lambda (file)
2435 (copy-file
2436 file
2437 (string-append man8 "/"
2438 (basename file))))
2439 (find-files "." "\\.8$"))
2440 (zero? (system* "scons" "install"
2441 (string-append "DESTDIR="
2442 bin)))))))))
2443 (home-page "http://code.google.com/p/exfat/")
2444 (synopsis "Mount exFAT file systems")
2445 (description
2446 "This package provides a FUSE-based file system that provides read and
2447 write access to exFAT devices.")
2448 (license gpl2+)))