gnu: zerofree: Use ‘install-file’.
[jackhill/guix/guix.git] / gnu / packages / linux.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
74d21291 2;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
35dfcdd7 3;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
233e7676 4;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
75fd35b6 5;;; Copyright © 2014, 2015, 2016, 2017 Mark H Weaver <mhw@netris.org>
31aa4379 6;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
e1e27737 7;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
e77fe950 8;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
1348185a 9;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
cd7caa3e 10;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
7994250f 11;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
96e9f097 12;;; Copyright © 2016 Raymond Nicholson <rain1@openmailbox.org>
dc9bdb1e 13;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
d17ae8c0 14;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
81b98756 15;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
9b0942c1 16;;; Copyright © 2016 David Craven <david@craven.ch>
594d740d 17;;; Copyright © 2016 John Darrington <jmd@gnu.org>
f8f44dd7 18;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
411264c2 19;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
440a3143 20;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
fd7000fe 21;;; Copyright © 2016, 2017 ng0 <ng0@no-reply.pragmatique.xyz>
6d3e08d4 22;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
01be4f93 23;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com>
189d8422 24;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
c7adafa7 25;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
1113386b 26;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
1eacffb9 27;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
3116c8b5 28;;; Copyright © 2017 nee <nee-git@hidamari.blue>
a73e7dd3 29;;; Copyright © 2017 Dave Love <fx@gnu.org>
fd76c904 30;;;
233e7676 31;;; This file is part of GNU Guix.
fd76c904 32;;;
233e7676 33;;; GNU Guix is free software; you can redistribute it and/or modify it
fd76c904
LC
34;;; under the terms of the GNU General Public License as published by
35;;; the Free Software Foundation; either version 3 of the License, or (at
36;;; your option) any later version.
37;;;
233e7676 38;;; GNU Guix is distributed in the hope that it will be useful, but
fd76c904
LC
39;;; WITHOUT ANY WARRANTY; without even the implied warranty of
40;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41;;; GNU General Public License for more details.
42;;;
43;;; You should have received a copy of the GNU General Public License
233e7676 44;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
fd76c904 45
1ffa7090 46(define-module (gnu packages linux)
59a43334 47 #:use-module (gnu packages)
0c60cc53 48 #:use-module (gnu packages acl)
75750abb
DC
49 #:use-module (gnu packages admin)
50 #:use-module (gnu packages algebra)
51 #:use-module (gnu packages attr)
52 #:use-module (gnu packages autotools)
1eacffb9 53 #:use-module (gnu packages backup)
75750abb 54 #:use-module (gnu packages base)
c7adafa7 55 #:use-module (gnu packages bash)
75750abb
DC
56 #:use-module (gnu packages bison)
57 #:use-module (gnu packages calendar)
58 #:use-module (gnu packages check)
e385e957 59 #:use-module (gnu packages crypto)
f61e0e79 60 #:use-module (gnu packages compression)
75750abb 61 #:use-module (gnu packages databases)
b3ed50e6 62 #:use-module (gnu packages datastructures)
75750abb
DC
63 #:use-module (gnu packages docbook)
64 #:use-module (gnu packages documentation)
65 #:use-module (gnu packages elf)
1ffa7090 66 #:use-module (gnu packages flex)
afc9d8ec 67 #:use-module (gnu packages file)
75750abb
DC
68 #:use-module (gnu packages freedesktop)
69 #:use-module (gnu packages gcc)
70 #:use-module (gnu packages gettext)
71 #:use-module (gnu packages glib)
e385e957 72 #:use-module (gnu packages gnuzilla)
d7d42d6b 73 #:use-module (gnu packages gperf)
75750abb 74 #:use-module (gnu packages gtk)
1ffa7090 75 #:use-module (gnu packages libusb)
01be4f93 76 #:use-module (gnu packages man)
75750abb 77 #:use-module (gnu packages maths)
dfe93c9a 78 #:use-module (gnu packages multiprecision)
1ffa7090 79 #:use-module (gnu packages ncurses)
c7adafa7 80 #:use-module (gnu packages networking)
f8f44dd7 81 #:use-module (gnu packages ninja)
1ffa7090 82 #:use-module (gnu packages perl)
75750abb 83 #:use-module (gnu packages pciutils)
1ffa7090 84 #:use-module (gnu packages pkg-config)
0d74462a 85 #:use-module (gnu packages popt)
75750abb 86 #:use-module (gnu packages pulseaudio)
7c0dbe78 87 #:use-module (gnu packages python)
75750abb
DC
88 #:use-module (gnu packages readline)
89 #:use-module (gnu packages rrdtool)
62b28c0e 90 #:use-module (gnu packages samba)
b1fb4b23 91 #:use-module (gnu packages slang)
b3ed50e6 92 #:use-module (gnu packages storage)
f57d2639 93 #:use-module (gnu packages texinfo)
75343704 94 #:use-module (gnu packages tls)
b3ed50e6 95 #:use-module (gnu packages valgrind)
7d2511bc 96 #:use-module (gnu packages video)
7f412f33 97 #:use-module (gnu packages web)
7d2511bc 98 #:use-module (gnu packages xiph)
75750abb 99 #:use-module (gnu packages xml)
58c4f11e
TGR
100 #:use-module (gnu packages xdisorg)
101 #:use-module (gnu packages xorg)
a73e7dd3
DL
102 #:use-module (gnu packages groff)
103 #:use-module (gnu packages selinux)
220193ad 104 #:use-module (guix build-system cmake)
75750abb 105 #:use-module (guix build-system gnu)
e102f940 106 #:use-module (guix build-system python)
a94546ec 107 #:use-module (guix build-system trivial)
75750abb 108 #:use-module (guix download)
6d31c175 109 #:use-module (guix git-download)
75750abb
DC
110 #:use-module ((guix licenses) #:prefix license:)
111 #:use-module (guix packages)
112 #:use-module (guix utils)
adddd5ba 113 #:use-module (srfi srfi-1)
17db0706 114 #:use-module (srfi srfi-2)
a94546ec
LC
115 #:use-module (srfi srfi-26)
116 #:use-module (ice-9 match))
fd76c904 117
aaf4cb20
LC
118(define-public (system->linux-architecture arch)
119 "Return the Linux architecture name for ARCH, a Guix system name such as
6d7ef2aa 120\"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
618cea69
NK
121 (let ((arch (car (string-split arch #\-))))
122 (cond ((string=? arch "i686") "i386")
123 ((string-prefix? "mips" arch) "mips")
aaf4cb20 124 ((string-prefix? "arm" arch) "arm")
503275e9 125 ((string-prefix? "aarch64" arch) "arm64")
605fec78 126 ((string-prefix? "alpha" arch) "alpha")
618cea69
NK
127 (else arch))))
128
440a3143
CSLL
129(define-public (system->defconfig system)
130 "Some systems (notably powerpc-linux) require a special target for kernel
131defconfig. Return the appropiate make target if applicable, otherwise return
132\"defconfig\"."
133 (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig")
134 (else "defconfig")))
135
6023cc74
LC
136(define (linux-libre-urls version)
137 "Return a list of URLs for Linux-Libre VERSION."
138 (list (string-append
139 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
140 version "-gnu/linux-libre-" version "-gnu.tar.xz")
141
142 ;; XXX: Work around <http://bugs.gnu.org/14851>.
143 (string-append
144 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
145 version "-gnu.tar.xz")
146
147 ;; Maybe this URL will become valid eventually.
148 (string-append
149 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
150 version "-gnu.tar.xz")))
151
80fe5c60 152(define-public linux-libre-headers
b450d2b4
DC
153 (package
154 (name "linux-libre-headers")
e77fe950 155 (version "4.4.47")
b450d2b4
DC
156 (source (origin
157 (method url-fetch)
158 (uri (linux-libre-urls version))
159 (sha256
160 (base32
e77fe950 161 "00zdq7swhvzbbnnhzizq6m34q5k4fycpcp215bmkbxh1ic76v7bs"))))
b450d2b4
DC
162 (build-system gnu-build-system)
163 (native-inputs `(("perl" ,perl)))
164 (arguments
165 `(#:modules ((guix build gnu-build-system)
166 (guix build utils)
167 (srfi srfi-1))
168 #:phases
169 (modify-phases %standard-phases
170 (delete 'configure)
171 (replace 'build
172 (lambda _
173 (let ((arch ,(system->linux-architecture
174 (or (%current-target-system)
440a3143
CSLL
175 (%current-system))))
176 (defconfig ,(system->defconfig
177 (or (%current-target-system)
178 (%current-system)))))
b450d2b4 179 (setenv "ARCH" arch)
618cea69 180 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
440a3143 181 (and (zero? (system* "make" defconfig))
618cea69 182 (zero? (system* "make" "mrproper" "headers_check"))))))
b450d2b4
DC
183 (replace 'install
184 (lambda* (#:key outputs #:allow-other-keys)
80fe5c60
LC
185 (let ((out (assoc-ref outputs "out")))
186 (and (zero? (system* "make"
187 (string-append "INSTALL_HDR_PATH=" out)
188 "headers_install"))
b15389e1
LC
189 (begin
190 (mkdir (string-append out "/include/config"))
191 (call-with-output-file
192 (string-append out
193 "/include/config/kernel.release")
194 (lambda (p)
195 (format p "~a-default~%" ,version)))
196
197 ;; Remove the '.install' and '..install.cmd' files; the
198 ;; latter contains store paths, which pulls in bootstrap
199 ;; binaries in the build environment, and prevents bit
200 ;; reproducibility for the bootstrap binaries.
201 (for-each delete-file (find-files out "\\.install"))
202
203 #t))))))
b15389e1 204 #:allowed-references ()
80fe5c60 205 #:tests? #f))
6fd52309 206 (home-page "https://www.gnu.org/software/linux-libre/")
80fe5c60
LC
207 (synopsis "GNU Linux-Libre kernel headers")
208 (description "Headers of the Linux-Libre kernel.")
b450d2b4 209 (license license:gpl2)))
80fe5c60 210
ac47a7c2
LC
211(define %boot-logo-patch
212 ;; Linux-Libre boot logo featuring Freedo and a gnu.
213 (origin
214 (method url-fetch)
215 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
74dde9e9 216 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
ac47a7c2
LC
217 (sha256
218 (base32
219 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
220
c258807a 221(define* (kernel-config arch #:key variant)
a94546ec 222 "Return the absolute file name of the Linux-Libre build configuration file
c258807a 223for ARCH and optionally VARIANT, or #f if there is no such configuration."
7994250f 224 (let* ((name (string-append (if variant (string-append variant "-") "")
25847b32 225 (if (string=? "i386" arch) "i686" arch) ".conf"))
7994250f
AK
226 (file (string-append "linux-libre/" name)))
227 (search-auxiliary-file file)))
a94546ec 228
90c18c32 229(define %default-extra-linux-options
50dbc036 230 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
b9f7895d
DC
231 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)
232 ;; Modules required for initrd:
233 ("CONFIG_NET_9P" . m)
234 ("CONFIG_NET_9P_VIRTIO" . m)
235 ("CONFIG_VIRTIO_BLK" . m)
236 ("CONFIG_VIRTIO_NET" . m)
237 ("CONFIG_VIRTIO_PCI" . m)
238 ("CONFIG_VIRTIO_BALLOON" . m)
239 ("CONFIG_VIRTIO_MMIO" . m)
240 ("CONFIG_FUSE_FS" . m)
241 ("CONFIG_CIFS" . m)
242 ("CONFIG_9P_FS" . m)))
90c18c32
DC
243
244(define (config->string options)
245 (string-join (map (match-lambda
246 ((option . 'm)
247 (string-append option "=m"))
248 ((option . #t)
249 (string-append option "=y"))
250 ((option . #f)
251 (string-append option "=n")))
252 options)
253 "\n"))
254
3129b9c2 255(define* (make-linux-libre version hash supported-systems
c258807a
DC
256 #:key
257 ;; A function that takes an arch and a variant.
258 ;; See kernel-config for an example.
a6d01325 259 (extra-version #f)
c258807a 260 (configuration-file #f)
90c18c32 261 (defconfig "defconfig")
64de7d1c
MW
262 (extra-options %default-extra-linux-options)
263 (patches (list %boot-logo-patch)))
614d1738 264 (package
a6d01325
DC
265 (name (if extra-version
266 (string-append "linux-libre-" extra-version)
267 "linux-libre"))
c258807a 268 (version version)
614d1738
DC
269 (source (origin
270 (method url-fetch)
271 (uri (linux-libre-urls version))
c258807a 272 (sha256 (base32 hash))
64de7d1c 273 (patches patches)))
3129b9c2 274 (supported-systems supported-systems)
614d1738 275 (build-system gnu-build-system)
614d1738
DC
276 (native-inputs
277 `(("perl" ,perl)
278 ("bc" ,bc)
279 ("openssl" ,openssl)
78edcccc 280 ("kmod" ,kmod)
64b5e413
LC
281 ,@(match (and configuration-file
282 (configuration-file
283 (system->linux-architecture
284 (or (%current-target-system) (%current-system)))
285 #:variant (version-major+minor version)))
286 (#f ;no config for this platform
287 '())
288 ((? string? config)
289 `(("kconfig" ,config))))))
614d1738
DC
290 (arguments
291 `(#:modules ((guix build gnu-build-system)
292 (guix build utils)
293 (srfi srfi-1)
294 (ice-9 match))
295 #:phases
296 (modify-phases %standard-phases
9416459b 297 (replace 'configure
4b42703e 298 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
96e9f097
RN
299 ;; Avoid introducing timestamps
300 (setenv "KCONFIG_NOTIMESTAMP" "1")
301 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
302
4b42703e 303 ;; Set ARCH and CROSS_COMPILE
6d7ef2aa
DC
304 (let ((arch ,(system->linux-architecture
305 (or (%current-target-system)
306 (%current-system)))))
4b42703e
DC
307 (setenv "ARCH" arch)
308 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
6d7ef2aa 309
4b42703e
DC
310 (when target
311 (setenv "CROSS_COMPILE" (string-append target "-"))
312 (format #t "`CROSS_COMPILE' set to `~a'~%"
313 (getenv "CROSS_COMPILE"))))
beacfcab 314
a6d01325
DC
315 (setenv "EXTRA_VERSION" ,extra-version)
316
a94546ec
LC
317 (let ((build (assoc-ref %standard-phases 'build))
318 (config (assoc-ref inputs "kconfig")))
1650dd8a 319
e4e9c0a0
DC
320 ;; Use a custom kernel configuration file or a default
321 ;; configuration file.
1650dd8a
LC
322 (if config
323 (begin
324 (copy-file config ".config")
325 (chmod ".config" #o666))
c258807a 326 (system* "make" ,defconfig))
a94546ec
LC
327
328 ;; Appending works even when the option wasn't in the
329 ;; file. The last one prevails if duplicated.
90c18c32
DC
330 (let ((port (open-file ".config" "a"))
331 (extra-configuration ,(config->string extra-options)))
332 (display extra-configuration port)
a94546ec
LC
333 (close-port port))
334
9416459b 335 (zero? (system* "make" "oldconfig")))))
614d1738 336 (replace 'install
4b42703e 337 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
beacfcab
LC
338 (let* ((out (assoc-ref outputs "out"))
339 (moddir (string-append out "/lib/modules"))
e4e9c0a0
DC
340 (dtbdir (string-append out "/lib/dtbs"))
341 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
342 ;; Install kernel image, kernel configuration and link map.
343 (for-each (lambda (file) (install-file file out))
fd900d68 344 (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map)$"))
e4e9c0a0
DC
345 ;; Install device tree files
346 (for-each (lambda (file) (install-file file dtbdir))
347 (find-files "." "\\.dtb$"))
348 ;; Install kernel modules
beacfcab 349 (mkdir-p moddir)
beacfcab 350 (zero? (system* "make"
78edcccc 351 (string-append "DEPMOD=" kmod "/bin/depmod")
beacfcab
LC
352 (string-append "MODULE_DIR=" moddir)
353 (string-append "INSTALL_PATH=" out)
354 (string-append "INSTALL_MOD_PATH=" out)
cda3d81e 355 "INSTALL_MOD_STRIP=1"
beacfcab 356 "modules_install"))))))
beacfcab 357 #:tests? #f))
6fd52309 358 (home-page "https://www.gnu.org/software/linux-libre//")
f50d2669 359 (synopsis "100% free redistribution of a cleaned Linux kernel")
a22dc0c4 360 (description
79c311b8
LC
361 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
362It has been modified to remove all non-free binary blobs.")
614d1738 363 (license license:gpl2)))
beacfcab 364
3129b9c2
DC
365(define %intel-compatible-systems '("x86_64-linux" "i686-linux"))
366
38ba8a61
MW
367(define %linux-libre-version "4.12.4")
368(define %linux-libre-hash "13c6ka4fhzi41bjlssbkz84hkag7knqpvfyp2jjhm3wm25r4lhw8")
76e62ef7 369
c258807a 370(define-public linux-libre
76e62ef7
MW
371 (make-linux-libre %linux-libre-version
372 %linux-libre-hash
3129b9c2 373 %intel-compatible-systems
91cf5fda 374 #:configuration-file kernel-config))
c258807a 375
52d901da 376(define-public linux-libre-4.9
dfa0c66c
MW
377 (make-linux-libre "4.9.40"
378 "1qaqi2dcydyxw79yj9pa7yxf13ss4rng7bgg0i1dl63c3g7qjgcz"
52d901da 379 %intel-compatible-systems
65763656 380 #:configuration-file kernel-config))
52d901da 381
75b314a6 382(define-public linux-libre-4.4
6b96478c
MW
383 (make-linux-libre "4.4.79"
384 "03x1nc2fxmh29sf2fbsqzmw8qrdzv5gakr9xrg1shxh31c6xr3xr"
3129b9c2 385 %intel-compatible-systems
c75a3081 386 #:configuration-file kernel-config))
75b314a6 387
adddd5ba 388(define-public linux-libre-4.1
5a1b5dcc
MW
389 (make-linux-libre "4.1.42"
390 "1g5jhn7cm6ixn7w8ciqm6qgxv7k1jg50v6k05hsvzvrqfpaxqlbz"
3129b9c2 391 %intel-compatible-systems
5227d53a 392 #:configuration-file kernel-config))
adddd5ba 393
cde7c23f
DC
394(define-public linux-libre-arm-generic
395 (make-linux-libre %linux-libre-version
396 %linux-libre-hash
397 '("armhf-linux")
398 #:defconfig "multi_v7_defconfig"
91cf5fda 399 #:extra-version "arm-generic"))
cde7c23f 400
97121c2a 401\f
c84d0eca
LC
402;;;
403;;; Pluggable authentication modules (PAM).
404;;;
405
fd76c904
LC
406(define-public linux-pam
407 (package
408 (name "linux-pam")
7483230f 409 (version "1.3.0")
fd76c904
LC
410 (source
411 (origin
412 (method url-fetch)
7483230f
DC
413 (uri (string-append
414 "http://www.linux-pam.org/library/"
415 "Linux-PAM-" version ".tar.bz2"))
fd76c904
LC
416 (sha256
417 (base32
411264c2
RS
418 "1fyi04d5nsh8ivd0rn2y0z83ylgc0licz7kifbb6xxi2ylgfs6i4"))
419 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
420
fd76c904 421 (build-system gnu-build-system)
c4c4cc05 422 (native-inputs
fd76c904
LC
423 `(("flex" ,flex)
424
425 ;; TODO: optional dependencies
426 ;; ("libxcrypt" ,libxcrypt)
427 ;; ("cracklib" ,cracklib)
428 ))
429 (arguments
ed8111ea 430 `(;; Most users, such as `shadow', expect the headers to be under
c134056a
LC
431 ;; `security'.
432 #:configure-flags (list (string-append "--includedir="
433 (assoc-ref %outputs "out")
ed8111ea
LC
434 "/include/security")
435
436 ;; XXX: <rpc/rpc.h> is missing from glibc when
437 ;; cross-compiling, so we have to disable NIS
438 ;; support altogether.
439 ,@(if (%current-target-system)
440 '("--disable-nis")
441 '()))
c134056a
LC
442
443 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
444 ;; isn't available.
445 #:tests? #f))
fd76c904
LC
446 (home-page "http://www.linux-pam.org/")
447 (synopsis "Pluggable authentication modules for Linux")
448 (description
449 "A *Free* project to implement OSF's RFC 86.0.
450Pluggable authentication modules are small shared object files that can
451be used through the PAM API to perform tasks, like authenticating a user
e881752c 452at login. Local and dynamic reconfiguration are its key features.")
3ac73271 453 (license license:bsd-3)))
686f14e8 454
4c93ce42
EF
455(define-public linux-pam-1.2
456 (package
457 (inherit linux-pam)
4c93ce42
EF
458 (version "1.2.1")
459 (source
460 (origin
461 (method url-fetch)
462 (uri (string-append
463 "http://www.linux-pam.org/library/"
464 "Linux-PAM-" version ".tar.bz2"))
465 (sha256
466 (base32
411264c2
RS
467 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
468 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
4c93ce42 469
53142109 470
c84d0eca
LC
471;;;
472;;; Miscellaneous.
473;;;
474
686f14e8
LC
475(define-public psmisc
476 (package
477 (name "psmisc")
aa9c221f 478 (version "22.21")
686f14e8
LC
479 (source
480 (origin
481 (method url-fetch)
482 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
483 version ".tar.gz"))
484 (sha256
485 (base32
aa9c221f 486 "0nhlm1vrrwn4a845p6y4nnnb4liq70n74zbdd5dq844jc6nkqclp"))))
686f14e8
LC
487 (build-system gnu-build-system)
488 (inputs `(("ncurses" ,ncurses)))
aa9c221f 489 (home-page "https://gitlab.com/psmisc/psmisc")
686f14e8 490 (synopsis
8f65585b 491 "Small utilities that use the proc file system")
686f14e8
LC
492 (description
493 "This PSmisc package is a set of some small useful utilities that
8f65585b 494use the proc file system. We're not about changing the world, but
686f14e8 495providing the system administrator with some help in common tasks.")
3ac73271 496 (license license:gpl2+)))
02b80c3f
NK
497
498(define-public util-linux
499 (package
500 (name "util-linux")
83090f6a 501 (version "2.29.2")
5a6a3ba4
LC
502 (source (origin
503 (method url-fetch)
504 (uri (string-append "mirror://kernel.org/linux/utils/"
9f533d60
LC
505 name "/v" (version-major+minor version) "/"
506 name "-" version ".tar.xz"))
5a6a3ba4
LC
507 (sha256
508 (base32
83090f6a 509 "1qz81w8vzrmy8xn9yx7ls4amkbgwx6vr62pl6kv9g7r0g3ba9kmc"))
fc1adab1 510 (patches (search-patches "util-linux-tests.patch"))
9d77da2a
LC
511 (modules '((guix build utils)))
512 (snippet
ec2da92c
LC
513 ;; We take the 'logger' program from GNU Inetutils and 'kill'
514 ;; from GNU Coreutils.
8338c241
MW
515 '(begin
516 (substitute* "configure"
517 (("build_logger=yes") "build_logger=no")
518 (("build_kill=yes") "build_kill=no"))
519 #t))))
02b80c3f 520 (build-system gnu-build-system)
dd581e9a
TGR
521 (outputs '("out"
522 "static")) ; >2 MiB of static .a libraries
02b80c3f 523 (arguments
29ec55ee 524 `(#:configure-flags (list "--disable-use-tty-group"
d9804e50 525 "--enable-fs-paths-default=/run/current-system/profile/sbin"
29ec55ee
LC
526 ;; Install completions where our
527 ;; bash-completion package expects them.
528 (string-append "--with-bashcompletiondir="
529 (assoc-ref %outputs "out")
530 "/etc/bash_completion.d"))
1b9cf4ad 531 #:phases (modify-phases %standard-phases
7e512497
LC
532 (add-before
533 'build 'set-umount-file-name
534 (lambda* (#:key outputs #:allow-other-keys)
535 ;; Tell 'eject' the right file name of 'umount'.
536 (let ((out (assoc-ref outputs "out")))
537 (substitute* "sys-utils/eject.c"
538 (("\"/bin/umount\"")
539 (string-append "\"" out "/bin/umount\"")))
540 #t)))
1b9cf4ad
LC
541 (add-before
542 'check 'pre-check
543 (lambda* (#:key inputs outputs #:allow-other-keys)
544 (let ((out (assoc-ref outputs "out"))
545 (net (assoc-ref inputs "net-base")))
546 ;; Change the test to refer to the right file.
547 (substitute* "tests/ts/misc/mcookie"
548 (("/etc/services")
549 (string-append net "/etc/services")))
dd581e9a
TGR
550 #t)))
551 (add-after
552 'install 'move-static-libraries
553 (lambda* (#:key outputs #:allow-other-keys)
554 (let ((out (assoc-ref outputs "out"))
555 (static (assoc-ref outputs "static")))
556 (mkdir-p (string-append static "/lib"))
557 (with-directory-excursion out
558 (for-each (lambda (file)
559 (rename-file file
560 (string-append static "/"
561 file)))
562 (find-files "lib" "\\.a$")))
1b9cf4ad 563 #t))))))
f61e0e79 564 (inputs `(("zlib" ,zlib)
ba4aca3a
LC
565 ("ncurses" ,ncurses)
566
567 ;; XXX: This is so that the 'pre-check' phase can find it.
568 ,@(if (%current-target-system)
569 `(("net-base" ,net-base))
570 '())))
c4c4cc05 571 (native-inputs
9f533d60
LC
572 `(("perl" ,perl)
573 ("net-base" ,net-base))) ;for tests
02b80c3f 574 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
35ec07c7 575 (synopsis "Collection of utilities for the Linux kernel")
437d7286 576 (description "Util-linux is a diverse collection of Linux kernel
8f65585b 577utilities. It provides dmesg and includes tools for working with file systems,
437d7286 578block devices, UUIDs, TTYs, and many other tools.")
fe8ccfcc 579
02b80c3f 580 ;; Note that util-linux doesn't use the same license for all the
fe8ccfcc 581 ;; code. GPLv2+ is the default license for a code without an
02b80c3f 582 ;; explicitly defined license.
3ac73271
LC
583 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
584 license:bsd-4 license:public-domain))))
5d5c4278 585
3116c8b5 586(define-public ddate
587 (package
588 (name "ddate")
589 (version "0.2.2")
590 (source (origin
591 (method url-fetch)
592 (uri (string-append "https://github.com/bo0ts/ddate/archive/v"
593 version ".tar.gz"))
594 (file-name (string-append name "-" version ".tar.gz"))
595 (sha256
596 (base32 "1bbqqq8mswj4bp9083gxjaky5ysfznax4cynsqwmy125z053yg6m"))))
597 (build-system cmake-build-system)
598 (arguments '(#:tests? #f))
599 (home-page "https://github.com/bo0ts/ddate")
600 (synopsis "PERPETUAL DATE CONVERTER FROM GREGORIAN TO POEE CALENDAR")
601 (description
602 "ddate displays the Discordian date and holidays of a given date.
603The Discordian calendar was made popular by the \"Illuminatus!\" trilogy
604by Robert Shea and Robert Anton Wilson.")
605 (license license:public-domain)))
606
e47e3eff
LC
607(define-public procps
608 (package
609 (name "procps")
74a3c4bb 610 (version "3.3.12")
e47e3eff 611 (source (origin
0cc22848
SB
612 (method url-fetch)
613 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
614 "procps-ng-" version ".tar.xz"))
615 (sha256
616 (base32
74a3c4bb 617 "1m57w6jmry84njd5sgk5afycbglql0al80grx027kwqqcfw5mmkf"))))
e47e3eff 618 (build-system gnu-build-system)
e47e3eff 619 (arguments
80393eed
LC
620 '(#:modules ((guix build utils)
621 (guix build gnu-build-system)
622 (srfi srfi-1)
623 (srfi srfi-26))
0cc22848
SB
624 #:phases
625 (modify-phases %standard-phases
241826b5
LC
626 (add-before 'check 'disable-strtod-test
627 (lambda _
628 ;; Disable the 'strtod' test, which fails on 32-bit systems.
629 ;; This is what upstream does:
630 ;; <https://gitlab.com/procps-ng/procps/commit/100afbc1491be388f1429021ff65d969f4b1e08f>.
631 (substitute* "Makefile"
632 (("^(TESTS|check_PROGRAMS) = .*$" all)
633 (string-append "# " all "\n")))
634 #t))
0cc22848
SB
635 (add-after
636 'install 'post-install
637 ;; Remove commands and man pages redudant with
638 ;; Coreutils.
639 (lambda* (#:key outputs #:allow-other-keys)
640 (let* ((out (assoc-ref outputs "out"))
641 (dup (append-map (cut find-files out <>)
642 '("^kill" "^uptime"))))
643 (for-each delete-file dup)
644 #t))))))
645 (inputs `(("ncurses" ,ncurses)))
646 (home-page "https://gitlab.com/procps-ng/procps/")
35ec07c7 647 (synopsis "Utilities that give information about processes")
e47e3eff 648 (description
35b9e423 649 "Procps is the package that has a bunch of small useful utilities
e47e3eff
LC
650that give information about processes using the Linux /proc file system.
651The package includes the programs ps, top, vmstat, w, kill, free,
652slabtop, and skill.")
3ac73271 653 (license license:gpl2)))
e47e3eff 654
5d5c4278
NK
655(define-public usbutils
656 (package
657 (name "usbutils")
e8a463e6 658 (version "008")
5d5c4278
NK
659 (source
660 (origin
661 (method url-fetch)
662 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
663 "usbutils-" version ".tar.xz"))
664 (sha256
665 (base32
e8a463e6 666 "132clk14j4nm8crln2jymdbbc2vhzar2j2hnxyh05m79pbq1lx24"))))
5d5c4278
NK
667 (build-system gnu-build-system)
668 (inputs
e8a463e6 669 `(("libusb" ,libusb)
e5d861f3 670 ("eudev" ,eudev-with-hwdb)))
c4c4cc05
JD
671 (native-inputs
672 `(("pkg-config" ,pkg-config)))
5d5c4278
NK
673 (home-page "http://www.linux-usb.org/")
674 (synopsis
675 "Tools for working with USB devices, such as lsusb")
676 (description
677 "Tools for working with USB devices, such as lsusb.")
3ac73271 678 (license license:gpl2+)))
0750452a
LC
679
680(define-public e2fsprogs
681 (package
682 (name "e2fsprogs")
b047a86b 683 (version "1.43.4")
0750452a
LC
684 (source (origin
685 (method url-fetch)
7409c8d4
MW
686 (uri (string-append
687 "mirror://kernel.org/linux/kernel/people/tytso/"
688 name "/v" version "/"
689 name "-" version ".tar.xz"))
0750452a
LC
690 (sha256
691 (base32
b047a86b 692 "092absr4vrlqrkdf9nwh4ykj40ab6hhwrkdr6sjsccd54c8z5csl"))))
0750452a 693 (build-system gnu-build-system)
c4c4cc05 694 (inputs `(("util-linux" ,util-linux)))
f57d2639 695 (native-inputs `(("pkg-config" ,pkg-config)
75f796bb
MB
696 ("texinfo" ,texinfo) ;for the libext2fs Info manual
697
698 ;; For tests.
699 ("perl" ,perl)
700 ("procps" ,procps)))
0750452a 701 (arguments
b047a86b 702 '(;; util-linux is the preferred source for some of the libraries and
c44ed26c 703 ;; commands, so disable them (see, e.g.,
a124bbd2 704 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
b047a86b
MB
705 #:configure-flags (list "--disable-libblkid"
706 "--disable-libuuid" "--disable-uuidd"
707 "--disable-fsck"
7c594a2c 708
b047a86b
MB
709 ;; Use symlinks instead of hard links for
710 ;; 'fsck.extN' etc. This makes the resulting nar
711 ;; smaller and is preserved across copies.
712 "--enable-symlink-install"
74d21291 713
b047a86b
MB
714 (string-append "LDFLAGS=-Wl,-rpath="
715 (assoc-ref %outputs "out")
716 "/lib")
7c594a2c 717
b047a86b
MB
718 ;; Install libext2fs et al.
719 "--enable-elf-shlibs")
ddfc2fd8 720
55acb372
MB
721 #:phases
722 (modify-phases %standard-phases
723 (add-before 'configure 'patch-shells
724 (lambda _
725 (substitute* "configure"
726 (("/bin/sh (.*)parse-types.sh" _ dir)
727 (string-append (which "sh") " " dir
728 "parse-types.sh")))
b047a86b
MB
729 (substitute* "MCONFIG.in"
730 (("INSTALL_SYMLINK = /bin/sh")
731 "INSTALL_SYMLINK = sh"))
55acb372
MB
732 (substitute* (find-files "." "^Makefile.in$")
733 (("#!/bin/sh")
734 (string-append "#!" (which "sh"))))
735 #t))
736 (add-after 'install 'install-libs
737 (lambda* (#:key outputs #:allow-other-keys)
738 (let* ((out (assoc-ref outputs "out"))
739 (lib (string-append out "/lib")))
740 (and (zero? (system* "make" "install-libs"))
741
742 ;; Make the .a writable so that 'strip' works.
743 ;; Failing to do that, due to debug symbols, we
744 ;; retain a reference to the final
745 ;; linux-libre-headers, which refer to the
746 ;; bootstrap binaries.
747 (let ((archives (find-files lib "\\.a$")))
748 (for-each (lambda (file)
749 (chmod file #o666))
750 archives)
75f796bb 751 #t))))))))
0750452a 752 (home-page "http://e2fsprogs.sourceforge.net/")
35ec07c7 753 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
0750452a
LC
754 (description
755 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
3ac73271
LC
756 (license (list license:gpl2 ;programs
757 license:lgpl2.0 ;libext2fs
758 license:x11)))) ;libuuid
d8482ad0 759
e48977e7
LC
760(define e2fsprogs/static
761 (static-package
762 (package (inherit e2fsprogs)
763 (arguments
764 ;; Do not build shared libraries.
765 (substitute-keyword-arguments (package-arguments e2fsprogs)
766 ((#:configure-flags _)
767 '(list "--disable-blkid"))
768 ((#:make-flags _)
769 '(list)))))))
770
e102f940
LC
771(define-public e2fsck/static
772 (package
773 (name "e2fsck-static")
0997771a 774 (version (package-version e2fsprogs))
e102f940
LC
775 (build-system trivial-build-system)
776 (source #f)
313880c7
DC
777 (inputs
778 `(("e2fsprogs" ,e2fsprogs/static)))
e102f940
LC
779 (arguments
780 `(#:modules ((guix build utils))
781 #:builder
782 (begin
783 (use-modules (guix build utils)
784 (ice-9 ftw)
785 (srfi srfi-26))
786
313880c7
DC
787 (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs")
788 "/sbin/e2fsck"))
e102f940
LC
789 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
790 (mkdir-p bin)
791 (with-directory-excursion bin
313880c7
DC
792 (copy-file e2fsck "e2fsck")
793 (remove-store-references "e2fsck")
794 (chmod "e2fsck" #o555))))))
0997771a 795 (home-page (package-home-page e2fsprogs))
313880c7
DC
796 (synopsis "Statically-linked e2fsck command from e2fsprogs")
797 (description "This package provides statically-linked e2fsck command taken
798from the e2fsprogs package. It is meant to be used in initrds.")
0997771a 799 (license (package-license e2fsprogs))))
e102f940 800
7c0a9104
LC
801(define-public extundelete
802 (package
803 (name "extundelete")
804 (version "0.2.4")
805 (source (origin
806 (method url-fetch)
807 (uri (string-append "mirror://sourceforge/extundelete/"
de67e922
LF
808 "extundelete/" version "/extundelete-"
809 version ".tar.bz2"))
7c0a9104
LC
810 (sha256
811 (base32
812 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
813 (build-system gnu-build-system)
814 (inputs `(("e2fsprogs" ,e2fsprogs)))
815 (home-page "http://extundelete.sourceforge.net/")
816 (synopsis "Recover deleted files from ext2/3/4 partitions")
817 (description
818 "Extundelete is a set of tools that can recover deleted files from an
819ext3 or ext4 partition.")
3ac73271 820 (license license:gpl2)))
7c0a9104 821
1c975f60
LC
822(define-public zerofree
823 (package
824 (name "zerofree")
825 (version "1.0.3")
826 (home-page "http://intgat.tigress.co.uk/rmy/uml/")
827 (source (origin
828 (method url-fetch)
829 (uri (string-append home-page name "-" version
830 ".tgz"))
831 (sha256
832 (base32
833 "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs"))))
834 (build-system gnu-build-system)
835 (arguments
0f08917d
TGR
836 '(#:phases
837 (modify-phases %standard-phases
838 (delete 'configure) ; no configure script
839 (replace 'install
840 ;; The Makefile lacks an ‘install’ target.
841 (lambda* (#:key outputs #:allow-other-keys)
842 (let* ((out (assoc-ref outputs "out"))
843 (bin (string-append out "/bin")))
7a068459
TGR
844 (chmod "zerofree" #o555)
845 (install-file "zerofree" bin)
0f08917d
TGR
846 #t))))
847 #:tests? #f)) ; no tests
1c975f60
LC
848 (inputs `(("libext2fs" ,e2fsprogs)))
849 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
850 (description
851 "The zerofree command scans the free blocks in an ext2 file system and
852fills any non-zero blocks with zeroes. This is a useful way to make disk
853images more compressible.")
3ac73271 854 (license license:gpl2)))
1c975f60 855
d8482ad0
LC
856(define-public strace
857 (package
858 (name "strace")
79937f72 859 (version "4.18")
d8482ad0
LC
860 (source (origin
861 (method url-fetch)
de67e922
LF
862 (uri (string-append "mirror://sourceforge/strace/strace/" version
863 "/strace-" version ".tar.xz"))
d8482ad0
LC
864 (sha256
865 (base32
79937f72 866 "026agy9nq238nx3ynhmi8h3vx96yra4xacfsm2ybs9k23ry8ibc9"))))
d8482ad0 867 (build-system gnu-build-system)
6983b8a8
MB
868 (arguments
869 '(#:phases
870 (modify-phases %standard-phases
871 (add-after 'unpack 'patch-/bin/sh
872 (lambda _
873 (substitute* "strace.c"
874 (("/bin/sh") (which "sh")))
875 #t)))))
c4c4cc05 876 (native-inputs `(("perl" ,perl)))
6983b8a8 877 (home-page "https://strace.io/")
d8482ad0
LC
878 (synopsis "System call tracer for Linux")
879 (description
880 "strace is a system call tracer, i.e. a debugging tool which prints out a
881trace of all the system calls made by a another process/program.")
3ac73271 882 (license license:bsd-3)))
ba04571a 883
e1e27737
TUBK
884(define-public ltrace
885 (package
886 (name "ltrace")
887 (version "0.7.3")
888 (source (origin
889 (method url-fetch)
890 (uri (string-append "http://www.ltrace.org/ltrace_" version
891 ".orig.tar.bz2"))
892 (sha256
893 (base32
894 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
895 (build-system gnu-build-system)
896 (inputs `(("libelf" ,libelf)))
897 (arguments
898 ;; Compilation uses -Werror by default, but it fails.
899 '(#:configure-flags '("--disable-werror")))
900 (home-page "http://www.ltrace.org/")
901 (synopsis "Library call tracer for Linux")
902 (description
903 "ltrace intercepts and records dynamic library calls which are called by
904an executed process and the signals received by that process. It can also
905intercept and print the system calls executed by the program.")
3ac73271 906 (license license:gpl2+)))
e1e27737 907
ba04571a
LC
908(define-public alsa-lib
909 (package
910 (name "alsa-lib")
5f3070a5 911 (version "1.1.3")
ba04571a
LC
912 (source (origin
913 (method url-fetch)
914 (uri (string-append
915 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
916 version ".tar.bz2"))
917 (sha256
918 (base32
5f3070a5 919 "174n2psp0328xcy2f1ayls67598bxli6q9cf00d2qnac3012aa3i"))))
ba04571a 920 (build-system gnu-build-system)
5f3070a5 921 (home-page "https://www.alsa-project.org/")
ba04571a
LC
922 (synopsis "The Advanced Linux Sound Architecture libraries")
923 (description
924 "The Advanced Linux Sound Architecture (ALSA) provides audio and
925MIDI functionality to the Linux-based operating system.")
3ac73271 926 (license license:lgpl2.1+)))
10afdf50 927
17b293a0
LC
928(define-public alsa-utils
929 (package
930 (name "alsa-utils")
31baa864 931 (version "1.1.4")
17b293a0
LC
932 (source (origin
933 (method url-fetch)
992b527d
EF
934 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
935 name "-" version ".tar.bz2"))
17b293a0
LC
936 (sha256
937 (base32
31baa864 938 "17cxih9ibjp1193dyd79j50pyfa9dvrs6r9kpwrvzicjvr2110x7"))))
17b293a0
LC
939 (build-system gnu-build-system)
940 (arguments
941 ;; XXX: Disable man page creation until we have DocBook.
942 '(#:configure-flags (list "--disable-xmlto"
f2817d43
LC
943
944 ;; The udev rule is responsible for restoring
945 ;; the volume.
17b293a0
LC
946 (string-append "--with-udev-rules-dir="
947 (assoc-ref %outputs "out")
948 "/lib/udev/rules.d"))
49165145
EF
949 #:phases
950 (modify-phases %standard-phases
951 (add-before
952 'install 'pre-install
953 (lambda _
954 ;; Don't try to mkdir /var/lib/alsa.
955 (substitute* "Makefile"
956 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
457d154f
EF
957 "true\n"))
958 #t)))))
17b293a0
LC
959 (inputs
960 `(("libsamplerate" ,libsamplerate)
961 ("ncurses" ,ncurses)
962 ("alsa-lib" ,alsa-lib)
963 ("xmlto" ,xmlto)
b94a6ca0 964 ("gettext" ,gettext-minimal)))
17b293a0
LC
965 (home-page "http://www.alsa-project.org/")
966 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
967 (description
968 "The Advanced Linux Sound Architecture (ALSA) provides audio and
969MIDI functionality to the Linux-based operating system.")
970
971 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
972 ;; GPLv2-only.
3ac73271 973 (license license:gpl2)))
17b293a0 974
7d2511bc 975(define-public alsa-plugins
976 (package
977 (name "alsa-plugins")
20d87dfb 978 (version "1.1.4")
7d2511bc 979 (source (origin
980 (method url-fetch)
981 (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
982 name "-" version ".tar.bz2"))
983 (sha256
984 (base32
20d87dfb 985 "12hsvm6rpinjkg06pa9hzndkdrbfw6wk6yk00cm8y1gbv8xiq3ak"))))
7d2511bc 986 (build-system gnu-build-system)
987 ;; TODO: Split libavcodec and speex if possible. It looks like they can not
988 ;; be split, there are references to both in files.
989 ;; TODO: Remove OSS related plugins, they add support to run native
990 ;; ALSA applications on OSS however we do not offer OSS and OSS is
991 ;; obsolete.
992 (outputs '("out" "pulseaudio"))
993 (arguments
994 `(#:phases
995 (modify-phases %standard-phases
996 (add-after 'install 'split
997 (lambda* (#:key inputs outputs #:allow-other-keys)
998 ;; Distribute the binaries to the various outputs.
999 (let* ((out (assoc-ref outputs "out"))
1000 (pua (assoc-ref outputs "pulseaudio"))
1001 (pualib (string-append pua "/lib/alsa-lib"))
1002 (puaconf (string-append pua "/share/alsa/alsa.conf.d")))
1003 (mkdir-p puaconf)
1004 (mkdir-p pualib)
1005 (chdir (string-append out "/share"))
1006 (for-each (lambda (file)
1007 (rename-file file (string-append puaconf "/" (basename file))))
1008 (find-files out "\\.(conf|example)"))
1009 (for-each (lambda (file)
1010 (rename-file file (string-append pualib "/" (basename file))))
1011 (find-files out ".*pulse\\.(la|so)"))
1012 (chdir "..")
1013 ;; We have moved the files to output pulsaudio, the
1014 ;; directory is now empty.
1015 (delete-file-recursively (string-append out "/share"))
1016 #t))))))
1017 (inputs
1018 `(("alsa-lib" ,alsa-lib)
1019 ("speex" ,speex) ; libspeexdsp resampling plugin
1020 ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
1021 ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
1022 ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
1023 (native-inputs
1024 `(("pkg-config" ,pkg-config)))
1025 (home-page "http://www.alsa-project.org/")
1026 (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
1027 (description
1028 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1029MIDI functionality to the Linux-based operating system. This package enhances ALSA
1030by providing additional plugins which include: upmixing, downmixing, jackd and
1031pulseaudio support for native alsa applications, format conversion (s16 to a52), and
1032external rate conversion.")
1033 (license (list license:gpl2+
1034 ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
1035 license:lgpl2.1+))))
1036
10afdf50
LC
1037(define-public iptables
1038 (package
1039 (name "iptables")
13223c8e 1040 (version "1.6.1")
10afdf50
LC
1041 (source (origin
1042 (method url-fetch)
1043 (uri (string-append
f11ae44f 1044 "mirror://netfilter.org/iptables/iptables-"
10afdf50
LC
1045 version ".tar.bz2"))
1046 (sha256
1047 (base32
13223c8e 1048 "1x8c9y340x79djsq54bc1674ryv59jfphrk4f88i7qbvbnyxghhg"))))
10afdf50 1049 (build-system gnu-build-system)
13223c8e
LF
1050 (native-inputs
1051 `(("pkg-config" ,pkg-config)
1052 ("flex" ,flex)
1053 ("bison" ,bison)))
1054 (inputs
1055 `(("libmnl" ,libmnl)
1056 ("libnftnl" ,libnftnl)))
50c26d9e
SB
1057 (arguments
1058 '(#:tests? #f ; no test suite
1059 #:configure-flags ; add $libdir to the RUNPATH of executables
1060 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
13223c8e 1061 (home-page "https://www.netfilter.org/projects/iptables/index.html")
10afdf50
LC
1062 (synopsis "Program to configure the Linux IP packet filtering rules")
1063 (description
1064 "iptables is the userspace command line program used to configure the
35e4b3d5 1065Linux 2.4.x and later IPv4 packet filtering ruleset (firewall). It is targeted at
10afdf50
LC
1066system administrators. Since Network Address Translation is also configured
1067from the packet filter ruleset, iptables is used for this, too. The iptables
1068package also includes ip6tables. ip6tables is used for configuring the IPv6
1069packet filter.")
3ac73271 1070 (license license:gpl2+)))
90a0048f 1071
6876a6fe
SB
1072(define-public ebtables
1073 (package
1074 (name "ebtables")
1075 (version "2.0.10-4")
1076 (source (origin
1077 (method url-fetch)
1078 (uri (string-append
1079 "mirror://netfilter.org/ebtables/ebtables-v"
1080 version ".tar.gz"))
1081 (sha256
1082 (base32
1083 "0pa5ljlk970yfyhpf3iqwfpbc30j8mgn90fapw9cfz909x47nvyw"))))
1084 (build-system gnu-build-system)
1085 (arguments
1086 '(#:tests? #f ; no test suite
1087 #:make-flags
1088 (let* ((out (assoc-ref %outputs "out"))
1089 (bin (string-append out "/sbin"))
1090 (lib (string-append out "/lib"))
1091 (man (string-append out "/share/man"))
1092 (iptables (assoc-ref %build-inputs "iptables"))
1093 (ethertypes (string-append iptables "/etc/ethertypes")))
1094 (list (string-append "LIBDIR=" lib)
1095 (string-append "MANDIR=" man)
1096 (string-append "BINDIR=" bin)
1097 (string-append "ETHERTYPESFILE=" ethertypes)
1098 ;; With the default CFLAGS, it falis with:
1099 ;; communication.c:259:58: error: variable ‘ret’ set but not
1100 ;; used [-Werror=unused-but-set-variable]
1101 "CFLAGS=-Wall"))
1102 #:phases
1103 (modify-phases %standard-phases
1104 (replace 'configure
1105 ;; no configure script
1106 (lambda _
1107 (substitute* "Makefile"
1108 ;; Remove user and group options from install commands,
1109 ;; otherwise it fails with: invalid user 'root'.
1110 (("-o root -g root") "")
1111 ;; Remove 'ethertypes' from the install target.
1112 (("install: .*")
1113 "install: $(MANDIR)/man8/ebtables.8 exec scripts\n"))
1114 #t)))))
1115 (inputs
1116 `(("perl" ,perl)
1117 ("iptables" ,iptables)))
1118 (synopsis "Ethernet bridge frame table administration")
1119 (home-page "http://ebtables.netfilter.org/")
1120 (description
1121 "ebtables is an application program used to set up and maintain the
1122tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is
1123analogous to the iptables application, but less complicated, due to the fact
1124that the Ethernet protocol is much simpler than the IP protocol.")
1125 (license license:gpl2+)))
1126
90a0048f
LC
1127(define-public iproute
1128 (package
1129 (name "iproute2")
856f6878 1130 (version "4.12.0")
90a0048f 1131 (source (origin
75cd4b05
AK
1132 (method url-fetch)
1133 (uri (string-append
1134 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
1135 version ".tar.xz"))
1136 (sha256
1137 (base32
856f6878 1138 "0zdxdsxyaazl85xhwskvsmpyzwf5qp21cvjsi1lw3xnrc914q2if"))))
90a0048f
LC
1139 (build-system gnu-build-system)
1140 (arguments
1141 `(#:tests? #f ; no test suite
1142 #:make-flags (let ((out (assoc-ref %outputs "out")))
1143 (list "DESTDIR="
e777d07d
LF
1144 (string-append "BASH_COMPDIR=" out
1145 "/etc/bash_completion.d")
90a0048f 1146 (string-append "LIBDIR=" out "/lib")
61f78e72 1147 (string-append "HDRDIR=" out "/include")
90a0048f
LC
1148 (string-append "SBINDIR=" out "/sbin")
1149 (string-append "CONFDIR=" out "/etc")
1150 (string-append "DOCDIR=" out "/share/doc/"
1151 ,name "-" ,version)
1152 (string-append "MANDIR=" out "/share/man")))
b53e44fb
AK
1153 #:phases (modify-phases %standard-phases
1154 (add-before 'install 'pre-install
1155 (lambda _
1156 ;; Don't attempt to create /var/lib/arpd.
1157 (substitute* "Makefile"
1158 (("^.*ARPDDIR.*$") "")))))))
90a0048f
LC
1159 (inputs
1160 `(("iptables" ,iptables)
c4c4cc05
JD
1161 ("db4" ,bdb)))
1162 (native-inputs
1163 `(("pkg-config" ,pkg-config)
90a0048f
LC
1164 ("flex" ,flex)
1165 ("bison" ,bison)))
1166 (home-page
d7f84eab 1167 "https://wiki.linuxfoundation.org/networking/iproute2")
90a0048f 1168 (synopsis
9e771e3b 1169 "Utilities for controlling TCP/IP networking and traffic in Linux")
90a0048f
LC
1170 (description
1171 "Iproute2 is a collection of utilities for controlling TCP/IP
1172networking and traffic with the Linux kernel.
1173
1174Most network configuration manuals still refer to ifconfig and route as the
1175primary network configuration tools, but ifconfig is known to behave
1176inadequately in modern network environments. They should be deprecated, but
1177most distros still include them. Most network configuration systems make use
1178of ifconfig and thus provide a limited feature set. The /etc/net project aims
1179to support most modern network technologies, as it doesn't use ifconfig and
1180allows a system administrator to make use of all iproute2 features, including
1181traffic control.
1182
1183iproute2 is usually shipped in a package called iproute or iproute2 and
02041872
TGR
1184consists of several tools, of which the most important are @command{ip} and
1185@command{tc}. @command{ip} controls IPv4 and IPv6 configuration and
1186@command{tc} stands for traffic control. Both tools print detailed usage
1187messages and are accompanied by a set of manpages.")
3ac73271 1188 (license license:gpl2+)))
85e0dc6a 1189
6d31c175
LF
1190;; There are two packages for net-tools. The first, net-tools, is more recent
1191;; and probably safer to use with untrusted inputs (i.e. the internet). The
1192;; second, net-tools-for-tests, is relatively old and buggy. It can be used in
1193;; package test suites and should never be referred to by a built package. Use
1194;; #:disallowed-references to enforce this.
1195;;
1196;; When we are able to rebuild many packages (i.e. core-updates), we can update
1197;; net-tools-for-tests if appropriate.
1198;;
1199;; See <https://bugs.gnu.org/27811> for more information.
85e0dc6a
LC
1200(define-public net-tools
1201 ;; XXX: This package is basically unmaintained, but it provides a few
1202 ;; commands not yet provided by Inetutils, such as 'route', so we have to
1203 ;; live with it.
6d31c175
LF
1204 (let ((commit "479bb4a7e11a4084e2935c0a576388f92469225b")
1205 (revision "0"))
1206 (package
1207 (name "net-tools")
1208 (version (string-append "1.60-" revision "." (string-take commit 7)))
1209 (source (origin
1210 (method git-fetch)
1211 (uri (git-reference
1212 (url "https://git.code.sf.net/p/net-tools/code")
1213 (commit commit)))
1214 (file-name (string-append name "-" version "-checkout"))
1215 (sha256
1216 (base32
1217 "189mdjfbd7j7j0jysy34nqn5byy9g5f6ylip1sikk7kz08vjml4s"))))
1218 (home-page "http://net-tools.sourceforge.net/")
1219 (build-system gnu-build-system)
1220 (arguments
1221 '(#:modules ((guix build gnu-build-system)
1222 (guix build utils)
1223 (srfi srfi-1)
1224 (srfi srfi-26))
1225 #:phases
1226 (modify-phases %standard-phases
1227 (replace 'configure
1228 (lambda* (#:key outputs #:allow-other-keys)
1229 (let ((out (assoc-ref outputs "out")))
1230 (mkdir-p (string-append out "/bin"))
1231 (mkdir-p (string-append out "/sbin"))
1232
1233 ;; Pretend we have everything...
1234 (system "yes | make config")
1235
1236 ;; ... except for the things we don't have.
1237 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1238 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1239 ;; that have been removed.
1240 ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we should
1241 ;; think about adding them later.
1242 (substitute* '("config.make" "config.h")
1243 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ =]1.*$")
1244 "")))))
1245 (add-after 'install 'remove-redundant-commands
1246 (lambda* (#:key outputs #:allow-other-keys)
1247 ;; Remove commands and man pages redundant with Inetutils.
1248 (let* ((out (assoc-ref outputs "out"))
1249 (dup (append-map (cut find-files out <>)
1250 '("^hostname"
1251 "^(yp|nis|dns)?domainname"))))
1252 (for-each delete-file dup)
1253 #t))))
1254 ;; Binaries that depend on libnet-tools.a don't declare that
1255 ;; dependency, making it parallel-unsafe.
1256 #:parallel-build? #f
1257
1258 #:tests? #f ; no test suite
1259 #:make-flags (let ((out (assoc-ref %outputs "out")))
1260 (list "CC=gcc"
1261 (string-append "BASEDIR=" out)
1262 (string-append "INSTALLNLSDIR=" out "/share/locale")
1263 (string-append "mandir=/share/man")))))
1264 (native-inputs `(("gettext" ,gettext-minimal)))
1265 (synopsis "Tools for controlling the network subsystem in Linux")
1266 (description
1267 "This package includes the important tools for controlling the network
1268subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp and
1269route. Additionally, this package contains utilities relating to particular
1270network hardware types (plipconfig, slattach) and advanced aspects of IP
1271configuration (iptunnel, ipmaddr).")
1272 (license license:gpl2+))))
1273
1274(define-public net-tools-for-tests
1275 (hidden-package (package (inherit net-tools)
85e0dc6a 1276 (version "1.60")
6d31c175
LF
1277 ;; Git depends on net-tools-for-tests via GnuTLS, so we can't use git-fetch
1278 ;; here. We should find a better workaround for this problem so that we can
1279 ;; use the latest upstream source.
85e0dc6a
LC
1280 (source (origin
1281 (method url-fetch)
6b55ee88
LC
1282 (uri (list (string-append
1283 "mirror://sourceforge/net-tools/net-tools-"
1284 version ".tar.bz2")
1285 (string-append
1286 "http://distro.ibiblio.org/rootlinux/rootlinux-ports"
1287 "/base/net-tools/net-tools-1.60.tar.bz2")))
85e0dc6a
LC
1288 (sha256
1289 (base32
177088a3 1290 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
fc1adab1 1291 (patches (search-patches "net-tools-bitrot.patch"))))
85e0dc6a
LC
1292 (build-system gnu-build-system)
1293 (arguments
c9e0a44e
LC
1294 '(#:modules ((guix build gnu-build-system)
1295 (guix build utils)
1296 (srfi srfi-1)
1297 (srfi srfi-26))
1298 #:phases (alist-cons-after
cd143df0 1299 'unpack 'patch
85e0dc6a
LC
1300 (lambda* (#:key inputs #:allow-other-keys)
1301 (define (apply-patch file)
9a224ac2 1302 (zero? (system* "patch" "-p1" "--force"
85e0dc6a
LC
1303 "--input" file)))
1304
1305 (let ((patch.gz (assoc-ref inputs "patch")))
1306 (format #t "applying Debian patch set '~a'...~%"
1307 patch.gz)
1308 (system (string-append "gunzip < " patch.gz " > the-patch"))
85e0dc6a
LC
1309 (and (apply-patch "the-patch")
1310 (for-each apply-patch
1311 (find-files "debian/patches"
1312 "\\.patch")))))
1313 (alist-replace
1314 'configure
1315 (lambda* (#:key outputs #:allow-other-keys)
1316 (let ((out (assoc-ref outputs "out")))
1317 (mkdir-p (string-append out "/bin"))
1318 (mkdir-p (string-append out "/sbin"))
1319
1320 ;; Pretend we have everything...
1321 (system "yes | make config")
1322
a153ff80
MW
1323 ;; ... except for the things we don't have.
1324 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1325 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1326 ;; that have been removed.
85e0dc6a 1327 (substitute* '("config.make" "config.h")
a153ff80 1328 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") ""))))
c9e0a44e
LC
1329 (alist-cons-after
1330 'install 'remove-redundant-commands
1331 (lambda* (#:key outputs #:allow-other-keys)
1332 ;; Remove commands and man pages redundant with
1333 ;; Inetutils.
1334 (let* ((out (assoc-ref outputs "out"))
1335 (dup (append-map (cut find-files out <>)
1336 '("^hostname"
1337 "^(yp|nis|dns)?domainname"))))
1338 (for-each delete-file dup)
1339 #t))
1340 %standard-phases)))
85e0dc6a
LC
1341
1342 ;; Binaries that depend on libnet-tools.a don't declare that
1343 ;; dependency, making it parallel-unsafe.
1344 #:parallel-build? #f
1345
1346 #:tests? #f ; no test suite
0d55c356
MW
1347 #:make-flags (let ((out (assoc-ref %outputs "out")))
1348 (list "CC=gcc"
1349 (string-append "BASEDIR=" out)
1350 (string-append "INSTALLNLSDIR=" out "/share/locale")
1351 (string-append "mandir=/share/man")))))
85e0dc6a
LC
1352
1353 ;; Use the big Debian patch set (the thing does not even compile out of
1354 ;; the box.)
6d31c175
LF
1355 ;; XXX The patch is not actually applied, due to a bug in the 'patch' phase
1356 ;; above. However, this package variant is only used in GnuTLS's tests. It
1357 ;; will be adjusted when convenient for the build farm.
1358 ;; See <https://bugs.gnu.org/27811> for more information.
85e0dc6a
LC
1359 (inputs `(("patch" ,(origin
1360 (method url-fetch)
1361 (uri
1362 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
1363 (sha256
1364 (base32
6d31c175 1365 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p")))))))))
f96dbf6b 1366
c762e82e
LC
1367(define-public libcap
1368 (package
1369 (name "libcap")
68ea090b 1370 (version "2.25")
c762e82e
LC
1371 (source (origin
1372 (method url-fetch)
c762e82e 1373 (uri (string-append
f6c2d05c
LC
1374 "mirror://kernel.org/linux/libs/security/linux-privs/"
1375 "libcap2/libcap-" version ".tar.xz"))
c762e82e
LC
1376 (sha256
1377 (base32
68ea090b 1378 "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39"))))
c762e82e 1379 (build-system gnu-build-system)
6d889daf
SB
1380 (arguments '(#:phases
1381 (modify-phases %standard-phases
1382 (replace 'configure
1383 ;; Add $libdir to the RUNPATH of executables.
1384 (lambda _
1385 (substitute* "Make.Rules"
1386 (("LDFLAGS := #-g")
1387 (string-append "LDFLAGS := -Wl,-rpath="
1388 %output "/lib"))))))
c762e82e
LC
1389 #:tests? #f ; no 'check' target
1390 #:make-flags (list "lib=lib"
1391 (string-append "prefix="
1392 (assoc-ref %outputs "out"))
1393 "RAISE_SETFCAP=no")))
1394 (native-inputs `(("perl" ,perl)))
1395 (inputs `(("attr" ,attr)))
1396 (home-page "https://sites.google.com/site/fullycapable/")
1397 (synopsis "Library for working with POSIX capabilities")
1398 (description
35b9e423 1399 "Libcap2 provides a programming interface to POSIX capabilities on
c762e82e
LC
1400Linux-based operating systems.")
1401
1402 ;; License is BSD-3 or GPLv2, at the user's choice.
3ac73271 1403 (license license:gpl2)))
215b6431
LC
1404
1405(define-public bridge-utils
1406 (package
1407 (name "bridge-utils")
1408 (version "1.5")
1409 (source (origin
1410 (method url-fetch)
de67e922
LF
1411 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1412 "bridge-utils-" version ".tar.gz"))
215b6431
LC
1413 (sha256
1414 (base32
1415 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1416 (build-system gnu-build-system)
1417
1418 ;; The tarball lacks all the generated files.
1419 (native-inputs `(("autoconf" ,autoconf)
1420 ("automake" ,automake)))
1421 (arguments
722ec722
MW
1422 '(#:phases (alist-cons-after
1423 'unpack 'bootstrap
215b6431 1424 (lambda _
e5c8e4f3
DT
1425 ;; Fix "field ‘ip6’ has incomplete type" errors.
1426 (substitute* "libbridge/libbridge.h"
1427 (("#include <linux/if_bridge.h>")
1428 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1429
1430 ;; Ensure that the entire build fails if one of the
1431 ;; sub-Makefiles fails.
1432 (substitute* "Makefile.in"
1433 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1434 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1435
215b6431
LC
1436 (zero? (system* "autoreconf" "-vf")))
1437 %standard-phases)
1438 #:tests? #f)) ; no 'check' target
1439
1440 (home-page
1441 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1442 (synopsis "Manipulate Ethernet bridges")
1443 (description
1444 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1445to connect two Ethernet segments together in a protocol independent way.
1446Packets are forwarded based on Ethernet address, rather than IP address (like
1447a router). Since forwarding is done at Layer 2, all protocols can go
1448transparently through a bridge.")
3ac73271 1449 (license license:gpl2+)))
3cc20675
LC
1450
1451(define-public libnl
1452 (package
1453 (name "libnl")
a2265ea3 1454 (version "3.3.0")
3cc20675
LC
1455 (source (origin
1456 (method url-fetch)
1457 (uri (string-append
a2265ea3
MB
1458 "https://github.com/thom311/libnl/releases/download/"
1459 "libnl" (string-join (string-split version #\.) "_")
1460 "/libnl-" version ".tar.gz"))
3cc20675
LC
1461 (sha256
1462 (base32
a2265ea3 1463 "1r3lw3hjvqxi5zqyq2w1qadm3gisd9nlf71dkl4yplacmssnhm3h"))))
3cc20675
LC
1464 (build-system gnu-build-system)
1465 (native-inputs `(("flex" ,flex) ("bison" ,bison)))
1466 (home-page "http://www.infradead.org/~tgr/libnl/")
1467 (synopsis "NetLink protocol library suite")
1468 (description
1469 "The libnl suite is a collection of libraries providing APIs to netlink
69b4ffcf 1470protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
3cc20675
LC
1471between the kernel and user space processes. It was designed to be a more
1472flexible successor to ioctl to provide mainly networking related kernel
1473configuration and monitoring interfaces.")
1474
1475 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1476 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
3ac73271 1477 (license license:gpl2)))
023fef7d 1478
65cd77db
MW
1479(define-public iw
1480 (package
1481 (name "iw")
72f0c5ea 1482 (version "4.9")
65cd77db
MW
1483 (source (origin
1484 (method url-fetch)
1485 (uri (string-append
2f9e312a 1486 "mirror://kernel.org/software/network/iw/iw-"
65cd77db
MW
1487 version ".tar.xz"))
1488 (sha256
1489 (base32
72f0c5ea 1490 "1klpvv98bnx1zm6aqalnri2vd7w80scmdaxr2qnblb6mz82whk1j"))))
65cd77db
MW
1491 (build-system gnu-build-system)
1492 (native-inputs `(("pkg-config" ,pkg-config)))
1493 (inputs `(("libnl" ,libnl)))
1494 (arguments
1495 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1496 "CC=gcc")
1497 #:phases (alist-delete 'configure %standard-phases)))
2f9e312a 1498 (home-page "https://wireless.wiki.kernel.org/")
65cd77db
MW
1499 (synopsis "Tool for configuring wireless devices")
1500 (description
1501 "iw is a new nl80211 based CLI configuration utility for wireless
2f9e312a 1502devices. It replaces @code{iwconfig}, which is deprecated.")
3ac73271 1503 (license license:isc)))
65cd77db 1504
023fef7d
LC
1505(define-public powertop
1506 (package
1507 (name "powertop")
ebacb0de 1508 (version "2.8")
023fef7d
LC
1509 (source
1510 (origin
1511 (method url-fetch)
1512 (uri (string-append
bd60e4e2 1513 "https://01.org/sites/default/files/downloads/powertop/powertop-"
023fef7d
LC
1514 version ".tar.gz"))
1515 (sha256
1516 (base32
ebacb0de 1517 "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8"))))
023fef7d 1518 (build-system gnu-build-system)
4c48bf55
ML
1519 (arguments
1520 '(#:phases
1521 (modify-phases %standard-phases
1522 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1523 ;; allow calibrating the network interface in GuixSD.
1524 (add-after 'unpack 'patch-absolute-file-names
1525 (lambda* (#:key inputs #:allow-other-keys)
1526 (let ((kmod (assoc-ref inputs "kmod")))
1527 (substitute* (find-files "src" "\\.cpp$")
1528 ;; Give the right 'modprobe' file name so that essential
1529 ;; modules such as msr.ko can be loaded.
1530 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1531 ;; These programs are only needed to calibrate, so using
1532 ;; relative file names avoids adding extra inputs. When they
1533 ;; are missing powertop gracefully handles it.
1534 (("/usr/bin/hcitool") "hcitool")
1535 (("/usr/bin/xset") "xset")
1536 (("/usr/sbin/hciconfig") "hciconfig"))
1537 #t))))))
023fef7d 1538 (inputs
4c48bf55
ML
1539 `(("kmod" ,kmod)
1540 ("libnl" ,libnl)
023fef7d 1541 ("ncurses" ,ncurses)
4c48bf55
ML
1542 ("pciutils" ,pciutils)
1543 ("zlib" ,zlib)))
c4c4cc05 1544 (native-inputs
ebacb0de 1545 `(("pkg-config" ,pkg-config)))
023fef7d
LC
1546 (home-page "https://01.org/powertop/")
1547 (synopsis "Analyze power consumption on Intel-based laptops")
1548 (description
1549 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1550power management. In addition to being a diagnostic tool, PowerTOP also has
1551an interactive mode where the user can experiment various power management
1552settings for cases where the operating system has not enabled these
1553settings.")
3ac73271 1554 (license license:gpl2)))
6869e5c9
LC
1555
1556(define-public aumix
1557 (package
1558 (name "aumix")
1559 (version "2.9.1")
1560 (source (origin
1561 (method url-fetch)
1562 (uri (string-append
1563 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1564 version ".tar.bz2"))
1565 (sha256
1566 (base32
1567 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1568 (build-system gnu-build-system)
1569 (inputs `(("ncurses" ,ncurses)))
1570 (home-page "http://www.jpj.net/~trevor/aumix.html")
1571 (synopsis "Audio mixer for X and the console")
1572 (description
1573 "Aumix adjusts an audio mixer from X, the console, a terminal,
1574the command line or a script.")
3ac73271 1575 (license license:gpl2+)))
7c0dbe78
SHT
1576
1577(define-public iotop
1578 (package
1579 (name "iotop")
1580 (version "0.6")
1581 (source
1582 (origin
1583 (method url-fetch)
1584 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1585 version ".tar.gz"))
1586 (sha256 (base32
1587 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1588 (build-system python-build-system)
1589 (arguments
35cebf01 1590 ;; The setup.py script expects python-2.
7c0dbe78 1591 `(#:python ,python-2
35cebf01 1592 ;; There are currently no checks in the package.
7c0dbe78
SHT
1593 #:tests? #f))
1594 (native-inputs `(("python" ,python-2)))
1595 (home-page "http://guichaz.free.fr/iotop/")
1596 (synopsis
1597 "Displays the IO activity of running processes")
1598 (description
1599 "Iotop is a Python program with a top like user interface to show the
1600processes currently causing I/O.")
3ac73271 1601 (license license:gpl2+)))
e30835e2
LC
1602
1603(define-public fuse
1604 (package
1605 (name "fuse")
436c0558 1606 (version "2.9.7")
e30835e2
LC
1607 (source (origin
1608 (method url-fetch)
0e9bc883
LF
1609 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1610 "download/fuse-" version
1611 "/fuse-" version ".tar.gz"))
e30835e2
LC
1612 (sha256
1613 (base32
436c0558 1614 "0x486nri30f7cgy0acj87v9sjxsjrr0cymrvw4h3r0sgmp8k4943"))
cd48a549 1615 (patches (search-patches "fuse-overlapping-headers.patch"))))
e30835e2 1616 (build-system gnu-build-system)
b148bd71 1617 (inputs `(("util-linux" ,util-linux)))
e30835e2
LC
1618 (arguments
1619 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1620 (assoc-ref %outputs "out")
1621 "/sbin")
1622 (string-append "INIT_D_PATH="
1623 (assoc-ref %outputs "out")
1624 "/etc/init.d")
9a4efac9
LC
1625
1626 ;; The rule makes /dev/fuse 666.
e30835e2
LC
1627 (string-append "UDEV_RULES_PATH="
1628 (assoc-ref %outputs "out")
9a4efac9 1629 "/lib/udev/rules.d"))
b148bd71
LC
1630 #:phases (alist-cons-before
1631 'build 'set-file-names
1632 (lambda* (#:key inputs #:allow-other-keys)
1633 ;; libfuse calls out to mount(8) and umount(8). Make sure
1634 ;; it refers to the right ones.
1635 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1636 (("/bin/(u?)mount" _ maybe-u)
1637 (string-append (assoc-ref inputs "util-linux")
1638 "/bin/" maybe-u "mount")))
1639 (substitute* '("util/mount.fuse.c")
1640 (("/bin/sh")
bd663902
LC
1641 (which "sh")))
1642
1643 ;; This hack leads libfuse to search for 'fusermount' in
1644 ;; $PATH, where it may find a setuid-root binary, instead of
1645 ;; trying solely $out/sbin/fusermount and failing because
1646 ;; it's not setuid.
1647 (substitute* "lib/Makefile"
1648 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1649 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
b148bd71 1650 %standard-phases)))
0e9bc883 1651 (home-page "https://github.com/libfuse/libfuse")
e30835e2
LC
1652 (synopsis "Support file systems implemented in user space")
1653 (description
1654 "As a consequence of its monolithic design, file system code for Linux
1655normally goes into the kernel itself---which is not only a robustness issue,
1656but also an impediment to system extensibility. FUSE, for \"file systems in
1657user space\", is a kernel module and user-space library that tries to address
1658part of this problem by allowing users to run file system implementations as
1659user-space processes.")
3ac73271
LC
1660 (license (list license:lgpl2.1 ;library
1661 license:gpl2+)))) ;command-line utilities
220193ad
LC
1662
1663(define-public unionfs-fuse
1664 (package
1665 (name "unionfs-fuse")
2f861edf 1666 (version "2.0")
220193ad
LC
1667 (source (origin
1668 (method url-fetch)
1669 (uri (string-append
2f861edf
EF
1670 "https://github.com/rpodgorny/unionfs-fuse/archive/v"
1671 version ".tar.gz"))
1672 (file-name (string-append name "-" version ".tar.gz"))
220193ad
LC
1673 (sha256
1674 (base32
2f861edf 1675 "0hsn8l1iblvx27bpd4dvnvnbh9ri3sv2f9xzpsnfz3379kb7skgj"))))
220193ad 1676 (build-system cmake-build-system)
094f4b53
EF
1677 (native-inputs
1678 `(("python" ,python)
1679 ("python-pytest" ,python-pytest)))
220193ad 1680 (inputs `(("fuse" ,fuse)))
094f4b53
EF
1681 (arguments
1682 '(#:phases
1683 (modify-phases %standard-phases
1684 (replace 'check
1685 ;; Borrowed from the Makefile
1686 (lambda _ (zero? (system* "python3" "-m" "pytest")))))))
2f861edf 1687 (home-page "https://github.com/rpodgorny/unionfs-fuse")
220193ad
LC
1688 (synopsis "User-space union file system")
1689 (description
1690 "UnionFS-FUSE is a flexible union file system implementation in user
1691space, using the FUSE library. Mounting a union file system allows you to
1692\"aggregate\" the contents of several directories into a single mount point.
1693UnionFS-FUSE additionally supports copy-on-write.")
3ac73271 1694 (license license:bsd-3)))
ed748588 1695
0b7a0c20
LC
1696(define fuse-static
1697 (package (inherit fuse)
1698 (name "fuse-static")
1699 (source (origin (inherit (package-source fuse))
1700 (modules '((guix build utils)))
1701 (snippet
1702 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1703 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1704 ;; it doesn't do that, allowing us to remove the dependency on
1705 ;; util-linux (something that is useful in initrds.)
1706 '(substitute* '("lib/mount_util.c"
1707 "util/mount_util.c")
1708 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1709 "0")
1710 (("/bin/")
1711 "")))))))
1712
ed748588
LC
1713(define-public unionfs-fuse/static
1714 (package (inherit unionfs-fuse)
1715 (synopsis "User-space union file system (statically linked)")
1716 (name (string-append (package-name unionfs-fuse) "-static"))
1717 (source (origin (inherit (package-source unionfs-fuse))
1718 (modules '((guix build utils)))
1719 (snippet
1720 ;; Add -ldl to the libraries, because libfuse.a needs that.
1721 '(substitute* "src/CMakeLists.txt"
1722 (("target_link_libraries(.*)\\)" _ libs)
1723 (string-append "target_link_libraries"
1724 libs " dl)"))))))
1725 (arguments
1726 '(#:tests? #f
1456cff1
LC
1727 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1728 #:phases (alist-cons-after
1729 'install 'post-install
1730 (lambda* (#:key outputs #:allow-other-keys)
1731 (let* ((out (assoc-ref outputs "out"))
1732 (exe (string-append out "/bin/unionfs")))
1733 ;; By default, 'unionfs' keeps references to
1734 ;; $glibc/share/locale and similar stuff. Remove them.
9f8d6eb2
LC
1735 (remove-store-references exe)
1736
1737 ;; 'unionfsctl' has references to glibc as well. Since
1738 ;; we don't need it, remove it.
1739 (delete-file (string-append out "/bin/unionfsctl"))
1740 #t))
1456cff1 1741 %standard-phases)))
0b7a0c20 1742 (inputs `(("fuse" ,fuse-static)))))
67b66003 1743
db288efa
LC
1744(define-public sshfs-fuse
1745 (package
1746 (name "sshfs-fuse")
20f8d1dd 1747 (version "2.10")
db288efa
LC
1748 (source (origin
1749 (method url-fetch)
b58c1b2d 1750 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
f5c6edd6
TGR
1751 "download/sshfs-" version "/sshfs-" version
1752 ".tar.gz"))
db288efa
LC
1753 (sha256
1754 (base32
20f8d1dd 1755 "00fir2iykdx11g8nv5gijg0zjrp2g3ldypnv0yi6lq3h5pg5v13h"))))
db288efa
LC
1756 (build-system gnu-build-system)
1757 (inputs
1758 `(("fuse" ,fuse)
1759 ("glib" ,glib)))
1760 (native-inputs
1761 `(("pkg-config" ,pkg-config)))
f5c6edd6 1762 (home-page "https://github.com/libfuse/sshfs")
db288efa
LC
1763 (synopsis "Mount remote file systems over SSH")
1764 (description
1765 "This is a file system client based on the SSH File Transfer Protocol.
1766Since most SSH servers already support this protocol it is very easy to set
1767up: on the server side there's nothing to do; on the client side mounting the
1768file system is as easy as logging into the server with an SSH client.")
3ac73271 1769 (license license:gpl2+)))
db288efa 1770
1eacffb9
RH
1771(define-public archivemount
1772 (package
1773 (name "archivemount")
1774 (version "0.8.7")
1775 (source
1776 (origin
1777 (method url-fetch)
1778 (uri (string-append "http://www.cybernoia.de/software/archivemount/"
1779 "archivemount-" version ".tar.gz"))
1780 (sha256
1781 (base32
1782 "1diiw6pnlnrnikn6l5ld92dx59lhrxjlqms8885vwbynsjl5q127"))))
1783 (build-system gnu-build-system)
1784 (inputs `(("fuse", fuse)
1785 ("libarchive", libarchive)))
1786 (native-inputs `(("pkg-config", pkg-config)))
1787 (home-page "http://www.cybernoia.de/software/archivemount")
1788 (synopsis "Tool for mounting archive files with FUSE")
1789 (description "archivemount is a FUSE-based file system for Unix variants,
1790including Linux. Its purpose is to mount archives (i.e. tar, tar.gz, etc.) to a
1791mount point where it can be read from or written to as with any other file
1792system. This makes accessing the contents of the archive, which may be
1793compressed, transparent to other programs, without decompressing them.")
1794 (license license:lgpl2.0+)))
1795
67b66003
LC
1796(define-public numactl
1797 (package
1798 (name "numactl")
e35dff97 1799 (version "2.0.11")
67b66003
LC
1800 (source (origin
1801 (method url-fetch)
1802 (uri (string-append
1803 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1804 version
1805 ".tar.gz"))
1806 (sha256
1807 (base32
e35dff97 1808 "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325"))))
67b66003
LC
1809 (build-system gnu-build-system)
1810 (arguments
e35dff97 1811 '(;; There's a 'test' target, but it requires NUMA support in the kernel
67b66003
LC
1812 ;; to run, which we can't assume to have.
1813 #:tests? #f))
b0015064 1814
35dfcdd7
AE
1815 ;; NUMA is apparently not supported on armhf, see
1816 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1817 (supported-systems (delete "armhf-linux" %supported-systems))
67b66003
LC
1818 (home-page "http://oss.sgi.com/projects/libnuma/")
1819 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1820 (description
1821 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1822memory is not all in one place. The numactl program allows you to run your
1823application program on specific CPU's and memory nodes. It does this by
1824supplying a NUMA memory policy to the operating system before running your
1825program.
1826
1827The package contains other commands, such as numademo, numastat and memhog.
1828The numademo command provides a quick overview of NUMA performance on your
1829system.")
3ac73271
LC
1830 (license (list license:gpl2 ;programs
1831 license:lgpl2.1)))) ;library
b10e9ff6 1832
103b7e79 1833(define-public kbd-neo
1834 (package
1835 (name "kbd-neo")
1836 (version "2486")
1837 (source
1838 (origin
1839 (method url-fetch)
1840 (uri (string-append "https://svn.neo-layout.org/!svn/bc/"
1841 version "/linux/console/neo.map"))
1842 (file-name (string-append name "-" version ".map"))
1843 (sha256
1844 (base32
1845 "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g"))))
1846 (build-system trivial-build-system)
1847 (arguments
1848 `(#:modules ((guix build utils))
1849 #:builder (begin
1850 (use-modules (guix build utils))
1851 (let ((out (string-append %output "/share/keymaps"))
1852 (source (assoc-ref %build-inputs "source")))
1853 (mkdir-p out)
1854 (copy-file source (string-append out "/neo.map"))
1855 #t))))
1856 (home-page "https://neo-layout.org")
1857 (synopsis "Neo2 console layout")
1858 (description
1859 "Kbd-neo provides the Neo2 keyboard layout for use with
1860@command{loadkeys(1)} from @code{kbd(4)}.")
1861 ;; The file is located in an svn directory, the entire content of
1862 ;; the directory is licensed as GPL3.
1863 (license license:gpl3+)))
1864
b10e9ff6
LC
1865(define-public kbd
1866 (package
1867 (name "kbd")
8555a609 1868 (version "2.0.4")
b10e9ff6
LC
1869 (source (origin
1870 (method url-fetch)
1871 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
710b4928 1872 version ".tar.xz"))
b10e9ff6
LC
1873 (sha256
1874 (base32
8555a609 1875 "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz"))
c8f60748
LC
1876 (modules '((guix build utils)))
1877 (snippet
f2cdcafb
LC
1878 '(begin
1879 (substitute* "tests/Makefile.in"
1880 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1881 (("@VERSION@")
1882 "[@]VERSION[@]"))
1883 (substitute* '("src/unicode_start" "src/unicode_stop")
1884 ;; Assume the Coreutils are in $PATH.
1885 (("/usr/bin/tty")
1886 "tty"))))))
b10e9ff6
LC
1887 (build-system gnu-build-system)
1888 (arguments
5953d2b7
AK
1889 '(#:phases
1890 (modify-phases %standard-phases
1891 (add-before 'build 'pre-build
1892 (lambda* (#:key inputs #:allow-other-keys)
1893 (let ((gzip (assoc-ref %build-inputs "gzip"))
1894 (bzip2 (assoc-ref %build-inputs "bzip2")))
1895 (substitute* "src/libkeymap/findfile.c"
1896 (("gzip")
1897 (string-append gzip "/bin/gzip"))
1898 (("bzip2")
1899 (string-append bzip2 "/bin/bzip2"))))))
1900 (add-after 'install 'post-install
1901 (lambda* (#:key outputs #:allow-other-keys)
1902 ;; Make sure these programs find their comrades.
1903 (let* ((out (assoc-ref outputs "out"))
1904 (bin (string-append out "/bin")))
1905 (for-each (lambda (prog)
1906 (wrap-program (string-append bin "/" prog)
1907 `("PATH" ":" prefix (,bin))))
1908 '("unicode_start" "unicode_stop"))))))))
b10e9ff6 1909 (inputs `(("check" ,check)
f61e0e79
LC
1910 ("gzip" ,gzip)
1911 ("bzip2" ,bzip2)
b10e9ff6 1912 ("pam" ,linux-pam)))
fd7000fe 1913 (native-search-paths
1914 (list (search-path-specification
1915 (variable "LOADKEYS_KEYMAP_PATH")
674d4e13
TGR
1916 ;; Append ‘/**’ to recursively search all directories. One can then
1917 ;; run (for example) ‘loadkeys en-latin9’ instead of having to find
1918 ;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard.
1919 (files (list "share/keymaps/**")))))
b10e9ff6 1920 (native-inputs `(("pkg-config" ,pkg-config)))
0ed81d04 1921 (home-page "http://kbd-project.org/")
b10e9ff6
LC
1922 (synopsis "Linux keyboard utilities and keyboard maps")
1923 (description
1924 "This package contains keytable files and keyboard utilities compatible
1925for systems using the Linux kernel. This includes commands such as
1926'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
3ac73271 1927 (license license:gpl2+)))
de0b620e
LC
1928
1929(define-public inotify-tools
1930 (package
1931 (name "inotify-tools")
1932 (version "3.13")
1933 (source (origin
1934 (method url-fetch)
1935 (uri (string-append
1936 "mirror://sourceforge/inotify-tools/inotify-tools/"
1937 version "/inotify-tools-" version ".tar.gz"))
1938 (sha256
1939 (base32
1940 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1941 (build-system gnu-build-system)
1942 (home-page "http://inotify-tools.sourceforge.net/")
1943 (synopsis "Monitor file accesses")
1944 (description
1945 "The inotify-tools packages provides a C library and command-line tools
1946to use Linux' inotify mechanism, which allows file accesses to be monitored.")
3ac73271 1947 (license license:gpl2+)))
e062d542
AE
1948
1949(define-public kmod
1950 (package
1951 (name "kmod")
b9375d89 1952 (version "24")
e062d542
AE
1953 (source (origin
1954 (method url-fetch)
1955 (uri
1956 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1957 "kmod-" version ".tar.xz"))
1958 (sha256
1959 (base32
b9375d89 1960 "15xkkkzvca9flvkm48gkh8y8f13vlm3sl7nz9ydc7b3jy4fqs2v1"))
fc1adab1 1961 (patches (search-patches "kmod-module-directory.patch"))))
e062d542
AE
1962 (build-system gnu-build-system)
1963 (native-inputs
1964 `(("pkg-config" ,pkg-config)))
1965 (inputs
f61e0e79
LC
1966 `(("xz" ,xz)
1967 ("zlib" ,zlib)))
e062d542
AE
1968 (arguments
1969 `(#:tests? #f ; FIXME: Investigate test failures
4a8b4c25
LC
1970 #:configure-flags '("--with-xz" "--with-zlib")
1971 #:phases (alist-cons-after
1972 'install 'install-modprobe&co
1973 (lambda* (#:key outputs #:allow-other-keys)
1974 (let* ((out (assoc-ref outputs "out"))
1975 (bin (string-append out "/bin")))
1976 (for-each (lambda (tool)
1977 (symlink "kmod"
1978 (string-append bin "/" tool)))
1979 '("insmod" "rmmod" "lsmod" "modprobe"
1980 "modinfo" "depmod"))))
1981 %standard-phases)))
e062d542
AE
1982 (home-page "https://www.kernel.org/")
1983 (synopsis "Kernel module tools")
35b9e423 1984 (description "Kmod is a set of tools to handle common tasks with Linux
e062d542
AE
1985kernel modules like insert, remove, list, check properties, resolve
1986dependencies and aliases.
1987
1988These tools are designed on top of libkmod, a library that is shipped with
1989kmod. The aim is to be compatible with tools, configurations and indices
1990from the module-init-tools project.")
3ac73271 1991 (license license:gpl2+))) ; library under lgpl2.1+
d7d42d6b 1992
7fa715e7
LC
1993(define-public eudev
1994 ;; The post-systemd fork, maintained by Gentoo.
fe32c7f7 1995 (package
7fa715e7 1996 (name "eudev")
37861864 1997 (version "3.2.1")
7fa715e7
LC
1998 (source (origin
1999 (method url-fetch)
2000 (uri (string-append
2001 "http://dev.gentoo.org/~blueness/eudev/eudev-"
2002 version ".tar.gz"))
2003 (sha256
2004 (base32
37861864 2005 "06gyyl90n85x8i7lfhns514y1kg1ians13l467admyzy3kjxkqsp"))
f0a01af5
LF
2006 (patches (search-patches "eudev-rules-directory.patch"
2007 "eudev-conflicting-declaration.patch"))))
fe32c7f7
MW
2008 (build-system gnu-build-system)
2009 (native-inputs
2010 `(("pkg-config" ,pkg-config)
e75230c1
SB
2011 ("perl" ,perl)
2012 ("gperf" ,gperf)))
fe32c7f7 2013 (inputs
255f7308
LC
2014 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
2015 ;; and similar; it also installs the '60-persistent-storage.rules' file,
2016 ;; which contains the rules to do that.
2017 `(("util-linux" ,util-linux) ;for blkid
2018 ("kmod" ,kmod)))
e1921a38 2019 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
fe32c7f7
MW
2020 (synopsis "Userspace device management")
2021 (description "Udev is a daemon which dynamically creates and removes
2022device nodes from /dev/, handles hotplug events and loads drivers at boot
2023time.")
3ac73271 2024 (license license:gpl2+)))
7fa715e7 2025
e5d861f3
LC
2026(define-public eudev-with-hwdb
2027 ;; TODO: Merge with 'eudev'.
2028 (package
2029 (inherit eudev)
2030 (name "eudev-with-hwdb")
2031 (arguments
2032 '(#:phases (modify-phases %standard-phases
2033 (add-after 'install 'build-hwdb
2034 (lambda* (#:key outputs #:allow-other-keys)
2035 ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
2036 ;; similar tools to display product names.
2037 (let ((out (assoc-ref outputs "out")))
2038 (zero? (system* (string-append out "/bin/udevadm")
2039 "hwdb" "--update"))))))))))
2040
66269d47
LC
2041(define-public lvm2
2042 (package
2043 (name "lvm2")
62ec02bf 2044 (version "2.02.171")
66269d47
LC
2045 (source (origin
2046 (method url-fetch)
2047 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
2048 version ".tgz"))
2049 (sha256
2050 (base32
62ec02bf 2051 "0r4r9fsvpj9hjmf0zz7h4prz12r6y16jhjhsvk1sbfpsl88sf5dq"))
66269d47
LC
2052 (modules '((guix build utils)))
2053 (snippet
2054 '(begin
2055 (use-modules (guix build utils))
2056
2057 ;; Honor sysconfdir.
2058 (substitute* "make.tmpl.in"
2059 (("confdir = .*$")
2060 "confdir = @sysconfdir@\n")
2061 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
01f94cca
LC
2062 "DEFAULT_SYS_DIR = @sysconfdir@"))))
2063 (patches (search-patches "lvm2-static-link.patch"))))
66269d47
LC
2064 (build-system gnu-build-system)
2065 (native-inputs
2066 `(("pkg-config" ,pkg-config)
2067 ("procps" ,procps))) ;tests use 'pgrep'
2068 (inputs
8fcaf8b1 2069 `(("udev" ,eudev)))
66269d47 2070 (arguments
3afbc6b3
LF
2071 '(#:phases
2072 (modify-phases %standard-phases
2073 (add-after 'configure 'set-makefile-shell
2074 (lambda _
2075 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
2076 ;; expected.
2077 (setenv "SHELL" (which "sh"))
66269d47 2078
3afbc6b3
LF
2079 ;; Replace /bin/sh with the right file name.
2080 (patch-makefile-SHELL "make.tmpl")
7ca97fae
LF
2081 #t))
2082 (add-before 'strip 'make-objects-writable
2083 (lambda* (#:key outputs #:allow-other-keys)
2084 ;; Make compiled objects writable so they can be stripped.
2085 (let ((out (assoc-ref outputs "out")))
2086 (for-each (lambda (file)
2087 (chmod file #o755))
2088 (append
2089 (find-files (string-append out "/lib"))
2090 (find-files (string-append out "/sbin"))))
2091 #t))))
66269d47
LC
2092
2093 #:configure-flags (list (string-append "--sysconfdir="
2094 (assoc-ref %outputs "out")
2095 "/etc/lvm")
2096 "--enable-udev_sync"
f2817d43
LC
2097 "--enable-udev_rules"
2098
2099 ;; Make sure programs such as 'dmsetup' can
2100 ;; find libdevmapper.so.
2101 (string-append "LDFLAGS=-Wl,-rpath="
2102 (assoc-ref %outputs "out")
2103 "/lib"))
66269d47
LC
2104
2105 ;; The tests use 'mknod', which requires root access.
2106 #:tests? #f))
62ec02bf 2107 (home-page "https://sourceware.org/lvm2/")
66269d47
LC
2108 (synopsis "Logical volume management for Linux")
2109 (description
2110 "LVM2 is the logical volume management tool set for Linux-based systems.
2111This package includes the user-space libraries and tools, including the device
2112mapper. Kernel components are part of Linux-libre.")
2113
2114 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
2115 ;; Command-line tools are GPLv2.
3ac73271 2116 (license (list license:gpl2 license:lgpl2.1))))
66269d47 2117
01f94cca
LC
2118(define-public lvm2-static
2119 (package
2120 (inherit lvm2)
2121 (name "lvm2-static")
2122
2123 ;; Propagate udev because libdevmapper.a depends on libudev.
2124 (inputs (alist-delete "udev" (package-inputs lvm2)))
2125 (propagated-inputs `(("udev" ,eudev)))
2126
2127 (arguments
2128 (substitute-keyword-arguments (package-arguments lvm2)
2129 ((#:configure-flags flags '())
2130 ;; LVM2 doesn't use Libtool, hence the custom option.
2131 `(cons "--enable-static_link" ,flags))))
2132 (synopsis "Logical volume management for Linux (statically linked)")))
2133
000f7559
DT
2134(define-public wireless-tools
2135 (package
2136 (name "wireless-tools")
2137 (version "30.pre9")
2138 (source (origin
2139 (method url-fetch)
2140 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
2141 version ".tar.gz"))
2142 (sha256
2143 (base32
ec01f22d 2144 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
ec01f22d 2145 (snippet
c2099a4c
MW
2146 '(begin
2147 ;; Remove the older header files that are not free software.
2148 (for-each (lambda (n)
2149 (delete-file (format #f "wireless.~a.h" n)))
2150 '(10 11 12 13 14 15 16 17 18 19 20))
2151 #t))))
000f7559
DT
2152 (build-system gnu-build-system)
2153 (arguments
c2099a4c
MW
2154 `(#:make-flags
2155 (list (string-append "PREFIX=" %output)
2156 (string-append "INSTALL_MAN=" %output "/share/man")
2157 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
2158 "BUILD_STATIC=")
2159 #:phases (modify-phases %standard-phases
2160 (delete 'configure))
000f7559
DT
2161 #:tests? #f))
2162 (synopsis "Tools for manipulating Linux Wireless Extensions")
fb9b7ce2
LC
2163 (description "Wireless Tools are used to manipulate the now-deprecated
2164Linux Wireless Extensions; consider using 'iw' instead. The Wireless
2165Extension was an interface allowing you to set Wireless LAN specific
2166parameters and get the specific stats. It is deprecated in favor the nl80211
2167interface.")
000f7559 2168 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
c2099a4c
MW
2169 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
2170 ;; other files are distributed under gpl2.
3ac73271 2171 (license (list license:gpl2 license:lgpl2.1+))))
30016044 2172
cc205dac
LC
2173(define-public crda
2174 (package
2175 (name "crda")
2176 (version "3.18")
2177 (source (origin
2178 (method url-fetch)
2179 (uri (string-append "mirror://kernel.org/software/network/crda/"
2180 "crda-" version ".tar.xz"))
2181 (sha256
2182 (base32
2183 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
fc1adab1 2184 (patches (search-patches "crda-optional-gcrypt.patch"))))
cc205dac
LC
2185 (build-system gnu-build-system)
2186 (arguments
2187 '(#:phases (modify-phases %standard-phases
2188 (delete 'configure)
2189 (add-before
2190 'build 'no-werror-no-ldconfig
2191 (lambda _
2192 (substitute* "Makefile"
2193 (("-Werror") "")
2194 (("ldconfig") "true"))
2195 #t))
2196 (add-before
2197 'build 'set-regulator-db-file-name
2198 (lambda* (#:key inputs #:allow-other-keys)
2199 ;; Tell CRDA where to find our database.
2200 (let ((regdb (assoc-ref inputs "wireless-regdb")))
2201 (substitute* "crda.c"
2202 (("\"/lib/crda/regulatory.bin\"")
2203 (string-append "\"" regdb
2204 "/lib/crda/regulatory.bin\"")))
2205 #t))))
2206 #:test-target "verify"
2207 #:make-flags (let ((out (assoc-ref %outputs "out"))
2208 (regdb (assoc-ref %build-inputs "wireless-regdb")))
2209 (list "CC=gcc" "V=1"
2210
2211 ;; Disable signature-checking on 'regulatory.bin'.
2212 ;; The reason is that this simplifies maintenance
2213 ;; on our side (no need to manage a distro key
2214 ;; pair), and we can guarantee integrity of
2215 ;; 'regulatory.bin' by other means anyway, such as
2216 ;; 'guix gc --verify'. See
2217 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
2218 ;; for a discssion.
2219 "USE_OPENSSL=0"
2220
2221 (string-append "PREFIX=" out)
2222 (string-append "SBINDIR=" out "/sbin/")
2223 (string-append "UDEV_RULE_DIR="
2224 out "/lib/udev/rules.d")
2225 (string-append "LDFLAGS=-Wl,-rpath="
2226 out "/lib -L.")
2227 (string-append "REG_BIN=" regdb
2228 "/lib/crda/regulatory.bin")))))
2229 (native-inputs `(("pkg-config" ,pkg-config)
2230 ("python" ,python-2)
2231 ("wireless-regdb" ,wireless-regdb)))
2232 (inputs `(("libnl" ,libnl)))
2233 (home-page
2234 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
2235 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
2236 (description
2237 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
2238communication between the kernel Linux and user space for regulatory
2239compliance.")
3ac73271 2240 (license license:copyleft-next)))
cc205dac 2241
c80b4a3e
LC
2242(define-public wireless-regdb
2243 (package
2244 (name "wireless-regdb")
a70782d3 2245 (version "2017.03.07")
c80b4a3e
LC
2246 (source (origin
2247 (method url-fetch)
2248 (uri (string-append
2249 "mirror://kernel.org/software/network/wireless-regdb/"
2250 "wireless-regdb-" version ".tar.xz"))
2251 (sha256
2252 (base32
a70782d3 2253 "1f9mcp78sdd4sci6v32vxfcl1rfjpv205jisz1p93kkfnaisy7ip"))
5568151f
LC
2254
2255 ;; We're building 'regulatory.bin' by ourselves.
2256 (snippet '(delete-file "regulatory.bin"))))
c80b4a3e
LC
2257 (build-system gnu-build-system)
2258 (arguments
2259 '(#:phases (modify-phases %standard-phases
2260 (delete 'configure))
5568151f
LC
2261
2262 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
2263 ;; is computed and can be equal to 'maintainer-clean'; when that
2264 ;; happens, we can end up deleting the 'regulatory.bin' file that we
2265 ;; just built. Thus, build things sequentially.
2266 #:parallel-build? #f
2267
c80b4a3e
LC
2268 #:tests? #f ;no tests
2269 #:make-flags (let ((out (assoc-ref %outputs "out")))
2270 (list (string-append "PREFIX=" out)
2271 (string-append "LSB_ID=GuixSD")
2272 (string-append "DISTRO_PUBKEY=/dev/null")
2273 (string-append "DISTRO_PRIVKEY=/dev/null")
2274 (string-append "REGDB_PUBKEY=/dev/null")
2275
2276 ;; Leave that empty so that db2bin.py doesn't try
2277 ;; to sign 'regulatory.bin'. This allows us to
2278 ;; avoid managing a key pair for the whole distro.
2279 (string-append "REGDB_PRIVKEY=")))))
2280 (native-inputs `(("python" ,python-2)))
2281 (home-page
2282 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
2283 (synopsis "Wireless regulatory database")
2284 (description
2285 "This package contains the wireless regulatory database Central
2286Regulatory Database Agent (CRDA) daemon. The database contains information on
2287country-specific regulations for the wireless spectrum.")
3ac73271 2288 (license license:isc)))
c80b4a3e 2289
30016044
MW
2290(define-public lm-sensors
2291 (package
2292 (name "lm-sensors")
171091a8 2293 (version "3.4.0")
30016044
MW
2294 (source (origin
2295 (method url-fetch)
ee6a5d0e 2296 (uri (list (string-append
171091a8
AE
2297 "https://github.com/groeck/lm-sensors/archive/V"
2298 (string-join (string-split version #\.) "-")
2299 ".tar.gz")))
bc4a2b85 2300 (file-name (string-append name "-" version ".tar.gz"))
30016044
MW
2301 (sha256
2302 (base32
171091a8 2303 "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73"))
fc1adab1 2304 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
30016044
MW
2305 (build-system gnu-build-system)
2306 (inputs `(("rrdtool" ,rrdtool)
2307 ("perl" ,perl)
2308 ("kmod" ,kmod)
2309 ("gnuplot" ,gnuplot)))
2310 (native-inputs `(("pkg-config" ,pkg-config)
2311 ("flex" ,flex)
2312 ("bison" ,bison)
2313 ("which" ,which)))
2314 (arguments
2315 `(#:tests? #f ; no 'check' target
2316 #:make-flags (list (string-append "PREFIX=" %output)
2317 (string-append "ETCDIR=" %output "/etc")
2318 (string-append "MANDIR=" %output "/share/man"))
2319 #:phases
2320 (alist-delete
2321 'configure
2322 (alist-cons-before
2323 'build 'patch-exec-paths
2324 (lambda* (#:key inputs outputs #:allow-other-keys)
2325 (substitute* "prog/detect/sensors-detect"
2326 (("`uname")
2327 (string-append "`" (assoc-ref inputs "coreutils")
2328 "/bin/uname"))
2329 (("(`|\")modprobe" all open-quote)
2330 (string-append open-quote
2331 (assoc-ref inputs "kmod")
2332 "/bin/modprobe")))
2333 (substitute* '("prog/pwm/pwmconfig"
2334 "prog/pwm/fancontrol")
2335 (("gnuplot")
2336 (string-append (assoc-ref inputs "gnuplot")
2337 "/bin/gnuplot"))
2338 (("cat ")
2339 (string-append (assoc-ref inputs "coreutils")
2340 "/bin/cat "))
2341 (("egrep ")
2342 (string-append (assoc-ref inputs "grep")
2343 "/bin/egrep "))
2344 (("sed -e")
2345 (string-append (assoc-ref inputs "sed")
2346 "/bin/sed -e"))
2347 (("cut -d")
2348 (string-append (assoc-ref inputs "coreutils")
2349 "/bin/cut -d"))
2350 (("sleep ")
2351 (string-append (assoc-ref inputs "coreutils")
2352 "/bin/sleep "))
2353 (("readlink -f")
2354 (string-append (assoc-ref inputs "coreutils")
2355 "/bin/readlink -f"))))
2356 %standard-phases))))
3a04d5d4 2357 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
30016044
MW
2358 (synopsis "Utilities to read temperature/voltage/fan sensors")
2359 (description
35b9e423 2360 "Lm-sensors is a hardware health monitoring package for Linux. It allows
30016044
MW
2361you to access information from temperature, voltage, and fan speed sensors.
2362It works with most newer systems.")
3ac73271 2363 (license license:gpl2+)))
b087d413 2364
f5b2a53d
RW
2365(define-public i2c-tools
2366 (package
2367 (name "i2c-tools")
2368 (version "3.1.1")
2369 (source (origin
2370 (method url-fetch)
2371 (uri (string-append
f32274a7 2372 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
f5b2a53d
RW
2373 version ".tar.bz2"))
2374 (sha256
2375 (base32
2376 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
2377 (build-system gnu-build-system)
2378 (arguments
2379 `(#:tests? #f ; no 'check' target
2380 #:make-flags (list (string-append "prefix=" %output)
2381 "CC=gcc")
2382 ;; no configure script
2383 #:phases (alist-delete 'configure %standard-phases)))
bccf27cb
RW
2384 (inputs
2385 `(("perl" ,perl)))
f32274a7 2386 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
f5b2a53d
RW
2387 (synopsis "I2C tools for Linux")
2388 (description
2389 "The i2c-tools package contains a heterogeneous set of I2C tools for
2390Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
2391EEPROM decoding scripts, EEPROM programming tools, and a python module for
2392SMBus access.")
3ac73271 2393 (license license:gpl2+)))
f5b2a53d 2394
b087d413
MW
2395(define-public xsensors
2396 (package
2397 (name "xsensors")
2398 (version "0.70")
2399 (source (origin
2400 (method url-fetch)
2401 (uri (string-append
2402 "http://www.linuxhardware.org/xsensors/xsensors-"
2403 version ".tar.gz"))
2404 (sha256
2405 (base32
2406 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
2407 (build-system gnu-build-system)
2408 (inputs `(("lm-sensors" ,lm-sensors)
2409 ("gtk" ,gtk+-2)))
2410 (native-inputs `(("pkg-config" ,pkg-config)))
2411 (arguments
2412 `(#:phases (alist-cons-before
2413 'configure 'enable-deprecated
2414 (lambda _
2415 (substitute* "src/Makefile.in"
2416 (("-DGDK_DISABLE_DEPRECATED") "")
2417 (("-DGTK_DISABLE_DEPRECATED") "")))
2418 (alist-cons-before
2419 'configure 'remove-Werror
2420 (lambda _
2421 (substitute* '("configure" "src/Makefile.in")
2422 (("-Werror") "")))
2423 %standard-phases))))
2424 (home-page "http://www.linuxhardware.org/xsensors/")
2425 (synopsis "Hardware health information viewer")
2426 (description
35b9e423 2427 "Xsensors reads data from the libsensors library regarding hardware
b087d413
MW
2428health such as temperature, voltage and fan speed and displays the information
2429in a digital read-out.")
3ac73271 2430 (license license:gpl2+)))
b62fe07f
LC
2431
2432(define-public perf
2433 (package
2434 (name "perf")
2435 (version (package-version linux-libre))
2436 (source (package-source linux-libre))
2437 (build-system gnu-build-system)
2438 (arguments
2439 '(#:phases (alist-replace
2440 'configure
2441 (lambda* (#:key inputs #:allow-other-keys)
2442 (setenv "SHELL_PATH" (which "bash"))
2443 (chdir "tools/perf"))
2444 %standard-phases)
2445 #:make-flags (list (string-append "DESTDIR="
2446 (assoc-ref %outputs "out"))
2af29d23
LC
2447 "WERROR=0"
2448
2449 ;; By default, 'config/Makefile' uses lib64 on
2450 ;; x86_64. Work around that.
2451 "lib=lib")
b62fe07f
LC
2452 #:tests? #f)) ;no tests
2453 (native-inputs
2454 `(("pkg-config" ,pkg-config)
2455 ("bison" ,bison)
2456 ("flex" ,flex)
2457
2458 ;; There are build scripts written in these languages.
2459 ("perl" ,perl)
2460 ("python" ,python-2)))
2461 (inputs
b1fb4b23 2462 `(("slang" ,slang) ;for the interactive TUI
b62fe07f 2463 ;; ("newt" ,newt)
6c030d10 2464 ("python" ,python-2) ;'perf' links against libpython
b62fe07f 2465 ("elfutils" ,elfutils)
b25d3bd9 2466 ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling
b62fe07f 2467
d7ece67a
LC
2468 ;; Documentation.
2469 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
d7ece67a
LC
2470 ("docbook-xsl" ,docbook-xsl)
2471 ("xmlto" ,xmlto)
2472 ("asciidoc" ,asciidoc)))
b62fe07f
LC
2473 (home-page "https://perf.wiki.kernel.org/")
2474 (synopsis "Linux profiling with performance counters")
2475 (description
2476 "perf is a tool suite for profiling using hardware performance counters,
2477with support in the Linux kernel. perf can instrument CPU performance
2478counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2479of lightweight profiling. This package contains the user-land tools and in
2480particular the 'perf' command.")
2481 (license (package-license linux-libre))))
c09e60e4
DT
2482
2483(define-public pflask
2484 (package
2485 (name "pflask")
2486 (version "0.2")
2487 (source (origin
2488 (method url-fetch)
2489 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2490 version ".tar.gz"))
f586c877 2491 (file-name (string-append name "-" version ".tar.gz"))
c09e60e4
DT
2492 (sha256
2493 (base32
2494 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2495 (build-system cmake-build-system)
2496 (arguments
2497 '(#:tests? #f)) ; no tests
2498 (home-page "http://ghedo.github.io/pflask/")
2499 (synopsis "Simple tool for creating Linux namespace containers")
2500 (description "pflask is a simple tool for creating Linux namespace
2501containers. It can be used for running a command or even booting an OS inside
2502an isolated container, created with the help of Linux namespaces. It is
2503similar in functionality to chroot, although pflask provides better isolation
2504thanks to the use of namespaces.")
3ac73271 2505 (license license:bsd-2)))
288084d5
MW
2506
2507(define-public hdparm
2508 (package
2509 (name "hdparm")
8a1bb378 2510 (version "9.52")
288084d5
MW
2511 (source (origin
2512 (method url-fetch)
de67e922 2513 (uri (string-append "mirror://sourceforge/" name "/" name "/"
288084d5
MW
2514 name "-" version ".tar.gz"))
2515 (sha256
2516 (base32
8a1bb378 2517 "1djgxhfadd865dcrl6dp7dvjxpaisy7mk17mbdbglwg24ga9qhn3"))))
288084d5
MW
2518 (build-system gnu-build-system)
2519 (arguments
2520 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2521 (list (string-append "binprefix=" out)
2522 (string-append "manprefix=" out)
2523 "CC=gcc"))
ec238332
TGR
2524 #:phases
2525 (modify-phases %standard-phases
2526 (delete 'configure)) ; no configure script
2527 #:tests? #f)) ; no test suite
3b3b60d0 2528 (home-page "https://sourceforge.net/projects/hdparm/")
02052b2c 2529 (synopsis "View and tune ATA disk drive parameters")
288084d5 2530 (description
02052b2c
TGR
2531 "@command{hdparm} is a command-line utility to control ATA controllers and
2532disk drives. It can increase performance and/or reliability by careful tuning
2533of hardware settings like power and acoustic management, DMA modes, and caching.
2534It can also display detailed device information, or be used as a simple
2535performance benchmarking tool.
2536
2537@command{hdparm} provides a command line interface to various Linux kernel
2538interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older
2539IDE driver subsystem. Many external USB drive enclosures with @dfn{SCSI-ATA
2540Command Translation} (SAT) are also supported.")
3ac73271 2541 (license (license:non-copyleft "file://LICENSE.TXT"))))
288084d5 2542
c755c854
MW
2543(define-public rfkill
2544 (package
2545 (name "rfkill")
2546 (version "0.5")
2547 (source (origin
2548 (method url-fetch)
2549 (uri (string-append "mirror://kernel.org/software/network/"
2550 name "/" name "-" version ".tar.xz"))
2551 (sha256
2552 (base32
2553 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2554 (build-system gnu-build-system)
2555 (arguments
2556 `(#:make-flags (list "CC=gcc"
2557 (string-append "PREFIX=" %output))
2558 #:phases (modify-phases %standard-phases
2559 (delete 'configure))
2560 #:tests? #f))
2561 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2562 (synopsis "Tool for enabling and disabling wireless devices")
2563 (description
2564 "rfkill is a simple tool for accessing the rfkill device interface,
2565which is used to enable and disable wireless networking devices, typically
2566WLAN, Bluetooth and mobile broadband.")
3ac73271
LC
2567 (license (license:non-copyleft "file://COPYING"
2568 "See COPYING in the distribution."))))
c755c854 2569
dc9bdb1e
ML
2570(define-public acpi
2571 (package
2572 (name "acpi")
2573 (version "1.7")
2574 (source (origin
2575 (method url-fetch)
de67e922
LF
2576 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2577 version "/" name "-" version ".tar.gz"))
dc9bdb1e
ML
2578 (sha256
2579 (base32
2580 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2581 (build-system gnu-build-system)
2582 (home-page "http://acpiclient.sourceforge.net")
2583 (synopsis "Display information on ACPI devices")
2584 (description "@code{acpi} attempts to replicate the functionality of the
2585\"old\" @code{apm} command on ACPI systems, including battery and thermal
2586information. It does not support ACPI suspending, only displays information
2587about ACPI devices.")
2588 (license license:gpl2+)))
2589
57a516d3
LC
2590(define-public acpid
2591 (package
2592 (name "acpid")
169a438c 2593 (version "2.0.28")
57a516d3
LC
2594 (source (origin
2595 (method url-fetch)
2596 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2597 version ".tar.xz"))
2598 (sha256
2599 (base32
169a438c 2600 "043igasvp1l6nv5rzh4sksmymay2qn20anl4zm4zvwnkn1a3l34q"))))
57a516d3 2601 (build-system gnu-build-system)
3b3b60d0 2602 (home-page "https://sourceforge.net/projects/acpid2/")
57a516d3
LC
2603 (synopsis "Daemon for delivering ACPI events to user-space programs")
2604 (description
2605 "acpid is designed to notify user-space programs of Advanced
2606Configuration and Power Interface (ACPI) events. acpid should be started
2607during the system boot, and will run as a background process. When an ACPI
2608event is received from the kernel, acpid will examine the list of rules
2609specified in /etc/acpi/events and execute the rules that match the event.")
3ac73271 2610 (license license:gpl2+)))
37f5caec
TUBK
2611
2612(define-public sysfsutils
2613 (package
2614 (name "sysfsutils")
2615 (version "2.1.0")
2616 (source
2617 (origin
2618 (method url-fetch)
2619 (uri
2620 (string-append
2621 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2622 version ".tar.gz"))
2623 (sha256
2624 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2625 (build-system gnu-build-system)
2626 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2627 (synopsis "System utilities based on Linux sysfs")
2628 (description
8f65585b 2629 "These are a set of utilities built upon sysfs, a virtual file system in
37f5caec
TUBK
2630Linux kernel versions 2.5+ that exposes a system's device tree. The package
2631also contains the libsysfs library.")
2632 ;; The library is under lgpl2.1+ (all files say "or any later version").
2633 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
3ac73271 2634 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
a9a1a40b
TUBK
2635
2636(define-public sysfsutils-1
2637 (package
2638 (inherit sysfsutils)
2639 (version "1.3.0")
2640 (source
2641 (origin
2642 (method url-fetch)
2643 (uri
2644 (string-append
2645 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2646 "/sysfsutils-" version ".tar.gz"))
2647 (sha256
2648 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2649 (modules '((guix build utils)))
2650 (snippet
2651 '(begin
2652 (substitute* "Makefile.in"
2653 (("includedir = /usr/include/sysfs")
2654 "includedir = @includedir@"))
2655 (substitute* "configure"
2656 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2657 (string-append "includedir='" orig "/sysfs'")))))))
2658 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
e6caa52d
TUBK
2659
2660(define-public cpufrequtils
2661 (package
2662 (name "cpufrequtils")
2663 (version "0.3")
2664 (source
2665 (origin
2666 (method url-fetch)
2667 (uri
2668 (string-append
2669 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2670 version ".tar.gz"))
2671 (sha256
2672 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
fc1adab1 2673 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
e6caa52d
TUBK
2674 (build-system gnu-build-system)
2675 (native-inputs
2676 `(("sysfsutils" ,sysfsutils-1)))
2677 (arguments
2678 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2679 (assoc-ref %outputs "out") "/lib"))))
2680 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2681 (synopsis "Utilities to get and set CPU frequency on Linux")
2682 (description
e881752c 2683 "The cpufrequtils suite contains utilities to retrieve CPU frequency
e6caa52d
TUBK
2684information, and set the CPU frequency if supported, using the cpufreq
2685capabilities of the Linux kernel.")
3ac73271 2686 (license license:gpl2)))
0a588bf9
SB
2687
2688(define-public libraw1394
2689 (package
2690 (name "libraw1394")
7c58c852 2691 (version "2.1.2")
0a588bf9
SB
2692 (source (origin
2693 (method url-fetch)
2694 (uri (string-append
2695 "mirror://kernel.org/linux/libs/ieee1394/"
2696 name "-" version ".tar.xz"))
2697 (sha256
2698 (base32
7c58c852 2699 "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
0a588bf9
SB
2700 (build-system gnu-build-system)
2701 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2702 (synopsis "Interface library for the Linux IEEE1394 drivers")
2703 (description
2704 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2705the Linux IEEE-1394 subsystem, which provides direct access to the connected
27061394 buses to user space. Through libraw1394/raw1394, applications can directly
2707send to and receive from other nodes without requiring a kernel driver for the
2708protocol in question.")
3ac73271 2709 (license license:lgpl2.1+)))
68e3c29d
SB
2710
2711(define-public libavc1394
2712 (package
2713 (name "libavc1394")
2714 (version "0.5.4")
2715 (source (origin
2716 (method url-fetch)
de67e922 2717 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
68e3c29d
SB
2718 name "-" version ".tar.gz"))
2719 (sha256
2720 (base32
2721 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2722 (build-system gnu-build-system)
2723 (native-inputs
2724 `(("pkg-config" ,pkg-config)))
2725 (propagated-inputs
2726 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
3b3b60d0 2727 (home-page "https://sourceforge.net/projects/libavc1394/")
68e3c29d
SB
2728 (synopsis "AV/C protocol library for IEEE 1394")
2729 (description
2730 "Libavc1394 is a programming interface to the AV/C specification from
69b4ffcf 2731the 1394 Trade Association. AV/C stands for Audio/Video Control.")
3ac73271 2732 (license license:lgpl2.1+)))
3f7bf86a
SB
2733
2734(define-public libiec61883
2735 (package
2736 (name "libiec61883")
2737 (version "1.2.0")
2738 (source (origin
2739 (method url-fetch)
2740 (uri (string-append
2741 "mirror://kernel.org/linux/libs/ieee1394/"
2742 name "-" version ".tar.xz"))
2743 (sha256
2744 (base32
2745 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2746 (build-system gnu-build-system)
2747 (native-inputs
2748 `(("pkg-config" ,pkg-config)))
2749 (propagated-inputs
2750 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2751 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2752 (synopsis "Isochronous streaming media library for IEEE 1394")
2753 (description
2754 "The libiec61883 library provides a higher level API for streaming DV,
2755MPEG-2 and audio over Linux IEEE 1394.")
3ac73271 2756 (license license:lgpl2.1+)))
69159125
MW
2757
2758(define-public mdadm
2759 (package
2760 (name "mdadm")
fae88ae8 2761 (version "4.0")
69159125
MW
2762 (source (origin
2763 (method url-fetch)
2764 (uri (string-append
2765 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2766 version ".tar.xz"))
2767 (sha256
2768 (base32
fae88ae8 2769 "1ad3mma641946wn5lsllwf0lifw9lps34fv1nnkhyfpd9krffshx"))))
69159125
MW
2770 (build-system gnu-build-system)
2771 (inputs
2772 `(("udev" ,eudev)))
2773 (arguments
2774 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
fae88ae8
LC
2775 (list "CC=gcc"
2776 "INSTALL=install"
69159125
MW
2777 "CHECK_RUN_DIR=0"
2778 ;; TODO: tell it where to find 'sendmail'
2779 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2780 (string-append "BINDIR=" out "/sbin")
2781 (string-append "MANDIR=" out "/share/man")
2782 (string-append "UDEVDIR=" out "/lib/udev")))
2783 #:phases (alist-cons-before
2784 'build 'patch-program-paths
2785 (lambda* (#:key inputs #:allow-other-keys)
2786 (let ((coreutils (assoc-ref inputs "coreutils")))
2787 (substitute* "udev-md-raid-arrays.rules"
2788 (("/usr/bin/(readlink|basename)" all program)
2789 (string-append coreutils "/bin/" program)))))
d76f44e8
LC
2790 (alist-cons-before
2791 'build 'remove-W-error
2792 (lambda _
2793 ;; We cannot build with -Werror on i686 due to a
2794 ;; 'sign-compare' warning in util.c.
2795 (substitute* "Makefile"
2796 (("-Werror") ""))
2797 #t)
2798 (alist-delete 'configure %standard-phases)))
69159125
MW
2799 ;;tests must be done as root
2800 #:tests? #f))
2801 (home-page "http://neil.brown.name/blog/mdadm")
2802 (synopsis "Tool for managing Linux Software RAID arrays")
2803 (description
2804 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2805assemble, report on, and monitor arrays. It can also move spares between raid
2806arrays when needed.")
3ac73271 2807 (license license:gpl2+)))
01ccdfb6 2808
631fda7e
LC
2809(define-public mdadm-static
2810 (package
2811 (inherit mdadm)
2812 (name "mdadm-static")
2813 (arguments
2814 (substitute-keyword-arguments (package-arguments mdadm)
2815 ((#:make-flags flags)
2816 `(cons "LDFLAGS = -static" ,flags))
2817 ((#:phases phases)
2818 `(modify-phases ,phases
2819 (add-after 'install 'remove-cruft
2820 (lambda* (#:key outputs #:allow-other-keys)
2821 (let* ((out (assoc-ref outputs "out"))
2822 (precious? (lambda (file)
2823 (member file '("." ".." "sbin"))))
2824 (directories (scandir out (negate precious?))))
2825 (with-directory-excursion out
2826 (for-each delete-file-recursively directories)
2827 (remove-store-references "sbin/mdadm")
2828 (delete-file "sbin/mdmon")
2829 #t))))))
2830 ((#:modules modules %gnu-build-system-modules)
2831 `((ice-9 ftw) ,@modules))
2832 ((#:strip-flags _ '())
2833 ''("--strip-all")) ;strip a few extra KiB
2834 ((#:allowed-references _ '("out"))
2835 '("out")))) ;refer only self
2836 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
2837
b3ed50e6
MB
2838(define-public multipath-tools
2839 (package
2840 (name "multipath-tools")
7f412f33 2841 (version "0.7.1")
b3ed50e6
MB
2842 (source (origin
2843 (method url-fetch)
2844 (uri (string-append "http://git.opensvc.com/?p=multipath-tools/"
2845 ".git;a=snapshot;h=" version ";sf=tgz"))
2846 (file-name (string-append name "-" version ".tar.gz"))
2847 (sha256
2848 (base32
7f412f33 2849 "0w0rgi3lqksaki30yvd4l5rgjqb0d7js1sh7masl8aw6xbrsm26p"))
b3ed50e6
MB
2850 (modules '((guix build utils)))
2851 (snippet
2852 '(begin
2853 ;; Drop bundled valgrind headers.
2854 (delete-file-recursively "third-party")
2855 (substitute* '("multipathd/main.c"
2856 "libmultipath/debug.c")
2857 (("#include \"../third-party/")
2858 "#include \""))
2859 #t))))
2860 (build-system gnu-build-system)
2861 (arguments
2862 '(#:tests? #f ; No tests.
2863 #:make-flags (list (string-append "DESTDIR="
2864 (assoc-ref %outputs "out"))
b5fb9430 2865 "SYSTEMDPATH=lib"
b3ed50e6
MB
2866 (string-append "LDFLAGS=-Wl,-rpath="
2867 (assoc-ref %outputs "out")
2868 "/lib"))
2869 #:phases
2870 (modify-phases %standard-phases
b5fb9430 2871 (add-after 'unpack 'patch-source
7f412f33
MB
2872 (lambda* (#:key inputs #:allow-other-keys)
2873 (let ((lvm2 (assoc-ref inputs "lvm2"))
2874 (udev (assoc-ref inputs "udev")))
2875 (substitute* "Makefile.inc"
2876 (("\\$\\(prefix\\)/usr") "$(prefix)"))
2877 (substitute* '("kpartx/Makefile" "libmultipath/Makefile")
2878 (("/usr/include/libdevmapper.h")
2879 (string-append lvm2 "/include/libdevmapper.h"))
2880 (("/usr/include/libudev.h")
2881 (string-append udev "/include/libudev.h")))
2882 #t)))
b3ed50e6
MB
2883 (delete 'configure)
2884 (add-before 'build 'set-CC
2885 (lambda _
2886 (setenv "CC" "gcc")
2887 #t)))))
2888 (native-inputs
7f412f33
MB
2889 `(("perl" ,perl)
2890 ("pkg-config" ,pkg-config)
2891 ("valgrind" ,valgrind)))
b3ed50e6
MB
2892 (inputs
2893 `(("ceph:lib" ,ceph "lib")
7f412f33 2894 ("json-c" ,json-c)
b3ed50e6
MB
2895 ("libaio" ,libaio)
2896 ("liburcu" ,liburcu)
2897 ("lvm2" ,lvm2)
2898 ("readline" ,readline)
2899 ("udev" ,eudev)))
2900 (home-page "http://christophe.varoqui.free.fr/")
2901 (synopsis "Access block devices through multiple paths")
2902 (description
2903 "This package provides the following binaries to drive the
2904Linux Device Mapper multipathing driver:
2905@enumerate
2906@item @command{multipath} - Device mapper target autoconfig.
2907@item @command{multipathd} - Multipath daemon.
2908@item @command{mpathpersist} - Manages SCSI persistent reservations on
2909@code{dm} multipath devices.
2910@item @command{kpartx} - Create device maps from partition tables.
2911@end enumerate")
2912 (license (list license:gpl2+ ; Main distribution.
2913 license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h
2914
01ccdfb6
SB
2915(define-public libaio
2916 (package
2917 (name "libaio")
2918 (version "0.3.110")
2919 (source (origin
2920 (method url-fetch)
2921 (uri (list
2922 (string-append "mirror://debian/pool/main/liba/libaio/"
4929a061 2923 name "_" version ".orig.tar.gz")))
01ccdfb6
SB
2924 (sha256
2925 (base32
2926 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
2927 (build-system gnu-build-system)
2928 (arguments
2929 '(#:make-flags
2930 (list "CC=gcc" (string-append "prefix=" %output))
2931 #:test-target "partcheck" ; need root for a full 'check'
2932 #:phases
2933 (alist-delete 'configure %standard-phases))) ; no configure script
2934 (home-page "http://lse.sourceforge.net/io/aio.html")
2935 (synopsis "Linux-native asynchronous I/O access library")
2936 (description
2937 "This library enables userspace to use Linux kernel asynchronous I/O
2938system calls, important for the performance of databases and other advanced
2939applications.")
3ac73271 2940 (license license:lgpl2.1+)))
eb7c43c3 2941
81b98756
RW
2942(define-public sbc
2943 (package
2944 (name "sbc")
2945 (version "1.3")
2946 (source (origin
2947 (method url-fetch)
2948 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
2949 name "-" version ".tar.xz"))
2950 (sha256
2951 (base32
2952 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
2953 (build-system gnu-build-system)
2954 (inputs
2955 `(("libsndfile" ,libsndfile)))
2956 (native-inputs
2957 `(("pkg-config" ,pkg-config)))
2958 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
2959 (synopsis "Bluetooth subband audio codec")
2960 (description
2961 "The SBC is a digital audio encoder and decoder used to transfer data to
2962Bluetooth audio output devices like headphones or loudspeakers.")
2963 (license license:gpl2+)))
2964
eb7c43c3
DT
2965(define-public bluez
2966 (package
2967 (name "bluez")
3590a6b5 2968 (version "5.45")
eb7c43c3
DT
2969 (source (origin
2970 (method url-fetch)
2971 (uri (string-append
e9eb24b1 2972 "mirror://kernel.org/linux/bluetooth/bluez-"
eb7c43c3
DT
2973 version ".tar.xz"))
2974 (sha256
2975 (base32
3590a6b5 2976 "1sb4aflgyrl7apricjipa8wx95qm69yja0lmn2f19g560c3v1b2c"))))
eb7c43c3
DT
2977 (build-system gnu-build-system)
2978 (arguments
2979 '(#:configure-flags
2980 (let ((out (assoc-ref %outputs "out")))
f3dbc626
SB
2981 (list "--sysconfdir=/etc"
2982 "--localstatedir=/var"
2983 "--enable-library"
53142109 2984 "--disable-systemd"
eb7c43c3
DT
2985 ;; Install dbus/udev files to the correct location.
2986 (string-append "--with-dbusconfdir=" out "/etc")
87a16de7
SB
2987 (string-append "--with-udevdir=" out "/lib/udev")))
2988 #:phases
2989 (modify-phases %standard-phases
2990 (add-after 'install 'post-install
2991 (lambda* (#:key inputs outputs #:allow-other-keys)
2992 (let* ((out (assoc-ref outputs "out"))
2993 (servicedir (string-append out "/share/dbus-1/services"))
2994 (service "obexd/src/org.bluez.obex.service")
2995 (rule (string-append
2996 out "/lib/udev/rules.d/97-hid2hci.rules")))
2997 ;; Install the obex dbus service file.
2998 (substitute* service
2999 (("/bin/false")
3000 (string-append out "/libexec/bluetooth/obexd")))
3001 (install-file service servicedir)
3002 ;; Fix paths in the udev rule.
3003 (substitute* rule
3004 (("hid2hci --method")
3005 (string-append out "/lib/udev/hid2hci --method"))
3006 (("/sbin/udevadm")
3007 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
3008 #t))))))
eb7c43c3
DT
3009 (native-inputs
3010 `(("pkg-config" ,pkg-config)
b94a6ca0 3011 ("gettext" ,gettext-minimal)))
eb7c43c3
DT
3012 (inputs
3013 `(("glib" ,glib)
3014 ("dbus" ,dbus)
3015 ("eudev" ,eudev)
3016 ("libical" ,libical)
3017 ("readline" ,readline)))
3018 (home-page "http://www.bluez.org/")
3019 (synopsis "Linux Bluetooth protocol stack")
3020 (description
3021 "BlueZ provides support for the core Bluetooth layers and protocols. It
3022is flexible, efficient and uses a modular implementation.")
3ac73271 3023 (license license:gpl2+)))
3d890318
LC
3024
3025(define-public fuse-exfat
3026 (package
3027 (name "fuse-exfat")
be900082 3028 (version "1.2.7")
3d890318
LC
3029 (source (origin
3030 (method url-fetch)
c0cc805e
TGR
3031 (uri (string-append
3032 "https://github.com/relan/exfat/releases/download/v"
3033 version "/" name "-" version ".tar.gz"))
3d890318
LC
3034 (sha256
3035 (base32
be900082 3036 "0df0ccnd0dgwc6rvk9qmrz0nfb8whc5s3wg9qnw1mzbrh4rcvhw2"))))
3d890318
LC
3037 (build-system gnu-build-system)
3038 (native-inputs
c0cc805e 3039 `(("pkg-config" ,pkg-config)))
3d890318
LC
3040 (inputs
3041 `(("fuse" ,fuse)))
c0cc805e 3042 (home-page "https://github.com/relan/exfat")
3d890318
LC
3043 (synopsis "Mount exFAT file systems")
3044 (description
3045 "This package provides a FUSE-based file system that provides read and
3046write access to exFAT devices.")
3ac73271 3047 (license license:gpl2+)))
53ec8d48
LC
3048
3049(define-public gpm
3050 (package
3051 (name "gpm")
3052 (version "1.20.7")
3053 (source (origin
3054 (method url-fetch)
3055 (uri (string-append
3056 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
3057 version ".tar.bz2"))
3058 (sha256
3059 (base32
3060 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
3061 (build-system gnu-build-system)
3062 (arguments
3063 '(#:phases (modify-phases %standard-phases
3064 (add-before 'configure 'bootstrap
3065 (lambda _
3066 ;; The tarball was not generated with 'make dist' so we
3067 ;; need to bootstrap things ourselves.
3068 (and (zero? (system* "./autogen.sh"))
3069 (begin
3070 (patch-makefile-SHELL "Makefile.include.in")
3071 #t)))))
3072
3073 ;; Make sure programs find libgpm.so.
3074 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
3075 (assoc-ref %outputs "out")
3076 "/lib"))))
3077 (native-inputs
3078 `(("texinfo" ,texinfo)
3079 ("bison" ,bison)
3080 ("flex" ,flex)
3081 ("autoconf" ,autoconf)
3082 ("automake" ,automake)
3083 ("libtool" ,libtool)))
3084 (home-page "http://www.nico.schottelius.org/software/gpm/")
3085 (synopsis "Mouse support for the Linux console")
3086 (description
3087 "The GPM (general-purpose mouse) daemon is a mouse server for
3088applications running on the Linux console. It allows users to select items
3089and copy/paste text in the console and in xterm.")
3ac73271 3090 (license license:gpl2+)))
fc686f9a
TGR
3091
3092(define-public btrfs-progs
3093 (package
3094 (name "btrfs-progs")
c4b006ba 3095 (version "4.12")
fc686f9a
TGR
3096 (source (origin
3097 (method url-fetch)
3098 (uri (string-append "mirror://kernel.org/linux/kernel/"
3099 "people/kdave/btrfs-progs/"
3100 "btrfs-progs-v" version ".tar.xz"))
3101 (sha256
3102 (base32
c4b006ba 3103 "1kif8xw2dbyc70ygkp0wyq4x96p1mkwdv4430f99qllx9b410xwi"))))
fc686f9a 3104 (build-system gnu-build-system)
7cad981d 3105 (outputs '("out"
c4b006ba 3106 "static")) ; static versions of the binaries in "out"
fc686f9a 3107 (arguments
7cad981d
TGR
3108 '(#:phases (modify-phases %standard-phases
3109 (add-after 'build 'build-static
3110 (lambda _ (zero? (system* "make" "static"))))
3111 (add-after 'install 'install-static
3112 (let ((staticbin (string-append (assoc-ref %outputs "static")
3113 "/bin")))
3114 (lambda _
3115 (zero? (system* "make"
3116 (string-append "bindir=" staticbin)
3117 "install-static"))))))
3118 #:test-target "test"
fc686f9a
TGR
3119 #:parallel-tests? #f)) ; tests fail when run in parallel
3120 (inputs `(("e2fsprogs" ,e2fsprogs)
3121 ("libblkid" ,util-linux)
7cad981d 3122 ("libblkid:static" ,util-linux "static")
fc686f9a 3123 ("libuuid" ,util-linux)
7cad981d 3124 ("libuuid:static" ,util-linux "static")
fc686f9a
TGR
3125 ("zlib" ,zlib)
3126 ("lzo" ,lzo)))
3127 (native-inputs `(("pkg-config" ,pkg-config)
3128 ("asciidoc" ,asciidoc)
3129 ("xmlto" ,xmlto)
41d23dd1 3130 ;; For building documentation.
fc686f9a 3131 ("libxml2" ,libxml2)
48b7e4a6 3132 ("docbook-xsl" ,docbook-xsl)
41d23dd1 3133 ;; For tests.
48b7e4a6 3134 ("which" ,which)))
fc686f9a
TGR
3135 (home-page "https://btrfs.wiki.kernel.org/")
3136 (synopsis "Create and manage btrfs copy-on-write file systems")
039601e0
TGR
3137 (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux
3138aimed at implementing advanced features while focusing on fault tolerance,
3139repair and easy administration.")
68bcac6b
LF
3140 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
3141 ;; GPL2: Everything else.
3142 (license (list license:gpl2 license:gpl2+))))
08e9daf5 3143
f3e44f5c
DC
3144(define-public btrfs-progs/static
3145 (package
3146 (name "btrfs-progs-static")
3147 (version (package-version btrfs-progs))
3148 (source #f)
3149 (build-system trivial-build-system)
3150 (inputs
3151 `(("btrfs-progs:static" ,btrfs-progs "static")))
3152 (arguments
3153 `(#:modules ((guix build utils))
3154 #:builder
3155 (begin
3156 (use-modules (guix build utils)
3157 (ice-9 ftw)
3158 (srfi srfi-26))
3159
3160 (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static"))
3161 (out (assoc-ref %outputs "out"))
3162 (source (string-append btrfs "/bin/btrfs.static"))
3163 (target (string-append out "/bin/btrfs")))
3164 (mkdir-p (dirname target))
3165 (copy-file source target)
3166 (remove-store-references target)
3167 (chmod target #o555)))))
3168 (home-page (package-home-page btrfs-progs))
ff797172
TGR
3169 (synopsis "Statically-linked btrfs command from btrfs-progs")
3170 (description "This package provides the statically-linked @command{btrfs}
3171from the btrfs-progs package. It is meant to be used in initrds.")
f3e44f5c
DC
3172 (license (package-license btrfs-progs))))
3173
08e9daf5
TGR
3174(define-public freefall
3175 (package
3176 (name "freefall")
3177 (version (package-version linux-libre))
3178 (source (package-source linux-libre))
3179 (build-system gnu-build-system)
3180 (arguments
3181 '(#:phases (modify-phases %standard-phases
3182 (add-after 'unpack 'enter-subdirectory
3183 (lambda _
3184 (chdir "tools/laptop/freefall")))
3185 (delete 'configure)
3186 (add-before 'build 'increase-timeout
3187 (lambda _
3188 ;; The default of 2 seconds is too low: it assumes an
3189 ;; open lid and AC power without actually checking.
3190 (substitute* "freefall.c"
3191 (("alarm\\(2\\)") "alarm(5)")))))
3192 #:make-flags (list (string-append "PREFIX="
3193 (assoc-ref %outputs "out")))
3194 #:tests? #f)) ;no tests
3195 (home-page (package-home-page linux-libre))
3196 (synopsis "Free-fall protection for spinning laptop hard drives")
3197 (description
3198 "Prevents shock damage to the internal spinning hard drive(s) of some
3199HP and Dell laptops. When sudden movement is detected, all input/output
3200operations on the drive are suspended and its heads are parked on the ramp,
3201where they are less likely to cause damage to the spinning disc. Requires a
3202drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
3203feature, and a laptop with an accelerometer. It has no effect on SSDs.")
3204 (license license:gpl2)))
d17ae8c0
NG
3205
3206(define-public thinkfan
3207 (package
3208 (name "thinkfan")
3209 (version "0.9.3")
3210 (source (origin
3211 (method url-fetch)
3212 (uri (string-append "mirror://sourceforge/thinkfan/"
de67e922 3213 "/thinkfan-" version ".tar.gz"))
d17ae8c0
NG
3214 (sha256
3215 (base32
3216 "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
3217 (modules '((guix build utils)))
3218 ;; Fix erroneous man page location in Makefile leading to
3219 ;; a compilation failure.
3220 (snippet
3221 '(substitute* "CMakeLists.txt"
3222 (("thinkfan\\.1") "src/thinkfan.1")))))
3223 (build-system cmake-build-system)
3224 (arguments
3225 `(#:modules ((guix build cmake-build-system)
3226 (guix build utils)
3227 (srfi srfi-26))
3228 #:tests? #f ;no test target
3229 #:configure-flags
3230 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
3231 `("-DUSE_ATASMART:BOOL=ON")
3232 #:phases
3233 (modify-phases %standard-phases
75e56aed
NG
3234 ;; Install scripts for various foreign init systems. Also fix
3235 ;; hard-coded path for daemon.
d17ae8c0
NG
3236 (add-after 'install 'install-rc-scripts
3237 (lambda* (#:key outputs #:allow-other-keys)
75e56aed
NG
3238 (let ((out (assoc-ref outputs "out"))
3239 (files (find-files
3240 (string-append "../thinkfan-" ,version "/rcscripts")
3241 ".*")))
3242 (substitute* files
3243 (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
3244 (string-append out "/sbin/" name)))
3245 (for-each (cute install-file <>
3246 (string-append out "/share/thinkfan"))
3247 files))
d17ae8c0
NG
3248 #t)))))
3249 (inputs
3250 `(("libatasmart" ,libatasmart)))
3251 (home-page "http://thinkfan.sourceforge.net/")
3252 (synopsis "Simple fan control program")
3253 (description
3254 "Thinkfan is a simple fan control program. It reads temperatures,
3255checks them against configured limits and switches to appropriate (also
3256pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
3257other @code{hwmon} driver that enables temperature reading and fan control
3258from userspace.")
3259 (license license:gpl3+)))
91231156
LC
3260
3261(define-public ntfs-3g
3262 (package
3263 (name "ntfs-3g")
3264 (version "2016.2.22")
3265 (source (origin
3266 (method url-fetch)
3267 (uri (string-append "https://tuxera.com/opensource/"
3268 "ntfs-3g_ntfsprogs-" version ".tgz"))
3269 (sha256
3270 (base32
3271 "180y5y09h30ryf2vim8j30a2npwz1iv9ly5yjmh3wjdkwh2jrdyp"))
3272 (modules '((guix build utils)))
1a82ba66 3273 (patches (search-patches "ntfs-3g-CVE-2017-0358.patch"))
91231156
LC
3274 (snippet
3275 ;; Install under $prefix.
3276 '(substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
3277 (("/sbin")
3278 "@sbindir@")))))
3279 (build-system gnu-build-system)
3280 (inputs `(("util-linux" ,util-linux)
3281 ("fuse" ,fuse))) ;libuuid
3282 (native-inputs `(("pkg-config" ,pkg-config)))
3283 (arguments
3284 '(#:configure-flags (list "--exec-prefix=${prefix}"
3285 "--with-fuse=external" ;use our own FUSE
3286 "--enable-mount-helper"
3287 "--enable-posix-acls"
3288 "--enable-xattr-mappings")))
3289 (home-page "http://www.tuxera.com/community/open-source-ntfs-3g/")
3290 (synopsis "Read-write access to NTFS file systems")
3291 (description
3292 "NTFS-3G provides read-write access to NTFS file systems, which are
3293commonly found on Microsoft Windows. It is implemented as a FUSE file system.
3294The package provides additional NTFS tools.")
3295 (license license:gpl2+)))
9b0942c1 3296
f8f44dd7
MB
3297(define-public rdma-core
3298 (package
3299 (name "rdma-core")
5826e7b1 3300 (version "14")
f8f44dd7
MB
3301 (source (origin
3302 (method url-fetch)
3303 (uri (string-append "https://github.com/linux-rdma/rdma-core"
3304 "/releases/download/v" version "/rdma-core-"
3305 version ".tar.gz"))
3306 (sha256
3307 (base32
5826e7b1 3308 "0w03zd49k96bmly44qc8l0s9l671sd26k4wrilsp13xaspy048kd"))))
f8f44dd7
MB
3309 (build-system cmake-build-system)
3310 (arguments
3311 '(#:tests? #f ; no tests
3312 ;; Upstream uses the "ninja" build system and encourage distros
3313 ;; to do the same for consistency. They also recommend using the
3314 ;; "Release" build type.
3315 #:configure-flags (list "-GNinja"
3316 ;; Defaults to "lib64" on 64-bit archs.
3317 (string-append "-DCMAKE_INSTALL_LIBDIR="
3318 (assoc-ref %outputs "out") "/lib")
3319 "-DCMAKE_BUILD_TYPE=Release")
3320 #:phases
3321 (modify-phases %standard-phases
3322 (replace 'build
3323 (lambda _
3324 (zero? (system* "ninja"
3325 "-j" (number->string (parallel-job-count))))))
3326 (replace 'install
3327 (lambda _
3328 (zero? (system* "ninja" "install")))))))
3329 (native-inputs
3330 `(("ninja" ,ninja)
3331 ("pkg-config" ,pkg-config)
3332 ("python" ,python-wrapper)))
3333 (inputs
3334 `(("libnl" ,libnl)
3335 ("udev" ,eudev)))
3336 (home-page "https://github.com/linux-rdma/rdma-core")
3337 (synopsis "Utilities and libraries for working with RDMA devices")
3338 (description
3339 "This package provides userspace components for the InfiniBand
3340subsystem of the Linux kernel. Specifically it contains userspace
3341libraries for the following device nodes:
3342
3343@enumerate
3344@item @file{/dev/infiniband/uverbsX} (@code{libibverbs})
3345@item @file{/dev/infiniband/rdma_cm} (@code{librdmacm})
3346@item @file{/dev/infiniband/umadX} (@code{libibumad})
3347@end enumerate
3348
3349The following service daemons are also provided:
3350@enumerate
3351@item @code{srp_daemon} (for the @code{ib_srp} kernel module)
3352@item @code{iwpmd} (for iWARP kernel providers)
3353@item @code{ibacm} (for InfiniBand communication management assistant)
3354@end enumerate")
3355 ;; All library code is dual licensed under GPL2 and a custom MIT
3356 ;; variant. The package also includes some components covered by
3357 ;; other licenses. Consult COPYING.md for full details.
3358 (license
3359 (list license:gpl2
3360 (license:x11-style "See COPYING.BSD_MIT in the distribution")
3361 license:bsd-2 ; Files referring to COPYING.BSD_FB
3362 license:cc0 ; most files in ccan/
3363 license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3
3364
9b0942c1
DC
3365(define-public rng-tools
3366 (package
3367 (name "rng-tools")
3368 (version "5")
3369 (source (origin
3370 (method url-fetch)
3371 (uri (string-append
3372 "http://downloads.sourceforge.net/sourceforge/gkernel/"
3373 "rng-tools-" version ".tar.gz"))
3374 (sha256
3375 (base32
3376 "13h7lc8wl9khhvkr0i3bl5j9bapf8anhqis1lcnwxg1vc2v058b0"))))
3377 (build-system gnu-build-system)
3378 (synopsis "Random number generator daemon")
3379 (description
3380 "Monitor a hardware random number generator, and supply entropy
3381from that to the system kernel's @file{/dev/random} machinery.")
3b3b60d0 3382 (home-page "https://sourceforge.net/projects/gkernel")
9b0942c1
DC
3383 ;; The source package is offered under the GPL2+, but the files
3384 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
3385 (license (list license:gpl2 license:gpl2+))))
58d6a1f2
TGR
3386
3387(define-public cpupower
3388 (package
3389 (name "cpupower")
3390 (version (package-version linux-libre))
3391 (source (package-source linux-libre))
3392 (build-system gnu-build-system)
3393 (arguments
3394 '(#:phases (modify-phases %standard-phases
3395 (add-after 'unpack 'enter-subdirectory
3396 (lambda _
3397 (chdir "tools/power/cpupower")))
3398 (delete 'configure)
3399 (add-before 'build 'fix-makefiles
3400 (lambda _
3401 (substitute* "Makefile"
3402 (("/usr/") "/")
3403 (("/bin/(install|pwd)" _ command) command))
3404 (substitute* "bench/Makefile"
3405 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")))))
3406 #:make-flags (let ((out (assoc-ref %outputs "out")))
3407 (list (string-append "DESTDIR=" out)
3408 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
3409 "docdir=/share/doc/cpupower"
3410 "confdir=$(docdir)/examples"
3411 ;; The Makefile recommends the following changes
3412 "DEBUG=false"
3413 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
3414 #:tests? #f)) ;no tests
b94a6ca0 3415 (native-inputs `(("gettext" ,gettext-minimal)))
58d6a1f2
TGR
3416 (inputs `(("pciutils" ,pciutils)))
3417 (home-page (package-home-page linux-libre))
3418 (synopsis "CPU frequency and voltage scaling tools for Linux")
3419 (description
3420 "cpupower is a set of user-space tools that use the cpufreq feature of the
3421Linux kernel to retrieve and control processor features related to power saving,
3422such as frequency and voltage scaling.")
3423 (license license:gpl2)))
2b76f135
TGR
3424
3425(define-public haveged
3426 (package
3427 (name "haveged")
3428 (version "1.9.1")
3429 (source
3430 (origin
3431 (method url-fetch)
3432 (uri (string-append "http://www.issihosts.com/haveged/haveged-"
3433 version ".tar.gz"))
3434 (sha256
3435 (base32
3436 "059pxlfd4l5dqhd6r3lynzfz4wby2f17294fy17pi9j2jpnn68ww"))))
3437 (build-system gnu-build-system)
3438 (home-page "http://www.issihosts.com/haveged")
3439 (synopsis "Entropy source for the Linux random number generator")
3440 (description
3441 "haveged generates an unpredictable stream of random numbers for use by
3442Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
3443standard mechanisms for filling the entropy pool may not be sufficient for
3444systems with high needs or limited user interaction, such as headless servers.
3445@command{haveged} runs as a privileged daemon, harvesting randomness from the
3446indirect effects of hardware events on hidden processor state using the HArdware
3447Volatile Entropy Gathering and Expansion (HAVEGE) algorithm. It tunes itself to
3448its environment and provides the same built-in test suite for the output stream
3449as used on certified hardware security devices.")
3450 (license (list (license:non-copyleft "file://nist/mconf.h")
3451 (license:non-copyleft "file://nist/packtest.c")
3452 license:public-domain ; nist/dfft.c
3453 license:gpl3+)))) ; everything else
e385e957
TGR
3454
3455(define-public ecryptfs-utils
3456 (package
3457 (name "ecryptfs-utils")
3458 (version "111")
3459 (source
3460 (origin
3461 (method url-fetch)
3462 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
3463 version "/+download/ecryptfs-utils_"
3464 version ".orig.tar.gz"))
3465 (sha256
3466 (base32
3467 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
3468 (build-system gnu-build-system)
3469 (arguments
3470 `(#:configure-flags (list "--disable-pywrap")))
3471 (native-inputs
3472 `(("intltool" ,intltool)
3473 ("perl" ,perl) ; for pod2man
3474 ("pkg-config" ,pkg-config)))
3475 (inputs
3476 `(("keyutils" ,keyutils)
3477 ("linux-pam" ,linux-pam)
3478 ("nss" ,nss)))
3479 (home-page "http://ecryptfs.org/")
3480 (synopsis "eCryptfs cryptographic file system utilities")
3481 (description
3482 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
3483Each file's cryptographic meta-data is stored inside the file itself, along
3484with the encrypted contents. This allows individual encrypted files to be
3485copied between hosts and still be decrypted with the proper key. eCryptfs is a
3486native Linux file system, and has been part of the Linux kernel since version
34872.6.19. This package contains the userland utilities to manage it.")
3488 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
3489 ;; grant additional permission to link with OpenSSL.
3490 (license license:gpl2+)))
cff0adec
DC
3491
3492(define-public libnfsidmap
3493 (package
3494 (name "libnfsidmap")
3495 (version "0.25")
3496 (source (origin
3497 (method url-fetch)
3498 (uri (string-append
3499 "http://www.citi.umich.edu/projects/nfsv4/linux/"
3500 name "/" name "-" version ".tar.gz"))
3501 (sha256
3502 (base32
3503 "1kzgwxzh83qi97rblcm9qj80cdvnv8kml2plz0q103j0hifj8vb5"))))
3504 (build-system gnu-build-system)
3505 (arguments
3506 `(#:configure-flags (list
3507 (string-append "--with-pluginpath="
3508 (assoc-ref %outputs "out")
3509 "/lib/libnfsidmap"))))
3510 (home-page
3511 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
3512 (synopsis
3513 "NFSv4 support library for name/ID mapping")
3514 (description "Libnfsidmap is a library holding mulitiple methods of
3515mapping names to ids and visa versa, mainly for NFSv4. It provides an
3516extensible array of mapping functions, currently consisting of two choices:
3517the default @code{nsswitch} and the experimental @code{umich_ldap}.")
3518 (license (license:non-copyleft "file://COPYING"
3519 "See COPYING in the distribution."))))
035d3593
DC
3520
3521(define-public module-init-tools
3522 (package
3523 (name "module-init-tools")
3524 (version "3.16")
3525 (source (origin
3526 (method url-fetch)
3527 (uri (string-append
3528 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
3529 "module-init-tools-" version ".tar.bz2"))
3530 (sha256
3531 (base32
3532 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
3533 (patches (search-patches "module-init-tools-moduledir.patch"))))
3534 (build-system gnu-build-system)
3535 (arguments
3536 ;; FIXME: The upstream tarball lacks man pages, and building them would
3537 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
3538 ;; but they vanished. In the meantime, fake it.
3539 '(#:phases (alist-cons-before
3540 'configure 'fake-docbook
3541 (lambda _
3542 (substitute* "Makefile.in"
3543 (("^DOCBOOKTOMAN.*$")
3544 "DOCBOOKTOMAN = true\n")))
3545 %standard-phases)))
3546 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
3547 (synopsis "Tools for loading and managing Linux kernel modules")
3548 (description
3549 "Tools for loading and managing Linux kernel modules, such as `modprobe',
3550`insmod', `lsmod', and more.")
3551 (license license:gpl2+)))
dd65f3b7
TGR
3552
3553(define-public mcelog
3554 (package
3555 (name "mcelog")
783467ae 3556 (version "153")
dd65f3b7
TGR
3557 (source (origin
3558 (method url-fetch)
3559 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
3560 "mcelog.git/snapshot/v" version ".tar.gz"))
3561 (sha256
3562 (base32
783467ae 3563 "0q40d60p1klzg0aznvxhxgjlddwcxfj2q59s4q86sf9ild6rcdhl"))
dd65f3b7
TGR
3564 (file-name (string-append name "-" version ".tar.gz"))
3565 (modules '((guix build utils)))
3566 (snippet
3567 ;; The snapshots lack a .git directory, breaking ‘git describe’.
3568 `(substitute* "Makefile"
3569 (("\"unknown\"") (string-append "\"v" ,version "\""))))))
3570 (build-system gnu-build-system)
3571 (arguments
3572 `(#:phases (modify-phases %standard-phases
3573 (delete 'configure)) ; no configure script
3574 #:make-flags (let ((out (assoc-ref %outputs "out")))
3575 (list "CC=gcc"
3576 (string-append "prefix=" out)
3577 (string-append "DOCDIR=" out "/share/doc/mcelog")
3578 "etcprefix=$(DOCDIR)/examples"))
3579 ;; The tests will only run as root on certain supported CPU models.
3580 #:tests? #f))
3581 (supported-systems (list "i686-linux" "x86_64-linux"))
3582 (home-page "http://mcelog.org/")
3583 (synopsis "Machine check monitor for x86 Linux systems")
3584 (description
3585 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
3586and other hardware errors on x86 systems. It can also perform user-defined
3587tasks, such as bringing bad pages off-line, when configurable error thresholds
3588are exceeded.")
3589 (license license:gpl2)))
0c60cc53
DM
3590
3591(define-public mtd-utils
3592 (package
3593 (name "mtd-utils")
3594 (version "1.5.2")
3595 (source (origin
3596 (method url-fetch)
3597 (uri (string-append
3598 "ftp://ftp.infradead.org/pub/mtd-utils/"
3599 "mtd-utils-" version ".tar.bz2"))
3600 (sha256
3601 (base32
3602 "007lhsd8yb34l899r4m37whhzdw815cz4fnjbpnblfha524p7dax"))))
3603 (inputs
3604 `(("acl" ,acl)
3605 ("libuuid" ,util-linux)
3606 ("lzo", lzo)
3607 ("zlib" ,zlib)))
3608 (build-system gnu-build-system)
3609 (arguments
3610 `(#:test-target "tests"
3611 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
3612 #:phases (modify-phases %standard-phases
3613 (delete 'configure))))
3614 (synopsis "MTD Flash Storage Utilities")
3615 (description "This package provides utilities for testing, partitioning, etc
3616of flash storage.")
3617 (home-page "http://www.linux-mtd.infradead.org/")
3618 (license
3619 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
3620 license:mpl1.1 ; All ftl* files
3621 license:expat)))) ; libiniparser
def6213f
LF
3622
3623(define-public libseccomp
3624 (package
3625 (name "libseccomp")
488a3734 3626 (version "2.3.2")
def6213f
LF
3627 (source (origin
3628 (method url-fetch)
3629 (uri (string-append "https://github.com/seccomp/libseccomp/"
3630 "releases/download/v" version
3631 "/libseccomp-" version ".tar.gz"))
3632 (sha256
3633 (base32
488a3734 3634 "18dwfxzsw3agiy2dxbflrkhmjgvlji0wwkk636nabh2ng41qrp1x"))))
def6213f
LF
3635 (build-system gnu-build-system)
3636 (native-inputs
3637 `(("which" ,which)))
3638 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
3639 (description "The libseccomp library provides an easy to use, platform
3640independent, interface to the Linux Kernel's syscall filtering mechanism. The
3641libseccomp API is designed to abstract away the underlying BPF based syscall
3642filter language and present a more conventional function-call based filtering
3643interface that should be familiar to, and easily adopted by, application
3644developers.")
3645 (home-page "https://github.com/seccomp/libseccomp")
3646 (license license:lgpl2.1)))
58c4f11e
TGR
3647
3648(define-public radeontop
3649 (package
3650 (name "radeontop")
a7c61512 3651 (version "1.0")
58c4f11e
TGR
3652 (home-page "https://github.com/clbr/radeontop/")
3653 (source (origin
3654 (method url-fetch)
a7c61512 3655 (uri (string-append home-page "archive/v" version ".tar.gz"))
58c4f11e
TGR
3656 (file-name (string-append name "-" version ".tar.gz"))
3657 (sha256
3658 (base32
a7c61512 3659 "1z38nibirqxrbsfyhfcrnzlcw16cqjp4ds6qnjfxalwayf9fm5x9"))))
58c4f11e
TGR
3660 (build-system gnu-build-system)
3661 (arguments
3662 `(#:phases (modify-phases %standard-phases
3663 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
3664 ;; dependency, and doesn't even work on release(!) tarballs.
3665 (add-after 'unpack 'report-correct-version
3666 (lambda _ (substitute* "getver.sh"
3667 (("ver=unknown")
3668 (string-append "ver=" ,version)))))
3669 (delete 'configure)) ; no configure script
3670 #:make-flags (list "CC=gcc"
3671 (string-append "PREFIX=" %output))
3672 #:tests? #f)) ; no tests
3673 (native-inputs
7c90d0f4 3674 `(("gettext" ,gettext-minimal)
58c4f11e
TGR
3675 ("pkg-config" ,pkg-config)))
3676 (inputs
3677 `(("libdrm" ,libdrm)
3678 ("libpciaccess" ,libpciaccess)
a7c61512 3679 ("libxcb" ,libxcb)
58c4f11e
TGR
3680 ("ncurses" ,ncurses)))
3681 (synopsis "Usage monitor for AMD Radeon graphics")
3682 (description "RadeonTop monitors resource consumption on supported AMD
3683Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
3684a terminal or saved to a file for further processing. It measures both the
3685activity of the GPU as a whole, which is also accurate during OpenCL
3686computations, as well as separate component statistics that are only meaningful
3687under OpenGL graphics workloads.")
3688 (license license:gpl3)))
0d74462a
MB
3689
3690(define-public efivar
3691 (package
3692 (name "efivar")
3693 (version "30")
3694 (source (origin
3695 (method url-fetch)
3696 (uri (string-append "https://github.com/rhinstaller/" name
3697 "/releases/download/" version "/" name
3698 "-" version ".tar.bz2"))
3699 (sha256
3700 (base32
3701 "12qjnm44yi55ffqxjpgrxy82s89yjziy84w2rfjjknsd8flj0mqz"))))
3702 (build-system gnu-build-system)
3703 (arguments
3704 `(;; Tests require a UEFI system and is not detected in the chroot.
3705 #:tests? #f
3706 #:make-flags (list (string-append "prefix=" %output)
3707 (string-append "libdir=" %output "/lib")
3708 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
3709 #:phases
3710 (modify-phases %standard-phases
3711 (delete 'configure))))
3712 (native-inputs
3713 `(("pkg-config" ,pkg-config)))
3714 (inputs
3715 `(("popt" ,popt)))
3716 (home-page "https://github.com/rhinstaller/efivar")
3717 (synopsis "Tool and library to manipulate EFI variables")
3718 (description "This package provides a library and a command line
3719interface to the variable facility of UEFI boot firmware.")
3720 (license license:lgpl2.1+)))
1581406e
MB
3721
3722(define-public efibootmgr
3723 (package
3724 (name "efibootmgr")
3725 (version "14")
3726 (source (origin
3727 (method url-fetch)
3728 (uri (string-append "https://github.com/rhinstaller/" name
3729 "/releases/download/" version "/" name
3730 "-" version ".tar.bz2"))
3731 (sha256
3732 (base32
3733 "1n3sydvpr6yl040hhf460k7mrxby7laqd9dqs6pq0js1hijc2zip"))))
3734 (build-system gnu-build-system)
3735 (arguments
3736 `(#:tests? #f ; No tests.
3737 #:make-flags (list (string-append "prefix=" %output)
3738 (string-append "libdir=" %output "/lib")
3739 ;; Override CFLAGS to add efivar include directory.
3740 (string-append "CFLAGS=-O2 -g -flto -I"
3741 (assoc-ref %build-inputs "efivar")
3742 "/include/efivar"))
3743 #:phases
3744 (modify-phases %standard-phases
3745 (add-after 'unpack 'branding
3746 ;; Replace default loader path with something more familiar.
3747 (lambda _
3748 (substitute* "src/efibootmgr.c"
3749 (("EFI\\\\\\\\redhat") ; Matches 'EFI\\redhat'.
3750 "EFI\\\\gnu"))
3751 #t))
3752 (delete 'configure))))
3753 (native-inputs
3754 `(("pkg-config" ,pkg-config)))
3755 (inputs
3756 `(("efivar" ,efivar)
3757 ("popt" ,popt)))
3758 (home-page "https://github.com/rhinstaller/efibootmgr")
3759 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
3760 (description
3761 "@code{efibootmgr} is a user-space application to modify the Intel
3762Extensible Firmware Interface (EFI) Boot Manager. This application can
3763create and destroy boot entries, change the boot order, change the next
3764running boot option, and more.")
3765 (license license:gpl2+)))
6d3e08d4
LF
3766
3767(define-public sysstat
3768 (package
3769 (name "sysstat")
70443013 3770 (version "11.4.3")
6d3e08d4
LF
3771 (source (origin
3772 (method url-fetch)
3773 (uri (string-append "http://perso.orange.fr/sebastien.godard/"
3774 "sysstat-" version ".tar.xz"))
3775 (sha256
3776 (base32
70443013 3777 "1ryf9myjzpa2279i3rvsh6fr5psm6qvr5r9kbm1sxyspapxcms82"))))
6d3e08d4
LF
3778 (build-system gnu-build-system)
3779 (arguments
3780 `(#:tests? #f ; No test suite.
3781 ;; Without this flag, it tries to install the man pages with group 'root'
3782 ;; and fails because /etc/passwd lacks an entry for the root user.
3783 #:configure-flags
3784 (list "--disable-file-attr"
3785 (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc"))
3786 #:phases
3787 (modify-phases %standard-phases
3788 ;; The build process tries to create '/var/lib/sa', so we skip that
3789 ;; instruction.
3790 (add-after 'build 'skip-touching-var
3791 (lambda _
3792 (substitute* "Makefile"
3793 (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)")
3794 ""))
3795 #t)))))
3796 (home-page "http://sebastien.godard.pagesperso-orange.fr/")
3797 (synopsis "Performance monitoring tools for Linux")
3798 (description "The sysstat utilities are a collection of performance
3799monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
3800@code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc},
3801@code{sadf} and @code{sa}.")
3802 (license license:gpl2+)))
01be4f93
JMSG
3803
3804(define-public light
3805 (package
3806 (name "light")
3807 (version "1.0")
3808 (source (origin
3809 (method url-fetch)
3810 (uri (string-append "https://github.com/haikarainen/" name
3811 "/archive/v" version ".tar.gz"))
3812 (sha256
3813 (base32
3814 "0r5gn6c0jcxknzybl6059dplxv46dpahchqq4gymrs7z8bp0hilp"))
3815 (file-name (string-append name "-" version ".tar.gz"))))
3816 (build-system gnu-build-system)
3817 (arguments
3818 '(#:tests? #f ; no tests
3819 #:make-flags (list "CC=gcc"
3820 (string-append "PREFIX=" %output))
3821 #:phases
3822 (modify-phases %standard-phases
3823 (delete 'configure)
3824 (add-after 'unpack 'patch-makefile
3825 (lambda _
3826 (substitute* "Makefile" (("chown") "#")))))))
3827 (native-inputs
3828 `(("help2man" ,help2man)))
3829 (home-page "https://haikarainen.github.io/light")
3830 (synopsis "GNU/Linux application to control backlights")
3831 (description
3832 "Light is a program to send commands to screen backlight controllers
3833under GNU/Linux. Features include:
3834
3835@itemize
3836@item It does not rely on X.
3837@item Light can automatically figure out the best controller to use, making
3838full use of underlying hardware.
3839@item It is possible to set a minimum brightness value, as some controllers
3840set the screen to be pitch black at a vaĺue of 0 (or higher).
3841@end itemize
3842
3843Light is the successor of lightscript.")
3844 (license license:gpl3+)))
189d8422 3845
c7adafa7
MO
3846(define-public tlp
3847 (package
3848 (name "tlp")
c48fa0ad 3849 (version "1.0")
c7adafa7
MO
3850 (source (origin
3851 (method url-fetch)
3852 (uri (string-append
3853 "https://github.com/linrunner/"
3854 (string-upcase name)
3855 "/archive/" version ".tar.gz"))
3856 (file-name (string-append name "-" version ".tar.gz"))
3857 (sha256
3858 (base32
c48fa0ad 3859 "1v3qpj9kp4rxwqapayd0i9419wwv4bikyrzjvqn0r9xkgnr1f9v4"))))
c7adafa7
MO
3860 (inputs `(("bash" ,bash)
3861 ("dbus" ,dbus)
3862 ("ethtool" ,ethtool)
3863 ("eudev" ,eudev)
3864 ("grep" ,grep)
3865 ("hdparm" ,hdparm)
3866 ("inetutils" ,inetutils)
3867 ("iw" ,iw)
3868 ("kmod" ,kmod)
3869 ("pciutils" ,pciutils)
3870 ("perl" ,perl)
3871 ("rfkill" ,rfkill)
3872 ("sed" ,sed)
3873 ("usbutils" ,usbutils)
3874 ("util-linux" ,util-linux)
3875 ("wireless-tools" ,wireless-tools)))
3876 (build-system gnu-build-system)
3877 (arguments
3878 `(#:phases
3879 (modify-phases %standard-phases
cef3f146 3880 (delete 'configure) ; no configure script
c7adafa7
MO
3881 (add-before 'build 'setenv
3882 (lambda* (#:key outputs #:allow-other-keys)
3883 (let ((out (assoc-ref outputs "out")))
3884 (setenv "TLP_WITH_SYSTEMD" "0")
3885 (setenv "TLP_NO_INIT" "1")
3886 (setenv "TLP_NO_PMUTILS" "1")
3887 (setenv "TLP_SBIN" (string-append out "/bin"))
3888 (setenv "TLP_BIN" (string-append out "/bin"))
3889 (setenv "TLP_TLIB" (string-append out "/share/tlp-pm"))
3890 (setenv "TLP_ULIB" (string-append out "/lib/udev"))
32e75b48 3891 (setenv "TLP_CONF" "/etc/tlp")
c7adafa7
MO
3892 (setenv "TLP_SHCPL"
3893 (string-append out "/share/bash-completion/completions"))
3894 (setenv "TLP_MAN" (string-append out "/share/man")))))
cef3f146
TGR
3895 (delete 'check) ; no tests
3896 (add-before 'install 'fix-installation
3897 (lambda _
3898 ;; Stop the Makefile from trying to create system directories.
3899 (substitute* "Makefile" (("\\[ -f \\$\\(_CONF\\) \\]") "#"))))
c7adafa7
MO
3900 (replace 'install
3901 (lambda _
cef3f146 3902 (zero? (system* "make" "install-tlp" "install-man"))))
c7adafa7
MO
3903 (add-after 'install 'wrap
3904 (lambda* (#:key inputs outputs #:allow-other-keys)
3905 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
3906 (bin-files (find-files bin ".*")))
3907 (define (bin-directory input-name)
3908 (string-append (assoc-ref inputs input-name) "/bin"))
3909 (define (sbin-directory input-name)
3910 (string-append (assoc-ref inputs input-name) "/sbin"))
3911 (for-each (lambda (program)
3912 (wrap-program program
3913 `("PATH" ":" prefix
3914 ,(append
3915 (map bin-directory '("bash"
3916 "coreutils"
3917 "dbus"
3918 "eudev"
3919 "grep"
3920 "inetutils"
3921 "kmod"
3922 "perl"
3923 "sed"
3924 "usbutils"
3925 "util-linux"))
3926 (map sbin-directory '("ethtool"
3927 "hdparm"
3928 "iw"
3929 "pciutils"
3930 "rfkill"
3931 "wireless-tools"))))))
3932 bin-files)))))))
3933 (home-page "http://linrunner.de/en/tlp/tlp.html")
3934 (synopsis "Power management tool for Linux")
3935 (description "TLP is a power management tool for Linux. It comes with
3936a default configuration already optimized for battery life. Nevertheless,
3937TLP is customizable to fulfil system requirements. TLP settings are applied
3938every time the power supply source is changed.")
3939
3940 ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
3941 ;; rest is GPLv2+.
3942 (license (list license:gpl2+ license:gpl3+))))
3943
189d8422
BG
3944(define-public lshw
3945 (package
3946 (name "lshw")
3947 (version "B.02.18")
3948 (source (origin
3949 (method url-fetch)
3950 (uri (string-append "https://www.ezix.org/software/"
3951 "files/lshw-" version
3952 ".tar.gz"))
3953 (sha256
3954 (base32
3955 "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf"))))
3956 (build-system gnu-build-system)
3957 (arguments
3958 `(#:phases (modify-phases %standard-phases (delete 'configure))
3959 #:tests? #f ; no tests
3960 #:make-flags
3961 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
3962 (synopsis "List hardware information")
3963 (description
3964 "@command{lshw} (Hardware Lister) is a small tool to provide
3965detailed information on the hardware configuration of the machine.
3966It can report exact memory configuration, firmware version, mainboard
3967configuration, CPU version and speed, cache configuration, bus speed,
3968and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC
3969machines (PowerMac G4 is known to work).")
3970 (home-page "https://www.ezix.org/project/wiki/HardwareLiSter")
3971 (license license:gpl2+)))
2f4a58b5
LF
3972
3973(define-public libmnl
3974 (package
3975 (name "libmnl")
3976 (version "1.0.4")
3977 (source
3978 (origin
3979 (method url-fetch)
f11ae44f 3980 (uri (string-append "mirror://netfilter.org/libmnl/"
2f4a58b5
LF
3981 "libmnl-" version ".tar.bz2"))
3982 (sha256
3983 (base32
3984 "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp"))))
3985 (build-system gnu-build-system)
3986 (home-page "https://www.netfilter.org/projects/libmnl/")
3987 (synopsis "Netlink utility library")
3988 (description "Libmnl is a minimalistic user-space library oriented to
3989Netlink developers. There are a lot of common tasks in parsing, validating,
3990constructing of both the Netlink header and TLVs that are repetitive and easy to
3991get wrong. This library aims to provide simple helpers that allows you to
3992re-use code and to avoid re-inventing the wheel.")
3993 (license license:lgpl2.1+)))
b754c612
LF
3994
3995(define-public libnftnl
3996 (package
3997 (name "libnftnl")
3998 (version "1.0.7")
3999 (source
4000 (origin
4001 (method url-fetch)
f11ae44f 4002 (uri (string-append "mirror://netfilter.org/libnftnl/"
b754c612
LF
4003 "libnftnl-" version ".tar.bz2"))
4004 (sha256
4005 (base32
4006 "10irjrylcfkbp11617yr19vpfhgl54w0kw02jhj0i1abqv5nxdlv"))))
4007 (build-system gnu-build-system)
4008 (native-inputs
4009 `(("pkg-config" ,pkg-config)))
4010 (inputs
4011 `(("libmnl" ,libmnl)))
4012 (home-page "https://www.netfilter.org/projects/libnftnl/index.html")
4013 (synopsis "Netlink programming interface to the Linux nf_tables subsystem")
4014 (description "Libnftnl is a userspace library providing a low-level netlink
4015programming interface to the in-kernel nf_tables subsystem. The library
4016libnftnl has been previously known as libnftables. This library is currently
4017used by nftables.")
4018 (license license:gpl2+)))
62b28c0e 4019
dfe93c9a
RH
4020(define-public nftables
4021 (package
4022 (name "nftables")
4023 (version "0.7")
4024 (source
4025 (origin
4026 (method url-fetch)
4027 (uri (string-append "http://www.nftables.org/projects/nftables"
4028 "/files/nftables-" version ".tar.bz2"))
4029 (sha256
4030 (base32
4031 "0hzdqigdx4i6jbpxbdyq4zy4p4waqn8l6vvz7685ikh1v0wr4qzy"))))
4032 (build-system gnu-build-system)
4033 (inputs `(("bison", bison)
4034 ("flex", flex)
4035 ("gmp", gmp)
4036 ("libmnl", libmnl)
4037 ("libnftnl", libnftnl)
4038 ("readline", readline)))
4039 (native-inputs `(("pkg-config", pkg-config)))
4040 (home-page "http://www.nftables.org")
4041 (synopsis "Userspace utility for Linux packet filtering")
4042 (description "nftables is the project that aims to replace the existing
4043{ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet
4044filtering framework, a new userspace utility and also a compatibility layer for
4045{ip,ip6}tables. nftables is built upon the building blocks of the Netfilter
4046infrastructure such as the existing hooks, the connection tracking system, the
4047userspace queueing component and the logging subsystem.")
4048 (license license:gpl2)))
4049
62b28c0e
LC
4050(define-public proot
4051 (package
4052 (name "proot")
4053 (version "5.1.0")
4054 (home-page "https://github.com/proot-me/PRoot")
4055 (source (origin
4056 (method url-fetch)
4057 (uri (string-append home-page "/archive/v" version ".tar.gz"))
4058 (file-name (string-append name "-" version ".tar.gz"))
4059 (sha256
4060 (base32
4061 "11h30i83vdhc3khlj6hrh3a21sbmmz8nhfv09vkf6b9bcs1biz2h"))
4062 (patches (search-patches "proot-test-fhs.patch"))))
4063 (build-system gnu-build-system)
4064 (arguments
4065 '(#:make-flags '("-C" "src")
4066
4067 #:phases (modify-phases %standard-phases
4068 (delete 'configure)
4069 (add-before 'build 'set-shell-file-name
4070 (lambda* (#:key inputs #:allow-other-keys)
4071 (substitute* (find-files "src" "\\.[ch]$")
4072 (("\"/bin/sh\"")
4073 (string-append "\""
4074 (assoc-ref inputs "bash")
4075 "/bin/sh\"")))
4076 #t))
4077 (add-before 'check 'fix-fhs-assumptions-in-tests
4078 (lambda _
4079 (substitute* "tests/test-c6b77b77.mk"
4080 (("/bin/bash") (which "bash"))
4081 (("/usr/bin/test") (which "test")))
4082 (substitute* '("tests/test-16573e73.c")
4083 (("/bin/([a-z-]+)" _ program)
4084 (which program)))
4085
4086 (substitute* (find-files "tests" "\\.sh$")
4087 ;; Some of the tests try to "bind-mount" /bin/true.
4088 (("-b /bin/true:")
4089 (string-append "-b " (which "true") ":"))
4090 ;; Likewise for /bin.
4091 (("-b /bin:") "-b /gnu:")
4092 ;; Others try to run /bin/sh.
4093 (("/bin/sh") (which "sh"))
4094 ;; Others assume /etc/fstab exists.
4095 (("/etc/fstab") "/etc/passwd"))
4096
4097 (substitute* "tests/GNUmakefile"
4098 (("-b /bin:") "-b /gnu:"))
4099
4100 ;; XXX: This test fails in an obscure corner case, just
4101 ;; skip it.
4102 (delete-file "tests/test-kkkkkkkk.c")
4103
4104 #t))
4105 (replace 'check
4106 (lambda _
4107 (let ((n (parallel-job-count)))
4108 ;; For some reason we get lots of segfaults with
4109 ;; seccomp support (x86_64, Linux-libre 4.11.0).
4110 (setenv "PROOT_NO_SECCOMP" "1")
4111
4112 ;; Most of the tests expect "/bin" to be in $PATH so
4113 ;; they can run things that live in $ROOTFS/bin.
4114 (setenv "PATH"
4115 (string-append (getenv "PATH") ":/bin"))
4116
4117 (zero? (system* "make" "check" "-C" "tests"
4118 ;;"V=1"
4119 "-j" (number->string n))))))
4120 (replace 'install
4121 (lambda* (#:key outputs #:allow-other-keys)
4122 ;; The 'install' rule does nearly nothing.
4123 (let ((out (assoc-ref outputs "out")))
4124 (and (zero?
4125 ;; TODO: 'make install-care' (does not even
4126 ;; build currently.)
4127 (system* "make" "-C" "src" "install"
4128 (string-append "PREFIX=" out)))
02084762
LC
4129 (let ((man1 (string-append out
4130 "/share/man/man1")))
4131 (mkdir-p man1)
4132 (copy-file "doc/proot/man.1"
4133 (string-append man1 "/proot.1"))
62b28c0e
LC
4134 #t))))))))
4135 (native-inputs `(("which" ,which)
4136
4137 ;; For 'mcookie', used by some of the tests.
4138 ("util-linux" ,util-linux)))
4139 (inputs `(("talloc" ,talloc)))
4140 (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
4141 (description
4142 "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind},
4143and @code{binfmt_misc}. This means that users don't need any privileges or
4144setup to do things like using an arbitrary directory as the new root
4145filesystem, making files accessible somewhere else in the file system
4146hierarchy, or executing programs built for another CPU architecture
4147transparently through QEMU user-mode. Also, developers can use PRoot as a
4148generic process instrumentation engine thanks to its extension mechanism.
4149Technically PRoot relies on @code{ptrace}, an unprivileged system-call
4150available in the kernel Linux.")
4151 (license license:gpl2+)))
b9048a14
LC
4152
4153(define-public proot-static
4154 (package
4155 (inherit proot)
4156 (name "proot-static")
4157 (synopsis
4158 "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)")
4159 (inputs `(("talloc" ,talloc/static)))
4160 (arguments
4161 (substitute-keyword-arguments (package-arguments proot)
4162 ((#:make-flags flags)
4163 `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags))
4164 ((#:phases phases)
4165 `(modify-phases ,phases
4166 (add-after 'strip 'remove-store-references
4167 (lambda* (#:key outputs #:allow-other-keys)
4168 (let* ((out (assoc-ref outputs "out")))
4169 (with-directory-excursion out
4170 (remove-store-references "bin/proot")
4171 #t))))))
4172 ((#:allowed-references _ '("out"))
4173 '("out"))))))
1113386b
CL
4174
4175(define-public cpuid
4176 (package
4177 (name "cpuid")
4178 (version "20170122")
4179 (source (origin
4180 (method url-fetch)
4181 (uri (string-append "http://www.etallen.com/cpuid/cpuid-"
4182 version ".src.tar.gz"))
4183 (sha256
4184 (base32
4185 "0ra8ph9m1dckqaikfnbsh408fp2w9k49fkl423fl2hvhwsm14xk6"))))
4186 (build-system gnu-build-system)
4187 (arguments
4188 '(#:make-flags '("CC=gcc")
4189 #:tests? #f ; no tests
4190 #:phases (modify-phases %standard-phases
4191 (delete 'configure)
4192 (add-before 'install 'fix-makefile
4193 (lambda* (#:key outputs #:allow-other-keys)
4194 (substitute* "Makefile"
4195 (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out")))
4196 ;; Make the compressed manpages writable so that the
4197 ;; reset-gzip-timestamps phase does not error out.
4198 (substitute* "Makefile"
4199 (("-m 444") "-m 644"))
4200 #t)))))
4201 (inputs `(("perl" ,perl)))
4202 (supported-systems '("i686-linux" "x86_64-linux"))
4203 (home-page "http://www.etallen.com/cpuid.html")
4204 (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)")
4205 (description "cpuid dumps detailed information about the CPU(s) gathered
4206from the CPUID instruction, and also determines the exact model of CPU(s). It
4207supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC,
4208NexGen, Rise, and SiS CPUs.")
4209 (license license:gpl2+)))
afc9d8ec
LF
4210
4211(define-public jmtpfs
4212 (package
4213 (name "jmtpfs")
4214 (version "0.5")
4215 (source
4216 (origin
4217 (method url-fetch)
4218 (uri (string-append "https://github.com/JasonFerrara/jmtpfs/archive/v"
4219 version ".tar.gz"))
4220 (file-name (string-append name "-" version ".tar.gz"))
4221 (sha256
4222 (base32
4223 "10v8d7mmx8b8123x5f9y9zaaa428ms6wkngwn2ra71n5a53wrjn0"))))
4224 (build-system gnu-build-system)
4225 (inputs
4226 `(("file" ,file)
4227 ("fuse" ,fuse)
4228 ("libmtp" ,libmtp)))
4229 (native-inputs
4230 `(("pkg-config" ,pkg-config)))
4231 (home-page "https://github.com/JasonFerrara/jmtpfs")
4232 (synopsis "Use a FUSE filesystem to access data over MTP")
4233 (description "jmtpfs uses FUSE (filesystem in userspace) to provide access
4234to data over the Media Transfer Protocol (MTP). Unprivileged users can mount
4235the MTP device as a filesystem.")
4236 (license license:gpl3)))
a73e7dd3
DL
4237
4238(define-public procenv
4239 (package
4240 (name "procenv")
4241 (version "0.49")
4242 (source
4243 (origin
4244 (method url-fetch)
4245 (uri (string-append "https://github.com/jamesodhunt/procenv/archive/"
4246 version ".tar.gz"))
4247 (file-name (string-append name "-" version ".tar.gz"))
4248 (sha256
4249 (base32 "0brzf6185hb76imw107cl21c8lzwiywkxi3jknihrk86bvvicd0d"))))
4250 (build-system gnu-build-system)
4251 (arguments `(#:configure-flags '("--disable-silent-rules")))
4252 (inputs `(("expat" ,expat) ("libcap" ,libcap) ("check" ,check)
4253 ("groff" ,groff) ; for tests
4254 ("libselinux" ,libselinux)))
4255 (synopsis "Utility to show process environment")
4256 (description "Procenv is a command-line tool that displays as much detail about
4257itself and its environment as possible. It can be used as a test
4258tool, to understand the type of environment a process runs in, and for
4259comparing system environments.")
4260 (home-page "http://github.com/jamesodhunt/procenv/")
4261 (license license:gpl3+)))