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