doc: Clarify and consolidate modify-services documentation.
[jackhill/guix/guix.git] / gnu / packages / linux.scm
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>
12 ;;;
13 ;;; This file is part of GNU Guix.
14 ;;;
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.
19 ;;;
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.
24 ;;;
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/>.
27
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))
75
76 (define-public (system->linux-architecture arch)
77 "Return the Linux architecture name for ARCH, a Guix system name such as
78 \"x86_64-linux\"."
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")
83 (else arch))))
84
85 (define (linux-libre-urls version)
86 "Return a list of URLs for Linux-Libre VERSION."
87 (list (string-append
88 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
89 version "-gnu/linux-libre-" version "-gnu.tar.xz")
90
91 ;; XXX: Work around <http://bugs.gnu.org/14851>.
92 (string-append
93 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
94 version "-gnu.tar.xz")
95
96 ;; Maybe this URL will become valid eventually.
97 (string-append
98 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
99 version "-gnu.tar.xz")))
100
101 (define-public linux-libre-headers
102 (let* ((version "3.14.37")
103 (build-phase
104 (lambda (arch)
105 `(lambda _
106 (setenv "ARCH" ,(system->linux-architecture arch))
107 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
108
109 (and (zero? (system* "make" "defconfig"))
110 (zero? (system* "make" "mrproper" "headers_check"))))))
111 (install-phase
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)
116 "headers_install"))
117 (begin
118 (mkdir (string-append out "/include/config"))
119 (call-with-output-file
120 (string-append out
121 "/include/config/kernel.release")
122 (lambda (p)
123 (format p "~a-default~%" ,version)))
124
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"))
130
131 #t))))))
132 (package
133 (name "linux-libre-headers")
134 (version version)
135 (source (origin
136 (method url-fetch)
137 (uri (linux-libre-urls version))
138 (sha256
139 (base32
140 "1blxr2bsvfqi9khj4cpspv434bmx252zak2wsbi2mgl60zh77gza"))))
141 (build-system gnu-build-system)
142 (native-inputs `(("perl" ,perl)))
143 (arguments
144 `(#:modules ((guix build gnu-build-system)
145 (guix build utils)
146 (srfi srfi-1))
147 #:phases (alist-replace
148 'build ,(build-phase (or (%current-target-system)
149 (%current-system)))
150 (alist-replace
151 'install ,install-phase
152 (alist-delete 'configure %standard-phases)))
153 #:allowed-references ()
154 #:tests? #f))
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/"))))
159
160 (define-public module-init-tools
161 (package
162 (name "module-init-tools")
163 (version "3.16")
164 (source (origin
165 (method url-fetch)
166 (uri (string-append
167 "mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-"
168 version ".tar.bz2"))
169 (sha256
170 (base32
171 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
172 (patches
173 (list (search-patch "module-init-tools-moduledir.patch")))))
174 (build-system gnu-build-system)
175 (arguments
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
181 (lambda _
182 (substitute* "Makefile.in"
183 (("^DOCBOOKTOMAN.*$")
184 "DOCBOOKTOMAN = true\n")))
185 %standard-phases)))
186 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
187 (synopsis "Tools for loading and managing Linux kernel modules")
188 (description
189 "Tools for loading and managing Linux kernel modules, such as `modprobe',
190 `insmod', `lsmod', and more.")
191 (license license:gpl2+)))
192
193 (define %boot-logo-patch
194 ;; Linux-Libre boot logo featuring Freedo and a gnu.
195 (origin
196 (method url-fetch)
197 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
198 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
199 (sha256
200 (base32
201 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
202
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
207 ("i686-linux"
208 "i686")
209 ("x86_64-linux"
210 "x86_64")
211 (_
212 #f)))
213 (name (string-append "linux-libre-"
214 (if variant
215 (string-append variant "-")
216 "")
217 arch
218 ".conf"))
219 (file (string-append "gnu/packages/" name)))
220 (search-path %load-path file)))
221
222 (define-public linux-libre
223 (let* ((version "4.4.5")
224 (build-phase
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"))
229
230 (let ((arch (car (string-split system #\-))))
231 (setenv "ARCH"
232 (cond ((string=? arch "i686") "i386")
233 ((string=? arch "mips64el") "mips")
234 (else arch)))
235 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
236
237 (let ((build (assoc-ref %standard-phases 'build))
238 (config (assoc-ref inputs "kconfig")))
239
240 ;; Use the architecture-specific config if available, and
241 ;; 'defconfig' otherwise.
242 (if config
243 (begin
244 (copy-file config ".config")
245 (chmod ".config" #o666))
246 (system* "make" "defconfig"))
247
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"
260 "CONFIG_FUSE_FS=m\n"
261 "CONFIG_CIFS=m\n"
262 "CONFIG_9P_FS=m\n")
263 port)
264 (close-port port))
265
266 (zero? (system* "make" "oldconfig"))
267
268 ;; Call the default `build' phase so `-j' is correctly
269 ;; passed.
270 (apply build #:make-flags "all" args))))
271 (install-phase
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")))
276 (mkdir-p moddir)
277 (for-each (lambda (file)
278 (copy-file 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"))))))
289 (package
290 (name "linux-libre")
291 (version version)
292 (source (origin
293 (method url-fetch)
294 (uri (linux-libre-urls version))
295 (sha256
296 (base32
297 "19yyw6yssyxr9k5y3whgz2p731mb1pnq3xajpv8g01m13cxs32dd"))))
298 (build-system gnu-build-system)
299 (supported-systems '("x86_64-linux" "i686-linux"))
300 (native-inputs `(("perl" ,perl)
301 ("bc" ,bc)
302 ("openssl" ,openssl)
303 ("module-init-tools" ,module-init-tools)
304 ("patch/freedo+gnu" ,%boot-logo-patch)
305
306 ,@(let ((conf (kernel-config (or (%current-target-system)
307 (%current-system)))))
308 (if conf
309 `(("kconfig" ,conf))
310 '()))))
311 (arguments
312 `(#:modules ((guix build gnu-build-system)
313 (guix build utils)
314 (srfi srfi-1)
315 (ice-9 match))
316 #:phases (alist-replace
317 'build ,build-phase
318 (alist-replace
319 'install ,install-phase
320 (alist-delete 'configure %standard-phases)))
321 #:tests? #f))
322 (synopsis "100% free redistribution of a cleaned Linux kernel")
323 (description
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/"))))
328
329 (define-public linux-libre-4.1
330 (package
331 (inherit linux-libre)
332 (version "4.1.19")
333 (source (origin
334 (method url-fetch)
335 (uri (linux-libre-urls version))
336 (sha256
337 (base32
338 "0xkj94xmnmxr768qp6n68r1g68ix1sds95nv6zfg4x8fc7fzn8km"))))
339 (native-inputs
340 (let ((conf (kernel-config (or (%current-target-system)
341 (%current-system))
342 #:variant "4.1")))
343 `(,@(alist-delete "kconfig" (package-native-inputs linux-libre))
344 ("kconfig" ,conf))))))
345
346 \f
347 ;;;
348 ;;; Pluggable authentication modules (PAM).
349 ;;;
350
351 (define-public linux-pam
352 (package
353 (name "linux-pam")
354 (version "1.2.1")
355 (source
356 (origin
357 (method url-fetch)
358 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
359 version ".tar.bz2")
360 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
361 version ".tar.bz2")))
362 (sha256
363 (base32
364 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))))
365 (build-system gnu-build-system)
366 (native-inputs
367 `(("flex" ,flex)
368
369 ;; TODO: optional dependencies
370 ;; ("libxcrypt" ,libxcrypt)
371 ;; ("cracklib" ,cracklib)
372 ))
373 (arguments
374 '(;; Most users, such as `shadow', expect the headers to be under
375 ;; `security'.
376 #:configure-flags (list (string-append "--includedir="
377 (assoc-ref %outputs "out")
378 "/include/security"))
379
380 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
381 ;; isn't available.
382 #:tests? #f))
383 (home-page "http://www.linux-pam.org/")
384 (synopsis "Pluggable authentication modules for Linux")
385 (description
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)))
391
392
393 ;;;
394 ;;; Miscellaneous.
395 ;;;
396
397 (define-public psmisc
398 (package
399 (name "psmisc")
400 (version "22.20")
401 (source
402 (origin
403 (method url-fetch)
404 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
405 version ".tar.gz"))
406 (sha256
407 (base32
408 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
409 (build-system gnu-build-system)
410 (inputs `(("ncurses" ,ncurses)))
411 (home-page "http://psmisc.sourceforge.net/")
412 (synopsis
413 "Small utilities that use the proc filesystem")
414 (description
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+)))
419
420 (define-public util-linux
421 (package
422 (name "util-linux")
423 (version "2.27")
424 (source (origin
425 (method url-fetch)
426 (uri (string-append "mirror://kernel.org/linux/utils/"
427 name "/v" (version-major+minor version) "/"
428 name "-" version ".tar.xz"))
429 (sha256
430 (base32
431 "1ivdx1bhjbakf77agm9dn3wyxia1wgz9lzxgd61zqxw3xzih9gzw"))
432 (patches (list (search-patch "util-linux-tests.patch")))
433 (modules '((guix build utils)))
434 (snippet
435 ;; We take the 'logger' program from GNU Inetutils and 'kill'
436 ;; from GNU Coreutils.
437 '(begin
438 (substitute* "configure"
439 (("build_logger=yes") "build_logger=no")
440 (("build_kill=yes") "build_kill=no"))
441 #t))))
442 (build-system gnu-build-system)
443 (arguments
444 `(#:configure-flags (list "--disable-use-tty-group"
445
446 ;; Do not build .a files to save 2 MiB.
447 "--disable-static"
448
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
455 (add-before
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"
461 (("\"/bin/umount\"")
462 (string-append "\"" out "/bin/umount\"")))
463 #t)))
464 (add-before
465 'check 'pre-check
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"
471 (("/etc/services")
472 (string-append net "/etc/services")))
473 #t))))))
474 (inputs `(("zlib" ,zlib)
475 ("ncurses" ,ncurses)))
476 (native-inputs
477 `(("perl" ,perl)
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.")
484
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))))
490
491 (define-public procps
492 (package
493 (name "procps")
494 (version "3.3.11")
495 (source (origin
496 (method url-fetch)
497 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
498 "procps-ng-" version ".tar.xz"))
499 (sha256
500 (base32
501 "1va4n0mpsq327ca9dqp4hnrpgs6821rp0f2m0jyc1bfjl9lk2jg9"))))
502 (build-system gnu-build-system)
503 (arguments
504 '(#:modules ((guix build utils)
505 (guix build gnu-build-system)
506 (srfi srfi-1)
507 (srfi srfi-26))
508 #:phases
509 (modify-phases %standard-phases
510 (add-after
511 'install 'post-install
512 ;; Remove commands and man pages redudant with
513 ;; Coreutils.
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)
519 #t))))))
520 (inputs `(("ncurses" ,ncurses)))
521 (home-page "https://gitlab.com/procps-ng/procps/")
522 (synopsis "Utilities that give information about processes")
523 (description
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)))
529
530 (define-public usbutils
531 (package
532 (name "usbutils")
533 (version "006")
534 (source
535 (origin
536 (method url-fetch)
537 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
538 "usbutils-" version ".tar.xz"))
539 (sha256
540 (base32
541 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
542 (build-system gnu-build-system)
543 (inputs
544 `(("libusb" ,libusb)))
545 (native-inputs
546 `(("pkg-config" ,pkg-config)))
547 (home-page "http://www.linux-usb.org/")
548 (synopsis
549 "Tools for working with USB devices, such as lsusb")
550 (description
551 "Tools for working with USB devices, such as lsusb.")
552 (license license:gpl2+)))
553
554 (define-public e2fsprogs
555 (package
556 (name "e2fsprogs")
557 (version "1.42.13")
558 (source (origin
559 (method url-fetch)
560 (uri (string-append
561 "mirror://kernel.org/linux/kernel/people/tytso/"
562 name "/v" version "/"
563 name "-" version ".tar.xz"))
564 (sha256
565 (base32
566 "1ix0b83zgw5n0p2grh2961c6796m92yr2jqc2sbr23x3lfsp8r71"))
567 (modules '((guix build utils)))
568 (snippet
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
576 (arguments
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"
582 "--disable-fsck"
583
584 ;; Install libext2fs et al.
585 "--enable-elf-shlibs")
586
587 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
588 (assoc-ref %outputs "out")
589 "/lib"))
590
591 #:phases (alist-cons-before
592 'configure 'patch-shells
593 (lambda _
594 (substitute* "configure"
595 (("/bin/sh (.*)parse-types.sh" _ dir)
596 (string-append (which "sh") " " dir
597 "parse-types.sh")))
598 (substitute* (find-files "." "^Makefile.in$")
599 (("#!/bin/sh")
600 (string-append "#!" (which "sh")))))
601 (alist-cons-after
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"))
607
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)
615 (chmod file #o666))
616 archives)
617 #t))))
618 %standard-phases))
619
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".
623 #:tests? #f))
624 (home-page "http://e2fsprogs.sourceforge.net/")
625 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
626 (description
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
631
632 (define e2fsprogs/static
633 (static-package
634 (package (inherit e2fsprogs)
635 (arguments
636 ;; Do not build shared libraries.
637 (substitute-keyword-arguments (package-arguments e2fsprogs)
638 ((#:configure-flags _)
639 '(list "--disable-blkid"))
640 ((#:make-flags _)
641 '(list)))))))
642
643 (define-public e2fsck/static
644 (package
645 (name "e2fsck-static")
646 (version (package-version e2fsprogs))
647 (build-system trivial-build-system)
648 (source #f)
649 (arguments
650 `(#:modules ((guix build utils))
651 #:builder
652 (begin
653 (use-modules (guix build utils)
654 (ice-9 ftw)
655 (srfi srfi-26))
656
657 (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs")
658 "/sbin"))
659 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
660 (mkdir-p bin)
661 (with-directory-excursion bin
662 (for-each (lambda (file)
663 (copy-file (string-append source "/" file)
664 file)
665 (remove-store-references file)
666 (chmod file #o555))
667 (scandir source (cut string-prefix? "fsck." <>))))))))
668 (inputs `(("e2fsprogs" ,e2fsprogs/static)))
669 (synopsis "Statically-linked fsck.* commands from e2fsprogs")
670 (description
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))))
675
676 (define-public extundelete
677 (package
678 (name "extundelete")
679 (version "0.2.4")
680 (source (origin
681 (method url-fetch)
682 (uri (string-append "mirror://sourceforge/extundelete/"
683 version "/extundelete-" version ".tar.bz2"))
684 (sha256
685 (base32
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")
691 (description
692 "Extundelete is a set of tools that can recover deleted files from an
693 ext3 or ext4 partition.")
694 (license license:gpl2)))
695
696 (define-public zerofree
697 (package
698 (name "zerofree")
699 (version "1.0.3")
700 (home-page "http://intgat.tigress.co.uk/rmy/uml/")
701 (source (origin
702 (method url-fetch)
703 (uri (string-append home-page name "-" version
704 ".tgz"))
705 (sha256
706 (base32
707 "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs"))))
708 (build-system gnu-build-system)
709 (arguments
710 '(#:phases (alist-replace
711 'install
712 (lambda* (#:key outputs #:allow-other-keys)
713 (let* ((out (assoc-ref outputs "out"))
714 (bin (string-append out "/bin")))
715 (mkdir-p bin)
716 (copy-file "zerofree"
717 (string-append bin "/zerofree"))
718 (chmod (string-append bin "/zerofree")
719 #o555)
720 #t))
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")
725 (description
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)))
730
731 (define-public strace
732 (package
733 (name "strace")
734 (version "4.7")
735 (source (origin
736 (method url-fetch)
737 (uri (string-append "mirror://sourceforge/strace/strace-"
738 version ".tar.xz"))
739 (sha256
740 (base32
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")
746 (description
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)))
750
751 (define-public ltrace
752 (package
753 (name "ltrace")
754 (version "0.7.3")
755 (source (origin
756 (method url-fetch)
757 (uri (string-append "http://www.ltrace.org/ltrace_" version
758 ".orig.tar.bz2"))
759 (sha256
760 (base32
761 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
762 (build-system gnu-build-system)
763 (inputs `(("libelf" ,libelf)))
764 (arguments
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")
769 (description
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+)))
774
775 (define-public alsa-lib
776 (package
777 (name "alsa-lib")
778 (version "1.0.27.1")
779 (source (origin
780 (method url-fetch)
781 (uri (string-append
782 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
783 version ".tar.bz2"))
784 (sha256
785 (base32
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")
791 (description
792 "The Advanced Linux Sound Architecture (ALSA) provides audio and
793 MIDI functionality to the Linux-based operating system.")
794 (license license:lgpl2.1+)))
795
796 (define-public alsa-utils
797 (package
798 (name "alsa-utils")
799 (version "1.1.0")
800 (source (origin
801 (method url-fetch)
802 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
803 name "-" version ".tar.bz2"))
804 (sha256
805 (base32
806 "1wa88wvqcfhak9x3y65wzzwxmmyxb5bv2gyj7lnm653fnwsk271v"))))
807 (build-system gnu-build-system)
808 (arguments
809 ;; XXX: Disable man page creation until we have DocBook.
810 '(#:configure-flags (list "--disable-xmlto"
811
812 ;; The udev rule is responsible for restoring
813 ;; the volume.
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
819 (lambda _
820 ;; Don't try to mkdir /var/lib/alsa.
821 (substitute* "Makefile"
822 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
823 "true\n")))
824 %standard-phases)))
825 (inputs
826 `(("libsamplerate" ,libsamplerate)
827 ("ncurses" ,ncurses)
828 ("alsa-lib" ,alsa-lib)
829 ("xmlto" ,xmlto)
830 ("gettext" ,gnu-gettext)))
831 (home-page "http://www.alsa-project.org/")
832 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
833 (description
834 "The Advanced Linux Sound Architecture (ALSA) provides audio and
835 MIDI functionality to the Linux-based operating system.")
836
837 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
838 ;; GPLv2-only.
839 (license license:gpl2)))
840
841 (define-public iptables
842 (package
843 (name "iptables")
844 (version "1.4.16.2")
845 (source (origin
846 (method url-fetch)
847 (uri (string-append
848 "http://www.netfilter.org/projects/iptables/files/iptables-"
849 version ".tar.bz2"))
850 (sha256
851 (base32
852 "0vkg5lzkn4l3i1sm6v3x96zzvnv9g7mi0qgj6279ld383mzcws24"))))
853 (build-system gnu-build-system)
854 (arguments
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")
860 (description
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
866 packet filter.")
867 (license license:gpl2+)))
868
869 (define-public iproute
870 (package
871 (name "iproute2")
872 (version "4.4.0")
873 (source (origin
874 (method url-fetch)
875 (uri (string-append
876 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
877 version ".tar.xz"))
878 (sha256
879 (base32
880 "05351m4m0whsivlblvs3m0nz5q9v6r06ik80z27gf6ca51kw74dw"))))
881 (build-system gnu-build-system)
882 (arguments
883 `(#:tests? #f ; no test suite
884 #:make-flags (let ((out (assoc-ref %outputs "out")))
885 (list "DESTDIR="
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/"
890 ,name "-" ,version)
891 (string-append "MANDIR=" out "/share/man")))
892 #:phases (modify-phases %standard-phases
893 (add-before 'install 'pre-install
894 (lambda _
895 ;; Don't attempt to create /var/lib/arpd.
896 (substitute* "Makefile"
897 (("^.*ARPDDIR.*$") "")))))))
898 (inputs
899 `(("iptables" ,iptables)
900 ("db4" ,bdb)))
901 (native-inputs
902 `(("pkg-config" ,pkg-config)
903 ("flex" ,flex)
904 ("bison" ,bison)))
905 (home-page
906 "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
907 (synopsis
908 "Utilities for controlling TCP/IP networking and traffic in Linux")
909 (description
910 "Iproute2 is a collection of utilities for controlling TCP/IP
911 networking and traffic with the Linux kernel.
912
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
920 traffic control.
921
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
926 manpages.")
927 (license license:gpl2+)))
928
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
932 ;; live with it.
933 (package
934 (name "net-tools")
935 (version "1.60")
936 (home-page "http://net-tools.sourceforge.net/")
937 (source (origin
938 (method url-fetch)
939 (uri (list (string-append
940 "mirror://sourceforge/net-tools/net-tools-"
941 version ".tar.bz2")
942 (string-append
943 "http://distro.ibiblio.org/rootlinux/rootlinux-ports"
944 "/base/net-tools/net-tools-1.60.tar.bz2")))
945 (sha256
946 (base32
947 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
948 (patches
949 (list (search-patch "net-tools-bitrot.patch")))))
950 (build-system gnu-build-system)
951 (arguments
952 '(#:modules ((guix build gnu-build-system)
953 (guix build utils)
954 (srfi srfi-1)
955 (srfi srfi-26))
956 #:phases (alist-cons-after
957 'unpack 'patch
958 (lambda* (#:key inputs #:allow-other-keys)
959 (define (apply-patch file)
960 (zero? (system* "patch" "-p1" "--force"
961 "--input" file)))
962
963 (let ((patch.gz (assoc-ref inputs "patch")))
964 (format #t "applying Debian patch set '~a'...~%"
965 patch.gz)
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"
970 "\\.patch")))))
971 (alist-replace
972 'configure
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"))
977
978 ;; Pretend we have everything...
979 (system "yes | make config")
980
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.*$") ""))))
987 (alist-cons-after
988 'install 'remove-redundant-commands
989 (lambda* (#:key outputs #:allow-other-keys)
990 ;; Remove commands and man pages redundant with
991 ;; Inetutils.
992 (let* ((out (assoc-ref outputs "out"))
993 (dup (append-map (cut find-files out <>)
994 '("^hostname"
995 "^(yp|nis|dns)?domainname"))))
996 (for-each delete-file dup)
997 #t))
998 %standard-phases)))
999
1000 ;; Binaries that depend on libnet-tools.a don't declare that
1001 ;; dependency, making it parallel-unsafe.
1002 #:parallel-build? #f
1003
1004 #:tests? #f ; no test suite
1005 #:make-flags (let ((out (assoc-ref %outputs "out")))
1006 (list "CC=gcc"
1007 (string-append "BASEDIR=" out)
1008 (string-append "INSTALLNLSDIR=" out "/share/locale")
1009 (string-append "mandir=/share/man")))))
1010
1011 ;; Use the big Debian patch set (the thing does not even compile out of
1012 ;; the box.)
1013 (inputs `(("patch" ,(origin
1014 (method url-fetch)
1015 (uri
1016 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
1017 (sha256
1018 (base32
1019 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
1020 (native-inputs `(("gettext" ,gnu-gettext)))
1021
1022 (synopsis "Tools for controlling the network subsystem in Linux")
1023 (description
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+)))
1030
1031 (define-public libcap
1032 (package
1033 (name "libcap")
1034 (version "2.24")
1035 (source (origin
1036 (method url-fetch)
1037 (uri (string-append
1038 "mirror://kernel.org/linux/libs/security/linux-privs/"
1039 "libcap2/libcap-" version ".tar.xz"))
1040 (sha256
1041 (base32
1042 "0rbc9qbqs5bp9am9s9g83wxj5k4ixps2agy9dxr1v1fwg27mdr6f"))))
1043 (build-system gnu-build-system)
1044 (arguments '(#:phases
1045 (modify-phases %standard-phases
1046 (replace 'configure
1047 ;; Add $libdir to the RUNPATH of executables.
1048 (lambda _
1049 (substitute* "Make.Rules"
1050 (("LDFLAGS := #-g")
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")
1062 (description
1063 "Libcap2 provides a programming interface to POSIX capabilities on
1064 Linux-based operating systems.")
1065
1066 ;; License is BSD-3 or GPLv2, at the user's choice.
1067 (license license:gpl2)))
1068
1069 (define-public bridge-utils
1070 (package
1071 (name "bridge-utils")
1072 (version "1.5")
1073 (source (origin
1074 (method url-fetch)
1075 (uri (string-append "mirror://sourceforge/bridge/bridge-utils-"
1076 version ".tar.gz"))
1077 (sha256
1078 (base32
1079 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1080 (build-system gnu-build-system)
1081
1082 ;; The tarball lacks all the generated files.
1083 (native-inputs `(("autoconf" ,autoconf)
1084 ("automake" ,automake)))
1085 (arguments
1086 '(#:phases (alist-cons-after
1087 'unpack 'bootstrap
1088 (lambda _
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>"))
1093
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;"))
1099
1100 (zero? (system* "autoreconf" "-vf")))
1101 %standard-phases)
1102 #:tests? #f)) ; no 'check' target
1103
1104 (home-page
1105 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1106 (synopsis "Manipulate Ethernet bridges")
1107 (description
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+)))
1114
1115 (define-public libnl
1116 (package
1117 (name "libnl")
1118 (version "3.2.25")
1119 (source (origin
1120 (method url-fetch)
1121 (uri (string-append
1122 "http://www.infradead.org/~tgr/libnl/files/libnl-"
1123 version ".tar.gz"))
1124 (sha256
1125 (base32
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")
1131 (description
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.")
1137
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)))
1141
1142 (define-public iw
1143 (package
1144 (name "iw")
1145 (version "3.17")
1146 (source (origin
1147 (method url-fetch)
1148 (uri (string-append
1149 "https://www.kernel.org/pub/software/network/iw/iw-"
1150 version ".tar.xz"))
1151 (sha256
1152 (base32
1153 "14zsapqhivk0ws5z21y1ys2c2czi05mzk7bl2yb7qxcfrnsjx9j8"))))
1154 (build-system gnu-build-system)
1155 (native-inputs `(("pkg-config" ,pkg-config)))
1156 (inputs `(("libnl" ,libnl)))
1157 (arguments
1158 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1159 "CC=gcc")
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")
1163 (description
1164 "iw is a new nl80211 based CLI configuration utility for wireless
1165 devices. It replaces 'iwconfig', which is deprecated.")
1166 (license license:isc)))
1167
1168 (define-public powertop
1169 (package
1170 (name "powertop")
1171 (version "2.8")
1172 (source
1173 (origin
1174 (method url-fetch)
1175 (uri (string-append
1176 "https://01.org/sites/default/files/downloads/powertop/powertop-"
1177 version ".tar.gz"))
1178 (sha256
1179 (base32
1180 "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8"))))
1181 (build-system gnu-build-system)
1182 (inputs
1183 `(("zlib" ,zlib)
1184 ("pciutils" ,pciutils)
1185 ("ncurses" ,ncurses)
1186 ("libnl" ,libnl)))
1187 (native-inputs
1188 `(("pkg-config" ,pkg-config)))
1189 (home-page "https://01.org/powertop/")
1190 (synopsis "Analyze power consumption on Intel-based laptops")
1191 (description
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
1196 settings.")
1197 (license license:gpl2)))
1198
1199 (define-public aumix
1200 (package
1201 (name "aumix")
1202 (version "2.9.1")
1203 (source (origin
1204 (method url-fetch)
1205 (uri (string-append
1206 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1207 version ".tar.bz2"))
1208 (sha256
1209 (base32
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")
1215 (description
1216 "Aumix adjusts an audio mixer from X, the console, a terminal,
1217 the command line or a script.")
1218 (license license:gpl2+)))
1219
1220 (define-public iotop
1221 (package
1222 (name "iotop")
1223 (version "0.6")
1224 (source
1225 (origin
1226 (method url-fetch)
1227 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1228 version ".tar.gz"))
1229 (sha256 (base32
1230 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1231 (build-system python-build-system)
1232 (arguments
1233 ;; The setup.py script expects python-2.
1234 `(#:python ,python-2
1235 ;; There are currently no checks in the package.
1236 #:tests? #f))
1237 (native-inputs `(("python" ,python-2)))
1238 (home-page "http://guichaz.free.fr/iotop/")
1239 (synopsis
1240 "Displays the IO activity of running processes")
1241 (description
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+)))
1245
1246 (define-public fuse
1247 (package
1248 (name "fuse")
1249 (version "2.9.5")
1250 (source (origin
1251 (method url-fetch)
1252 (uri (let ((version-with-underscores
1253 (string-join (string-split version #\.) "_")))
1254 (string-append
1255 "https://github.com/libfuse/libfuse/"
1256 "releases/download/fuse_" version-with-underscores
1257 "/fuse-" version ".tar.gz")))
1258 (sha256
1259 (base32
1260 "1dfvbi1p57svbv2sfnbqwpnsk219spvjnlapf35azhgzqlf3g7sp"))))
1261 (build-system gnu-build-system)
1262 (inputs `(("util-linux" ,util-linux)))
1263 (arguments
1264 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1265 (assoc-ref %outputs "out")
1266 "/sbin")
1267 (string-append "INIT_D_PATH="
1268 (assoc-ref %outputs "out")
1269 "/etc/init.d")
1270
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")
1285 (("/bin/sh")
1286 (which "sh")))
1287
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
1291 ;; it's not setuid.
1292 (substitute* "lib/Makefile"
1293 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1294 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
1295 %standard-phases)))
1296 (home-page "http://fuse.sourceforge.net/")
1297 (synopsis "Support file systems implemented in user space")
1298 (description
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
1307
1308 (define-public unionfs-fuse
1309 (package
1310 (name "unionfs-fuse")
1311 (version "0.26")
1312 (source (origin
1313 (method url-fetch)
1314 (uri (string-append
1315 "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-"
1316 version ".tar.xz"))
1317 (sha256
1318 (base32
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")
1325 (description
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)))
1331
1332 (define fuse-static
1333 (package (inherit fuse)
1334 (name "fuse-static")
1335 (source (origin (inherit (package-source fuse))
1336 (modules '((guix build utils)))
1337 (snippet
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_]+\\)")
1345 "0")
1346 (("/bin/")
1347 "")))))))
1348
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)))
1355 (snippet
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"
1360 libs " dl)"))))))
1361 (arguments
1362 '(#:tests? #f
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)))
1372 %standard-phases)))
1373 (inputs `(("fuse" ,fuse-static)))))
1374
1375 (define-public sshfs-fuse
1376 (package
1377 (name "sshfs-fuse")
1378 (version "2.5")
1379 (source (origin
1380 (method url-fetch)
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")))
1386 (sha256
1387 (base32
1388 "0gp6qr33l2p0964j0kds0dfmvyyf5lpgsn11daf0n5fhwm9185z9"))))
1389 (build-system gnu-build-system)
1390 (inputs
1391 `(("fuse" ,fuse)
1392 ("glib" ,glib)))
1393 (native-inputs
1394 `(("pkg-config" ,pkg-config)))
1395 (home-page "http://fuse.sourceforge.net/sshfs.html")
1396 (synopsis "Mount remote file systems over SSH")
1397 (description
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+)))
1403
1404 (define-public numactl
1405 (package
1406 (name "numactl")
1407 (version "2.0.11")
1408 (source (origin
1409 (method url-fetch)
1410 (uri (string-append
1411 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1412 version
1413 ".tar.gz"))
1414 (sha256
1415 (base32
1416 "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325"))))
1417 (build-system gnu-build-system)
1418 (arguments
1419 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1420 ;; to run, which we can't assume to have.
1421 #:tests? #f))
1422
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")
1428 (description
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
1433 program.
1434
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
1437 system.")
1438 (license (list license:gpl2 ;programs
1439 license:lgpl2.1)))) ;library
1440
1441 (define-public kbd
1442 (package
1443 (name "kbd")
1444 (version "2.0.2")
1445 (source (origin
1446 (method url-fetch)
1447 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1448 version ".tar.xz"))
1449 (sha256
1450 (base32
1451 "04mrms12nm5sas0nxs94yrr3hz7gmqhnmfgb9ff34bh1jszxmzcx"))
1452 (modules '((guix build utils)))
1453 (snippet
1454 '(begin
1455 (substitute* "tests/Makefile.in"
1456 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1457 (("@VERSION@")
1458 "[@]VERSION[@]"))
1459 (substitute* '("src/unicode_start" "src/unicode_stop")
1460 ;; Assume the Coreutils are in $PATH.
1461 (("/usr/bin/tty")
1462 "tty"))))))
1463 (build-system gnu-build-system)
1464 (arguments
1465 '(#:phases (alist-cons-before
1466 'build 'pre-build
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"
1471 (("gzip")
1472 (string-append gzip "/bin/gzip"))
1473 (("bzip2")
1474 (string-append bzip2 "/bin/bzip2")))))
1475 (alist-cons-after
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)
1487 ("gzip" ,gzip)
1488 ("bzip2" ,bzip2)
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")
1493 (description
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+)))
1498
1499 (define-public inotify-tools
1500 (package
1501 (name "inotify-tools")
1502 (version "3.13")
1503 (source (origin
1504 (method url-fetch)
1505 (uri (string-append
1506 "mirror://sourceforge/inotify-tools/inotify-tools/"
1507 version "/inotify-tools-" version ".tar.gz"))
1508 (sha256
1509 (base32
1510 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1511 (build-system gnu-build-system)
1512 (home-page "http://inotify-tools.sourceforge.net/")
1513 (synopsis "Monitor file accesses")
1514 (description
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+)))
1518
1519 (define-public kmod
1520 (package
1521 (name "kmod")
1522 (version "17")
1523 (source (origin
1524 (method url-fetch)
1525 (uri
1526 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1527 "kmod-" version ".tar.xz"))
1528 (sha256
1529 (base32
1530 "1yid3a9b64a60ybj66fk2ysrq5klnl0ijl4g624cl16y8404g9rv"))
1531 (patches (list (search-patch "kmod-module-directory.patch")))))
1532 (build-system gnu-build-system)
1533 (native-inputs
1534 `(("pkg-config" ,pkg-config)))
1535 (inputs
1536 `(("xz" ,xz)
1537 ("zlib" ,zlib)))
1538 (arguments
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)
1547 (symlink "kmod"
1548 (string-append bin "/" tool)))
1549 '("insmod" "rmmod" "lsmod" "modprobe"
1550 "modinfo" "depmod"))))
1551 %standard-phases)))
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.
1557
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+
1562
1563 (define-public eudev
1564 ;; The post-systemd fork, maintained by Gentoo.
1565 ;; TODO: Merge with 'eudev-with-blkid' below at an opportune time.
1566 (package
1567 (name "eudev")
1568 (version "3.1.5")
1569 (source (origin
1570 (method url-fetch)
1571 (uri (string-append
1572 "http://dev.gentoo.org/~blueness/eudev/eudev-"
1573 version ".tar.gz"))
1574 (sha256
1575 (base32
1576 "0akg9gcc3c2p56xbhlvbybqavcprly5q0bvk655zwl6d62j8an7p"))
1577 (patches (list (search-patch "eudev-rules-directory.patch")))))
1578 (build-system gnu-build-system)
1579 (native-inputs
1580 `(("pkg-config" ,pkg-config)
1581 ("perl" ,perl)
1582 ("gperf" ,gperf)))
1583 (inputs
1584 `(("kmod" ,kmod)))
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
1589 time.")
1590 (license license:gpl2+)))
1591
1592 (define-public eudev-with-blkid
1593 ;; TODO: Merge with 'eudev' above at an opportune time.
1594 (package
1595 (inherit eudev)
1596 (name "eudev-with-blkid")
1597 (inputs
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)))))
1603
1604 (define-public lvm2
1605 (package
1606 (name "lvm2")
1607 (version "2.02.109")
1608 (source (origin
1609 (method url-fetch)
1610 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
1611 version ".tgz"))
1612 (sha256
1613 (base32
1614 "1rv5ivg0l1w3nwzwdkqixm96h5bzg7ib4rr196ysb2lw42jmpjbv"))
1615 (modules '((guix build utils)))
1616 (snippet
1617 '(begin
1618 (use-modules (guix build utils))
1619
1620 ;; Honor sysconfdir.
1621 (substitute* "make.tmpl.in"
1622 (("confdir = .*$")
1623 "confdir = @sysconfdir@\n")
1624 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
1625 "DEFAULT_SYS_DIR = @sysconfdir@"))))))
1626 (build-system gnu-build-system)
1627 (native-inputs
1628 `(("pkg-config" ,pkg-config)
1629 ("procps" ,procps))) ;tests use 'pgrep'
1630 (inputs
1631 `(("udev" ,eudev)))
1632 (arguments
1633 '(#:phases (alist-cons-after
1634 'configure 'set-makefile-shell
1635 (lambda _
1636 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
1637 ;; expected.
1638 (setenv "SHELL" (which "sh"))
1639
1640 ;; Replace /bin/sh with the right file name.
1641 (patch-makefile-SHELL "make.tmpl"))
1642 %standard-phases)
1643
1644 #:configure-flags (list (string-append "--sysconfdir="
1645 (assoc-ref %outputs "out")
1646 "/etc/lvm")
1647 "--enable-udev_sync"
1648 "--enable-udev_rules"
1649
1650 ;; Make sure programs such as 'dmsetup' can
1651 ;; find libdevmapper.so.
1652 (string-append "LDFLAGS=-Wl,-rpath="
1653 (assoc-ref %outputs "out")
1654 "/lib"))
1655
1656 ;; The tests use 'mknod', which requires root access.
1657 #:tests? #f))
1658 (home-page "http://sourceware.org/lvm2/")
1659 (synopsis "Logical volume management for Linux")
1660 (description
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.")
1664
1665 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
1666 ;; Command-line tools are GPLv2.
1667 (license (list license:gpl2 license:lgpl2.1))))
1668
1669 (define-public wireless-tools
1670 (package
1671 (name "wireless-tools")
1672 (version "30.pre9")
1673 (source (origin
1674 (method url-fetch)
1675 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
1676 version ".tar.gz"))
1677 (sha256
1678 (base32
1679 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
1680 (snippet
1681 '(begin
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))
1686 #t))))
1687 (build-system gnu-build-system)
1688 (arguments
1689 `(#:make-flags
1690 (list (string-append "PREFIX=" %output)
1691 (string-append "INSTALL_MAN=" %output "/share/man")
1692 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
1693 "BUILD_STATIC=")
1694 #:phases (modify-phases %standard-phases
1695 (delete 'configure))
1696 #:tests? #f))
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
1702 interface.")
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+))))
1707
1708 (define-public crda
1709 (package
1710 (name "crda")
1711 (version "3.18")
1712 (source (origin
1713 (method url-fetch)
1714 (uri (string-append "mirror://kernel.org/software/network/crda/"
1715 "crda-" version ".tar.xz"))
1716 (sha256
1717 (base32
1718 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
1719 (patches (list (search-patch "crda-optional-gcrypt.patch")))))
1720 (build-system gnu-build-system)
1721 (arguments
1722 '(#:phases (modify-phases %standard-phases
1723 (delete 'configure)
1724 (add-before
1725 'build 'no-werror-no-ldconfig
1726 (lambda _
1727 (substitute* "Makefile"
1728 (("-Werror") "")
1729 (("ldconfig") "true"))
1730 #t))
1731 (add-before
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\"")))
1740 #t))))
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"
1745
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>
1753 ;; for a discssion.
1754 "USE_OPENSSL=0"
1755
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="
1761 out "/lib -L.")
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)))
1768 (home-page
1769 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
1770 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
1771 (description
1772 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
1773 communication between the kernel Linux and user space for regulatory
1774 compliance.")
1775 (license license:copyleft-next)))
1776
1777 (define-public wireless-regdb
1778 (package
1779 (name "wireless-regdb")
1780 (version "2015.04.06")
1781 (source (origin
1782 (method url-fetch)
1783 (uri (string-append
1784 "mirror://kernel.org/software/network/wireless-regdb/"
1785 "wireless-regdb-" version ".tar.xz"))
1786 (sha256
1787 (base32
1788 "0czi83k311fp27z42hxjm8vi88fsbc23mhavv96lkb4pmari0jjc"))
1789
1790 ;; We're building 'regulatory.bin' by ourselves.
1791 (snippet '(delete-file "regulatory.bin"))))
1792 (build-system gnu-build-system)
1793 (arguments
1794 '(#:phases (modify-phases %standard-phases
1795 (delete 'configure))
1796
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
1802
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")
1810
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)))
1816 (home-page
1817 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
1818 (synopsis "Wireless regulatory database")
1819 (description
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)))
1824
1825 (define-public lm-sensors
1826 (package
1827 (name "lm-sensors")
1828 (version "3.3.5")
1829 (source (origin
1830 (method url-fetch)
1831 (uri (string-append
1832 "ftp://ftp.netroedge.com/pub/lm-sensors/lm_sensors-"
1833 version ".tar.bz2"))
1834 (sha256
1835 (base32
1836 "1ksgrynxgrq590nb2fwxrl1gwzisjkqlyg3ljfd1al0ibrk6mbjx"))
1837 (patches (list (search-patch "lm-sensors-hwmon-attrs.patch")))))
1838 (build-system gnu-build-system)
1839 (inputs `(("rrdtool" ,rrdtool)
1840 ("perl" ,perl)
1841 ("kmod" ,kmod)
1842 ("gnuplot" ,gnuplot)))
1843 (native-inputs `(("pkg-config" ,pkg-config)
1844 ("flex" ,flex)
1845 ("bison" ,bison)
1846 ("which" ,which)))
1847 (arguments
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"))
1852 #:phases
1853 (alist-delete
1854 'configure
1855 (alist-cons-before
1856 'build 'patch-exec-paths
1857 (lambda* (#:key inputs outputs #:allow-other-keys)
1858 (substitute* "prog/detect/sensors-detect"
1859 (("`uname")
1860 (string-append "`" (assoc-ref inputs "coreutils")
1861 "/bin/uname"))
1862 (("(`|\")modprobe" all open-quote)
1863 (string-append open-quote
1864 (assoc-ref inputs "kmod")
1865 "/bin/modprobe")))
1866 (substitute* '("prog/pwm/pwmconfig"
1867 "prog/pwm/fancontrol")
1868 (("gnuplot")
1869 (string-append (assoc-ref inputs "gnuplot")
1870 "/bin/gnuplot"))
1871 (("cat ")
1872 (string-append (assoc-ref inputs "coreutils")
1873 "/bin/cat "))
1874 (("egrep ")
1875 (string-append (assoc-ref inputs "grep")
1876 "/bin/egrep "))
1877 (("sed -e")
1878 (string-append (assoc-ref inputs "sed")
1879 "/bin/sed -e"))
1880 (("cut -d")
1881 (string-append (assoc-ref inputs "coreutils")
1882 "/bin/cut -d"))
1883 (("sleep ")
1884 (string-append (assoc-ref inputs "coreutils")
1885 "/bin/sleep "))
1886 (("readlink -f")
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")
1892 (description
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+)))
1897
1898 (define-public i2c-tools
1899 (package
1900 (name "i2c-tools")
1901 (version "3.1.1")
1902 (source (origin
1903 (method url-fetch)
1904 (uri (string-append
1905 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
1906 version ".tar.bz2"))
1907 (sha256
1908 (base32
1909 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
1910 (build-system gnu-build-system)
1911 (arguments
1912 `(#:tests? #f ; no 'check' target
1913 #:make-flags (list (string-append "prefix=" %output)
1914 "CC=gcc")
1915 ;; no configure script
1916 #:phases (alist-delete 'configure %standard-phases)))
1917 (inputs
1918 `(("perl" ,perl)))
1919 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
1920 (synopsis "I2C tools for Linux")
1921 (description
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
1925 SMBus access.")
1926 (license license:gpl2+)))
1927
1928 (define-public xsensors
1929 (package
1930 (name "xsensors")
1931 (version "0.70")
1932 (source (origin
1933 (method url-fetch)
1934 (uri (string-append
1935 "http://www.linuxhardware.org/xsensors/xsensors-"
1936 version ".tar.gz"))
1937 (sha256
1938 (base32
1939 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
1940 (build-system gnu-build-system)
1941 (inputs `(("lm-sensors" ,lm-sensors)
1942 ("gtk" ,gtk+-2)))
1943 (native-inputs `(("pkg-config" ,pkg-config)))
1944 (arguments
1945 `(#:phases (alist-cons-before
1946 'configure 'enable-deprecated
1947 (lambda _
1948 (substitute* "src/Makefile.in"
1949 (("-DGDK_DISABLE_DEPRECATED") "")
1950 (("-DGTK_DISABLE_DEPRECATED") "")))
1951 (alist-cons-before
1952 'configure 'remove-Werror
1953 (lambda _
1954 (substitute* '("configure" "src/Makefile.in")
1955 (("-Werror") "")))
1956 %standard-phases))))
1957 (home-page "http://www.linuxhardware.org/xsensors/")
1958 (synopsis "Hardware health information viewer")
1959 (description
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+)))
1964
1965 (define-public perf
1966 (package
1967 (name "perf")
1968 (version (package-version linux-libre))
1969 (source (package-source linux-libre))
1970 (build-system gnu-build-system)
1971 (arguments
1972 '(#:phases (alist-replace
1973 'configure
1974 (lambda* (#:key inputs #:allow-other-keys)
1975 (setenv "SHELL_PATH" (which "bash"))
1976 (chdir "tools/perf"))
1977 %standard-phases)
1978 #:make-flags (list (string-append "DESTDIR="
1979 (assoc-ref %outputs "out"))
1980 "WERROR=0"
1981
1982 ;; By default, 'config/Makefile' uses lib64 on
1983 ;; x86_64. Work around that.
1984 "lib=lib")
1985 #:tests? #f)) ;no tests
1986 (native-inputs
1987 `(("pkg-config" ,pkg-config)
1988 ("bison" ,bison)
1989 ("flex" ,flex)
1990
1991 ;; There are build scripts written in these languages.
1992 ("perl" ,perl)
1993 ("python" ,python-2)))
1994 (inputs
1995 `(("slang" ,slang) ;for the interactive TUI
1996 ;; ("newt" ,newt)
1997 ("python" ,python-2) ;'perf' links against libpython
1998 ("elfutils" ,elfutils)
1999
2000 ;; Documentation.
2001 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2002 ("libxslt" ,libxslt)
2003 ("docbook-xml" ,docbook-xml)
2004 ("docbook-xsl" ,docbook-xsl)
2005 ("xmlto" ,xmlto)
2006 ("asciidoc" ,asciidoc)))
2007 (home-page "https://perf.wiki.kernel.org/")
2008 (synopsis "Linux profiling with performance counters")
2009 (description
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))))
2016
2017 (define-public pflask
2018 (package
2019 (name "pflask")
2020 (version "0.2")
2021 (source (origin
2022 (method url-fetch)
2023 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2024 version ".tar.gz"))
2025 (file-name (string-append name "-" version ".tar.gz"))
2026 (sha256
2027 (base32
2028 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2029 (build-system cmake-build-system)
2030 (arguments
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)))
2040
2041 (define-public hdparm
2042 (package
2043 (name "hdparm")
2044 (version "9.45")
2045 (source (origin
2046 (method url-fetch)
2047 (uri (string-append "mirror://sourceforge/" name "/"
2048 name "-" version ".tar.gz"))
2049 (sha256
2050 (base32
2051 "0sc6yf3k6sd7n6a2ig2my9fjlqpak3znlyw7jw4cz5d9asm1rc13"))))
2052 (build-system gnu-build-system)
2053 (arguments
2054 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2055 (list (string-append "binprefix=" out)
2056 (string-append "manprefix=" out)
2057 "CC=gcc"))
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")
2062 (description
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"))))
2066
2067 (define-public rfkill
2068 (package
2069 (name "rfkill")
2070 (version "0.5")
2071 (source (origin
2072 (method url-fetch)
2073 (uri (string-append "mirror://kernel.org/software/network/"
2074 name "/" name "-" version ".tar.xz"))
2075 (sha256
2076 (base32
2077 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2078 (build-system gnu-build-system)
2079 (arguments
2080 `(#:make-flags (list "CC=gcc"
2081 (string-append "PREFIX=" %output))
2082 #:phases (modify-phases %standard-phases
2083 (delete 'configure))
2084 #:tests? #f))
2085 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2086 (synopsis "Tool for enabling and disabling wireless devices")
2087 (description
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."))))
2093
2094 (define-public acpid
2095 (package
2096 (name "acpid")
2097 (version "2.0.23")
2098 (source (origin
2099 (method url-fetch)
2100 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2101 version ".tar.xz"))
2102 (sha256
2103 (base32
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")
2108 (description
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+)))
2115
2116 (define-public sysfsutils
2117 (package
2118 (name "sysfsutils")
2119 (version "2.1.0")
2120 (source
2121 (origin
2122 (method url-fetch)
2123 (uri
2124 (string-append
2125 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2126 version ".tar.gz"))
2127 (sha256
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")
2132 (description
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+))))
2139
2140 (define-public sysfsutils-1
2141 (package
2142 (inherit sysfsutils)
2143 (version "1.3.0")
2144 (source
2145 (origin
2146 (method url-fetch)
2147 (uri
2148 (string-append
2149 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2150 "/sysfsutils-" version ".tar.gz"))
2151 (sha256
2152 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2153 (modules '((guix build utils)))
2154 (snippet
2155 '(begin
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)")))
2163
2164 (define-public cpufrequtils
2165 (package
2166 (name "cpufrequtils")
2167 (version "0.3")
2168 (source
2169 (origin
2170 (method url-fetch)
2171 (uri
2172 (string-append
2173 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2174 version ".tar.gz"))
2175 (sha256
2176 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2177 (patches (list (search-patch "cpufrequtils-fix-aclocal.patch")))))
2178 (build-system gnu-build-system)
2179 (native-inputs
2180 `(("sysfsutils" ,sysfsutils-1)))
2181 (arguments
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")
2186 (description
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)))
2191
2192 (define-public libraw1394
2193 (package
2194 (name "libraw1394")
2195 (version "2.1.0")
2196 (source (origin
2197 (method url-fetch)
2198 (uri (string-append
2199 "mirror://kernel.org/linux/libs/ieee1394/"
2200 name "-" version ".tar.xz"))
2201 (sha256
2202 (base32
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")
2207 (description
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+)))
2214
2215 (define-public libavc1394
2216 (package
2217 (name "libavc1394")
2218 (version "0.5.4")
2219 (source (origin
2220 (method url-fetch)
2221 (uri (string-append "mirror://sourceforge/libavc1394/"
2222 name "-" version ".tar.gz"))
2223 (sha256
2224 (base32
2225 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2226 (build-system gnu-build-system)
2227 (native-inputs
2228 `(("pkg-config" ,pkg-config)))
2229 (propagated-inputs
2230 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2231 (home-page "http://sourceforge.net/projects/libavc1394/")
2232 (synopsis "AV/C protocol library for IEEE 1394")
2233 (description
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+)))
2237
2238 (define-public libiec61883
2239 (package
2240 (name "libiec61883")
2241 (version "1.2.0")
2242 (source (origin
2243 (method url-fetch)
2244 (uri (string-append
2245 "mirror://kernel.org/linux/libs/ieee1394/"
2246 name "-" version ".tar.xz"))
2247 (sha256
2248 (base32
2249 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2250 (build-system gnu-build-system)
2251 (native-inputs
2252 `(("pkg-config" ,pkg-config)))
2253 (propagated-inputs
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")
2257 (description
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+)))
2261
2262 (define-public mdadm
2263 (package
2264 (name "mdadm")
2265 (version "3.3.2")
2266 (source (origin
2267 (method url-fetch)
2268 (uri (string-append
2269 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2270 version ".tar.xz"))
2271 (sha256
2272 (base32
2273 "132vdvh3myjgcjn6i9w90ck16ddjxjcszklzkyvr4f5ifqd7wfhg"))
2274 (patches (list (search-patch "mdadm-gcc-4.9-fix.patch")))))
2275 (build-system gnu-build-system)
2276 (inputs
2277 `(("udev" ,eudev)))
2278 (arguments
2279 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2280 (list "INSTALL=install"
2281 "CHECK_RUN_DIR=0"
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
2296 #:tests? #f))
2297 (home-page "http://neil.brown.name/blog/mdadm")
2298 (synopsis "Tool for managing Linux Software RAID arrays")
2299 (description
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+)))
2304
2305 (define-public libaio
2306 (package
2307 (name "libaio")
2308 (version "0.3.110")
2309 (source (origin
2310 (method url-fetch)
2311 (uri (list
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")))
2316 (sha256
2317 (base32
2318 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
2319 (build-system gnu-build-system)
2320 (arguments
2321 '(#:make-flags
2322 (list "CC=gcc" (string-append "prefix=" %output))
2323 #:test-target "partcheck" ; need root for a full 'check'
2324 #:phases
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")
2328 (description
2329 "This library enables userspace to use Linux kernel asynchronous I/O
2330 system calls, important for the performance of databases and other advanced
2331 applications.")
2332 (license license:lgpl2.1+)))
2333
2334 (define-public bluez
2335 (package
2336 (name "bluez")
2337 (version "5.36")
2338 (source (origin
2339 (method url-fetch)
2340 (uri (string-append
2341 "https://www.kernel.org/pub/linux/bluetooth/bluez-"
2342 version ".tar.xz"))
2343 (sha256
2344 (base32
2345 "1wkqwmi5krr37mxcqqlp5m2xnw7vw70v3ww7j09vvlskxcdflhx3"))))
2346 (build-system gnu-build-system)
2347 (arguments
2348 '(#:configure-flags
2349 (let ((out (assoc-ref %outputs "out")))
2350 (list "--enable-library"
2351 "--disable-systemd"
2352 ;; Install dbus/udev files to the correct location.
2353 (string-append "--with-dbusconfdir=" out "/etc")
2354 (string-append "--with-udevdir=" out "/lib/udev")))))
2355 (native-inputs
2356 `(("pkg-config" ,pkg-config)
2357 ("gettext" ,gnu-gettext)))
2358 (inputs
2359 `(("glib" ,glib)
2360 ("dbus" ,dbus)
2361 ("eudev" ,eudev)
2362 ("libical" ,libical)
2363 ("readline" ,readline)))
2364 (home-page "http://www.bluez.org/")
2365 (synopsis "Linux Bluetooth protocol stack")
2366 (description
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+)))
2370
2371 (define-public fuse-exfat
2372 (package
2373 (name "fuse-exfat")
2374 (version "1.1.0")
2375 (source (origin
2376 (method url-fetch)
2377 (uri "https://docs.google.com/uc?export=download&\
2378 id=0B7CLI-REKbE3VTdaa0EzTkhYdU0")
2379 (sha256
2380 (base32
2381 "0glmgwrf0nv09am54i6s35ksbvrywrwc51w6q32mv5by8475530r"))
2382 (file-name (string-append name "-" version ".tar.gz"))))
2383 (build-system gnu-build-system)
2384 (native-inputs
2385 `(("scons" ,scons)
2386 ("pkg-config" ,pkg-config)))
2387 (inputs
2388 `(("fuse" ,fuse)))
2389 (arguments
2390 '(#:tests? #f ;no test suite
2391
2392 ;; XXX: Factorize with 'exfat-utils'.
2393 #:phases (modify-phases %standard-phases
2394 (delete 'configure)
2395 (add-after 'unpack 'scons-propagate-environment
2396 (lambda _
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, "))))
2402 (replace 'build
2403 (lambda _
2404 (zero? (system* "scons"))))
2405 (replace 'install
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")))
2411 (mkdir-p bin)
2412 (mkdir-p man8)
2413 (for-each (lambda (file)
2414 (copy-file
2415 file
2416 (string-append man8 "/"
2417 (basename file))))
2418 (find-files "." "\\.8$"))
2419 (zero? (system* "scons" "install"
2420 (string-append "DESTDIR="
2421 bin)))))))))
2422 (home-page "http://code.google.com/p/exfat/")
2423 (synopsis "Mount exFAT file systems")
2424 (description
2425 "This package provides a FUSE-based file system that provides read and
2426 write access to exFAT devices.")
2427 (license license:gpl2+)))
2428
2429 (define-public gpm
2430 (package
2431 (name "gpm")
2432 (version "1.20.7")
2433 (source (origin
2434 (method url-fetch)
2435 (uri (string-append
2436 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
2437 version ".tar.bz2"))
2438 (sha256
2439 (base32
2440 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
2441 (build-system gnu-build-system)
2442 (arguments
2443 '(#:phases (modify-phases %standard-phases
2444 (add-before 'configure 'bootstrap
2445 (lambda _
2446 ;; The tarball was not generated with 'make dist' so we
2447 ;; need to bootstrap things ourselves.
2448 (and (zero? (system* "./autogen.sh"))
2449 (begin
2450 (patch-makefile-SHELL "Makefile.include.in")
2451 #t)))))
2452
2453 ;; Make sure programs find libgpm.so.
2454 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2455 (assoc-ref %outputs "out")
2456 "/lib"))))
2457 (native-inputs
2458 `(("texinfo" ,texinfo)
2459 ("bison" ,bison)
2460 ("flex" ,flex)
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")
2466 (description
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+)))
2471
2472 (define-public btrfs-progs
2473 (package
2474 (name "btrfs-progs")
2475 (version "4.4.1")
2476 (source (origin
2477 (method url-fetch)
2478 (uri (string-append "mirror://kernel.org/linux/kernel/"
2479 "people/kdave/btrfs-progs/"
2480 "btrfs-progs-v" version ".tar.xz"))
2481 (sha256
2482 (base32
2483 "1z5882zx9jx02vyg067siws0irsl8pg37myx17hr4imn9ypf6r4r"))))
2484 (build-system gnu-build-system)
2485 (arguments
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)
2491 ("zlib" ,zlib)
2492 ("lzo" ,lzo)))
2493 (native-inputs `(("pkg-config" ,pkg-config)
2494 ("asciidoc" ,asciidoc)
2495 ("xmlto" ,xmlto)
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+))))