gnu: gdk-pixbuf: Update to 2.31.1.
[jackhill/guix/guix.git] / gnu / packages / linux.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
fb9b7ce2 2;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
66269d47 3;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
233e7676 4;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
bdac3d4b 5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
fd76c904 6;;;
233e7676 7;;; This file is part of GNU Guix.
fd76c904 8;;;
233e7676 9;;; GNU Guix is free software; you can redistribute it and/or modify it
fd76c904
LC
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
233e7676 14;;; GNU Guix is distributed in the hope that it will be useful, but
fd76c904
LC
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
233e7676 20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
fd76c904 21
1ffa7090 22(define-module (gnu packages linux)
023fef7d
LC
23 #:use-module ((guix licenses)
24 #:hide (zlib))
59a43334 25 #:use-module (gnu packages)
30016044 26 #:use-module ((gnu packages compression) #:prefix guix:)
3b027388 27 #:use-module (gnu packages gcc)
1ffa7090 28 #:use-module (gnu packages flex)
90a0048f 29 #:use-module (gnu packages bison)
d7d42d6b 30 #:use-module (gnu packages gperf)
1ffa7090
LC
31 #:use-module (gnu packages libusb)
32 #:use-module (gnu packages ncurses)
d7d42d6b 33 #:use-module (gnu packages pciutils)
5f96f303 34 #:use-module (gnu packages databases)
1ffa7090
LC
35 #:use-module (gnu packages perl)
36 #:use-module (gnu packages pkg-config)
7c0dbe78 37 #:use-module (gnu packages python)
e7b38500 38 #:use-module (gnu packages algebra)
1dba6407 39 #:use-module (gnu packages gettext)
db288efa 40 #:use-module (gnu packages glib)
17b293a0 41 #:use-module (gnu packages pulseaudio)
c762e82e 42 #:use-module (gnu packages attr)
17b293a0 43 #:use-module (gnu packages xml)
215b6431 44 #:use-module (gnu packages autotools)
f57d2639 45 #:use-module (gnu packages texinfo)
b10e9ff6 46 #:use-module (gnu packages check)
30016044
MW
47 #:use-module (gnu packages maths)
48 #:use-module (gnu packages which)
49 #:use-module (gnu packages rrdtool)
b62fe07f 50 #:use-module (gnu packages elf)
b087d413 51 #:use-module (gnu packages gtk)
02b80c3f
NK
52 #:use-module (guix packages)
53 #:use-module (guix download)
dc2d59af 54 #:use-module (guix utils)
7c0dbe78 55 #:use-module (guix build-system gnu)
220193ad 56 #:use-module (guix build-system cmake)
e102f940 57 #:use-module (guix build-system python)
a94546ec
LC
58 #:use-module (guix build-system trivial)
59 #:use-module (srfi srfi-26)
60 #:use-module (ice-9 match))
fd76c904 61
aaf4cb20
LC
62(define-public (system->linux-architecture arch)
63 "Return the Linux architecture name for ARCH, a Guix system name such as
64\"x86_64-linux\"."
618cea69
NK
65 (let ((arch (car (string-split arch #\-))))
66 (cond ((string=? arch "i686") "i386")
67 ((string-prefix? "mips" arch) "mips")
aaf4cb20 68 ((string-prefix? "arm" arch) "arm")
618cea69
NK
69 (else arch))))
70
6023cc74
LC
71(define (linux-libre-urls version)
72 "Return a list of URLs for Linux-Libre VERSION."
73 (list (string-append
74 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
75 version "-gnu/linux-libre-" version "-gnu.tar.xz")
76
77 ;; XXX: Work around <http://bugs.gnu.org/14851>.
78 (string-append
79 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
80 version "-gnu.tar.xz")
81
82 ;; Maybe this URL will become valid eventually.
83 (string-append
84 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
85 version "-gnu.tar.xz")))
86
80fe5c60 87(define-public linux-libre-headers
dfb52abb 88 (let* ((version "3.3.8")
80fe5c60 89 (build-phase
618cea69
NK
90 (lambda (arch)
91 `(lambda _
92 (setenv "ARCH" ,(system->linux-architecture arch))
93 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
45298f8f 94
618cea69
NK
95 (and (zero? (system* "make" "defconfig"))
96 (zero? (system* "make" "mrproper" "headers_check"))))))
80fe5c60
LC
97 (install-phase
98 `(lambda* (#:key outputs #:allow-other-keys)
99 (let ((out (assoc-ref outputs "out")))
100 (and (zero? (system* "make"
101 (string-append "INSTALL_HDR_PATH=" out)
102 "headers_install"))
103 (mkdir (string-append out "/include/config"))
104 (call-with-output-file
105 (string-append out
106 "/include/config/kernel.release")
107 (lambda (p)
dfb52abb 108 (format p "~a-default~%" ,version))))))))
80fe5c60
LC
109 (package
110 (name "linux-libre-headers")
dfb52abb 111 (version version)
80fe5c60
LC
112 (source (origin
113 (method url-fetch)
6023cc74 114 (uri (linux-libre-urls version))
80fe5c60
LC
115 (sha256
116 (base32
117 "0jkfh0z1s6izvdnc3njm39dhzp1cg8i06jv06izwqz9w9qsprvnl"))))
118 (build-system gnu-build-system)
119 (native-inputs `(("perl" ,perl)))
120 (arguments
121 `(#:modules ((guix build gnu-build-system)
122 (guix build utils)
56c092ce 123 (srfi srfi-1))
80fe5c60 124 #:phases (alist-replace
fb6c2fa8
LC
125 'build ,(build-phase (or (%current-target-system)
126 (%current-system)))
80fe5c60
LC
127 (alist-replace
128 'install ,install-phase
56c092ce 129 (alist-delete 'configure %standard-phases)))
80fe5c60
LC
130 #:tests? #f))
131 (synopsis "GNU Linux-Libre kernel headers")
132 (description "Headers of the Linux-Libre kernel.")
38bbd61d 133 (license gpl2)
80fe5c60
LC
134 (home-page "http://www.gnu.org/software/linux-libre/"))))
135
b4fcb735
LC
136(define-public module-init-tools
137 (package
138 (name "module-init-tools")
139 (version "3.16")
140 (source (origin
141 (method url-fetch)
142 (uri (string-append
143 "mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-"
144 version ".tar.bz2"))
145 (sha256
146 (base32
d3bbe992
LC
147 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
148 (patches
149 (list (search-patch "module-init-tools-moduledir.patch")))))
b4fcb735 150 (build-system gnu-build-system)
b4fcb735 151 (arguments
5c413a9c
LC
152 ;; FIXME: The upstream tarball lacks man pages, and building them would
153 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
154 ;; but they vanished. In the meantime, fake it.
b4fcb735 155 '(#:phases (alist-cons-before
5c413a9c
LC
156 'configure 'fake-docbook
157 (lambda _
158 (substitute* "Makefile.in"
159 (("^DOCBOOKTOMAN.*$")
160 "DOCBOOKTOMAN = true\n")))
b4fcb735
LC
161 %standard-phases)))
162 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
163 (synopsis "Tools for loading and managing Linux kernel modules")
164 (description
165 "Tools for loading and managing Linux kernel modules, such as `modprobe',
166`insmod', `lsmod', and more.")
167 (license gpl2+)))
168
ac47a7c2
LC
169(define %boot-logo-patch
170 ;; Linux-Libre boot logo featuring Freedo and a gnu.
171 (origin
172 (method url-fetch)
173 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
74dde9e9 174 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
ac47a7c2
LC
175 (sha256
176 (base32
177 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
178
a94546ec
LC
179(define (kernel-config system)
180 "Return the absolute file name of the Linux-Libre build configuration file
1650dd8a 181for SYSTEM, or #f if there is no configuration for SYSTEM."
a94546ec
LC
182 (define (lookup file)
183 (let ((file (string-append "gnu/packages/" file)))
184 (search-path %load-path file)))
185
186 (match system
187 ("i686-linux"
188 (lookup "linux-libre-i686.conf"))
189 ("x86_64-linux"
190 (lookup "linux-libre-x86_64.conf"))
191 (_
1650dd8a 192 #f)))
a94546ec 193
beacfcab 194(define-public linux-libre
5db37191 195 (let* ((version "3.18.3")
beacfcab 196 (build-phase
ac47a7c2
LC
197 '(lambda* (#:key system inputs #:allow-other-keys #:rest args)
198 ;; Apply the neat patch.
9a224ac2 199 (system* "patch" "-p1" "--force"
ac47a7c2
LC
200 "-i" (assoc-ref inputs "patch/freedo+gnu"))
201
beacfcab
LC
202 (let ((arch (car (string-split system #\-))))
203 (setenv "ARCH"
204 (cond ((string=? arch "i686") "i386")
205 (else arch)))
206 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
207
a94546ec
LC
208 (let ((build (assoc-ref %standard-phases 'build))
209 (config (assoc-ref inputs "kconfig")))
1650dd8a
LC
210
211 ;; Use the architecture-specific config if available, and
212 ;; 'defconfig' otherwise.
213 (if config
214 (begin
215 (copy-file config ".config")
216 (chmod ".config" #o666))
217 (system* "make" "defconfig"))
a94546ec
LC
218
219 ;; Appending works even when the option wasn't in the
220 ;; file. The last one prevails if duplicated.
221 (let ((port (open-file ".config" "a")))
222 (display (string-append "CONFIG_NET_9P=m\n"
223 "CONFIG_NET_9P_VIRTIO=m\n"
224 "CONFIG_VIRTIO_BLK=m\n"
225 "CONFIG_VIRTIO_NET=m\n"
226 ;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
227 "CONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n"
228 "CONFIG_VIRTIO_PCI=m\n"
229 "CONFIG_VIRTIO_BALLOON=m\n"
230 "CONFIG_VIRTIO_MMIO=m\n"
231 "CONFIG_FUSE_FS=m\n"
232 "CONFIG_CIFS=m\n"
233 "CONFIG_9P_FS=m\n")
234 port)
235 (close-port port))
236
237 (zero? (system* "make" "oldconfig"))
238
239 ;; Call the default `build' phase so `-j' is correctly
240 ;; passed.
241 (apply build #:make-flags "all" args))))
beacfcab
LC
242 (install-phase
243 `(lambda* (#:key inputs outputs #:allow-other-keys)
244 (let* ((out (assoc-ref outputs "out"))
245 (moddir (string-append out "/lib/modules"))
246 (mit (assoc-ref inputs "module-init-tools")))
247 (mkdir-p moddir)
248 (for-each (lambda (file)
249 (copy-file file
250 (string-append out "/" (basename file))))
251 (find-files "." "^(bzImage|System\\.map)$"))
252 (copy-file ".config" (string-append out "/config"))
253 (zero? (system* "make"
254 (string-append "DEPMOD=" mit "/sbin/depmod")
255 (string-append "MODULE_DIR=" moddir)
256 (string-append "INSTALL_PATH=" out)
257 (string-append "INSTALL_MOD_PATH=" out)
cda3d81e 258 "INSTALL_MOD_STRIP=1"
beacfcab
LC
259 "modules_install"))))))
260 (package
261 (name "linux-libre")
dfb52abb 262 (version version)
beacfcab
LC
263 (source (origin
264 (method url-fetch)
6023cc74 265 (uri (linux-libre-urls version))
beacfcab
LC
266 (sha256
267 (base32
5db37191 268 "1qw8b4kc18s7qy314cm4mbg6hmyfpya10awxda78fa7g830pay8h"))))
beacfcab
LC
269 (build-system gnu-build-system)
270 (native-inputs `(("perl" ,perl)
e7b38500 271 ("bc" ,bc)
ac47a7c2 272 ("module-init-tools" ,module-init-tools)
a94546ec 273 ("patch/freedo+gnu" ,%boot-logo-patch)
1650dd8a
LC
274
275 ,@(let ((conf (kernel-config (or (%current-target-system)
276 (%current-system)))))
277 (if conf
278 `(("kconfig" ,conf))
279 '()))))
3b027388
LC
280
281 ;; XXX: Work around an ICE with our patched GCC 4.8.3 while compiling
282 ;; 'drivers/staging/vt6656/michael.o': <http://hydra.gnu.org/build/96389/>.
283 (inputs `(("gcc" ,gcc-4.9)))
284
beacfcab
LC
285 (arguments
286 `(#:modules ((guix build gnu-build-system)
287 (guix build utils)
288 (srfi srfi-1)
289 (ice-9 match))
290 #:phases (alist-replace
291 'build ,build-phase
292 (alist-replace
293 'install ,install-phase
294 (alist-delete 'configure %standard-phases)))
295 #:tests? #f))
f50d2669 296 (synopsis "100% free redistribution of a cleaned Linux kernel")
a22dc0c4 297 (description
79c311b8
LC
298 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
299It has been modified to remove all non-free binary blobs.")
beacfcab
LC
300 (license gpl2)
301 (home-page "http://www.gnu.org/software/linux-libre/"))))
302
c84d0eca
LC
303\f
304;;;
305;;; Pluggable authentication modules (PAM).
306;;;
307
fd76c904
LC
308(define-public linux-pam
309 (package
310 (name "linux-pam")
311 (version "1.1.6")
312 (source
313 (origin
314 (method url-fetch)
315 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
316 version ".tar.bz2")
317 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
318 version ".tar.bz2")))
319 (sha256
320 (base32
321 "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s"))))
322 (build-system gnu-build-system)
c4c4cc05 323 (native-inputs
fd76c904
LC
324 `(("flex" ,flex)
325
326 ;; TODO: optional dependencies
327 ;; ("libxcrypt" ,libxcrypt)
328 ;; ("cracklib" ,cracklib)
329 ))
330 (arguments
c134056a
LC
331 '(;; Most users, such as `shadow', expect the headers to be under
332 ;; `security'.
333 #:configure-flags (list (string-append "--includedir="
334 (assoc-ref %outputs "out")
335 "/include/security"))
336
337 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
338 ;; isn't available.
339 #:tests? #f))
fd76c904
LC
340 (home-page "http://www.linux-pam.org/")
341 (synopsis "Pluggable authentication modules for Linux")
342 (description
343 "A *Free* project to implement OSF's RFC 86.0.
344Pluggable authentication modules are small shared object files that can
345be used through the PAM API to perform tasks, like authenticating a user
346at login. Local and dynamic reconfiguration are its key features")
4a44e743 347 (license bsd-3)))
686f14e8 348
c84d0eca
LC
349\f
350;;;
351;;; Miscellaneous.
352;;;
353
686f14e8
LC
354(define-public psmisc
355 (package
356 (name "psmisc")
357 (version "22.20")
358 (source
359 (origin
360 (method url-fetch)
361 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
362 version ".tar.gz"))
363 (sha256
364 (base32
365 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
366 (build-system gnu-build-system)
367 (inputs `(("ncurses" ,ncurses)))
368 (home-page "http://psmisc.sourceforge.net/")
369 (synopsis
35b9e423 370 "Small utilities that use the proc filesystem")
686f14e8
LC
371 (description
372 "This PSmisc package is a set of some small useful utilities that
35b9e423 373use the proc filesystem. We're not about changing the world, but
686f14e8 374providing the system administrator with some help in common tasks.")
4a44e743 375 (license gpl2+)))
02b80c3f
NK
376
377(define-public util-linux
378 (package
379 (name "util-linux")
380 (version "2.21")
5a6a3ba4
LC
381 (source (origin
382 (method url-fetch)
383 (uri (string-append "mirror://kernel.org/linux/utils/"
384 name "/v" version "/"
385 name "-" version ".2" ".tar.xz"))
386 (sha256
387 (base32
388 "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir"))
9d77da2a
LC
389 (patches (list (search-patch "util-linux-perl.patch")))
390 (modules '((guix build utils)))
391 (snippet
392 ;; We take the 'logger' program from GNU Inetutils, so remove
393 ;; it from here.
394 '(substitute* "misc-utils/Makefile.in"
395 (("PROGRAMS =(.*) logger(.*)" _ before after)
396 (string-append "PROGRAMS =" before " " after))
397 (("MANS =(.*) logger\\.1(.*)" _ before after)
398 (string-append "MANS =" before " " after))))))
02b80c3f
NK
399 (build-system gnu-build-system)
400 (arguments
8b8476b8
AE
401 `(#:configure-flags '("--disable-use-tty-group"
402 "--enable-ddate")
02b80c3f
NK
403 #:phases (alist-cons-after
404 'install 'patch-chkdupexe
405 (lambda* (#:key outputs #:allow-other-keys)
406 (let ((out (assoc-ref outputs "out")))
407 (substitute* (string-append out "/bin/chkdupexe")
408 ;; Allow 'patch-shebang' to do its work.
409 (("@PERL@") "/bin/perl"))))
410 %standard-phases)))
4a44e743 411 (inputs `(("zlib" ,guix:zlib)
c4c4cc05
JD
412 ("ncurses" ,ncurses)))
413 (native-inputs
414 `(("perl" ,perl)))
02b80c3f 415 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
35ec07c7 416 (synopsis "Collection of utilities for the Linux kernel")
02b80c3f 417 (description
35b9e423 418 "Util-linux is a random collection of utilities for the Linux kernel.")
fe8ccfcc 419
02b80c3f 420 ;; Note that util-linux doesn't use the same license for all the
fe8ccfcc 421 ;; code. GPLv2+ is the default license for a code without an
02b80c3f 422 ;; explicitly defined license.
fe8ccfcc
LC
423 (license (list gpl3+ gpl2+ gpl2 lgpl2.0+
424 bsd-4 public-domain))))
5d5c4278 425
e47e3eff
LC
426(define-public procps
427 (package
428 (name "procps")
429 (version "3.2.8")
430 (source (origin
431 (method url-fetch)
432 (uri (string-append "http://procps.sourceforge.net/procps-"
433 version ".tar.gz"))
434 (sha256
435 (base32
01eafd38
LC
436 "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i"))
437 (patches (list (search-patch "procps-make-3.82.patch")))))
e47e3eff 438 (build-system gnu-build-system)
01eafd38 439 (inputs `(("ncurses" ,ncurses)))
e47e3eff 440 (arguments
01eafd38 441 '(#:phases (alist-replace
e47e3eff
LC
442 'configure
443 (lambda* (#:key outputs #:allow-other-keys)
444 ;; No `configure', just a single Makefile.
445 (let ((out (assoc-ref outputs "out")))
446 (substitute* "Makefile"
447 (("/usr/") "/")
448 (("--(owner|group) 0") "")
449 (("ldconfig") "true")
450 (("^LDFLAGS[[:blank:]]*:=(.*)$" _ value)
451 ;; Add libproc to the RPATH.
452 (string-append "LDFLAGS := -Wl,-rpath="
453 out "/lib" value))))
454 (setenv "CC" "gcc"))
455 (alist-replace
456 'install
457 (lambda* (#:key outputs #:allow-other-keys)
458 (let ((out (assoc-ref outputs "out")))
459 (and (zero?
460 (system* "make" "install"
461 (string-append "DESTDIR=" out)))
462
463 ;; Sanity check.
464 (zero?
465 (system* (string-append out "/bin/ps")
466 "--version")))))
467 %standard-phases))
468
469 ;; What did you expect? Tests?
470 #:tests? #f))
471 (home-page "http://procps.sourceforge.net/")
35ec07c7 472 (synopsis "Utilities that give information about processes")
e47e3eff 473 (description
35b9e423 474 "Procps is the package that has a bunch of small useful utilities
e47e3eff
LC
475that give information about processes using the Linux /proc file system.
476The package includes the programs ps, top, vmstat, w, kill, free,
477slabtop, and skill.")
478 (license gpl2)))
479
5d5c4278
NK
480(define-public usbutils
481 (package
482 (name "usbutils")
483 (version "006")
484 (source
485 (origin
486 (method url-fetch)
487 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
488 "usbutils-" version ".tar.xz"))
489 (sha256
490 (base32
491 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
492 (build-system gnu-build-system)
493 (inputs
c4c4cc05
JD
494 `(("libusb" ,libusb)))
495 (native-inputs
496 `(("pkg-config" ,pkg-config)))
5d5c4278
NK
497 (home-page "http://www.linux-usb.org/")
498 (synopsis
499 "Tools for working with USB devices, such as lsusb")
500 (description
501 "Tools for working with USB devices, such as lsusb.")
4050e5d6 502 (license gpl2+)))
0750452a
LC
503
504(define-public e2fsprogs
505 (package
506 (name "e2fsprogs")
507 (version "1.42.7")
508 (source (origin
509 (method url-fetch)
510 (uri (string-append "mirror://sourceforge/e2fsprogs/e2fsprogs-"
511 version ".tar.gz"))
512 (sha256
513 (base32
7c594a2c
LC
514 "0ibkkvp6kan0hn0d1anq4n2md70j5gcm7mwna515w82xwyr02rfw"))
515 (modules '((guix build utils)))
516 (snippet
517 '(substitute* "MCONFIG.in"
518 (("INSTALL_SYMLINK = /bin/sh")
519 "INSTALL_SYMLINK = sh")))))
0750452a 520 (build-system gnu-build-system)
c4c4cc05 521 (inputs `(("util-linux" ,util-linux)))
f57d2639 522 (native-inputs `(("pkg-config" ,pkg-config)
7c594a2c 523 ("texinfo" ,texinfo))) ;for the libext2fs Info manual
0750452a 524 (arguments
ddfc2fd8
LC
525 '(;; The 'blkid' command and library are already provided by util-linux,
526 ;; which is the preferred source for them (see, e.g.,
527 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b336339909c90559b7db40b455f172>.)
7c594a2c
LC
528 #:configure-flags '("--disable-blkid"
529
530 ;; Install libext2fs et al.
531 "--enable-elf-shlibs")
532
533 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
534 (assoc-ref %outputs "out")
535 "/lib"))
ddfc2fd8
LC
536
537 #:phases (alist-cons-before
0750452a
LC
538 'configure 'patch-shells
539 (lambda _
540 (substitute* "configure"
541 (("/bin/sh (.*)parse-types.sh" _ dir)
542 (string-append (which "sh") " " dir
543 "parse-types.sh")))
544 (substitute* (find-files "." "^Makefile.in$")
545 (("#!/bin/sh")
546 (string-append "#!" (which "sh")))))
1c975f60
LC
547 (alist-cons-after
548 'install 'install-libs
549 (lambda _
550 (zero? (system* "make" "install-libs")))
551 %standard-phases))
0750452a
LC
552
553 ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
554 ;; they fail because we get an extra line that says "Can't check if
555 ;; filesystem is mounted due to missing mtab file".
556 #:tests? #f))
557 (home-page "http://e2fsprogs.sourceforge.net/")
35ec07c7 558 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
0750452a
LC
559 (description
560 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
561 (license (list gpl2 ; programs
562 lgpl2.0 ; libext2fs
563 x11)))) ; libuuid
d8482ad0 564
e48977e7
LC
565(define e2fsprogs/static
566 (static-package
567 (package (inherit e2fsprogs)
568 (arguments
569 ;; Do not build shared libraries.
570 (substitute-keyword-arguments (package-arguments e2fsprogs)
571 ((#:configure-flags _)
572 '(list "--disable-blkid"))
573 ((#:make-flags _)
574 '(list)))))))
575
e102f940
LC
576(define-public e2fsck/static
577 (package
578 (name "e2fsck-static")
0997771a 579 (version (package-version e2fsprogs))
e102f940
LC
580 (build-system trivial-build-system)
581 (source #f)
582 (arguments
583 `(#:modules ((guix build utils))
584 #:builder
585 (begin
586 (use-modules (guix build utils)
587 (ice-9 ftw)
588 (srfi srfi-26))
589
590 (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs")
591 "/sbin"))
592 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
593 (mkdir-p bin)
594 (with-directory-excursion bin
595 (for-each (lambda (file)
596 (copy-file (string-append source "/" file)
597 file)
598 (remove-store-references file)
599 (chmod file #o555))
600 (scandir source (cut string-prefix? "fsck." <>))))))))
e48977e7 601 (inputs `(("e2fsprogs" ,e2fsprogs/static)))
e102f940
LC
602 (synopsis "Statically-linked fsck.* commands from e2fsprogs")
603 (description
604 "This package provides statically-linked command of fsck.ext[234] taken
605from the e2fsprogs package. It is meant to be used in initrds.")
0997771a
LC
606 (home-page (package-home-page e2fsprogs))
607 (license (package-license e2fsprogs))))
e102f940 608
1c975f60
LC
609(define-public zerofree
610 (package
611 (name "zerofree")
612 (version "1.0.3")
613 (home-page "http://intgat.tigress.co.uk/rmy/uml/")
614 (source (origin
615 (method url-fetch)
616 (uri (string-append home-page name "-" version
617 ".tgz"))
618 (sha256
619 (base32
620 "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs"))))
621 (build-system gnu-build-system)
622 (arguments
623 '(#:phases (alist-replace
624 'install
625 (lambda* (#:key outputs #:allow-other-keys)
626 (let* ((out (assoc-ref outputs "out"))
627 (bin (string-append out "/bin")))
628 (mkdir-p bin)
629 (copy-file "zerofree"
630 (string-append bin "/zerofree"))
631 (chmod (string-append bin "/zerofree")
632 #o555)
633 #t))
634 (alist-delete 'configure %standard-phases))
635 #:tests? #f)) ;no tests
636 (inputs `(("libext2fs" ,e2fsprogs)))
637 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
638 (description
639 "The zerofree command scans the free blocks in an ext2 file system and
640fills any non-zero blocks with zeroes. This is a useful way to make disk
641images more compressible.")
642 (license gpl2)))
643
d8482ad0
LC
644(define-public strace
645 (package
646 (name "strace")
647 (version "4.7")
648 (source (origin
649 (method url-fetch)
650 (uri (string-append "mirror://sourceforge/strace/strace-"
651 version ".tar.xz"))
652 (sha256
653 (base32
654 "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
655 (build-system gnu-build-system)
c4c4cc05 656 (native-inputs `(("perl" ,perl)))
d8482ad0
LC
657 (home-page "http://strace.sourceforge.net/")
658 (synopsis "System call tracer for Linux")
659 (description
660 "strace is a system call tracer, i.e. a debugging tool which prints out a
661trace of all the system calls made by a another process/program.")
662 (license bsd-3)))
ba04571a
LC
663
664(define-public alsa-lib
665 (package
666 (name "alsa-lib")
667 (version "1.0.27.1")
668 (source (origin
669 (method url-fetch)
670 (uri (string-append
671 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
672 version ".tar.bz2"))
673 (sha256
674 (base32
bcd94e19
MW
675 "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9"))
676 (patches (list (search-patch "alsa-lib-mips-atomic-fix.patch")))))
ba04571a
LC
677 (build-system gnu-build-system)
678 (home-page "http://www.alsa-project.org/")
679 (synopsis "The Advanced Linux Sound Architecture libraries")
680 (description
681 "The Advanced Linux Sound Architecture (ALSA) provides audio and
682MIDI functionality to the Linux-based operating system.")
683 (license lgpl2.1+)))
10afdf50 684
17b293a0
LC
685(define-public alsa-utils
686 (package
687 (name "alsa-utils")
688 (version "1.0.27.2")
689 (source (origin
690 (method url-fetch)
691 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-"
692 version ".tar.bz2"))
693 (sha256
694 (base32
695 "1sjjngnq50jv5ilwsb4zys6smifni3bd6fn28gbnhfrg14wsrgq2"))))
696 (build-system gnu-build-system)
697 (arguments
698 ;; XXX: Disable man page creation until we have DocBook.
699 '(#:configure-flags (list "--disable-xmlto"
f2817d43
LC
700
701 ;; The udev rule is responsible for restoring
702 ;; the volume.
17b293a0
LC
703 (string-append "--with-udev-rules-dir="
704 (assoc-ref %outputs "out")
705 "/lib/udev/rules.d"))
706 #:phases (alist-cons-before
707 'install 'pre-install
708 (lambda _
709 ;; Don't try to mkdir /var/lib/alsa.
710 (substitute* "Makefile"
711 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
712 "true\n")))
713 %standard-phases)))
714 (inputs
715 `(("libsamplerate" ,libsamplerate)
716 ("ncurses" ,ncurses)
717 ("alsa-lib" ,alsa-lib)
718 ("xmlto" ,xmlto)
1dba6407 719 ("gettext" ,gnu-gettext)))
17b293a0
LC
720 (home-page "http://www.alsa-project.org/")
721 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
722 (description
723 "The Advanced Linux Sound Architecture (ALSA) provides audio and
724MIDI functionality to the Linux-based operating system.")
725
726 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
727 ;; GPLv2-only.
728 (license gpl2)))
729
10afdf50
LC
730(define-public iptables
731 (package
732 (name "iptables")
733 (version "1.4.16.2")
734 (source (origin
735 (method url-fetch)
736 (uri (string-append
737 "http://www.netfilter.org/projects/iptables/files/iptables-"
738 version ".tar.bz2"))
739 (sha256
740 (base32
741 "0vkg5lzkn4l3i1sm6v3x96zzvnv9g7mi0qgj6279ld383mzcws24"))))
742 (build-system gnu-build-system)
743 (arguments '(#:tests? #f)) ; no test suite
744 (home-page "http://www.netfilter.org/projects/iptables/index.html")
745 (synopsis "Program to configure the Linux IP packet filtering rules")
746 (description
747 "iptables is the userspace command line program used to configure the
748Linux 2.4.x and later IPv4 packet filtering ruleset. It is targeted towards
749system administrators. Since Network Address Translation is also configured
750from the packet filter ruleset, iptables is used for this, too. The iptables
751package also includes ip6tables. ip6tables is used for configuring the IPv6
752packet filter.")
753 (license gpl2+)))
90a0048f
LC
754
755(define-public iproute
756 (package
757 (name "iproute2")
5fd7f3e0 758 (version "3.12.0")
90a0048f
LC
759 (source (origin
760 (method url-fetch)
761 (uri (string-append
762 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
763 version ".tar.xz"))
764 (sha256
765 (base32
5fd7f3e0 766 "04gi11gh087bg2nlxhj0lxrk8l9qxkpr88nsiil23917bm3h1xj4"))))
90a0048f
LC
767 (build-system gnu-build-system)
768 (arguments
769 `(#:tests? #f ; no test suite
770 #:make-flags (let ((out (assoc-ref %outputs "out")))
771 (list "DESTDIR="
772 (string-append "LIBDIR=" out "/lib")
773 (string-append "SBINDIR=" out "/sbin")
774 (string-append "CONFDIR=" out "/etc")
775 (string-append "DOCDIR=" out "/share/doc/"
776 ,name "-" ,version)
777 (string-append "MANDIR=" out "/share/man")))
778 #:phases (alist-cons-before
779 'install 'pre-install
780 (lambda _
781 ;; Don't attempt to create /var/lib/arpd.
782 (substitute* "Makefile"
783 (("^.*ARPDDIR.*$") "")))
784 %standard-phases)))
785 (inputs
786 `(("iptables" ,iptables)
c4c4cc05
JD
787 ("db4" ,bdb)))
788 (native-inputs
789 `(("pkg-config" ,pkg-config)
90a0048f
LC
790 ("flex" ,flex)
791 ("bison" ,bison)))
792 (home-page
793 "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
794 (synopsis
9e771e3b 795 "Utilities for controlling TCP/IP networking and traffic in Linux")
90a0048f
LC
796 (description
797 "Iproute2 is a collection of utilities for controlling TCP/IP
798networking and traffic with the Linux kernel.
799
800Most network configuration manuals still refer to ifconfig and route as the
801primary network configuration tools, but ifconfig is known to behave
802inadequately in modern network environments. They should be deprecated, but
803most distros still include them. Most network configuration systems make use
804of ifconfig and thus provide a limited feature set. The /etc/net project aims
805to support most modern network technologies, as it doesn't use ifconfig and
806allows a system administrator to make use of all iproute2 features, including
807traffic control.
808
809iproute2 is usually shipped in a package called iproute or iproute2 and
810consists of several tools, of which the most important are ip and tc. ip
811controls IPv4 and IPv6 configuration and tc stands for traffic control. Both
812tools print detailed usage messages and are accompanied by a set of
813manpages.")
814 (license gpl2+)))
85e0dc6a
LC
815
816(define-public net-tools
817 ;; XXX: This package is basically unmaintained, but it provides a few
818 ;; commands not yet provided by Inetutils, such as 'route', so we have to
819 ;; live with it.
820 (package
821 (name "net-tools")
822 (version "1.60")
823 (home-page "http://www.tazenda.demon.co.uk/phil/net-tools/")
824 (source (origin
825 (method url-fetch)
826 (uri (string-append home-page "/" name "-"
827 version ".tar.bz2"))
828 (sha256
829 (base32
177088a3
LC
830 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
831 (patches
832 (list (search-patch "net-tools-bitrot.patch")))))
85e0dc6a
LC
833 (build-system gnu-build-system)
834 (arguments
cd143df0
LC
835 '(#:phases (alist-cons-after
836 'unpack 'patch
85e0dc6a
LC
837 (lambda* (#:key inputs #:allow-other-keys)
838 (define (apply-patch file)
9a224ac2 839 (zero? (system* "patch" "-p1" "--force"
85e0dc6a
LC
840 "--input" file)))
841
842 (let ((patch.gz (assoc-ref inputs "patch")))
843 (format #t "applying Debian patch set '~a'...~%"
844 patch.gz)
845 (system (string-append "gunzip < " patch.gz " > the-patch"))
846 (pk 'here)
847 (and (apply-patch "the-patch")
848 (for-each apply-patch
849 (find-files "debian/patches"
850 "\\.patch")))))
851 (alist-replace
852 'configure
853 (lambda* (#:key outputs #:allow-other-keys)
854 (let ((out (assoc-ref outputs "out")))
855 (mkdir-p (string-append out "/bin"))
856 (mkdir-p (string-append out "/sbin"))
857
858 ;; Pretend we have everything...
859 (system "yes | make config")
860
861 ;; ... except we don't have libdnet, so remove that
862 ;; definition.
863 (substitute* '("config.make" "config.h")
864 (("^.*HAVE_AFDECnet.*$") ""))))
865 %standard-phases))
866
867 ;; Binaries that depend on libnet-tools.a don't declare that
868 ;; dependency, making it parallel-unsafe.
869 #:parallel-build? #f
870
871 #:tests? #f ; no test suite
0d55c356
MW
872 #:make-flags (let ((out (assoc-ref %outputs "out")))
873 (list "CC=gcc"
874 (string-append "BASEDIR=" out)
875 (string-append "INSTALLNLSDIR=" out "/share/locale")
876 (string-append "mandir=/share/man")))))
85e0dc6a
LC
877
878 ;; Use the big Debian patch set (the thing does not even compile out of
879 ;; the box.)
880 (inputs `(("patch" ,(origin
881 (method url-fetch)
882 (uri
883 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
884 (sha256
885 (base32
886 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
1dba6407 887 (native-inputs `(("gettext" ,gnu-gettext)))
85e0dc6a
LC
888
889 (synopsis "Tools for controlling the network subsystem in Linux")
890 (description
891 "This package includes the important tools for controlling the network
892subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
893netstat, rarp and route. Additionally, this package contains utilities
894relating to particular network hardware types (plipconfig, slattach) and
895advanced aspects of IP configuration (iptunnel, ipmaddr).")
896 (license gpl2+)))
c762e82e
LC
897
898(define-public libcap
899 (package
900 (name "libcap")
901 (version "2.22")
902 (source (origin
903 (method url-fetch)
904
905 ;; Tarballs used to be available from
906 ;; <https://www.kernel.org/pub/linux/libs/security/linux-privs/>
907 ;; but they never came back after kernel.org was compromised.
908 (uri (string-append
909 "mirror://debian/pool/main/libc/libcap2/libcap2_"
910 version ".orig.tar.gz"))
911 (sha256
912 (base32
913 "07vjhkznm82p8dm4w6j8mmg7h5c70lp5s9bwwfdmgwpbixfydjp1"))))
914 (build-system gnu-build-system)
915 (arguments '(#:phases (alist-delete 'configure %standard-phases)
916 #:tests? #f ; no 'check' target
917 #:make-flags (list "lib=lib"
918 (string-append "prefix="
919 (assoc-ref %outputs "out"))
920 "RAISE_SETFCAP=no")))
921 (native-inputs `(("perl" ,perl)))
922 (inputs `(("attr" ,attr)))
923 (home-page "https://sites.google.com/site/fullycapable/")
924 (synopsis "Library for working with POSIX capabilities")
925 (description
35b9e423 926 "Libcap2 provides a programming interface to POSIX capabilities on
c762e82e
LC
927Linux-based operating systems.")
928
929 ;; License is BSD-3 or GPLv2, at the user's choice.
930 (license gpl2)))
215b6431
LC
931
932(define-public bridge-utils
933 (package
934 (name "bridge-utils")
935 (version "1.5")
936 (source (origin
937 (method url-fetch)
938 (uri (string-append "mirror://sourceforge/bridge/bridge-utils-"
939 version ".tar.gz"))
940 (sha256
941 (base32
942 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
943 (build-system gnu-build-system)
944
945 ;; The tarball lacks all the generated files.
946 (native-inputs `(("autoconf" ,autoconf)
947 ("automake" ,automake)))
948 (arguments
949 '(#:phases (alist-cons-before
950 'configure 'bootstrap
951 (lambda _
952 (zero? (system* "autoreconf" "-vf")))
953 %standard-phases)
954 #:tests? #f)) ; no 'check' target
955
956 (home-page
957 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
958 (synopsis "Manipulate Ethernet bridges")
959 (description
960 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
961to connect two Ethernet segments together in a protocol independent way.
962Packets are forwarded based on Ethernet address, rather than IP address (like
963a router). Since forwarding is done at Layer 2, all protocols can go
964transparently through a bridge.")
965 (license gpl2+)))
3cc20675
LC
966
967(define-public libnl
968 (package
969 (name "libnl")
bdac3d4b 970 (version "3.2.25")
3cc20675
LC
971 (source (origin
972 (method url-fetch)
973 (uri (string-append
974 "http://www.infradead.org/~tgr/libnl/files/libnl-"
975 version ".tar.gz"))
976 (sha256
977 (base32
bdac3d4b 978 "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb"))))
3cc20675
LC
979 (build-system gnu-build-system)
980 (native-inputs `(("flex" ,flex) ("bison" ,bison)))
981 (home-page "http://www.infradead.org/~tgr/libnl/")
982 (synopsis "NetLink protocol library suite")
983 (description
984 "The libnl suite is a collection of libraries providing APIs to netlink
985protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarly
986between the kernel and user space processes. It was designed to be a more
987flexible successor to ioctl to provide mainly networking related kernel
988configuration and monitoring interfaces.")
989
990 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
991 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
992 (license gpl2)))
023fef7d 993
65cd77db
MW
994(define-public iw
995 (package
996 (name "iw")
997 (version "3.17")
998 (source (origin
999 (method url-fetch)
1000 (uri (string-append
1001 "https://www.kernel.org/pub/software/network/iw/iw-"
1002 version ".tar.xz"))
1003 (sha256
1004 (base32
1005 "14zsapqhivk0ws5z21y1ys2c2czi05mzk7bl2yb7qxcfrnsjx9j8"))))
1006 (build-system gnu-build-system)
1007 (native-inputs `(("pkg-config" ,pkg-config)))
1008 (inputs `(("libnl" ,libnl)))
1009 (arguments
1010 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1011 "CC=gcc")
1012 #:phases (alist-delete 'configure %standard-phases)))
1013 (home-page "http://wireless.kernel.org/en/users/Documentation/iw")
1014 (synopsis "Tool for configuring wireless devices")
1015 (description
1016 "iw is a new nl80211 based CLI configuration utility for wireless
1017devices. It replaces 'iwconfig', which is deprecated.")
1018 (license isc)))
1019
023fef7d
LC
1020(define-public powertop
1021 (package
1022 (name "powertop")
1023 (version "2.5")
1024 (source
1025 (origin
1026 (method url-fetch)
1027 (uri (string-append
1028 "https://01.org/powertop/sites/default/files/downloads/powertop-"
1029 version ".tar.gz"))
1030 (sha256
1031 (base32
1032 "02rwqbpasdayl201v0549gbp2f82rd0hqiv3i111r7npanjhhb4b"))))
1033 (build-system gnu-build-system)
1034 (inputs
1035 ;; TODO: Add pciutils.
1036 `(("zlib" ,guix:zlib)
023fef7d
LC
1037 ;; ("pciutils" ,pciutils)
1038 ("ncurses" ,ncurses)
1039 ("libnl" ,libnl)))
c4c4cc05
JD
1040 (native-inputs
1041 `(("pkg-config" ,pkg-config)))
023fef7d
LC
1042 (home-page "https://01.org/powertop/")
1043 (synopsis "Analyze power consumption on Intel-based laptops")
1044 (description
1045 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1046power management. In addition to being a diagnostic tool, PowerTOP also has
1047an interactive mode where the user can experiment various power management
1048settings for cases where the operating system has not enabled these
1049settings.")
1050 (license gpl2)))
6869e5c9
LC
1051
1052(define-public aumix
1053 (package
1054 (name "aumix")
1055 (version "2.9.1")
1056 (source (origin
1057 (method url-fetch)
1058 (uri (string-append
1059 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1060 version ".tar.bz2"))
1061 (sha256
1062 (base32
1063 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1064 (build-system gnu-build-system)
1065 (inputs `(("ncurses" ,ncurses)))
1066 (home-page "http://www.jpj.net/~trevor/aumix.html")
1067 (synopsis "Audio mixer for X and the console")
1068 (description
1069 "Aumix adjusts an audio mixer from X, the console, a terminal,
1070the command line or a script.")
1071 (license gpl2+)))
7c0dbe78
SHT
1072
1073(define-public iotop
1074 (package
1075 (name "iotop")
1076 (version "0.6")
1077 (source
1078 (origin
1079 (method url-fetch)
1080 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1081 version ".tar.gz"))
1082 (sha256 (base32
1083 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1084 (build-system python-build-system)
1085 (arguments
35cebf01 1086 ;; The setup.py script expects python-2.
7c0dbe78 1087 `(#:python ,python-2
35cebf01 1088 ;; There are currently no checks in the package.
7c0dbe78
SHT
1089 #:tests? #f))
1090 (native-inputs `(("python" ,python-2)))
1091 (home-page "http://guichaz.free.fr/iotop/")
1092 (synopsis
1093 "Displays the IO activity of running processes")
1094 (description
1095 "Iotop is a Python program with a top like user interface to show the
1096processes currently causing I/O.")
35cebf01 1097 (license gpl2+)))
e30835e2
LC
1098
1099(define-public fuse
1100 (package
1101 (name "fuse")
1102 (version "2.9.3")
1103 (source (origin
1104 (method url-fetch)
1105 (uri (string-append "mirror://sourceforge/fuse/fuse-"
1106 version ".tar.gz"))
1107 (sha256
1108 (base32
1109 "071r6xjgssy8vwdn6m28qq1bqxsd2bphcd2mzhq0grf5ybm87sqb"))))
1110 (build-system gnu-build-system)
b148bd71 1111 (inputs `(("util-linux" ,util-linux)))
e30835e2
LC
1112 (arguments
1113 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1114 (assoc-ref %outputs "out")
1115 "/sbin")
1116 (string-append "INIT_D_PATH="
1117 (assoc-ref %outputs "out")
1118 "/etc/init.d")
9a4efac9
LC
1119
1120 ;; The rule makes /dev/fuse 666.
e30835e2
LC
1121 (string-append "UDEV_RULES_PATH="
1122 (assoc-ref %outputs "out")
9a4efac9 1123 "/lib/udev/rules.d"))
b148bd71
LC
1124 #:phases (alist-cons-before
1125 'build 'set-file-names
1126 (lambda* (#:key inputs #:allow-other-keys)
1127 ;; libfuse calls out to mount(8) and umount(8). Make sure
1128 ;; it refers to the right ones.
1129 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1130 (("/bin/(u?)mount" _ maybe-u)
1131 (string-append (assoc-ref inputs "util-linux")
1132 "/bin/" maybe-u "mount")))
1133 (substitute* '("util/mount.fuse.c")
1134 (("/bin/sh")
bd663902
LC
1135 (which "sh")))
1136
1137 ;; This hack leads libfuse to search for 'fusermount' in
1138 ;; $PATH, where it may find a setuid-root binary, instead of
1139 ;; trying solely $out/sbin/fusermount and failing because
1140 ;; it's not setuid.
1141 (substitute* "lib/Makefile"
1142 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1143 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
b148bd71 1144 %standard-phases)))
e30835e2
LC
1145 (home-page "http://fuse.sourceforge.net/")
1146 (synopsis "Support file systems implemented in user space")
1147 (description
1148 "As a consequence of its monolithic design, file system code for Linux
1149normally goes into the kernel itself---which is not only a robustness issue,
1150but also an impediment to system extensibility. FUSE, for \"file systems in
1151user space\", is a kernel module and user-space library that tries to address
1152part of this problem by allowing users to run file system implementations as
1153user-space processes.")
1154 (license (list lgpl2.1 ; library
1155 gpl2+)))) ; command-line utilities
220193ad
LC
1156
1157(define-public unionfs-fuse
1158 (package
1159 (name "unionfs-fuse")
1160 (version "0.26")
1161 (source (origin
1162 (method url-fetch)
1163 (uri (string-append
1164 "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-"
1165 version ".tar.xz"))
1166 (sha256
1167 (base32
1168 "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d"))))
1169 (build-system cmake-build-system)
1170 (inputs `(("fuse" ,fuse)))
1171 (arguments '(#:tests? #f)) ; no tests
1172 (home-page "http://podgorny.cz/moin/UnionFsFuse")
1173 (synopsis "User-space union file system")
1174 (description
1175 "UnionFS-FUSE is a flexible union file system implementation in user
1176space, using the FUSE library. Mounting a union file system allows you to
1177\"aggregate\" the contents of several directories into a single mount point.
1178UnionFS-FUSE additionally supports copy-on-write.")
1179 (license bsd-3)))
ed748588 1180
0b7a0c20
LC
1181(define fuse-static
1182 (package (inherit fuse)
1183 (name "fuse-static")
1184 (source (origin (inherit (package-source fuse))
1185 (modules '((guix build utils)))
1186 (snippet
1187 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1188 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1189 ;; it doesn't do that, allowing us to remove the dependency on
1190 ;; util-linux (something that is useful in initrds.)
1191 '(substitute* '("lib/mount_util.c"
1192 "util/mount_util.c")
1193 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1194 "0")
1195 (("/bin/")
1196 "")))))))
1197
ed748588
LC
1198(define-public unionfs-fuse/static
1199 (package (inherit unionfs-fuse)
1200 (synopsis "User-space union file system (statically linked)")
1201 (name (string-append (package-name unionfs-fuse) "-static"))
1202 (source (origin (inherit (package-source unionfs-fuse))
1203 (modules '((guix build utils)))
1204 (snippet
1205 ;; Add -ldl to the libraries, because libfuse.a needs that.
1206 '(substitute* "src/CMakeLists.txt"
1207 (("target_link_libraries(.*)\\)" _ libs)
1208 (string-append "target_link_libraries"
1209 libs " dl)"))))))
1210 (arguments
1211 '(#:tests? #f
1456cff1
LC
1212 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1213 #:phases (alist-cons-after
1214 'install 'post-install
1215 (lambda* (#:key outputs #:allow-other-keys)
1216 (let* ((out (assoc-ref outputs "out"))
1217 (exe (string-append out "/bin/unionfs")))
1218 ;; By default, 'unionfs' keeps references to
1219 ;; $glibc/share/locale and similar stuff. Remove them.
1220 (remove-store-references exe)))
1221 %standard-phases)))
0b7a0c20 1222 (inputs `(("fuse" ,fuse-static)))))
67b66003 1223
db288efa
LC
1224(define-public sshfs-fuse
1225 (package
1226 (name "sshfs-fuse")
1227 (version "2.5")
1228 (source (origin
1229 (method url-fetch)
1230 (uri (string-append "mirror://sourceforge/fuse/sshfs-fuse-"
1231 version ".tar.gz"))
1232 (sha256
1233 (base32
1234 "0gp6qr33l2p0964j0kds0dfmvyyf5lpgsn11daf0n5fhwm9185z9"))))
1235 (build-system gnu-build-system)
1236 (inputs
1237 `(("fuse" ,fuse)
1238 ("glib" ,glib)))
1239 (native-inputs
1240 `(("pkg-config" ,pkg-config)))
1241 (home-page "http://fuse.sourceforge.net/sshfs.html")
1242 (synopsis "Mount remote file systems over SSH")
1243 (description
1244 "This is a file system client based on the SSH File Transfer Protocol.
1245Since most SSH servers already support this protocol it is very easy to set
1246up: on the server side there's nothing to do; on the client side mounting the
1247file system is as easy as logging into the server with an SSH client.")
1248 (license gpl2+)))
1249
67b66003
LC
1250(define-public numactl
1251 (package
1252 (name "numactl")
1253 (version "2.0.9")
1254 (source (origin
1255 (method url-fetch)
1256 (uri (string-append
1257 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1258 version
1259 ".tar.gz"))
1260 (sha256
1261 (base32
1262 "073myxlyyhgxh1w3r757ajixb7s2k69czc3r0g12c3scq7k3784w"))))
1263 (build-system gnu-build-system)
1264 (arguments
1265 '(#:phases (alist-replace
1266 'configure
1267 (lambda* (#:key outputs #:allow-other-keys)
1268 ;; There's no 'configure' script, just a raw makefile.
1269 (substitute* "Makefile"
1270 (("^prefix := .*$")
1271 (string-append "prefix := " (assoc-ref outputs "out")
1272 "\n"))
1273 (("^libdir := .*$")
1274 ;; By default the thing tries to install under
1275 ;; $prefix/lib64 when on a 64-bit platform.
1276 (string-append "libdir := $(prefix)/lib\n"))))
1277 %standard-phases)
1278
1279 #:make-flags (list
1280 ;; By default the thing tries to use 'cc'.
1281 "CC=gcc"
1282
1283 ;; Make sure programs have an RPATH so they can find
1284 ;; libnuma.so.
1285 (string-append "LDLIBS=-Wl,-rpath="
1286 (assoc-ref %outputs "out") "/lib"))
1287
1288 ;; There's a 'test' target, but it requires NUMA support in the kernel
1289 ;; to run, which we can't assume to have.
1290 #:tests? #f))
1291 (home-page "http://oss.sgi.com/projects/libnuma/")
1292 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1293 (description
1294 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1295memory is not all in one place. The numactl program allows you to run your
1296application program on specific CPU's and memory nodes. It does this by
1297supplying a NUMA memory policy to the operating system before running your
1298program.
1299
1300The package contains other commands, such as numademo, numastat and memhog.
1301The numademo command provides a quick overview of NUMA performance on your
1302system.")
1303 (license (list gpl2 ; programs
1304 lgpl2.1)))) ; library
b10e9ff6
LC
1305
1306(define-public kbd
1307 (package
1308 (name "kbd")
1309 (version "2.0.1")
1310 (source (origin
1311 (method url-fetch)
1312 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1313 version ".tar.gz"))
1314 (sha256
1315 (base32
c8f60748
LC
1316 "0c34b0za2v0934acvgnva0vaqpghmmhz4zh7k0m9jd4mbc91byqm"))
1317 (modules '((guix build utils)))
1318 (snippet
f2cdcafb
LC
1319 '(begin
1320 (substitute* "tests/Makefile.in"
1321 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1322 (("@VERSION@")
1323 "[@]VERSION[@]"))
1324 (substitute* '("src/unicode_start" "src/unicode_stop")
1325 ;; Assume the Coreutils are in $PATH.
1326 (("/usr/bin/tty")
1327 "tty"))))))
b10e9ff6
LC
1328 (build-system gnu-build-system)
1329 (arguments
1330 '(#:phases (alist-cons-before
1331 'build 'pre-build
1332 (lambda* (#:key inputs #:allow-other-keys)
1333 (let ((gzip (assoc-ref %build-inputs "gzip"))
1334 (bzip2 (assoc-ref %build-inputs "bzip2")))
1335 (substitute* "src/libkeymap/findfile.c"
1336 (("gzip")
1337 (string-append gzip "/bin/gzip"))
1338 (("bzip2")
1339 (string-append bzip2 "/bin/bzip2")))))
f2cdcafb
LC
1340 (alist-cons-after
1341 'install 'post-install
1342 (lambda* (#:key outputs #:allow-other-keys)
1343 ;; Make sure these programs find their comrades.
1344 (let* ((out (assoc-ref outputs "out"))
1345 (bin (string-append out "/bin")))
1346 (for-each (lambda (prog)
1347 (wrap-program (string-append bin "/" prog)
1348 `("PATH" ":" prefix (,bin))))
1349 '("unicode_start" "unicode_stop"))))
1350 %standard-phases))))
b10e9ff6
LC
1351 (inputs `(("check" ,check)
1352 ("gzip" ,guix:gzip)
1353 ("bzip2" ,guix:bzip2)
1354 ("pam" ,linux-pam)))
1355 (native-inputs `(("pkg-config" ,pkg-config)))
1356 (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/")
1357 (synopsis "Linux keyboard utilities and keyboard maps")
1358 (description
1359 "This package contains keytable files and keyboard utilities compatible
1360for systems using the Linux kernel. This includes commands such as
1361'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1362 (license gpl2+)))
de0b620e
LC
1363
1364(define-public inotify-tools
1365 (package
1366 (name "inotify-tools")
1367 (version "3.13")
1368 (source (origin
1369 (method url-fetch)
1370 (uri (string-append
1371 "mirror://sourceforge/inotify-tools/inotify-tools/"
1372 version "/inotify-tools-" version ".tar.gz"))
1373 (sha256
1374 (base32
1375 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1376 (build-system gnu-build-system)
1377 (home-page "http://inotify-tools.sourceforge.net/")
1378 (synopsis "Monitor file accesses")
1379 (description
1380 "The inotify-tools packages provides a C library and command-line tools
1381to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1382 (license gpl2+)))
e062d542
AE
1383
1384(define-public kmod
1385 (package
1386 (name "kmod")
1387 (version "17")
1388 (source (origin
1389 (method url-fetch)
1390 (uri
1391 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1392 "kmod-" version ".tar.xz"))
1393 (sha256
1394 (base32
528b6a3d
LC
1395 "1yid3a9b64a60ybj66fk2ysrq5klnl0ijl4g624cl16y8404g9rv"))
1396 (patches (list (search-patch "kmod-module-directory.patch")))))
e062d542
AE
1397 (build-system gnu-build-system)
1398 (native-inputs
1399 `(("pkg-config" ,pkg-config)))
1400 (inputs
1401 `(("xz" ,guix:xz)
1402 ("zlib" ,guix:zlib)))
1403 (arguments
1404 `(#:tests? #f ; FIXME: Investigate test failures
4a8b4c25
LC
1405 #:configure-flags '("--with-xz" "--with-zlib")
1406 #:phases (alist-cons-after
1407 'install 'install-modprobe&co
1408 (lambda* (#:key outputs #:allow-other-keys)
1409 (let* ((out (assoc-ref outputs "out"))
1410 (bin (string-append out "/bin")))
1411 (for-each (lambda (tool)
1412 (symlink "kmod"
1413 (string-append bin "/" tool)))
1414 '("insmod" "rmmod" "lsmod" "modprobe"
1415 "modinfo" "depmod"))))
1416 %standard-phases)))
e062d542
AE
1417 (home-page "https://www.kernel.org/")
1418 (synopsis "Kernel module tools")
35b9e423 1419 (description "Kmod is a set of tools to handle common tasks with Linux
e062d542
AE
1420kernel modules like insert, remove, list, check properties, resolve
1421dependencies and aliases.
1422
1423These tools are designed on top of libkmod, a library that is shipped with
1424kmod. The aim is to be compatible with tools, configurations and indices
1425from the module-init-tools project.")
1426 (license gpl2+))) ; library under lgpl2.1+
d7d42d6b 1427
7fa715e7
LC
1428(define-public eudev
1429 ;; The post-systemd fork, maintained by Gentoo.
fe32c7f7 1430 (package
7fa715e7 1431 (name "eudev")
eb564fc3 1432 (version "1.10")
7fa715e7
LC
1433 (source (origin
1434 (method url-fetch)
1435 (uri (string-append
1436 "http://dev.gentoo.org/~blueness/eudev/eudev-"
1437 version ".tar.gz"))
1438 (sha256
1439 (base32
2de52589 1440 "1l907bvz6dcykvaq8d4iklvfpb9fyrnh1a29g3c28gkx2hlyn7j0"))
eb564fc3
LC
1441 (patches (list (search-patch "eudev-rules-directory.patch")))
1442 (modules '((guix build utils)))
1443 (snippet
1444 ;; 'configure' checks uses <linux/btrfs.h> as an indication of
1445 ;; whether Linux headers are available, but it doesn't actually
1446 ;; use it, and our 'linux-libre-headers' package doesn't
1447 ;; provide it. So just remove that.
1448 '(substitute* "configure"
1449 (("linux/btrfs\\.h")
1450 "")))))
fe32c7f7
MW
1451 (build-system gnu-build-system)
1452 (native-inputs
1453 `(("pkg-config" ,pkg-config)
1454 ("gperf" ,gperf)
1455 ("glib" ,glib "bin") ; glib-genmarshal, etc.
1456 ("perl" ,perl) ; for the tests
1457 ("python" ,python-2))) ; ditto
1458 (inputs
1459 `(("kmod" ,kmod)
1460 ("pciutils" ,pciutils)
1461 ("usbutils" ,usbutils)
1462 ("util-linux" ,util-linux)
1463 ("glib" ,glib)
1464 ("gobject-introspection" ,gobject-introspection)))
dc2d59af 1465 (arguments
fe32c7f7
MW
1466 `(#:configure-flags (list "--enable-libkmod"
1467
1468 (string-append
1469 "--with-pci-ids-path="
1470 (assoc-ref %build-inputs "pciutils")
1471 "/share/pci.ids.gz")
1472
1473 "--with-firmware-path=/no/firmware"
1474
1475 ;; Work around undefined reference to
1476 ;; 'mq_getattr' in sc-daemon.c.
1477 "LDFLAGS=-lrt")))
1478 (home-page "http://www.gentoo.org/proj/en/eudev/")
1479 (synopsis "Userspace device management")
1480 (description "Udev is a daemon which dynamically creates and removes
1481device nodes from /dev/, handles hotplug events and loads drivers at boot
1482time.")
1483 (license gpl2+)))
7fa715e7 1484
66269d47
LC
1485(define-public lvm2
1486 (package
1487 (name "lvm2")
1488 (version "2.02.109")
1489 (source (origin
1490 (method url-fetch)
1491 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
1492 version ".tgz"))
1493 (sha256
1494 (base32
1495 "1rv5ivg0l1w3nwzwdkqixm96h5bzg7ib4rr196ysb2lw42jmpjbv"))
1496 (modules '((guix build utils)))
1497 (snippet
1498 '(begin
1499 (use-modules (guix build utils))
1500
1501 ;; Honor sysconfdir.
1502 (substitute* "make.tmpl.in"
1503 (("confdir = .*$")
1504 "confdir = @sysconfdir@\n")
1505 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
1506 "DEFAULT_SYS_DIR = @sysconfdir@"))))))
1507 (build-system gnu-build-system)
1508 (native-inputs
1509 `(("pkg-config" ,pkg-config)
1510 ("procps" ,procps))) ;tests use 'pgrep'
1511 (inputs
8fcaf8b1 1512 `(("udev" ,eudev)))
66269d47
LC
1513 (arguments
1514 '(#:phases (alist-cons-after
1515 'configure 'set-makefile-shell
1516 (lambda _
1517 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
1518 ;; expected.
1519 (setenv "SHELL" (which "sh"))
1520
1521 ;; Replace /bin/sh with the right file name.
1522 (patch-makefile-SHELL "make.tmpl"))
1523 %standard-phases)
1524
1525 #:configure-flags (list (string-append "--sysconfdir="
1526 (assoc-ref %outputs "out")
1527 "/etc/lvm")
1528 "--enable-udev_sync"
f2817d43
LC
1529 "--enable-udev_rules"
1530
1531 ;; Make sure programs such as 'dmsetup' can
1532 ;; find libdevmapper.so.
1533 (string-append "LDFLAGS=-Wl,-rpath="
1534 (assoc-ref %outputs "out")
1535 "/lib"))
66269d47
LC
1536
1537 ;; The tests use 'mknod', which requires root access.
1538 #:tests? #f))
1539 (home-page "http://sourceware.org/lvm2/")
1540 (synopsis "Logical volume management for Linux")
1541 (description
1542 "LVM2 is the logical volume management tool set for Linux-based systems.
1543This package includes the user-space libraries and tools, including the device
1544mapper. Kernel components are part of Linux-libre.")
1545
1546 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
1547 ;; Command-line tools are GPLv2.
1548 (license (list gpl2 lgpl2.1))))
1549
000f7559
DT
1550(define-public wireless-tools
1551 (package
1552 (name "wireless-tools")
1553 (version "30.pre9")
1554 (source (origin
1555 (method url-fetch)
1556 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
1557 version ".tar.gz"))
1558 (sha256
1559 (base32
ec01f22d
SB
1560 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
1561 (modules '((guix build utils)))
1562 (snippet
1563 ;; Install the manual pages in the right place.
1564 '(substitute* "Makefile"
1565 (("INSTALL_MAN= .*")
1566 "INSTALL_MAN= $(PREFIX)/share/man")))))
000f7559
DT
1567 (build-system gnu-build-system)
1568 (arguments
1569 `(#:phases (alist-replace
1570 'configure
1571 (lambda* (#:key outputs #:allow-other-keys)
1572 (setenv "PREFIX" (assoc-ref outputs "out")))
1573 %standard-phases)
1574 #:tests? #f))
1575 (synopsis "Tools for manipulating Linux Wireless Extensions")
fb9b7ce2
LC
1576 (description "Wireless Tools are used to manipulate the now-deprecated
1577Linux Wireless Extensions; consider using 'iw' instead. The Wireless
1578Extension was an interface allowing you to set Wireless LAN specific
1579parameters and get the specific stats. It is deprecated in favor the nl80211
1580interface.")
000f7559
DT
1581 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
1582 (license gpl2+)))
30016044
MW
1583
1584(define-public lm-sensors
1585 (package
1586 (name "lm-sensors")
1587 (version "3.3.5")
1588 (source (origin
1589 (method url-fetch)
1590 (uri (string-append
1591 "http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-"
1592 version ".tar.bz2"))
1593 (sha256
1594 (base32
1595 "1ksgrynxgrq590nb2fwxrl1gwzisjkqlyg3ljfd1al0ibrk6mbjx"))
1596 (patches (list (search-patch "lm-sensors-hwmon-attrs.patch")))))
1597 (build-system gnu-build-system)
1598 (inputs `(("rrdtool" ,rrdtool)
1599 ("perl" ,perl)
1600 ("kmod" ,kmod)
1601 ("gnuplot" ,gnuplot)))
1602 (native-inputs `(("pkg-config" ,pkg-config)
1603 ("flex" ,flex)
1604 ("bison" ,bison)
1605 ("which" ,which)))
1606 (arguments
1607 `(#:tests? #f ; no 'check' target
1608 #:make-flags (list (string-append "PREFIX=" %output)
1609 (string-append "ETCDIR=" %output "/etc")
1610 (string-append "MANDIR=" %output "/share/man"))
1611 #:phases
1612 (alist-delete
1613 'configure
1614 (alist-cons-before
1615 'build 'patch-exec-paths
1616 (lambda* (#:key inputs outputs #:allow-other-keys)
1617 (substitute* "prog/detect/sensors-detect"
1618 (("`uname")
1619 (string-append "`" (assoc-ref inputs "coreutils")
1620 "/bin/uname"))
1621 (("(`|\")modprobe" all open-quote)
1622 (string-append open-quote
1623 (assoc-ref inputs "kmod")
1624 "/bin/modprobe")))
1625 (substitute* '("prog/pwm/pwmconfig"
1626 "prog/pwm/fancontrol")
1627 (("gnuplot")
1628 (string-append (assoc-ref inputs "gnuplot")
1629 "/bin/gnuplot"))
1630 (("cat ")
1631 (string-append (assoc-ref inputs "coreutils")
1632 "/bin/cat "))
1633 (("egrep ")
1634 (string-append (assoc-ref inputs "grep")
1635 "/bin/egrep "))
1636 (("sed -e")
1637 (string-append (assoc-ref inputs "sed")
1638 "/bin/sed -e"))
1639 (("cut -d")
1640 (string-append (assoc-ref inputs "coreutils")
1641 "/bin/cut -d"))
1642 (("sleep ")
1643 (string-append (assoc-ref inputs "coreutils")
1644 "/bin/sleep "))
1645 (("readlink -f")
1646 (string-append (assoc-ref inputs "coreutils")
1647 "/bin/readlink -f"))))
1648 %standard-phases))))
1649 (home-page "http://www.lm-sensors.org/")
1650 (synopsis "Utilities to read temperature/voltage/fan sensors")
1651 (description
35b9e423 1652 "Lm-sensors is a hardware health monitoring package for Linux. It allows
30016044
MW
1653you to access information from temperature, voltage, and fan speed sensors.
1654It works with most newer systems.")
1655 (license gpl2+)))
b087d413
MW
1656
1657(define-public xsensors
1658 (package
1659 (name "xsensors")
1660 (version "0.70")
1661 (source (origin
1662 (method url-fetch)
1663 (uri (string-append
1664 "http://www.linuxhardware.org/xsensors/xsensors-"
1665 version ".tar.gz"))
1666 (sha256
1667 (base32
1668 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
1669 (build-system gnu-build-system)
1670 (inputs `(("lm-sensors" ,lm-sensors)
1671 ("gtk" ,gtk+-2)))
1672 (native-inputs `(("pkg-config" ,pkg-config)))
1673 (arguments
1674 `(#:phases (alist-cons-before
1675 'configure 'enable-deprecated
1676 (lambda _
1677 (substitute* "src/Makefile.in"
1678 (("-DGDK_DISABLE_DEPRECATED") "")
1679 (("-DGTK_DISABLE_DEPRECATED") "")))
1680 (alist-cons-before
1681 'configure 'remove-Werror
1682 (lambda _
1683 (substitute* '("configure" "src/Makefile.in")
1684 (("-Werror") "")))
1685 %standard-phases))))
1686 (home-page "http://www.linuxhardware.org/xsensors/")
1687 (synopsis "Hardware health information viewer")
1688 (description
35b9e423 1689 "Xsensors reads data from the libsensors library regarding hardware
b087d413
MW
1690health such as temperature, voltage and fan speed and displays the information
1691in a digital read-out.")
1692 (license gpl2+)))
b62fe07f
LC
1693
1694(define-public perf
1695 (package
1696 (name "perf")
1697 (version (package-version linux-libre))
1698 (source (package-source linux-libre))
1699 (build-system gnu-build-system)
1700 (arguments
1701 '(#:phases (alist-replace
1702 'configure
1703 (lambda* (#:key inputs #:allow-other-keys)
1704 (setenv "SHELL_PATH" (which "bash"))
1705 (chdir "tools/perf"))
1706 %standard-phases)
1707 #:make-flags (list (string-append "DESTDIR="
1708 (assoc-ref %outputs "out"))
1709 "WERROR=0")
1710 #:tests? #f)) ;no tests
1711 (native-inputs
1712 `(("pkg-config" ,pkg-config)
1713 ("bison" ,bison)
1714 ("flex" ,flex)
1715
1716 ;; There are build scripts written in these languages.
1717 ("perl" ,perl)
1718 ("python" ,python-2)))
1719 (inputs
1720 `(;; ("slang" ,slang)
1721 ;; ("newt" ,newt)
1722 ("elfutils" ,elfutils)
1723
1724 ;; FIXME: Documentation.
1725 ;; ("libxslt" ,libxslt)
1726 ;; ("docbook-xml" ,docbook-xml)
1727 ;; ("docbook-xsl" ,docbook-xsl)
1728 ;; ("xmlto" ,xmlto)
1729 ;; ("asciidoc" ,asciidoc)
1730 ))
1731 (home-page "https://perf.wiki.kernel.org/")
1732 (synopsis "Linux profiling with performance counters")
1733 (description
1734 "perf is a tool suite for profiling using hardware performance counters,
1735with support in the Linux kernel. perf can instrument CPU performance
1736counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
1737of lightweight profiling. This package contains the user-land tools and in
1738particular the 'perf' command.")
1739 (license (package-license linux-libre))))
c09e60e4
DT
1740
1741(define-public pflask
1742 (package
1743 (name "pflask")
1744 (version "0.2")
1745 (source (origin
1746 (method url-fetch)
1747 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
1748 version ".tar.gz"))
1749 (sha256
1750 (base32
1751 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
1752 (build-system cmake-build-system)
1753 (arguments
1754 '(#:tests? #f)) ; no tests
1755 (home-page "http://ghedo.github.io/pflask/")
1756 (synopsis "Simple tool for creating Linux namespace containers")
1757 (description "pflask is a simple tool for creating Linux namespace
1758containers. It can be used for running a command or even booting an OS inside
1759an isolated container, created with the help of Linux namespaces. It is
1760similar in functionality to chroot, although pflask provides better isolation
1761thanks to the use of namespaces.")
1762 (license bsd-2)))