Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
400ed6ac | 2 | ;;; Copyright © 2012, 2013, 2014, 2015, 2016 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> |
beed3af5 | 5 | ;;; Copyright © 2014, 2015, 2016 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> |
ebf89f13 | 8 | ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il> |
1348185a | 9 | ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org> |
e05647ad | 10 | ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr> |
b53e44fb | 11 | ;;; Copyright © 2016 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> |
0d74462a | 18 | ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com> |
411264c2 | 19 | ;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org> |
fd76c904 | 20 | ;;; |
233e7676 | 21 | ;;; This file is part of GNU Guix. |
fd76c904 | 22 | ;;; |
233e7676 | 23 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
fd76c904 LC |
24 | ;;; under the terms of the GNU General Public License as published by |
25 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
26 | ;;; your option) any later version. | |
27 | ;;; | |
233e7676 | 28 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
fd76c904 LC |
29 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
30 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
31 | ;;; GNU General Public License for more details. | |
32 | ;;; | |
33 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 34 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
fd76c904 | 35 | |
1ffa7090 | 36 | (define-module (gnu packages linux) |
59a43334 | 37 | #:use-module (gnu packages) |
0c60cc53 | 38 | #:use-module (gnu packages acl) |
75750abb DC |
39 | #:use-module (gnu packages admin) |
40 | #:use-module (gnu packages algebra) | |
41 | #:use-module (gnu packages attr) | |
42 | #:use-module (gnu packages autotools) | |
43 | #:use-module (gnu packages base) | |
44 | #:use-module (gnu packages bison) | |
45 | #:use-module (gnu packages calendar) | |
46 | #:use-module (gnu packages check) | |
e385e957 | 47 | #:use-module (gnu packages crypto) |
f61e0e79 | 48 | #:use-module (gnu packages compression) |
75750abb DC |
49 | #:use-module (gnu packages databases) |
50 | #:use-module (gnu packages docbook) | |
51 | #:use-module (gnu packages documentation) | |
52 | #:use-module (gnu packages elf) | |
1ffa7090 | 53 | #:use-module (gnu packages flex) |
75750abb DC |
54 | #:use-module (gnu packages freedesktop) |
55 | #:use-module (gnu packages gcc) | |
56 | #:use-module (gnu packages gettext) | |
57 | #:use-module (gnu packages glib) | |
e385e957 | 58 | #:use-module (gnu packages gnuzilla) |
d7d42d6b | 59 | #:use-module (gnu packages gperf) |
75750abb | 60 | #:use-module (gnu packages gtk) |
1ffa7090 | 61 | #:use-module (gnu packages libusb) |
75750abb | 62 | #:use-module (gnu packages maths) |
1ffa7090 LC |
63 | #:use-module (gnu packages ncurses) |
64 | #:use-module (gnu packages perl) | |
75750abb | 65 | #:use-module (gnu packages pciutils) |
1ffa7090 | 66 | #:use-module (gnu packages pkg-config) |
0d74462a | 67 | #:use-module (gnu packages popt) |
75750abb | 68 | #:use-module (gnu packages pulseaudio) |
7c0dbe78 | 69 | #:use-module (gnu packages python) |
75750abb DC |
70 | #:use-module (gnu packages readline) |
71 | #:use-module (gnu packages rrdtool) | |
b1fb4b23 | 72 | #:use-module (gnu packages slang) |
f57d2639 | 73 | #:use-module (gnu packages texinfo) |
75343704 | 74 | #:use-module (gnu packages tls) |
75750abb | 75 | #:use-module (gnu packages xml) |
58c4f11e TGR |
76 | #:use-module (gnu packages xdisorg) |
77 | #:use-module (gnu packages xorg) | |
220193ad | 78 | #:use-module (guix build-system cmake) |
75750abb | 79 | #:use-module (guix build-system gnu) |
e102f940 | 80 | #:use-module (guix build-system python) |
a94546ec | 81 | #:use-module (guix build-system trivial) |
75750abb DC |
82 | #:use-module (guix download) |
83 | #:use-module ((guix licenses) #:prefix license:) | |
84 | #:use-module (guix packages) | |
85 | #:use-module (guix utils) | |
adddd5ba | 86 | #:use-module (srfi srfi-1) |
17db0706 | 87 | #:use-module (srfi srfi-2) |
a94546ec LC |
88 | #:use-module (srfi srfi-26) |
89 | #:use-module (ice-9 match)) | |
fd76c904 | 90 | |
aaf4cb20 LC |
91 | (define-public (system->linux-architecture arch) |
92 | "Return the Linux architecture name for ARCH, a Guix system name such as | |
6d7ef2aa | 93 | \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"." |
618cea69 NK |
94 | (let ((arch (car (string-split arch #\-)))) |
95 | (cond ((string=? arch "i686") "i386") | |
96 | ((string-prefix? "mips" arch) "mips") | |
aaf4cb20 | 97 | ((string-prefix? "arm" arch) "arm") |
503275e9 | 98 | ((string-prefix? "aarch64" arch) "arm64") |
618cea69 NK |
99 | (else arch)))) |
100 | ||
6023cc74 LC |
101 | (define (linux-libre-urls version) |
102 | "Return a list of URLs for Linux-Libre VERSION." | |
103 | (list (string-append | |
104 | "http://linux-libre.fsfla.org/pub/linux-libre/releases/" | |
105 | version "-gnu/linux-libre-" version "-gnu.tar.xz") | |
106 | ||
107 | ;; XXX: Work around <http://bugs.gnu.org/14851>. | |
108 | (string-append | |
109 | "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-" | |
110 | version "-gnu.tar.xz") | |
111 | ||
112 | ;; Maybe this URL will become valid eventually. | |
113 | (string-append | |
114 | "mirror://gnu/linux-libre/" version "-gnu/linux-libre-" | |
115 | version "-gnu.tar.xz"))) | |
116 | ||
80fe5c60 | 117 | (define-public linux-libre-headers |
b450d2b4 DC |
118 | (package |
119 | (name "linux-libre-headers") | |
120 | (version "4.4.18") | |
121 | (source (origin | |
122 | (method url-fetch) | |
123 | (uri (linux-libre-urls version)) | |
124 | (sha256 | |
125 | (base32 | |
126 | "0k8k17in7dkjd9d8zg3i8l1ax466dba6bxw28flxizzyq8znljps")))) | |
127 | (build-system gnu-build-system) | |
128 | (native-inputs `(("perl" ,perl))) | |
129 | (arguments | |
130 | `(#:modules ((guix build gnu-build-system) | |
131 | (guix build utils) | |
132 | (srfi srfi-1)) | |
133 | #:phases | |
134 | (modify-phases %standard-phases | |
135 | (delete 'configure) | |
136 | (replace 'build | |
137 | (lambda _ | |
138 | (let ((arch ,(system->linux-architecture | |
139 | (or (%current-target-system) | |
140 | (%current-system))))) | |
141 | (setenv "ARCH" arch) | |
618cea69 | 142 | (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")) |
45298f8f | 143 | |
618cea69 NK |
144 | (and (zero? (system* "make" "defconfig")) |
145 | (zero? (system* "make" "mrproper" "headers_check")))))) | |
b450d2b4 DC |
146 | (replace 'install |
147 | (lambda* (#:key outputs #:allow-other-keys) | |
80fe5c60 LC |
148 | (let ((out (assoc-ref outputs "out"))) |
149 | (and (zero? (system* "make" | |
150 | (string-append "INSTALL_HDR_PATH=" out) | |
151 | "headers_install")) | |
b15389e1 LC |
152 | (begin |
153 | (mkdir (string-append out "/include/config")) | |
154 | (call-with-output-file | |
155 | (string-append out | |
156 | "/include/config/kernel.release") | |
157 | (lambda (p) | |
158 | (format p "~a-default~%" ,version))) | |
159 | ||
160 | ;; Remove the '.install' and '..install.cmd' files; the | |
161 | ;; latter contains store paths, which pulls in bootstrap | |
162 | ;; binaries in the build environment, and prevents bit | |
163 | ;; reproducibility for the bootstrap binaries. | |
164 | (for-each delete-file (find-files out "\\.install")) | |
165 | ||
166 | #t)))))) | |
b15389e1 | 167 | #:allowed-references () |
80fe5c60 | 168 | #:tests? #f)) |
b450d2b4 | 169 | (home-page "http://www.gnu.org/software/linux-libre") |
80fe5c60 LC |
170 | (synopsis "GNU Linux-Libre kernel headers") |
171 | (description "Headers of the Linux-Libre kernel.") | |
b450d2b4 | 172 | (license license:gpl2))) |
80fe5c60 | 173 | |
ac47a7c2 LC |
174 | (define %boot-logo-patch |
175 | ;; Linux-Libre boot logo featuring Freedo and a gnu. | |
176 | (origin | |
177 | (method url-fetch) | |
178 | (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/" | |
74dde9e9 | 179 | "lemote/gnewsense/branches/3.16/100gnu+freedo.patch")) |
ac47a7c2 LC |
180 | (sha256 |
181 | (base32 | |
182 | "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06")))) | |
183 | ||
c258807a | 184 | (define* (kernel-config arch #:key variant) |
a94546ec | 185 | "Return the absolute file name of the Linux-Libre build configuration file |
c258807a DC |
186 | for ARCH and optionally VARIANT, or #f if there is no such configuration." |
187 | (let* ((name (string-append "linux-libre-" | |
188 | (if variant (string-append variant "-") "") | |
25847b32 | 189 | (if (string=? "i386" arch) "i686" arch) ".conf")) |
c258807a | 190 | (file (string-append "gnu/packages/" name))) |
d6feaf6e | 191 | (search-path %load-path file))) |
a94546ec | 192 | |
90c18c32 | 193 | (define %default-extra-linux-options |
50dbc036 | 194 | `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html |
b9f7895d DC |
195 | ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t) |
196 | ;; Modules required for initrd: | |
197 | ("CONFIG_NET_9P" . m) | |
198 | ("CONFIG_NET_9P_VIRTIO" . m) | |
199 | ("CONFIG_VIRTIO_BLK" . m) | |
200 | ("CONFIG_VIRTIO_NET" . m) | |
201 | ("CONFIG_VIRTIO_PCI" . m) | |
202 | ("CONFIG_VIRTIO_BALLOON" . m) | |
203 | ("CONFIG_VIRTIO_MMIO" . m) | |
204 | ("CONFIG_FUSE_FS" . m) | |
205 | ("CONFIG_CIFS" . m) | |
206 | ("CONFIG_9P_FS" . m))) | |
90c18c32 DC |
207 | |
208 | (define (config->string options) | |
209 | (string-join (map (match-lambda | |
210 | ((option . 'm) | |
211 | (string-append option "=m")) | |
212 | ((option . #t) | |
213 | (string-append option "=y")) | |
214 | ((option . #f) | |
215 | (string-append option "=n"))) | |
216 | options) | |
217 | "\n")) | |
218 | ||
3129b9c2 | 219 | (define* (make-linux-libre version hash supported-systems |
c258807a DC |
220 | #:key |
221 | ;; A function that takes an arch and a variant. | |
222 | ;; See kernel-config for an example. | |
a6d01325 | 223 | (extra-version #f) |
c258807a | 224 | (configuration-file #f) |
90c18c32 | 225 | (defconfig "defconfig") |
64de7d1c MW |
226 | (extra-options %default-extra-linux-options) |
227 | (patches (list %boot-logo-patch))) | |
614d1738 | 228 | (package |
a6d01325 DC |
229 | (name (if extra-version |
230 | (string-append "linux-libre-" extra-version) | |
231 | "linux-libre")) | |
c258807a | 232 | (version version) |
614d1738 DC |
233 | (source (origin |
234 | (method url-fetch) | |
235 | (uri (linux-libre-urls version)) | |
c258807a | 236 | (sha256 (base32 hash)) |
64de7d1c | 237 | (patches patches))) |
3129b9c2 | 238 | (supported-systems supported-systems) |
614d1738 | 239 | (build-system gnu-build-system) |
614d1738 DC |
240 | (native-inputs |
241 | `(("perl" ,perl) | |
242 | ("bc" ,bc) | |
243 | ("openssl" ,openssl) | |
78edcccc | 244 | ("kmod" ,kmod) |
0b759869 DC |
245 | ,@(if configuration-file |
246 | `(("kconfig" ,(configuration-file | |
247 | (system->linux-architecture | |
248 | (or (%current-target-system) | |
249 | (%current-system))) | |
250 | #:variant (version-major+minor version)))) | |
251 | '()))) | |
614d1738 DC |
252 | (arguments |
253 | `(#:modules ((guix build gnu-build-system) | |
254 | (guix build utils) | |
255 | (srfi srfi-1) | |
256 | (ice-9 match)) | |
257 | #:phases | |
258 | (modify-phases %standard-phases | |
9416459b | 259 | (replace 'configure |
4b42703e | 260 | (lambda* (#:key inputs native-inputs target #:allow-other-keys) |
96e9f097 RN |
261 | ;; Avoid introducing timestamps |
262 | (setenv "KCONFIG_NOTIMESTAMP" "1") | |
263 | (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH")) | |
264 | ||
4b42703e | 265 | ;; Set ARCH and CROSS_COMPILE |
6d7ef2aa DC |
266 | (let ((arch ,(system->linux-architecture |
267 | (or (%current-target-system) | |
268 | (%current-system))))) | |
4b42703e DC |
269 | (setenv "ARCH" arch) |
270 | (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")) | |
6d7ef2aa | 271 | |
4b42703e DC |
272 | (when target |
273 | (setenv "CROSS_COMPILE" (string-append target "-")) | |
274 | (format #t "`CROSS_COMPILE' set to `~a'~%" | |
275 | (getenv "CROSS_COMPILE")))) | |
beacfcab | 276 | |
a6d01325 DC |
277 | (setenv "EXTRA_VERSION" ,extra-version) |
278 | ||
a94546ec LC |
279 | (let ((build (assoc-ref %standard-phases 'build)) |
280 | (config (assoc-ref inputs "kconfig"))) | |
1650dd8a | 281 | |
e4e9c0a0 DC |
282 | ;; Use a custom kernel configuration file or a default |
283 | ;; configuration file. | |
1650dd8a LC |
284 | (if config |
285 | (begin | |
286 | (copy-file config ".config") | |
287 | (chmod ".config" #o666)) | |
c258807a | 288 | (system* "make" ,defconfig)) |
a94546ec LC |
289 | |
290 | ;; Appending works even when the option wasn't in the | |
291 | ;; file. The last one prevails if duplicated. | |
90c18c32 DC |
292 | (let ((port (open-file ".config" "a")) |
293 | (extra-configuration ,(config->string extra-options))) | |
294 | (display extra-configuration port) | |
a94546ec LC |
295 | (close-port port)) |
296 | ||
9416459b | 297 | (zero? (system* "make" "oldconfig"))))) |
614d1738 | 298 | (replace 'install |
4b42703e | 299 | (lambda* (#:key inputs native-inputs outputs #:allow-other-keys) |
beacfcab LC |
300 | (let* ((out (assoc-ref outputs "out")) |
301 | (moddir (string-append out "/lib/modules")) | |
e4e9c0a0 DC |
302 | (dtbdir (string-append out "/lib/dtbs")) |
303 | (kmod (assoc-ref (or native-inputs inputs) "kmod"))) | |
304 | ;; Install kernel image, kernel configuration and link map. | |
305 | (for-each (lambda (file) (install-file file out)) | |
306 | (find-files "." "^(\\.config|bzImage|zImage|vmlinuz|System\\.map)$")) | |
307 | ;; Install device tree files | |
308 | (for-each (lambda (file) (install-file file dtbdir)) | |
309 | (find-files "." "\\.dtb$")) | |
310 | ;; Install kernel modules | |
beacfcab | 311 | (mkdir-p moddir) |
beacfcab | 312 | (zero? (system* "make" |
78edcccc | 313 | (string-append "DEPMOD=" kmod "/bin/depmod") |
beacfcab LC |
314 | (string-append "MODULE_DIR=" moddir) |
315 | (string-append "INSTALL_PATH=" out) | |
316 | (string-append "INSTALL_MOD_PATH=" out) | |
cda3d81e | 317 | "INSTALL_MOD_STRIP=1" |
beacfcab | 318 | "modules_install")))))) |
beacfcab | 319 | #:tests? #f)) |
614d1738 | 320 | (home-page "http://www.gnu.org/software/linux-libre/") |
f50d2669 | 321 | (synopsis "100% free redistribution of a cleaned Linux kernel") |
a22dc0c4 | 322 | (description |
79c311b8 LC |
323 | "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel. |
324 | It has been modified to remove all non-free binary blobs.") | |
614d1738 | 325 | (license license:gpl2))) |
beacfcab | 326 | |
3129b9c2 DC |
327 | (define %intel-compatible-systems '("x86_64-linux" "i686-linux")) |
328 | ||
c258807a | 329 | (define-public linux-libre |
e9913f82 MW |
330 | (make-linux-libre "4.8.12" |
331 | "1vhqpi5r219a9y1drc3pdzwjif8r974hbc0x9dk4w25c8bsr3cm1" | |
3129b9c2 | 332 | %intel-compatible-systems |
c258807a DC |
333 | #:configuration-file kernel-config)) |
334 | ||
75b314a6 | 335 | (define-public linux-libre-4.4 |
bc6d4612 MW |
336 | (make-linux-libre "4.4.36" |
337 | "0cvax02jj9zyk818gi6fjgacxa5z89y03kxwclb8l7cr8mcbwcdf" | |
3129b9c2 | 338 | %intel-compatible-systems |
c258807a | 339 | #:configuration-file kernel-config)) |
75b314a6 | 340 | |
adddd5ba | 341 | (define-public linux-libre-4.1 |
80a359f2 MW |
342 | (make-linux-libre "4.1.36" |
343 | "0wy7xpqjwn1aprbzrbqgjskcg8qj2mczkv3rcisxf8gcdifz61qh" | |
3129b9c2 | 344 | %intel-compatible-systems |
e9a19bde | 345 | #:configuration-file kernel-config)) |
adddd5ba | 346 | |
cde7c23f | 347 | ;; Avoid rebuilding kernel variants when there is a minor version bump. |
e9913f82 MW |
348 | (define %linux-libre-version "4.8.12") |
349 | (define %linux-libre-hash "1vhqpi5r219a9y1drc3pdzwjif8r974hbc0x9dk4w25c8bsr3cm1") | |
cde7c23f DC |
350 | |
351 | (define-public linux-libre-arm-generic | |
352 | (make-linux-libre %linux-libre-version | |
353 | %linux-libre-hash | |
354 | '("armhf-linux") | |
355 | #:defconfig "multi_v7_defconfig" | |
356 | #:extra-version "arm-generic")) | |
357 | ||
97121c2a | 358 | \f |
c84d0eca LC |
359 | ;;; |
360 | ;;; Pluggable authentication modules (PAM). | |
361 | ;;; | |
362 | ||
fd76c904 LC |
363 | (define-public linux-pam |
364 | (package | |
365 | (name "linux-pam") | |
7483230f | 366 | (version "1.3.0") |
fd76c904 LC |
367 | (source |
368 | (origin | |
369 | (method url-fetch) | |
7483230f DC |
370 | (uri (string-append |
371 | "http://www.linux-pam.org/library/" | |
372 | "Linux-PAM-" version ".tar.bz2")) | |
fd76c904 LC |
373 | (sha256 |
374 | (base32 | |
411264c2 RS |
375 | "1fyi04d5nsh8ivd0rn2y0z83ylgc0licz7kifbb6xxi2ylgfs6i4")) |
376 | (patches (search-patches "linux-pam-no-setfsuid.patch")))) | |
377 | ||
fd76c904 | 378 | (build-system gnu-build-system) |
c4c4cc05 | 379 | (native-inputs |
fd76c904 LC |
380 | `(("flex" ,flex) |
381 | ||
382 | ;; TODO: optional dependencies | |
383 | ;; ("libxcrypt" ,libxcrypt) | |
384 | ;; ("cracklib" ,cracklib) | |
385 | )) | |
386 | (arguments | |
c134056a LC |
387 | '(;; Most users, such as `shadow', expect the headers to be under |
388 | ;; `security'. | |
389 | #:configure-flags (list (string-append "--includedir=" | |
390 | (assoc-ref %outputs "out") | |
391 | "/include/security")) | |
392 | ||
393 | ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d | |
394 | ;; isn't available. | |
395 | #:tests? #f)) | |
fd76c904 LC |
396 | (home-page "http://www.linux-pam.org/") |
397 | (synopsis "Pluggable authentication modules for Linux") | |
398 | (description | |
399 | "A *Free* project to implement OSF's RFC 86.0. | |
400 | Pluggable authentication modules are small shared object files that can | |
401 | be used through the PAM API to perform tasks, like authenticating a user | |
e881752c | 402 | at login. Local and dynamic reconfiguration are its key features.") |
3ac73271 | 403 | (license license:bsd-3))) |
686f14e8 | 404 | |
4c93ce42 EF |
405 | (define-public linux-pam-1.2 |
406 | (package | |
407 | (inherit linux-pam) | |
4c93ce42 EF |
408 | (version "1.2.1") |
409 | (source | |
410 | (origin | |
411 | (method url-fetch) | |
412 | (uri (string-append | |
413 | "http://www.linux-pam.org/library/" | |
414 | "Linux-PAM-" version ".tar.bz2")) | |
415 | (sha256 | |
416 | (base32 | |
411264c2 RS |
417 | "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl")) |
418 | (patches (search-patches "linux-pam-no-setfsuid.patch")))))) | |
4c93ce42 | 419 | |
53142109 | 420 | |
c84d0eca LC |
421 | ;;; |
422 | ;;; Miscellaneous. | |
423 | ;;; | |
424 | ||
686f14e8 LC |
425 | (define-public psmisc |
426 | (package | |
427 | (name "psmisc") | |
428 | (version "22.20") | |
429 | (source | |
430 | (origin | |
431 | (method url-fetch) | |
432 | (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-" | |
433 | version ".tar.gz")) | |
434 | (sha256 | |
435 | (base32 | |
436 | "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi")))) | |
437 | (build-system gnu-build-system) | |
438 | (inputs `(("ncurses" ,ncurses))) | |
439 | (home-page "http://psmisc.sourceforge.net/") | |
440 | (synopsis | |
8f65585b | 441 | "Small utilities that use the proc file system") |
686f14e8 LC |
442 | (description |
443 | "This PSmisc package is a set of some small useful utilities that | |
8f65585b | 444 | use the proc file system. We're not about changing the world, but |
686f14e8 | 445 | providing the system administrator with some help in common tasks.") |
3ac73271 | 446 | (license license:gpl2+))) |
02b80c3f NK |
447 | |
448 | (define-public util-linux | |
449 | (package | |
450 | (name "util-linux") | |
f041616d | 451 | (version "2.28.1") |
5a6a3ba4 LC |
452 | (source (origin |
453 | (method url-fetch) | |
454 | (uri (string-append "mirror://kernel.org/linux/utils/" | |
9f533d60 LC |
455 | name "/v" (version-major+minor version) "/" |
456 | name "-" version ".tar.xz")) | |
5a6a3ba4 LC |
457 | (sha256 |
458 | (base32 | |
f041616d | 459 | "03xnaw3c7pavxvvh1vnimcr44hlhhf25whawiyv8dxsflfj4xkiy")) |
fc1adab1 | 460 | (patches (search-patches "util-linux-tests.patch")) |
9d77da2a LC |
461 | (modules '((guix build utils))) |
462 | (snippet | |
ec2da92c LC |
463 | ;; We take the 'logger' program from GNU Inetutils and 'kill' |
464 | ;; from GNU Coreutils. | |
8338c241 MW |
465 | '(begin |
466 | (substitute* "configure" | |
467 | (("build_logger=yes") "build_logger=no") | |
468 | (("build_kill=yes") "build_kill=no")) | |
469 | #t)))) | |
02b80c3f | 470 | (build-system gnu-build-system) |
dd581e9a TGR |
471 | (outputs '("out" |
472 | "static")) ; >2 MiB of static .a libraries | |
02b80c3f | 473 | (arguments |
29ec55ee | 474 | `(#:configure-flags (list "--disable-use-tty-group" |
29ec55ee LC |
475 | |
476 | ;; Install completions where our | |
477 | ;; bash-completion package expects them. | |
478 | (string-append "--with-bashcompletiondir=" | |
479 | (assoc-ref %outputs "out") | |
480 | "/etc/bash_completion.d")) | |
1b9cf4ad | 481 | #:phases (modify-phases %standard-phases |
7e512497 LC |
482 | (add-before |
483 | 'build 'set-umount-file-name | |
484 | (lambda* (#:key outputs #:allow-other-keys) | |
485 | ;; Tell 'eject' the right file name of 'umount'. | |
486 | (let ((out (assoc-ref outputs "out"))) | |
487 | (substitute* "sys-utils/eject.c" | |
488 | (("\"/bin/umount\"") | |
489 | (string-append "\"" out "/bin/umount\""))) | |
490 | #t))) | |
1b9cf4ad LC |
491 | (add-before |
492 | 'check 'pre-check | |
493 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
494 | (let ((out (assoc-ref outputs "out")) | |
495 | (net (assoc-ref inputs "net-base"))) | |
496 | ;; Change the test to refer to the right file. | |
497 | (substitute* "tests/ts/misc/mcookie" | |
498 | (("/etc/services") | |
499 | (string-append net "/etc/services"))) | |
dd581e9a TGR |
500 | #t))) |
501 | (add-after | |
502 | 'install 'move-static-libraries | |
503 | (lambda* (#:key outputs #:allow-other-keys) | |
504 | (let ((out (assoc-ref outputs "out")) | |
505 | (static (assoc-ref outputs "static"))) | |
506 | (mkdir-p (string-append static "/lib")) | |
507 | (with-directory-excursion out | |
508 | (for-each (lambda (file) | |
509 | (rename-file file | |
510 | (string-append static "/" | |
511 | file))) | |
512 | (find-files "lib" "\\.a$"))) | |
1b9cf4ad | 513 | #t)))))) |
f61e0e79 | 514 | (inputs `(("zlib" ,zlib) |
c4c4cc05 JD |
515 | ("ncurses" ,ncurses))) |
516 | (native-inputs | |
9f533d60 LC |
517 | `(("perl" ,perl) |
518 | ("net-base" ,net-base))) ;for tests | |
02b80c3f | 519 | (home-page "https://www.kernel.org/pub/linux/utils/util-linux/") |
35ec07c7 | 520 | (synopsis "Collection of utilities for the Linux kernel") |
437d7286 | 521 | (description "Util-linux is a diverse collection of Linux kernel |
8f65585b | 522 | utilities. It provides dmesg and includes tools for working with file systems, |
437d7286 | 523 | block devices, UUIDs, TTYs, and many other tools.") |
fe8ccfcc | 524 | |
02b80c3f | 525 | ;; Note that util-linux doesn't use the same license for all the |
fe8ccfcc | 526 | ;; code. GPLv2+ is the default license for a code without an |
02b80c3f | 527 | ;; explicitly defined license. |
3ac73271 LC |
528 | (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+ |
529 | license:bsd-4 license:public-domain)))) | |
5d5c4278 | 530 | |
e47e3eff LC |
531 | (define-public procps |
532 | (package | |
533 | (name "procps") | |
74a3c4bb | 534 | (version "3.3.12") |
e47e3eff | 535 | (source (origin |
0cc22848 SB |
536 | (method url-fetch) |
537 | (uri (string-append "mirror://sourceforge/procps-ng/Production/" | |
538 | "procps-ng-" version ".tar.xz")) | |
539 | (sha256 | |
540 | (base32 | |
74a3c4bb | 541 | "1m57w6jmry84njd5sgk5afycbglql0al80grx027kwqqcfw5mmkf")))) |
e47e3eff | 542 | (build-system gnu-build-system) |
e47e3eff | 543 | (arguments |
80393eed LC |
544 | '(#:modules ((guix build utils) |
545 | (guix build gnu-build-system) | |
546 | (srfi srfi-1) | |
547 | (srfi srfi-26)) | |
0cc22848 SB |
548 | #:phases |
549 | (modify-phases %standard-phases | |
241826b5 LC |
550 | (add-before 'check 'disable-strtod-test |
551 | (lambda _ | |
552 | ;; Disable the 'strtod' test, which fails on 32-bit systems. | |
553 | ;; This is what upstream does: | |
554 | ;; <https://gitlab.com/procps-ng/procps/commit/100afbc1491be388f1429021ff65d969f4b1e08f>. | |
555 | (substitute* "Makefile" | |
556 | (("^(TESTS|check_PROGRAMS) = .*$" all) | |
557 | (string-append "# " all "\n"))) | |
558 | #t)) | |
0cc22848 SB |
559 | (add-after |
560 | 'install 'post-install | |
561 | ;; Remove commands and man pages redudant with | |
562 | ;; Coreutils. | |
563 | (lambda* (#:key outputs #:allow-other-keys) | |
564 | (let* ((out (assoc-ref outputs "out")) | |
565 | (dup (append-map (cut find-files out <>) | |
566 | '("^kill" "^uptime")))) | |
567 | (for-each delete-file dup) | |
568 | #t)))))) | |
569 | (inputs `(("ncurses" ,ncurses))) | |
570 | (home-page "https://gitlab.com/procps-ng/procps/") | |
35ec07c7 | 571 | (synopsis "Utilities that give information about processes") |
e47e3eff | 572 | (description |
35b9e423 | 573 | "Procps is the package that has a bunch of small useful utilities |
e47e3eff LC |
574 | that give information about processes using the Linux /proc file system. |
575 | The package includes the programs ps, top, vmstat, w, kill, free, | |
576 | slabtop, and skill.") | |
3ac73271 | 577 | (license license:gpl2))) |
e47e3eff | 578 | |
5d5c4278 NK |
579 | (define-public usbutils |
580 | (package | |
581 | (name "usbutils") | |
582 | (version "006") | |
583 | (source | |
584 | (origin | |
585 | (method url-fetch) | |
586 | (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/" | |
587 | "usbutils-" version ".tar.xz")) | |
588 | (sha256 | |
589 | (base32 | |
590 | "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr")))) | |
591 | (build-system gnu-build-system) | |
592 | (inputs | |
c4c4cc05 JD |
593 | `(("libusb" ,libusb))) |
594 | (native-inputs | |
595 | `(("pkg-config" ,pkg-config))) | |
5d5c4278 NK |
596 | (home-page "http://www.linux-usb.org/") |
597 | (synopsis | |
598 | "Tools for working with USB devices, such as lsusb") | |
599 | (description | |
600 | "Tools for working with USB devices, such as lsusb.") | |
3ac73271 | 601 | (license license:gpl2+))) |
0750452a LC |
602 | |
603 | (define-public e2fsprogs | |
604 | (package | |
605 | (name "e2fsprogs") | |
7409c8d4 | 606 | (version "1.42.13") |
0750452a LC |
607 | (source (origin |
608 | (method url-fetch) | |
7409c8d4 MW |
609 | (uri (string-append |
610 | "mirror://kernel.org/linux/kernel/people/tytso/" | |
611 | name "/v" version "/" | |
612 | name "-" version ".tar.xz")) | |
0750452a LC |
613 | (sha256 |
614 | (base32 | |
7409c8d4 | 615 | "1ix0b83zgw5n0p2grh2961c6796m92yr2jqc2sbr23x3lfsp8r71")) |
7c594a2c LC |
616 | (modules '((guix build utils))) |
617 | (snippet | |
618 | '(substitute* "MCONFIG.in" | |
619 | (("INSTALL_SYMLINK = /bin/sh") | |
620 | "INSTALL_SYMLINK = sh"))))) | |
0750452a | 621 | (build-system gnu-build-system) |
c4c4cc05 | 622 | (inputs `(("util-linux" ,util-linux))) |
f57d2639 | 623 | (native-inputs `(("pkg-config" ,pkg-config) |
7c594a2c | 624 | ("texinfo" ,texinfo))) ;for the libext2fs Info manual |
0750452a | 625 | (arguments |
7d453656 LF |
626 | '(;; Parallel building reliably yields a failure like this: |
627 | ;; "make[2]: *** No rule to make target '../lib/libss.so', needed by | |
14594760 | 628 | ;; 'debugfs'. Stop." |
7d453656 LF |
629 | #:parallel-build? #f |
630 | ;; util-linux is the preferred source for some of the libraries and | |
c44ed26c | 631 | ;; commands, so disable them (see, e.g., |
a124bbd2 | 632 | ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.) |
c44ed26c LC |
633 | #:configure-flags '("--disable-libblkid" |
634 | "--disable-libuuid" "--disable-uuidd" | |
635 | "--disable-fsck" | |
7c594a2c LC |
636 | |
637 | ;; Install libext2fs et al. | |
638 | "--enable-elf-shlibs") | |
639 | ||
640 | #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" | |
641 | (assoc-ref %outputs "out") | |
642 | "/lib")) | |
ddfc2fd8 LC |
643 | |
644 | #:phases (alist-cons-before | |
0750452a LC |
645 | 'configure 'patch-shells |
646 | (lambda _ | |
647 | (substitute* "configure" | |
648 | (("/bin/sh (.*)parse-types.sh" _ dir) | |
649 | (string-append (which "sh") " " dir | |
650 | "parse-types.sh"))) | |
651 | (substitute* (find-files "." "^Makefile.in$") | |
652 | (("#!/bin/sh") | |
653 | (string-append "#!" (which "sh"))))) | |
1c975f60 LC |
654 | (alist-cons-after |
655 | 'install 'install-libs | |
853c2f18 LC |
656 | (lambda* (#:key outputs #:allow-other-keys) |
657 | (let* ((out (assoc-ref outputs "out")) | |
658 | (lib (string-append out "/lib"))) | |
659 | (and (zero? (system* "make" "install-libs")) | |
660 | ||
661 | ;; Make the .a writable so that 'strip' works. | |
662 | ;; Failing to do that, due to debug symbols, we | |
663 | ;; retain a reference to the final | |
664 | ;; linux-libre-headers, which refer to the | |
665 | ;; bootstrap binaries. | |
666 | (let ((archives (find-files lib "\\.a$"))) | |
667 | (for-each (lambda (file) | |
668 | (chmod file #o666)) | |
669 | archives) | |
670 | #t)))) | |
1c975f60 | 671 | %standard-phases)) |
0750452a LC |
672 | |
673 | ;; FIXME: Tests work by comparing the stdout/stderr of programs, that | |
674 | ;; they fail because we get an extra line that says "Can't check if | |
8f65585b | 675 | ;; file system is mounted due to missing mtab file". |
0750452a LC |
676 | #:tests? #f)) |
677 | (home-page "http://e2fsprogs.sourceforge.net/") | |
35ec07c7 | 678 | (synopsis "Creating and checking ext2/ext3/ext4 file systems") |
0750452a LC |
679 | (description |
680 | "This package provides tools for manipulating ext2/ext3/ext4 file systems.") | |
3ac73271 LC |
681 | (license (list license:gpl2 ;programs |
682 | license:lgpl2.0 ;libext2fs | |
683 | license:x11)))) ;libuuid | |
d8482ad0 | 684 | |
e48977e7 LC |
685 | (define e2fsprogs/static |
686 | (static-package | |
687 | (package (inherit e2fsprogs) | |
688 | (arguments | |
689 | ;; Do not build shared libraries. | |
690 | (substitute-keyword-arguments (package-arguments e2fsprogs) | |
691 | ((#:configure-flags _) | |
692 | '(list "--disable-blkid")) | |
693 | ((#:make-flags _) | |
694 | '(list))))))) | |
695 | ||
e102f940 LC |
696 | (define-public e2fsck/static |
697 | (package | |
698 | (name "e2fsck-static") | |
0997771a | 699 | (version (package-version e2fsprogs)) |
e102f940 LC |
700 | (build-system trivial-build-system) |
701 | (source #f) | |
702 | (arguments | |
703 | `(#:modules ((guix build utils)) | |
704 | #:builder | |
705 | (begin | |
706 | (use-modules (guix build utils) | |
707 | (ice-9 ftw) | |
708 | (srfi srfi-26)) | |
709 | ||
710 | (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs") | |
711 | "/sbin")) | |
712 | (bin (string-append (assoc-ref %outputs "out") "/sbin"))) | |
713 | (mkdir-p bin) | |
714 | (with-directory-excursion bin | |
715 | (for-each (lambda (file) | |
716 | (copy-file (string-append source "/" file) | |
717 | file) | |
718 | (remove-store-references file) | |
719 | (chmod file #o555)) | |
720 | (scandir source (cut string-prefix? "fsck." <>)))))))) | |
e48977e7 | 721 | (inputs `(("e2fsprogs" ,e2fsprogs/static))) |
e102f940 LC |
722 | (synopsis "Statically-linked fsck.* commands from e2fsprogs") |
723 | (description | |
724 | "This package provides statically-linked command of fsck.ext[234] taken | |
725 | from the e2fsprogs package. It is meant to be used in initrds.") | |
0997771a LC |
726 | (home-page (package-home-page e2fsprogs)) |
727 | (license (package-license e2fsprogs)))) | |
e102f940 | 728 | |
7c0a9104 LC |
729 | (define-public extundelete |
730 | (package | |
731 | (name "extundelete") | |
732 | (version "0.2.4") | |
733 | (source (origin | |
734 | (method url-fetch) | |
735 | (uri (string-append "mirror://sourceforge/extundelete/" | |
de67e922 LF |
736 | "extundelete/" version "/extundelete-" |
737 | version ".tar.bz2")) | |
7c0a9104 LC |
738 | (sha256 |
739 | (base32 | |
740 | "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1")))) | |
741 | (build-system gnu-build-system) | |
742 | (inputs `(("e2fsprogs" ,e2fsprogs))) | |
743 | (home-page "http://extundelete.sourceforge.net/") | |
744 | (synopsis "Recover deleted files from ext2/3/4 partitions") | |
745 | (description | |
746 | "Extundelete is a set of tools that can recover deleted files from an | |
747 | ext3 or ext4 partition.") | |
3ac73271 | 748 | (license license:gpl2))) |
7c0a9104 | 749 | |
1c975f60 LC |
750 | (define-public zerofree |
751 | (package | |
752 | (name "zerofree") | |
753 | (version "1.0.3") | |
754 | (home-page "http://intgat.tigress.co.uk/rmy/uml/") | |
755 | (source (origin | |
756 | (method url-fetch) | |
757 | (uri (string-append home-page name "-" version | |
758 | ".tgz")) | |
759 | (sha256 | |
760 | (base32 | |
761 | "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs")))) | |
762 | (build-system gnu-build-system) | |
763 | (arguments | |
764 | '(#:phases (alist-replace | |
765 | 'install | |
766 | (lambda* (#:key outputs #:allow-other-keys) | |
767 | (let* ((out (assoc-ref outputs "out")) | |
768 | (bin (string-append out "/bin"))) | |
769 | (mkdir-p bin) | |
770 | (copy-file "zerofree" | |
771 | (string-append bin "/zerofree")) | |
772 | (chmod (string-append bin "/zerofree") | |
773 | #o555) | |
774 | #t)) | |
775 | (alist-delete 'configure %standard-phases)) | |
776 | #:tests? #f)) ;no tests | |
777 | (inputs `(("libext2fs" ,e2fsprogs))) | |
778 | (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems") | |
779 | (description | |
780 | "The zerofree command scans the free blocks in an ext2 file system and | |
781 | fills any non-zero blocks with zeroes. This is a useful way to make disk | |
782 | images more compressible.") | |
3ac73271 | 783 | (license license:gpl2))) |
1c975f60 | 784 | |
d8482ad0 LC |
785 | (define-public strace |
786 | (package | |
787 | (name "strace") | |
788 | (version "4.7") | |
789 | (source (origin | |
790 | (method url-fetch) | |
de67e922 LF |
791 | (uri (string-append "mirror://sourceforge/strace/strace/" version |
792 | "/strace-" version ".tar.xz")) | |
d8482ad0 LC |
793 | (sha256 |
794 | (base32 | |
795 | "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764")))) | |
796 | (build-system gnu-build-system) | |
c4c4cc05 | 797 | (native-inputs `(("perl" ,perl))) |
d8482ad0 LC |
798 | (home-page "http://strace.sourceforge.net/") |
799 | (synopsis "System call tracer for Linux") | |
800 | (description | |
801 | "strace is a system call tracer, i.e. a debugging tool which prints out a | |
802 | trace of all the system calls made by a another process/program.") | |
3ac73271 | 803 | (license license:bsd-3))) |
ba04571a | 804 | |
e1e27737 TUBK |
805 | (define-public ltrace |
806 | (package | |
807 | (name "ltrace") | |
808 | (version "0.7.3") | |
809 | (source (origin | |
810 | (method url-fetch) | |
811 | (uri (string-append "http://www.ltrace.org/ltrace_" version | |
812 | ".orig.tar.bz2")) | |
813 | (sha256 | |
814 | (base32 | |
815 | "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf")))) | |
816 | (build-system gnu-build-system) | |
817 | (inputs `(("libelf" ,libelf))) | |
818 | (arguments | |
819 | ;; Compilation uses -Werror by default, but it fails. | |
820 | '(#:configure-flags '("--disable-werror"))) | |
821 | (home-page "http://www.ltrace.org/") | |
822 | (synopsis "Library call tracer for Linux") | |
823 | (description | |
824 | "ltrace intercepts and records dynamic library calls which are called by | |
825 | an executed process and the signals received by that process. It can also | |
826 | intercept and print the system calls executed by the program.") | |
3ac73271 | 827 | (license license:gpl2+))) |
e1e27737 | 828 | |
ba04571a LC |
829 | (define-public alsa-lib |
830 | (package | |
831 | (name "alsa-lib") | |
832 | (version "1.0.27.1") | |
833 | (source (origin | |
834 | (method url-fetch) | |
835 | (uri (string-append | |
836 | "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-" | |
837 | version ".tar.bz2")) | |
838 | (sha256 | |
839 | (base32 | |
bcd94e19 | 840 | "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9")) |
fc1adab1 | 841 | (patches (search-patches "alsa-lib-mips-atomic-fix.patch")))) |
ba04571a LC |
842 | (build-system gnu-build-system) |
843 | (home-page "http://www.alsa-project.org/") | |
844 | (synopsis "The Advanced Linux Sound Architecture libraries") | |
845 | (description | |
846 | "The Advanced Linux Sound Architecture (ALSA) provides audio and | |
847 | MIDI functionality to the Linux-based operating system.") | |
3ac73271 | 848 | (license license:lgpl2.1+))) |
10afdf50 | 849 | |
17b293a0 LC |
850 | (define-public alsa-utils |
851 | (package | |
852 | (name "alsa-utils") | |
43043f23 | 853 | (version "1.1.2") |
17b293a0 LC |
854 | (source (origin |
855 | (method url-fetch) | |
992b527d EF |
856 | (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/" |
857 | name "-" version ".tar.bz2")) | |
17b293a0 LC |
858 | (sha256 |
859 | (base32 | |
43043f23 | 860 | "0wcha78c2sm8qqk5r3w83cvm8fp6fb1zpd35kmcm24kxhz007xks")))) |
17b293a0 LC |
861 | (build-system gnu-build-system) |
862 | (arguments | |
863 | ;; XXX: Disable man page creation until we have DocBook. | |
864 | '(#:configure-flags (list "--disable-xmlto" | |
f2817d43 LC |
865 | |
866 | ;; The udev rule is responsible for restoring | |
867 | ;; the volume. | |
17b293a0 LC |
868 | (string-append "--with-udev-rules-dir=" |
869 | (assoc-ref %outputs "out") | |
870 | "/lib/udev/rules.d")) | |
49165145 EF |
871 | #:phases |
872 | (modify-phases %standard-phases | |
873 | (add-before | |
874 | 'install 'pre-install | |
875 | (lambda _ | |
876 | ;; Don't try to mkdir /var/lib/alsa. | |
877 | (substitute* "Makefile" | |
878 | (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*") | |
879 | "true\n"))))))) | |
17b293a0 LC |
880 | (inputs |
881 | `(("libsamplerate" ,libsamplerate) | |
882 | ("ncurses" ,ncurses) | |
883 | ("alsa-lib" ,alsa-lib) | |
884 | ("xmlto" ,xmlto) | |
b94a6ca0 | 885 | ("gettext" ,gettext-minimal))) |
17b293a0 LC |
886 | (home-page "http://www.alsa-project.org/") |
887 | (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)") | |
888 | (description | |
889 | "The Advanced Linux Sound Architecture (ALSA) provides audio and | |
890 | MIDI functionality to the Linux-based operating system.") | |
891 | ||
892 | ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are | |
893 | ;; GPLv2-only. | |
3ac73271 | 894 | (license license:gpl2))) |
17b293a0 | 895 | |
10afdf50 LC |
896 | (define-public iptables |
897 | (package | |
898 | (name "iptables") | |
ac9fc78f | 899 | (version "1.4.21") |
10afdf50 LC |
900 | (source (origin |
901 | (method url-fetch) | |
902 | (uri (string-append | |
903 | "http://www.netfilter.org/projects/iptables/files/iptables-" | |
904 | version ".tar.bz2")) | |
905 | (sha256 | |
906 | (base32 | |
ac9fc78f | 907 | "1q6kg7sf0pgpq0qhab6sywl23cngxxfzc9zdzscsba8x09l4q02j")))) |
10afdf50 | 908 | (build-system gnu-build-system) |
50c26d9e SB |
909 | (arguments |
910 | '(#:tests? #f ; no test suite | |
911 | #:configure-flags ; add $libdir to the RUNPATH of executables | |
912 | (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")))) | |
10afdf50 LC |
913 | (home-page "http://www.netfilter.org/projects/iptables/index.html") |
914 | (synopsis "Program to configure the Linux IP packet filtering rules") | |
915 | (description | |
916 | "iptables is the userspace command line program used to configure the | |
35e4b3d5 | 917 | Linux 2.4.x and later IPv4 packet filtering ruleset (firewall). It is targeted at |
10afdf50 LC |
918 | system administrators. Since Network Address Translation is also configured |
919 | from the packet filter ruleset, iptables is used for this, too. The iptables | |
920 | package also includes ip6tables. ip6tables is used for configuring the IPv6 | |
921 | packet filter.") | |
3ac73271 | 922 | (license license:gpl2+))) |
90a0048f LC |
923 | |
924 | (define-public iproute | |
925 | (package | |
926 | (name "iproute2") | |
e777d07d | 927 | (version "4.8.0") |
90a0048f | 928 | (source (origin |
75cd4b05 AK |
929 | (method url-fetch) |
930 | (uri (string-append | |
931 | "mirror://kernel.org/linux/utils/net/iproute2/iproute2-" | |
932 | version ".tar.xz")) | |
933 | (sha256 | |
934 | (base32 | |
e777d07d | 935 | "12dk5hn1zlraqk2p0z8dv2xgsz0x9v8l3vcvf51fzj0v8b45j2d3")))) |
90a0048f LC |
936 | (build-system gnu-build-system) |
937 | (arguments | |
938 | `(#:tests? #f ; no test suite | |
939 | #:make-flags (let ((out (assoc-ref %outputs "out"))) | |
940 | (list "DESTDIR=" | |
e777d07d LF |
941 | (string-append "BASH_COMPDIR=" out |
942 | "/etc/bash_completion.d") | |
90a0048f LC |
943 | (string-append "LIBDIR=" out "/lib") |
944 | (string-append "SBINDIR=" out "/sbin") | |
945 | (string-append "CONFDIR=" out "/etc") | |
946 | (string-append "DOCDIR=" out "/share/doc/" | |
947 | ,name "-" ,version) | |
948 | (string-append "MANDIR=" out "/share/man"))) | |
b53e44fb AK |
949 | #:phases (modify-phases %standard-phases |
950 | (add-before 'install 'pre-install | |
951 | (lambda _ | |
952 | ;; Don't attempt to create /var/lib/arpd. | |
953 | (substitute* "Makefile" | |
954 | (("^.*ARPDDIR.*$") ""))))))) | |
90a0048f LC |
955 | (inputs |
956 | `(("iptables" ,iptables) | |
c4c4cc05 JD |
957 | ("db4" ,bdb))) |
958 | (native-inputs | |
959 | `(("pkg-config" ,pkg-config) | |
90a0048f LC |
960 | ("flex" ,flex) |
961 | ("bison" ,bison))) | |
962 | (home-page | |
963 | "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2") | |
964 | (synopsis | |
9e771e3b | 965 | "Utilities for controlling TCP/IP networking and traffic in Linux") |
90a0048f LC |
966 | (description |
967 | "Iproute2 is a collection of utilities for controlling TCP/IP | |
968 | networking and traffic with the Linux kernel. | |
969 | ||
970 | Most network configuration manuals still refer to ifconfig and route as the | |
971 | primary network configuration tools, but ifconfig is known to behave | |
972 | inadequately in modern network environments. They should be deprecated, but | |
973 | most distros still include them. Most network configuration systems make use | |
974 | of ifconfig and thus provide a limited feature set. The /etc/net project aims | |
975 | to support most modern network technologies, as it doesn't use ifconfig and | |
976 | allows a system administrator to make use of all iproute2 features, including | |
977 | traffic control. | |
978 | ||
979 | iproute2 is usually shipped in a package called iproute or iproute2 and | |
980 | consists of several tools, of which the most important are ip and tc. ip | |
981 | controls IPv4 and IPv6 configuration and tc stands for traffic control. Both | |
982 | tools print detailed usage messages and are accompanied by a set of | |
983 | manpages.") | |
3ac73271 | 984 | (license license:gpl2+))) |
85e0dc6a LC |
985 | |
986 | (define-public net-tools | |
987 | ;; XXX: This package is basically unmaintained, but it provides a few | |
988 | ;; commands not yet provided by Inetutils, such as 'route', so we have to | |
989 | ;; live with it. | |
990 | (package | |
991 | (name "net-tools") | |
992 | (version "1.60") | |
6b55ee88 | 993 | (home-page "http://net-tools.sourceforge.net/") |
85e0dc6a LC |
994 | (source (origin |
995 | (method url-fetch) | |
6b55ee88 LC |
996 | (uri (list (string-append |
997 | "mirror://sourceforge/net-tools/net-tools-" | |
998 | version ".tar.bz2") | |
999 | (string-append | |
1000 | "http://distro.ibiblio.org/rootlinux/rootlinux-ports" | |
1001 | "/base/net-tools/net-tools-1.60.tar.bz2"))) | |
85e0dc6a LC |
1002 | (sha256 |
1003 | (base32 | |
177088a3 | 1004 | "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s")) |
fc1adab1 | 1005 | (patches (search-patches "net-tools-bitrot.patch")))) |
85e0dc6a LC |
1006 | (build-system gnu-build-system) |
1007 | (arguments | |
c9e0a44e LC |
1008 | '(#:modules ((guix build gnu-build-system) |
1009 | (guix build utils) | |
1010 | (srfi srfi-1) | |
1011 | (srfi srfi-26)) | |
1012 | #:phases (alist-cons-after | |
cd143df0 | 1013 | 'unpack 'patch |
85e0dc6a LC |
1014 | (lambda* (#:key inputs #:allow-other-keys) |
1015 | (define (apply-patch file) | |
9a224ac2 | 1016 | (zero? (system* "patch" "-p1" "--force" |
85e0dc6a LC |
1017 | "--input" file))) |
1018 | ||
1019 | (let ((patch.gz (assoc-ref inputs "patch"))) | |
1020 | (format #t "applying Debian patch set '~a'...~%" | |
1021 | patch.gz) | |
1022 | (system (string-append "gunzip < " patch.gz " > the-patch")) | |
85e0dc6a LC |
1023 | (and (apply-patch "the-patch") |
1024 | (for-each apply-patch | |
1025 | (find-files "debian/patches" | |
1026 | "\\.patch"))))) | |
1027 | (alist-replace | |
1028 | 'configure | |
1029 | (lambda* (#:key outputs #:allow-other-keys) | |
1030 | (let ((out (assoc-ref outputs "out"))) | |
1031 | (mkdir-p (string-append out "/bin")) | |
1032 | (mkdir-p (string-append out "/sbin")) | |
1033 | ||
1034 | ;; Pretend we have everything... | |
1035 | (system "yes | make config") | |
1036 | ||
a153ff80 MW |
1037 | ;; ... except for the things we don't have. |
1038 | ;; HAVE_AFDECnet requires libdnet, which we don't have. | |
1039 | ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers | |
1040 | ;; that have been removed. | |
85e0dc6a | 1041 | (substitute* '("config.make" "config.h") |
a153ff80 | 1042 | (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") "")))) |
c9e0a44e LC |
1043 | (alist-cons-after |
1044 | 'install 'remove-redundant-commands | |
1045 | (lambda* (#:key outputs #:allow-other-keys) | |
1046 | ;; Remove commands and man pages redundant with | |
1047 | ;; Inetutils. | |
1048 | (let* ((out (assoc-ref outputs "out")) | |
1049 | (dup (append-map (cut find-files out <>) | |
1050 | '("^hostname" | |
1051 | "^(yp|nis|dns)?domainname")))) | |
1052 | (for-each delete-file dup) | |
1053 | #t)) | |
1054 | %standard-phases))) | |
85e0dc6a LC |
1055 | |
1056 | ;; Binaries that depend on libnet-tools.a don't declare that | |
1057 | ;; dependency, making it parallel-unsafe. | |
1058 | #:parallel-build? #f | |
1059 | ||
1060 | #:tests? #f ; no test suite | |
0d55c356 MW |
1061 | #:make-flags (let ((out (assoc-ref %outputs "out"))) |
1062 | (list "CC=gcc" | |
1063 | (string-append "BASEDIR=" out) | |
1064 | (string-append "INSTALLNLSDIR=" out "/share/locale") | |
1065 | (string-append "mandir=/share/man"))))) | |
85e0dc6a LC |
1066 | |
1067 | ;; Use the big Debian patch set (the thing does not even compile out of | |
1068 | ;; the box.) | |
1069 | (inputs `(("patch" ,(origin | |
1070 | (method url-fetch) | |
1071 | (uri | |
1072 | "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz") | |
1073 | (sha256 | |
1074 | (base32 | |
1075 | "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p")))))) | |
b94a6ca0 | 1076 | (native-inputs `(("gettext" ,gettext-minimal))) |
85e0dc6a LC |
1077 | |
1078 | (synopsis "Tools for controlling the network subsystem in Linux") | |
1079 | (description | |
1080 | "This package includes the important tools for controlling the network | |
1081 | subsystem of the Linux kernel. This includes arp, hostname, ifconfig, | |
1082 | netstat, rarp and route. Additionally, this package contains utilities | |
1083 | relating to particular network hardware types (plipconfig, slattach) and | |
1084 | advanced aspects of IP configuration (iptunnel, ipmaddr).") | |
3ac73271 | 1085 | (license license:gpl2+))) |
c762e82e LC |
1086 | |
1087 | (define-public libcap | |
1088 | (package | |
1089 | (name "libcap") | |
f6c2d05c | 1090 | (version "2.24") |
c762e82e LC |
1091 | (source (origin |
1092 | (method url-fetch) | |
c762e82e | 1093 | (uri (string-append |
f6c2d05c LC |
1094 | "mirror://kernel.org/linux/libs/security/linux-privs/" |
1095 | "libcap2/libcap-" version ".tar.xz")) | |
c762e82e LC |
1096 | (sha256 |
1097 | (base32 | |
f6c2d05c | 1098 | "0rbc9qbqs5bp9am9s9g83wxj5k4ixps2agy9dxr1v1fwg27mdr6f")))) |
c762e82e | 1099 | (build-system gnu-build-system) |
6d889daf SB |
1100 | (arguments '(#:phases |
1101 | (modify-phases %standard-phases | |
1102 | (replace 'configure | |
1103 | ;; Add $libdir to the RUNPATH of executables. | |
1104 | (lambda _ | |
1105 | (substitute* "Make.Rules" | |
1106 | (("LDFLAGS := #-g") | |
1107 | (string-append "LDFLAGS := -Wl,-rpath=" | |
1108 | %output "/lib")))))) | |
c762e82e LC |
1109 | #:tests? #f ; no 'check' target |
1110 | #:make-flags (list "lib=lib" | |
1111 | (string-append "prefix=" | |
1112 | (assoc-ref %outputs "out")) | |
1113 | "RAISE_SETFCAP=no"))) | |
1114 | (native-inputs `(("perl" ,perl))) | |
1115 | (inputs `(("attr" ,attr))) | |
1116 | (home-page "https://sites.google.com/site/fullycapable/") | |
1117 | (synopsis "Library for working with POSIX capabilities") | |
1118 | (description | |
35b9e423 | 1119 | "Libcap2 provides a programming interface to POSIX capabilities on |
c762e82e LC |
1120 | Linux-based operating systems.") |
1121 | ||
1122 | ;; License is BSD-3 or GPLv2, at the user's choice. | |
3ac73271 | 1123 | (license license:gpl2))) |
215b6431 LC |
1124 | |
1125 | (define-public bridge-utils | |
1126 | (package | |
1127 | (name "bridge-utils") | |
1128 | (version "1.5") | |
1129 | (source (origin | |
1130 | (method url-fetch) | |
de67e922 LF |
1131 | (uri (string-append "mirror://sourceforge/bridge/bridge/" |
1132 | "bridge-utils-" version ".tar.gz")) | |
215b6431 LC |
1133 | (sha256 |
1134 | (base32 | |
1135 | "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2")))) | |
1136 | (build-system gnu-build-system) | |
1137 | ||
1138 | ;; The tarball lacks all the generated files. | |
1139 | (native-inputs `(("autoconf" ,autoconf) | |
1140 | ("automake" ,automake))) | |
1141 | (arguments | |
722ec722 MW |
1142 | '(#:phases (alist-cons-after |
1143 | 'unpack 'bootstrap | |
215b6431 | 1144 | (lambda _ |
e5c8e4f3 DT |
1145 | ;; Fix "field ‘ip6’ has incomplete type" errors. |
1146 | (substitute* "libbridge/libbridge.h" | |
1147 | (("#include <linux/if_bridge.h>") | |
1148 | "#include <linux/in6.h>\n#include <linux/if_bridge.h>")) | |
1149 | ||
1150 | ;; Ensure that the entire build fails if one of the | |
1151 | ;; sub-Makefiles fails. | |
1152 | (substitute* "Makefile.in" | |
1153 | (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;") | |
1154 | "$(MAKE) $(MFLAGS) -C $$x || exit 1;")) | |
1155 | ||
215b6431 LC |
1156 | (zero? (system* "autoreconf" "-vf"))) |
1157 | %standard-phases) | |
1158 | #:tests? #f)) ; no 'check' target | |
1159 | ||
1160 | (home-page | |
1161 | "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge") | |
1162 | (synopsis "Manipulate Ethernet bridges") | |
1163 | (description | |
1164 | "Utilities for Linux's Ethernet bridging facilities. A bridge is a way | |
1165 | to connect two Ethernet segments together in a protocol independent way. | |
1166 | Packets are forwarded based on Ethernet address, rather than IP address (like | |
1167 | a router). Since forwarding is done at Layer 2, all protocols can go | |
1168 | transparently through a bridge.") | |
3ac73271 | 1169 | (license license:gpl2+))) |
3cc20675 LC |
1170 | |
1171 | (define-public libnl | |
1172 | (package | |
1173 | (name "libnl") | |
bdac3d4b | 1174 | (version "3.2.25") |
3cc20675 LC |
1175 | (source (origin |
1176 | (method url-fetch) | |
1177 | (uri (string-append | |
1178 | "http://www.infradead.org/~tgr/libnl/files/libnl-" | |
1179 | version ".tar.gz")) | |
1180 | (sha256 | |
1181 | (base32 | |
bdac3d4b | 1182 | "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb")))) |
3cc20675 LC |
1183 | (build-system gnu-build-system) |
1184 | (native-inputs `(("flex" ,flex) ("bison" ,bison))) | |
1185 | (home-page "http://www.infradead.org/~tgr/libnl/") | |
1186 | (synopsis "NetLink protocol library suite") | |
1187 | (description | |
1188 | "The libnl suite is a collection of libraries providing APIs to netlink | |
69b4ffcf | 1189 | protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily |
3cc20675 LC |
1190 | between the kernel and user space processes. It was designed to be a more |
1191 | flexible successor to ioctl to provide mainly networking related kernel | |
1192 | configuration and monitoring interfaces.") | |
1193 | ||
1194 | ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like | |
1195 | ;; 'nl-addr-add.c'), so the result is GPLv2-only. | |
3ac73271 | 1196 | (license license:gpl2))) |
023fef7d | 1197 | |
65cd77db MW |
1198 | (define-public iw |
1199 | (package | |
1200 | (name "iw") | |
72f0c5ea | 1201 | (version "4.9") |
65cd77db MW |
1202 | (source (origin |
1203 | (method url-fetch) | |
1204 | (uri (string-append | |
2f9e312a | 1205 | "mirror://kernel.org/software/network/iw/iw-" |
65cd77db MW |
1206 | version ".tar.xz")) |
1207 | (sha256 | |
1208 | (base32 | |
72f0c5ea | 1209 | "1klpvv98bnx1zm6aqalnri2vd7w80scmdaxr2qnblb6mz82whk1j")))) |
65cd77db MW |
1210 | (build-system gnu-build-system) |
1211 | (native-inputs `(("pkg-config" ,pkg-config))) | |
1212 | (inputs `(("libnl" ,libnl))) | |
1213 | (arguments | |
1214 | `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) | |
1215 | "CC=gcc") | |
1216 | #:phases (alist-delete 'configure %standard-phases))) | |
2f9e312a | 1217 | (home-page "https://wireless.wiki.kernel.org/") |
65cd77db MW |
1218 | (synopsis "Tool for configuring wireless devices") |
1219 | (description | |
1220 | "iw is a new nl80211 based CLI configuration utility for wireless | |
2f9e312a | 1221 | devices. It replaces @code{iwconfig}, which is deprecated.") |
3ac73271 | 1222 | (license license:isc))) |
65cd77db | 1223 | |
023fef7d LC |
1224 | (define-public powertop |
1225 | (package | |
1226 | (name "powertop") | |
ebacb0de | 1227 | (version "2.8") |
023fef7d LC |
1228 | (source |
1229 | (origin | |
1230 | (method url-fetch) | |
1231 | (uri (string-append | |
bd60e4e2 | 1232 | "https://01.org/sites/default/files/downloads/powertop/powertop-" |
023fef7d LC |
1233 | version ".tar.gz")) |
1234 | (sha256 | |
1235 | (base32 | |
ebacb0de | 1236 | "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8")))) |
023fef7d | 1237 | (build-system gnu-build-system) |
4c48bf55 ML |
1238 | (arguments |
1239 | '(#:phases | |
1240 | (modify-phases %standard-phases | |
1241 | ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to | |
1242 | ;; allow calibrating the network interface in GuixSD. | |
1243 | (add-after 'unpack 'patch-absolute-file-names | |
1244 | (lambda* (#:key inputs #:allow-other-keys) | |
1245 | (let ((kmod (assoc-ref inputs "kmod"))) | |
1246 | (substitute* (find-files "src" "\\.cpp$") | |
1247 | ;; Give the right 'modprobe' file name so that essential | |
1248 | ;; modules such as msr.ko can be loaded. | |
1249 | (("/sbin/modprobe") (string-append kmod "/bin/modprobe")) | |
1250 | ;; These programs are only needed to calibrate, so using | |
1251 | ;; relative file names avoids adding extra inputs. When they | |
1252 | ;; are missing powertop gracefully handles it. | |
1253 | (("/usr/bin/hcitool") "hcitool") | |
1254 | (("/usr/bin/xset") "xset") | |
1255 | (("/usr/sbin/hciconfig") "hciconfig")) | |
1256 | #t)))))) | |
023fef7d | 1257 | (inputs |
4c48bf55 ML |
1258 | `(("kmod" ,kmod) |
1259 | ("libnl" ,libnl) | |
023fef7d | 1260 | ("ncurses" ,ncurses) |
4c48bf55 ML |
1261 | ("pciutils" ,pciutils) |
1262 | ("zlib" ,zlib))) | |
c4c4cc05 | 1263 | (native-inputs |
ebacb0de | 1264 | `(("pkg-config" ,pkg-config))) |
023fef7d LC |
1265 | (home-page "https://01.org/powertop/") |
1266 | (synopsis "Analyze power consumption on Intel-based laptops") | |
1267 | (description | |
1268 | "PowerTOP is a Linux tool to diagnose issues with power consumption and | |
1269 | power management. In addition to being a diagnostic tool, PowerTOP also has | |
1270 | an interactive mode where the user can experiment various power management | |
1271 | settings for cases where the operating system has not enabled these | |
1272 | settings.") | |
3ac73271 | 1273 | (license license:gpl2))) |
6869e5c9 LC |
1274 | |
1275 | (define-public aumix | |
1276 | (package | |
1277 | (name "aumix") | |
1278 | (version "2.9.1") | |
1279 | (source (origin | |
1280 | (method url-fetch) | |
1281 | (uri (string-append | |
1282 | "http://www.jpj.net/~trevor/aumix/releases/aumix-" | |
1283 | version ".tar.bz2")) | |
1284 | (sha256 | |
1285 | (base32 | |
1286 | "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj")))) | |
1287 | (build-system gnu-build-system) | |
1288 | (inputs `(("ncurses" ,ncurses))) | |
1289 | (home-page "http://www.jpj.net/~trevor/aumix.html") | |
1290 | (synopsis "Audio mixer for X and the console") | |
1291 | (description | |
1292 | "Aumix adjusts an audio mixer from X, the console, a terminal, | |
1293 | the command line or a script.") | |
3ac73271 | 1294 | (license license:gpl2+))) |
7c0dbe78 SHT |
1295 | |
1296 | (define-public iotop | |
1297 | (package | |
1298 | (name "iotop") | |
1299 | (version "0.6") | |
1300 | (source | |
1301 | (origin | |
1302 | (method url-fetch) | |
1303 | (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-" | |
1304 | version ".tar.gz")) | |
1305 | (sha256 (base32 | |
1306 | "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s")))) | |
1307 | (build-system python-build-system) | |
1308 | (arguments | |
35cebf01 | 1309 | ;; The setup.py script expects python-2. |
7c0dbe78 | 1310 | `(#:python ,python-2 |
35cebf01 | 1311 | ;; There are currently no checks in the package. |
7c0dbe78 SHT |
1312 | #:tests? #f)) |
1313 | (native-inputs `(("python" ,python-2))) | |
1314 | (home-page "http://guichaz.free.fr/iotop/") | |
1315 | (synopsis | |
1316 | "Displays the IO activity of running processes") | |
1317 | (description | |
1318 | "Iotop is a Python program with a top like user interface to show the | |
1319 | processes currently causing I/O.") | |
3ac73271 | 1320 | (license license:gpl2+))) |
e30835e2 LC |
1321 | |
1322 | (define-public fuse | |
1323 | (package | |
1324 | (name "fuse") | |
0e9bc883 | 1325 | (version "2.9.6") |
e30835e2 LC |
1326 | (source (origin |
1327 | (method url-fetch) | |
0e9bc883 LF |
1328 | (uri (string-append "https://github.com/libfuse/libfuse/releases/" |
1329 | "download/fuse-" version | |
1330 | "/fuse-" version ".tar.gz")) | |
e30835e2 LC |
1331 | (sha256 |
1332 | (base32 | |
0e9bc883 | 1333 | "0szi2vlsjxg03y4ji51jks34p269jqj5ify6l0ajsqq6f6y8pd0c")))) |
e30835e2 | 1334 | (build-system gnu-build-system) |
b148bd71 | 1335 | (inputs `(("util-linux" ,util-linux))) |
e30835e2 LC |
1336 | (arguments |
1337 | '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH=" | |
1338 | (assoc-ref %outputs "out") | |
1339 | "/sbin") | |
1340 | (string-append "INIT_D_PATH=" | |
1341 | (assoc-ref %outputs "out") | |
1342 | "/etc/init.d") | |
9a4efac9 LC |
1343 | |
1344 | ;; The rule makes /dev/fuse 666. | |
e30835e2 LC |
1345 | (string-append "UDEV_RULES_PATH=" |
1346 | (assoc-ref %outputs "out") | |
9a4efac9 | 1347 | "/lib/udev/rules.d")) |
b148bd71 LC |
1348 | #:phases (alist-cons-before |
1349 | 'build 'set-file-names | |
1350 | (lambda* (#:key inputs #:allow-other-keys) | |
1351 | ;; libfuse calls out to mount(8) and umount(8). Make sure | |
1352 | ;; it refers to the right ones. | |
1353 | (substitute* '("lib/mount_util.c" "util/mount_util.c") | |
1354 | (("/bin/(u?)mount" _ maybe-u) | |
1355 | (string-append (assoc-ref inputs "util-linux") | |
1356 | "/bin/" maybe-u "mount"))) | |
1357 | (substitute* '("util/mount.fuse.c") | |
1358 | (("/bin/sh") | |
bd663902 LC |
1359 | (which "sh"))) |
1360 | ||
1361 | ;; This hack leads libfuse to search for 'fusermount' in | |
1362 | ;; $PATH, where it may find a setuid-root binary, instead of | |
1363 | ;; trying solely $out/sbin/fusermount and failing because | |
1364 | ;; it's not setuid. | |
1365 | (substitute* "lib/Makefile" | |
1366 | (("-DFUSERMOUNT_DIR=[[:graph:]]+") | |
1367 | "-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))) | |
b148bd71 | 1368 | %standard-phases))) |
0e9bc883 | 1369 | (home-page "https://github.com/libfuse/libfuse") |
e30835e2 LC |
1370 | (synopsis "Support file systems implemented in user space") |
1371 | (description | |
1372 | "As a consequence of its monolithic design, file system code for Linux | |
1373 | normally goes into the kernel itself---which is not only a robustness issue, | |
1374 | but also an impediment to system extensibility. FUSE, for \"file systems in | |
1375 | user space\", is a kernel module and user-space library that tries to address | |
1376 | part of this problem by allowing users to run file system implementations as | |
1377 | user-space processes.") | |
3ac73271 LC |
1378 | (license (list license:lgpl2.1 ;library |
1379 | license:gpl2+)))) ;command-line utilities | |
220193ad LC |
1380 | |
1381 | (define-public unionfs-fuse | |
1382 | (package | |
1383 | (name "unionfs-fuse") | |
1384 | (version "0.26") | |
1385 | (source (origin | |
1386 | (method url-fetch) | |
1387 | (uri (string-append | |
1388 | "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-" | |
1389 | version ".tar.xz")) | |
1390 | (sha256 | |
1391 | (base32 | |
1392 | "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d")))) | |
1393 | (build-system cmake-build-system) | |
1394 | (inputs `(("fuse" ,fuse))) | |
1395 | (arguments '(#:tests? #f)) ; no tests | |
1396 | (home-page "http://podgorny.cz/moin/UnionFsFuse") | |
1397 | (synopsis "User-space union file system") | |
1398 | (description | |
1399 | "UnionFS-FUSE is a flexible union file system implementation in user | |
1400 | space, using the FUSE library. Mounting a union file system allows you to | |
1401 | \"aggregate\" the contents of several directories into a single mount point. | |
1402 | UnionFS-FUSE additionally supports copy-on-write.") | |
3ac73271 | 1403 | (license license:bsd-3))) |
ed748588 | 1404 | |
0b7a0c20 LC |
1405 | (define fuse-static |
1406 | (package (inherit fuse) | |
1407 | (name "fuse-static") | |
1408 | (source (origin (inherit (package-source fuse)) | |
1409 | (modules '((guix build utils))) | |
1410 | (snippet | |
1411 | ;; Normally libfuse invokes mount(8) so that /etc/mtab is | |
1412 | ;; updated. Change calls to 'mtab_needs_update' to 0 so that | |
1413 | ;; it doesn't do that, allowing us to remove the dependency on | |
1414 | ;; util-linux (something that is useful in initrds.) | |
1415 | '(substitute* '("lib/mount_util.c" | |
1416 | "util/mount_util.c") | |
1417 | (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)") | |
1418 | "0") | |
1419 | (("/bin/") | |
1420 | ""))))))) | |
1421 | ||
ed748588 LC |
1422 | (define-public unionfs-fuse/static |
1423 | (package (inherit unionfs-fuse) | |
1424 | (synopsis "User-space union file system (statically linked)") | |
1425 | (name (string-append (package-name unionfs-fuse) "-static")) | |
1426 | (source (origin (inherit (package-source unionfs-fuse)) | |
1427 | (modules '((guix build utils))) | |
1428 | (snippet | |
1429 | ;; Add -ldl to the libraries, because libfuse.a needs that. | |
1430 | '(substitute* "src/CMakeLists.txt" | |
1431 | (("target_link_libraries(.*)\\)" _ libs) | |
1432 | (string-append "target_link_libraries" | |
1433 | libs " dl)")))))) | |
1434 | (arguments | |
1435 | '(#:tests? #f | |
1456cff1 LC |
1436 | #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static") |
1437 | #:phases (alist-cons-after | |
1438 | 'install 'post-install | |
1439 | (lambda* (#:key outputs #:allow-other-keys) | |
1440 | (let* ((out (assoc-ref outputs "out")) | |
1441 | (exe (string-append out "/bin/unionfs"))) | |
1442 | ;; By default, 'unionfs' keeps references to | |
1443 | ;; $glibc/share/locale and similar stuff. Remove them. | |
1444 | (remove-store-references exe))) | |
1445 | %standard-phases))) | |
0b7a0c20 | 1446 | (inputs `(("fuse" ,fuse-static))))) |
67b66003 | 1447 | |
db288efa LC |
1448 | (define-public sshfs-fuse |
1449 | (package | |
1450 | (name "sshfs-fuse") | |
b58c1b2d | 1451 | (version "2.8") |
db288efa LC |
1452 | (source (origin |
1453 | (method url-fetch) | |
b58c1b2d EF |
1454 | (uri (string-append "https://github.com/libfuse/sshfs/releases/" |
1455 | "download/sshfs_" version | |
1456 | "/sshfs-" version ".tar.gz")) | |
db288efa LC |
1457 | (sha256 |
1458 | (base32 | |
b58c1b2d | 1459 | "08mdd4rs7yys7hmyig6i08qlid76p17xlvrh64k7wsrfs1s92s3z")))) |
db288efa LC |
1460 | (build-system gnu-build-system) |
1461 | (inputs | |
1462 | `(("fuse" ,fuse) | |
1463 | ("glib" ,glib))) | |
1464 | (native-inputs | |
1465 | `(("pkg-config" ,pkg-config))) | |
1466 | (home-page "http://fuse.sourceforge.net/sshfs.html") | |
1467 | (synopsis "Mount remote file systems over SSH") | |
1468 | (description | |
1469 | "This is a file system client based on the SSH File Transfer Protocol. | |
1470 | Since most SSH servers already support this protocol it is very easy to set | |
1471 | up: on the server side there's nothing to do; on the client side mounting the | |
1472 | file system is as easy as logging into the server with an SSH client.") | |
3ac73271 | 1473 | (license license:gpl2+))) |
db288efa | 1474 | |
67b66003 LC |
1475 | (define-public numactl |
1476 | (package | |
1477 | (name "numactl") | |
e35dff97 | 1478 | (version "2.0.11") |
67b66003 LC |
1479 | (source (origin |
1480 | (method url-fetch) | |
1481 | (uri (string-append | |
1482 | "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-" | |
1483 | version | |
1484 | ".tar.gz")) | |
1485 | (sha256 | |
1486 | (base32 | |
e35dff97 | 1487 | "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325")))) |
67b66003 LC |
1488 | (build-system gnu-build-system) |
1489 | (arguments | |
e35dff97 | 1490 | '(;; There's a 'test' target, but it requires NUMA support in the kernel |
67b66003 LC |
1491 | ;; to run, which we can't assume to have. |
1492 | #:tests? #f)) | |
b0015064 | 1493 | |
35dfcdd7 AE |
1494 | ;; NUMA is apparently not supported on armhf, see |
1495 | ;; http://www.spinics.net/lists/linux-numa/msg01157.html | |
1496 | (supported-systems (delete "armhf-linux" %supported-systems)) | |
67b66003 LC |
1497 | (home-page "http://oss.sgi.com/projects/libnuma/") |
1498 | (synopsis "Tools for non-uniform memory access (NUMA) machines") | |
1499 | (description | |
1500 | "NUMA stands for Non-Uniform Memory Access, in other words a system whose | |
1501 | memory is not all in one place. The numactl program allows you to run your | |
1502 | application program on specific CPU's and memory nodes. It does this by | |
1503 | supplying a NUMA memory policy to the operating system before running your | |
1504 | program. | |
1505 | ||
1506 | The package contains other commands, such as numademo, numastat and memhog. | |
1507 | The numademo command provides a quick overview of NUMA performance on your | |
1508 | system.") | |
3ac73271 LC |
1509 | (license (list license:gpl2 ;programs |
1510 | license:lgpl2.1)))) ;library | |
b10e9ff6 LC |
1511 | |
1512 | (define-public kbd | |
1513 | (package | |
1514 | (name "kbd") | |
a78daf5e | 1515 | (version "2.0.3") |
b10e9ff6 LC |
1516 | (source (origin |
1517 | (method url-fetch) | |
1518 | (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-" | |
710b4928 | 1519 | version ".tar.xz")) |
b10e9ff6 LC |
1520 | (sha256 |
1521 | (base32 | |
a78daf5e | 1522 | "0ppv953gn2zylcagr4z6zg5y2x93dxrml29plypg6xgbq3hrv2bs")) |
c8f60748 LC |
1523 | (modules '((guix build utils))) |
1524 | (snippet | |
f2cdcafb LC |
1525 | '(begin |
1526 | (substitute* "tests/Makefile.in" | |
1527 | ;; The '%: %.in' rule incorrectly uses @VERSION@. | |
1528 | (("@VERSION@") | |
1529 | "[@]VERSION[@]")) | |
1530 | (substitute* '("src/unicode_start" "src/unicode_stop") | |
1531 | ;; Assume the Coreutils are in $PATH. | |
1532 | (("/usr/bin/tty") | |
1533 | "tty")))))) | |
b10e9ff6 LC |
1534 | (build-system gnu-build-system) |
1535 | (arguments | |
5953d2b7 AK |
1536 | '(#:phases |
1537 | (modify-phases %standard-phases | |
1538 | (add-before 'build 'pre-build | |
1539 | (lambda* (#:key inputs #:allow-other-keys) | |
1540 | (let ((gzip (assoc-ref %build-inputs "gzip")) | |
1541 | (bzip2 (assoc-ref %build-inputs "bzip2"))) | |
1542 | (substitute* "src/libkeymap/findfile.c" | |
1543 | (("gzip") | |
1544 | (string-append gzip "/bin/gzip")) | |
1545 | (("bzip2") | |
1546 | (string-append bzip2 "/bin/bzip2")))))) | |
1547 | (add-after 'install 'post-install | |
1548 | (lambda* (#:key outputs #:allow-other-keys) | |
1549 | ;; Make sure these programs find their comrades. | |
1550 | (let* ((out (assoc-ref outputs "out")) | |
1551 | (bin (string-append out "/bin"))) | |
1552 | (for-each (lambda (prog) | |
1553 | (wrap-program (string-append bin "/" prog) | |
1554 | `("PATH" ":" prefix (,bin)))) | |
1555 | '("unicode_start" "unicode_stop")))))))) | |
b10e9ff6 | 1556 | (inputs `(("check" ,check) |
f61e0e79 LC |
1557 | ("gzip" ,gzip) |
1558 | ("bzip2" ,bzip2) | |
b10e9ff6 LC |
1559 | ("pam" ,linux-pam))) |
1560 | (native-inputs `(("pkg-config" ,pkg-config))) | |
1561 | (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/") | |
1562 | (synopsis "Linux keyboard utilities and keyboard maps") | |
1563 | (description | |
1564 | "This package contains keytable files and keyboard utilities compatible | |
1565 | for systems using the Linux kernel. This includes commands such as | |
1566 | 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.") | |
3ac73271 | 1567 | (license license:gpl2+))) |
de0b620e LC |
1568 | |
1569 | (define-public inotify-tools | |
1570 | (package | |
1571 | (name "inotify-tools") | |
1572 | (version "3.13") | |
1573 | (source (origin | |
1574 | (method url-fetch) | |
1575 | (uri (string-append | |
1576 | "mirror://sourceforge/inotify-tools/inotify-tools/" | |
1577 | version "/inotify-tools-" version ".tar.gz")) | |
1578 | (sha256 | |
1579 | (base32 | |
1580 | "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6")))) | |
1581 | (build-system gnu-build-system) | |
1582 | (home-page "http://inotify-tools.sourceforge.net/") | |
1583 | (synopsis "Monitor file accesses") | |
1584 | (description | |
1585 | "The inotify-tools packages provides a C library and command-line tools | |
1586 | to use Linux' inotify mechanism, which allows file accesses to be monitored.") | |
3ac73271 | 1587 | (license license:gpl2+))) |
e062d542 AE |
1588 | |
1589 | (define-public kmod | |
1590 | (package | |
1591 | (name "kmod") | |
ac52b72d | 1592 | (version "22") |
e062d542 AE |
1593 | (source (origin |
1594 | (method url-fetch) | |
1595 | (uri | |
1596 | (string-append "mirror://kernel.org/linux/utils/kernel/kmod/" | |
1597 | "kmod-" version ".tar.xz")) | |
1598 | (sha256 | |
1599 | (base32 | |
ac52b72d | 1600 | "10lzfkmnpq6a43a3gkx7x633njh216w0bjwz31rv8a1jlgg1sfxs")) |
fc1adab1 | 1601 | (patches (search-patches "kmod-module-directory.patch")))) |
e062d542 AE |
1602 | (build-system gnu-build-system) |
1603 | (native-inputs | |
1604 | `(("pkg-config" ,pkg-config))) | |
1605 | (inputs | |
f61e0e79 LC |
1606 | `(("xz" ,xz) |
1607 | ("zlib" ,zlib))) | |
e062d542 AE |
1608 | (arguments |
1609 | `(#:tests? #f ; FIXME: Investigate test failures | |
4a8b4c25 LC |
1610 | #:configure-flags '("--with-xz" "--with-zlib") |
1611 | #:phases (alist-cons-after | |
1612 | 'install 'install-modprobe&co | |
1613 | (lambda* (#:key outputs #:allow-other-keys) | |
1614 | (let* ((out (assoc-ref outputs "out")) | |
1615 | (bin (string-append out "/bin"))) | |
1616 | (for-each (lambda (tool) | |
1617 | (symlink "kmod" | |
1618 | (string-append bin "/" tool))) | |
1619 | '("insmod" "rmmod" "lsmod" "modprobe" | |
1620 | "modinfo" "depmod")))) | |
1621 | %standard-phases))) | |
e062d542 AE |
1622 | (home-page "https://www.kernel.org/") |
1623 | (synopsis "Kernel module tools") | |
35b9e423 | 1624 | (description "Kmod is a set of tools to handle common tasks with Linux |
e062d542 AE |
1625 | kernel modules like insert, remove, list, check properties, resolve |
1626 | dependencies and aliases. | |
1627 | ||
1628 | These tools are designed on top of libkmod, a library that is shipped with | |
1629 | kmod. The aim is to be compatible with tools, configurations and indices | |
1630 | from the module-init-tools project.") | |
3ac73271 | 1631 | (license license:gpl2+))) ; library under lgpl2.1+ |
d7d42d6b | 1632 | |
7fa715e7 LC |
1633 | (define-public eudev |
1634 | ;; The post-systemd fork, maintained by Gentoo. | |
fe32c7f7 | 1635 | (package |
7fa715e7 | 1636 | (name "eudev") |
2c6a1c67 | 1637 | (version "3.2") |
7fa715e7 LC |
1638 | (source (origin |
1639 | (method url-fetch) | |
1640 | (uri (string-append | |
1641 | "http://dev.gentoo.org/~blueness/eudev/eudev-" | |
1642 | version ".tar.gz")) | |
1643 | (sha256 | |
1644 | (base32 | |
2c6a1c67 | 1645 | "099w62ncq78nxpxizf910mx18hc8x4qvzw3azjd00fir89wmyjnq")) |
fc1adab1 | 1646 | (patches (search-patches "eudev-rules-directory.patch")))) |
fe32c7f7 MW |
1647 | (build-system gnu-build-system) |
1648 | (native-inputs | |
1649 | `(("pkg-config" ,pkg-config) | |
e75230c1 SB |
1650 | ("perl" ,perl) |
1651 | ("gperf" ,gperf))) | |
fe32c7f7 | 1652 | (inputs |
255f7308 LC |
1653 | ;; When linked against libblkid, eudev can populate /dev/disk/by-label |
1654 | ;; and similar; it also installs the '60-persistent-storage.rules' file, | |
1655 | ;; which contains the rules to do that. | |
1656 | `(("util-linux" ,util-linux) ;for blkid | |
1657 | ("kmod" ,kmod))) | |
e1921a38 | 1658 | (home-page "https://wiki.gentoo.org/wiki/Project:Eudev") |
fe32c7f7 MW |
1659 | (synopsis "Userspace device management") |
1660 | (description "Udev is a daemon which dynamically creates and removes | |
1661 | device nodes from /dev/, handles hotplug events and loads drivers at boot | |
1662 | time.") | |
3ac73271 | 1663 | (license license:gpl2+))) |
7fa715e7 | 1664 | |
66269d47 LC |
1665 | (define-public lvm2 |
1666 | (package | |
1667 | (name "lvm2") | |
123c0ffb | 1668 | (version "2.02.166") |
66269d47 LC |
1669 | (source (origin |
1670 | (method url-fetch) | |
1671 | (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2." | |
1672 | version ".tgz")) | |
1673 | (sha256 | |
1674 | (base32 | |
123c0ffb | 1675 | "150v0mawd2swdvypcmkjd3h3s4n5i1220h6sxx94a8jvp1kb0871")) |
66269d47 LC |
1676 | (modules '((guix build utils))) |
1677 | (snippet | |
1678 | '(begin | |
1679 | (use-modules (guix build utils)) | |
1680 | ||
1681 | ;; Honor sysconfdir. | |
1682 | (substitute* "make.tmpl.in" | |
1683 | (("confdir = .*$") | |
1684 | "confdir = @sysconfdir@\n") | |
1685 | (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@") | |
01f94cca LC |
1686 | "DEFAULT_SYS_DIR = @sysconfdir@")))) |
1687 | (patches (search-patches "lvm2-static-link.patch")))) | |
66269d47 LC |
1688 | (build-system gnu-build-system) |
1689 | (native-inputs | |
1690 | `(("pkg-config" ,pkg-config) | |
1691 | ("procps" ,procps))) ;tests use 'pgrep' | |
1692 | (inputs | |
8fcaf8b1 | 1693 | `(("udev" ,eudev))) |
66269d47 | 1694 | (arguments |
3afbc6b3 LF |
1695 | '(#:phases |
1696 | (modify-phases %standard-phases | |
1697 | (add-after 'configure 'set-makefile-shell | |
1698 | (lambda _ | |
1699 | ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as | |
1700 | ;; expected. | |
1701 | (setenv "SHELL" (which "sh")) | |
66269d47 | 1702 | |
3afbc6b3 LF |
1703 | ;; Replace /bin/sh with the right file name. |
1704 | (patch-makefile-SHELL "make.tmpl") | |
7ca97fae LF |
1705 | #t)) |
1706 | (add-before 'strip 'make-objects-writable | |
1707 | (lambda* (#:key outputs #:allow-other-keys) | |
1708 | ;; Make compiled objects writable so they can be stripped. | |
1709 | (let ((out (assoc-ref outputs "out"))) | |
1710 | (for-each (lambda (file) | |
1711 | (chmod file #o755)) | |
1712 | (append | |
1713 | (find-files (string-append out "/lib")) | |
1714 | (find-files (string-append out "/sbin")))) | |
1715 | #t)))) | |
66269d47 LC |
1716 | |
1717 | #:configure-flags (list (string-append "--sysconfdir=" | |
1718 | (assoc-ref %outputs "out") | |
1719 | "/etc/lvm") | |
1720 | "--enable-udev_sync" | |
f2817d43 LC |
1721 | "--enable-udev_rules" |
1722 | ||
1723 | ;; Make sure programs such as 'dmsetup' can | |
1724 | ;; find libdevmapper.so. | |
1725 | (string-append "LDFLAGS=-Wl,-rpath=" | |
1726 | (assoc-ref %outputs "out") | |
1727 | "/lib")) | |
66269d47 LC |
1728 | |
1729 | ;; The tests use 'mknod', which requires root access. | |
1730 | #:tests? #f)) | |
1731 | (home-page "http://sourceware.org/lvm2/") | |
1732 | (synopsis "Logical volume management for Linux") | |
1733 | (description | |
1734 | "LVM2 is the logical volume management tool set for Linux-based systems. | |
1735 | This package includes the user-space libraries and tools, including the device | |
1736 | mapper. Kernel components are part of Linux-libre.") | |
1737 | ||
1738 | ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1. | |
1739 | ;; Command-line tools are GPLv2. | |
3ac73271 | 1740 | (license (list license:gpl2 license:lgpl2.1)))) |
66269d47 | 1741 | |
01f94cca LC |
1742 | (define-public lvm2-static |
1743 | (package | |
1744 | (inherit lvm2) | |
1745 | (name "lvm2-static") | |
1746 | ||
1747 | ;; Propagate udev because libdevmapper.a depends on libudev. | |
1748 | (inputs (alist-delete "udev" (package-inputs lvm2))) | |
1749 | (propagated-inputs `(("udev" ,eudev))) | |
1750 | ||
1751 | (arguments | |
1752 | (substitute-keyword-arguments (package-arguments lvm2) | |
1753 | ((#:configure-flags flags '()) | |
1754 | ;; LVM2 doesn't use Libtool, hence the custom option. | |
1755 | `(cons "--enable-static_link" ,flags)))) | |
1756 | (synopsis "Logical volume management for Linux (statically linked)"))) | |
1757 | ||
000f7559 DT |
1758 | (define-public wireless-tools |
1759 | (package | |
1760 | (name "wireless-tools") | |
1761 | (version "30.pre9") | |
1762 | (source (origin | |
1763 | (method url-fetch) | |
1764 | (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools." | |
1765 | version ".tar.gz")) | |
1766 | (sha256 | |
1767 | (base32 | |
ec01f22d | 1768 | "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb")) |
ec01f22d | 1769 | (snippet |
c2099a4c MW |
1770 | '(begin |
1771 | ;; Remove the older header files that are not free software. | |
1772 | (for-each (lambda (n) | |
1773 | (delete-file (format #f "wireless.~a.h" n))) | |
1774 | '(10 11 12 13 14 15 16 17 18 19 20)) | |
1775 | #t)))) | |
000f7559 DT |
1776 | (build-system gnu-build-system) |
1777 | (arguments | |
c2099a4c MW |
1778 | `(#:make-flags |
1779 | (list (string-append "PREFIX=" %output) | |
1780 | (string-append "INSTALL_MAN=" %output "/share/man") | |
1781 | (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib") | |
1782 | "BUILD_STATIC=") | |
1783 | #:phases (modify-phases %standard-phases | |
1784 | (delete 'configure)) | |
000f7559 DT |
1785 | #:tests? #f)) |
1786 | (synopsis "Tools for manipulating Linux Wireless Extensions") | |
fb9b7ce2 LC |
1787 | (description "Wireless Tools are used to manipulate the now-deprecated |
1788 | Linux Wireless Extensions; consider using 'iw' instead. The Wireless | |
1789 | Extension was an interface allowing you to set Wireless LAN specific | |
1790 | parameters and get the specific stats. It is deprecated in favor the nl80211 | |
1791 | interface.") | |
000f7559 | 1792 | (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html") |
c2099a4c MW |
1793 | ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the |
1794 | ;; other files are distributed under gpl2. | |
3ac73271 | 1795 | (license (list license:gpl2 license:lgpl2.1+)))) |
30016044 | 1796 | |
cc205dac LC |
1797 | (define-public crda |
1798 | (package | |
1799 | (name "crda") | |
1800 | (version "3.18") | |
1801 | (source (origin | |
1802 | (method url-fetch) | |
1803 | (uri (string-append "mirror://kernel.org/software/network/crda/" | |
1804 | "crda-" version ".tar.xz")) | |
1805 | (sha256 | |
1806 | (base32 | |
1807 | "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23")) | |
fc1adab1 | 1808 | (patches (search-patches "crda-optional-gcrypt.patch")))) |
cc205dac LC |
1809 | (build-system gnu-build-system) |
1810 | (arguments | |
1811 | '(#:phases (modify-phases %standard-phases | |
1812 | (delete 'configure) | |
1813 | (add-before | |
1814 | 'build 'no-werror-no-ldconfig | |
1815 | (lambda _ | |
1816 | (substitute* "Makefile" | |
1817 | (("-Werror") "") | |
1818 | (("ldconfig") "true")) | |
1819 | #t)) | |
1820 | (add-before | |
1821 | 'build 'set-regulator-db-file-name | |
1822 | (lambda* (#:key inputs #:allow-other-keys) | |
1823 | ;; Tell CRDA where to find our database. | |
1824 | (let ((regdb (assoc-ref inputs "wireless-regdb"))) | |
1825 | (substitute* "crda.c" | |
1826 | (("\"/lib/crda/regulatory.bin\"") | |
1827 | (string-append "\"" regdb | |
1828 | "/lib/crda/regulatory.bin\""))) | |
1829 | #t)))) | |
1830 | #:test-target "verify" | |
1831 | #:make-flags (let ((out (assoc-ref %outputs "out")) | |
1832 | (regdb (assoc-ref %build-inputs "wireless-regdb"))) | |
1833 | (list "CC=gcc" "V=1" | |
1834 | ||
1835 | ;; Disable signature-checking on 'regulatory.bin'. | |
1836 | ;; The reason is that this simplifies maintenance | |
1837 | ;; on our side (no need to manage a distro key | |
1838 | ;; pair), and we can guarantee integrity of | |
1839 | ;; 'regulatory.bin' by other means anyway, such as | |
1840 | ;; 'guix gc --verify'. See | |
1841 | ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb> | |
1842 | ;; for a discssion. | |
1843 | "USE_OPENSSL=0" | |
1844 | ||
1845 | (string-append "PREFIX=" out) | |
1846 | (string-append "SBINDIR=" out "/sbin/") | |
1847 | (string-append "UDEV_RULE_DIR=" | |
1848 | out "/lib/udev/rules.d") | |
1849 | (string-append "LDFLAGS=-Wl,-rpath=" | |
1850 | out "/lib -L.") | |
1851 | (string-append "REG_BIN=" regdb | |
1852 | "/lib/crda/regulatory.bin"))))) | |
1853 | (native-inputs `(("pkg-config" ,pkg-config) | |
1854 | ("python" ,python-2) | |
1855 | ("wireless-regdb" ,wireless-regdb))) | |
1856 | (inputs `(("libnl" ,libnl))) | |
1857 | (home-page | |
1858 | "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA") | |
1859 | (synopsis "Central regulatory domain agent (CRDA) for WiFi") | |
1860 | (description | |
1861 | "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for | |
1862 | communication between the kernel Linux and user space for regulatory | |
1863 | compliance.") | |
3ac73271 | 1864 | (license license:copyleft-next))) |
cc205dac | 1865 | |
c80b4a3e LC |
1866 | (define-public wireless-regdb |
1867 | (package | |
1868 | (name "wireless-regdb") | |
9a12ca77 | 1869 | (version "2016.05.02") |
c80b4a3e LC |
1870 | (source (origin |
1871 | (method url-fetch) | |
1872 | (uri (string-append | |
1873 | "mirror://kernel.org/software/network/wireless-regdb/" | |
1874 | "wireless-regdb-" version ".tar.xz")) | |
1875 | (sha256 | |
1876 | (base32 | |
9a12ca77 | 1877 | "07n6gcwfbddz3awbdflv3dhxjszsqq2lrdwih0a0ahcliac4qry9")) |
5568151f LC |
1878 | |
1879 | ;; We're building 'regulatory.bin' by ourselves. | |
1880 | (snippet '(delete-file "regulatory.bin")))) | |
c80b4a3e LC |
1881 | (build-system gnu-build-system) |
1882 | (arguments | |
1883 | '(#:phases (modify-phases %standard-phases | |
1884 | (delete 'configure)) | |
5568151f LC |
1885 | |
1886 | ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which | |
1887 | ;; is computed and can be equal to 'maintainer-clean'; when that | |
1888 | ;; happens, we can end up deleting the 'regulatory.bin' file that we | |
1889 | ;; just built. Thus, build things sequentially. | |
1890 | #:parallel-build? #f | |
1891 | ||
c80b4a3e LC |
1892 | #:tests? #f ;no tests |
1893 | #:make-flags (let ((out (assoc-ref %outputs "out"))) | |
1894 | (list (string-append "PREFIX=" out) | |
1895 | (string-append "LSB_ID=GuixSD") | |
1896 | (string-append "DISTRO_PUBKEY=/dev/null") | |
1897 | (string-append "DISTRO_PRIVKEY=/dev/null") | |
1898 | (string-append "REGDB_PUBKEY=/dev/null") | |
1899 | ||
1900 | ;; Leave that empty so that db2bin.py doesn't try | |
1901 | ;; to sign 'regulatory.bin'. This allows us to | |
1902 | ;; avoid managing a key pair for the whole distro. | |
1903 | (string-append "REGDB_PRIVKEY="))))) | |
1904 | (native-inputs `(("python" ,python-2))) | |
1905 | (home-page | |
1906 | "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb") | |
1907 | (synopsis "Wireless regulatory database") | |
1908 | (description | |
1909 | "This package contains the wireless regulatory database Central | |
1910 | Regulatory Database Agent (CRDA) daemon. The database contains information on | |
1911 | country-specific regulations for the wireless spectrum.") | |
3ac73271 | 1912 | (license license:isc))) |
c80b4a3e | 1913 | |
30016044 MW |
1914 | (define-public lm-sensors |
1915 | (package | |
1916 | (name "lm-sensors") | |
171091a8 | 1917 | (version "3.4.0") |
30016044 MW |
1918 | (source (origin |
1919 | (method url-fetch) | |
ee6a5d0e | 1920 | (uri (list (string-append |
171091a8 AE |
1921 | "https://github.com/groeck/lm-sensors/archive/V" |
1922 | (string-join (string-split version #\.) "-") | |
1923 | ".tar.gz"))) | |
30016044 MW |
1924 | (sha256 |
1925 | (base32 | |
171091a8 | 1926 | "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73")) |
fc1adab1 | 1927 | (patches (search-patches "lm-sensors-hwmon-attrs.patch")))) |
30016044 MW |
1928 | (build-system gnu-build-system) |
1929 | (inputs `(("rrdtool" ,rrdtool) | |
1930 | ("perl" ,perl) | |
1931 | ("kmod" ,kmod) | |
1932 | ("gnuplot" ,gnuplot))) | |
1933 | (native-inputs `(("pkg-config" ,pkg-config) | |
1934 | ("flex" ,flex) | |
1935 | ("bison" ,bison) | |
1936 | ("which" ,which))) | |
1937 | (arguments | |
1938 | `(#:tests? #f ; no 'check' target | |
1939 | #:make-flags (list (string-append "PREFIX=" %output) | |
1940 | (string-append "ETCDIR=" %output "/etc") | |
1941 | (string-append "MANDIR=" %output "/share/man")) | |
1942 | #:phases | |
1943 | (alist-delete | |
1944 | 'configure | |
1945 | (alist-cons-before | |
1946 | 'build 'patch-exec-paths | |
1947 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1948 | (substitute* "prog/detect/sensors-detect" | |
1949 | (("`uname") | |
1950 | (string-append "`" (assoc-ref inputs "coreutils") | |
1951 | "/bin/uname")) | |
1952 | (("(`|\")modprobe" all open-quote) | |
1953 | (string-append open-quote | |
1954 | (assoc-ref inputs "kmod") | |
1955 | "/bin/modprobe"))) | |
1956 | (substitute* '("prog/pwm/pwmconfig" | |
1957 | "prog/pwm/fancontrol") | |
1958 | (("gnuplot") | |
1959 | (string-append (assoc-ref inputs "gnuplot") | |
1960 | "/bin/gnuplot")) | |
1961 | (("cat ") | |
1962 | (string-append (assoc-ref inputs "coreutils") | |
1963 | "/bin/cat ")) | |
1964 | (("egrep ") | |
1965 | (string-append (assoc-ref inputs "grep") | |
1966 | "/bin/egrep ")) | |
1967 | (("sed -e") | |
1968 | (string-append (assoc-ref inputs "sed") | |
1969 | "/bin/sed -e")) | |
1970 | (("cut -d") | |
1971 | (string-append (assoc-ref inputs "coreutils") | |
1972 | "/bin/cut -d")) | |
1973 | (("sleep ") | |
1974 | (string-append (assoc-ref inputs "coreutils") | |
1975 | "/bin/sleep ")) | |
1976 | (("readlink -f") | |
1977 | (string-append (assoc-ref inputs "coreutils") | |
1978 | "/bin/readlink -f")))) | |
1979 | %standard-phases)))) | |
3a04d5d4 | 1980 | (home-page "http://jdelvare.nerim.net/devel.html#lmsensors") |
30016044 MW |
1981 | (synopsis "Utilities to read temperature/voltage/fan sensors") |
1982 | (description | |
35b9e423 | 1983 | "Lm-sensors is a hardware health monitoring package for Linux. It allows |
30016044 MW |
1984 | you to access information from temperature, voltage, and fan speed sensors. |
1985 | It works with most newer systems.") | |
3ac73271 | 1986 | (license license:gpl2+))) |
b087d413 | 1987 | |
f5b2a53d RW |
1988 | (define-public i2c-tools |
1989 | (package | |
1990 | (name "i2c-tools") | |
1991 | (version "3.1.1") | |
1992 | (source (origin | |
1993 | (method url-fetch) | |
1994 | (uri (string-append | |
f32274a7 | 1995 | "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-" |
f5b2a53d RW |
1996 | version ".tar.bz2")) |
1997 | (sha256 | |
1998 | (base32 | |
1999 | "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l")))) | |
2000 | (build-system gnu-build-system) | |
2001 | (arguments | |
2002 | `(#:tests? #f ; no 'check' target | |
2003 | #:make-flags (list (string-append "prefix=" %output) | |
2004 | "CC=gcc") | |
2005 | ;; no configure script | |
2006 | #:phases (alist-delete 'configure %standard-phases))) | |
bccf27cb RW |
2007 | (inputs |
2008 | `(("perl" ,perl))) | |
f32274a7 | 2009 | (home-page "http://jdelvare.nerim.net/devel.html#i2ctools") |
f5b2a53d RW |
2010 | (synopsis "I2C tools for Linux") |
2011 | (description | |
2012 | "The i2c-tools package contains a heterogeneous set of I2C tools for | |
2013 | Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers, | |
2014 | EEPROM decoding scripts, EEPROM programming tools, and a python module for | |
2015 | SMBus access.") | |
3ac73271 | 2016 | (license license:gpl2+))) |
f5b2a53d | 2017 | |
b087d413 MW |
2018 | (define-public xsensors |
2019 | (package | |
2020 | (name "xsensors") | |
2021 | (version "0.70") | |
2022 | (source (origin | |
2023 | (method url-fetch) | |
2024 | (uri (string-append | |
2025 | "http://www.linuxhardware.org/xsensors/xsensors-" | |
2026 | version ".tar.gz")) | |
2027 | (sha256 | |
2028 | (base32 | |
2029 | "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh")))) | |
2030 | (build-system gnu-build-system) | |
2031 | (inputs `(("lm-sensors" ,lm-sensors) | |
2032 | ("gtk" ,gtk+-2))) | |
2033 | (native-inputs `(("pkg-config" ,pkg-config))) | |
2034 | (arguments | |
2035 | `(#:phases (alist-cons-before | |
2036 | 'configure 'enable-deprecated | |
2037 | (lambda _ | |
2038 | (substitute* "src/Makefile.in" | |
2039 | (("-DGDK_DISABLE_DEPRECATED") "") | |
2040 | (("-DGTK_DISABLE_DEPRECATED") ""))) | |
2041 | (alist-cons-before | |
2042 | 'configure 'remove-Werror | |
2043 | (lambda _ | |
2044 | (substitute* '("configure" "src/Makefile.in") | |
2045 | (("-Werror") ""))) | |
2046 | %standard-phases)))) | |
2047 | (home-page "http://www.linuxhardware.org/xsensors/") | |
2048 | (synopsis "Hardware health information viewer") | |
2049 | (description | |
35b9e423 | 2050 | "Xsensors reads data from the libsensors library regarding hardware |
b087d413 MW |
2051 | health such as temperature, voltage and fan speed and displays the information |
2052 | in a digital read-out.") | |
3ac73271 | 2053 | (license license:gpl2+))) |
b62fe07f LC |
2054 | |
2055 | (define-public perf | |
2056 | (package | |
2057 | (name "perf") | |
2058 | (version (package-version linux-libre)) | |
2059 | (source (package-source linux-libre)) | |
2060 | (build-system gnu-build-system) | |
2061 | (arguments | |
2062 | '(#:phases (alist-replace | |
2063 | 'configure | |
2064 | (lambda* (#:key inputs #:allow-other-keys) | |
2065 | (setenv "SHELL_PATH" (which "bash")) | |
2066 | (chdir "tools/perf")) | |
2067 | %standard-phases) | |
2068 | #:make-flags (list (string-append "DESTDIR=" | |
2069 | (assoc-ref %outputs "out")) | |
2af29d23 LC |
2070 | "WERROR=0" |
2071 | ||
2072 | ;; By default, 'config/Makefile' uses lib64 on | |
2073 | ;; x86_64. Work around that. | |
2074 | "lib=lib") | |
b62fe07f LC |
2075 | #:tests? #f)) ;no tests |
2076 | (native-inputs | |
2077 | `(("pkg-config" ,pkg-config) | |
2078 | ("bison" ,bison) | |
2079 | ("flex" ,flex) | |
2080 | ||
2081 | ;; There are build scripts written in these languages. | |
2082 | ("perl" ,perl) | |
2083 | ("python" ,python-2))) | |
2084 | (inputs | |
b1fb4b23 | 2085 | `(("slang" ,slang) ;for the interactive TUI |
b62fe07f | 2086 | ;; ("newt" ,newt) |
6c030d10 | 2087 | ("python" ,python-2) ;'perf' links against libpython |
b62fe07f LC |
2088 | ("elfutils" ,elfutils) |
2089 | ||
d7ece67a LC |
2090 | ;; Documentation. |
2091 | ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES | |
2092 | ("libxslt" ,libxslt) | |
2093 | ("docbook-xml" ,docbook-xml) | |
2094 | ("docbook-xsl" ,docbook-xsl) | |
2095 | ("xmlto" ,xmlto) | |
2096 | ("asciidoc" ,asciidoc))) | |
b62fe07f LC |
2097 | (home-page "https://perf.wiki.kernel.org/") |
2098 | (synopsis "Linux profiling with performance counters") | |
2099 | (description | |
2100 | "perf is a tool suite for profiling using hardware performance counters, | |
2101 | with support in the Linux kernel. perf can instrument CPU performance | |
2102 | counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable | |
2103 | of lightweight profiling. This package contains the user-land tools and in | |
2104 | particular the 'perf' command.") | |
2105 | (license (package-license linux-libre)))) | |
c09e60e4 DT |
2106 | |
2107 | (define-public pflask | |
2108 | (package | |
2109 | (name "pflask") | |
2110 | (version "0.2") | |
2111 | (source (origin | |
2112 | (method url-fetch) | |
2113 | (uri (string-append "https://github.com/ghedo/pflask/archive/v" | |
2114 | version ".tar.gz")) | |
f586c877 | 2115 | (file-name (string-append name "-" version ".tar.gz")) |
c09e60e4 DT |
2116 | (sha256 |
2117 | (base32 | |
2118 | "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys")))) | |
2119 | (build-system cmake-build-system) | |
2120 | (arguments | |
2121 | '(#:tests? #f)) ; no tests | |
2122 | (home-page "http://ghedo.github.io/pflask/") | |
2123 | (synopsis "Simple tool for creating Linux namespace containers") | |
2124 | (description "pflask is a simple tool for creating Linux namespace | |
2125 | containers. It can be used for running a command or even booting an OS inside | |
2126 | an isolated container, created with the help of Linux namespaces. It is | |
2127 | similar in functionality to chroot, although pflask provides better isolation | |
2128 | thanks to the use of namespaces.") | |
3ac73271 | 2129 | (license license:bsd-2))) |
288084d5 MW |
2130 | |
2131 | (define-public hdparm | |
2132 | (package | |
2133 | (name "hdparm") | |
2134 | (version "9.45") | |
2135 | (source (origin | |
2136 | (method url-fetch) | |
de67e922 | 2137 | (uri (string-append "mirror://sourceforge/" name "/" name "/" |
288084d5 MW |
2138 | name "-" version ".tar.gz")) |
2139 | (sha256 | |
2140 | (base32 | |
2141 | "0sc6yf3k6sd7n6a2ig2my9fjlqpak3znlyw7jw4cz5d9asm1rc13")))) | |
2142 | (build-system gnu-build-system) | |
2143 | (arguments | |
2144 | `(#:make-flags (let ((out (assoc-ref %outputs "out"))) | |
2145 | (list (string-append "binprefix=" out) | |
2146 | (string-append "manprefix=" out) | |
2147 | "CC=gcc")) | |
2148 | #:phases (alist-delete 'configure %standard-phases) | |
2149 | #:tests? #f)) ; no test suite | |
2150 | (home-page "http://sourceforge.net/projects/hdparm/") | |
e881752c | 2151 | (synopsis "Tune hard disk parameters for high performance") |
288084d5 MW |
2152 | (description |
2153 | "Get/set device parameters for Linux SATA/IDE drives. It's primary use | |
e881752c | 2154 | is for enabling irq-unmasking and IDE multiple-mode.") |
3ac73271 | 2155 | (license (license:non-copyleft "file://LICENSE.TXT")))) |
288084d5 | 2156 | |
c755c854 MW |
2157 | (define-public rfkill |
2158 | (package | |
2159 | (name "rfkill") | |
2160 | (version "0.5") | |
2161 | (source (origin | |
2162 | (method url-fetch) | |
2163 | (uri (string-append "mirror://kernel.org/software/network/" | |
2164 | name "/" name "-" version ".tar.xz")) | |
2165 | (sha256 | |
2166 | (base32 | |
2167 | "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0")))) | |
2168 | (build-system gnu-build-system) | |
2169 | (arguments | |
2170 | `(#:make-flags (list "CC=gcc" | |
2171 | (string-append "PREFIX=" %output)) | |
2172 | #:phases (modify-phases %standard-phases | |
2173 | (delete 'configure)) | |
2174 | #:tests? #f)) | |
2175 | (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill") | |
2176 | (synopsis "Tool for enabling and disabling wireless devices") | |
2177 | (description | |
2178 | "rfkill is a simple tool for accessing the rfkill device interface, | |
2179 | which is used to enable and disable wireless networking devices, typically | |
2180 | WLAN, Bluetooth and mobile broadband.") | |
3ac73271 LC |
2181 | (license (license:non-copyleft "file://COPYING" |
2182 | "See COPYING in the distribution.")))) | |
c755c854 | 2183 | |
dc9bdb1e ML |
2184 | (define-public acpi |
2185 | (package | |
2186 | (name "acpi") | |
2187 | (version "1.7") | |
2188 | (source (origin | |
2189 | (method url-fetch) | |
de67e922 LF |
2190 | (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/" |
2191 | version "/" name "-" version ".tar.gz")) | |
dc9bdb1e ML |
2192 | (sha256 |
2193 | (base32 | |
2194 | "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp")))) | |
2195 | (build-system gnu-build-system) | |
2196 | (home-page "http://acpiclient.sourceforge.net") | |
2197 | (synopsis "Display information on ACPI devices") | |
2198 | (description "@code{acpi} attempts to replicate the functionality of the | |
2199 | \"old\" @code{apm} command on ACPI systems, including battery and thermal | |
2200 | information. It does not support ACPI suspending, only displays information | |
2201 | about ACPI devices.") | |
2202 | (license license:gpl2+))) | |
2203 | ||
57a516d3 LC |
2204 | (define-public acpid |
2205 | (package | |
2206 | (name "acpid") | |
2207 | (version "2.0.23") | |
2208 | (source (origin | |
2209 | (method url-fetch) | |
2210 | (uri (string-append "mirror://sourceforge/acpid2/acpid-" | |
2211 | version ".tar.xz")) | |
2212 | (sha256 | |
2213 | (base32 | |
2214 | "1vl7c6vc724v4jwki17czgj6lnrknnj1a6llm8gkl32i2gnam5j3")))) | |
2215 | (build-system gnu-build-system) | |
2216 | (home-page "http://sourceforge.net/projects/acpid2/") | |
2217 | (synopsis "Daemon for delivering ACPI events to user-space programs") | |
2218 | (description | |
2219 | "acpid is designed to notify user-space programs of Advanced | |
2220 | Configuration and Power Interface (ACPI) events. acpid should be started | |
2221 | during the system boot, and will run as a background process. When an ACPI | |
2222 | event is received from the kernel, acpid will examine the list of rules | |
2223 | specified in /etc/acpi/events and execute the rules that match the event.") | |
3ac73271 | 2224 | (license license:gpl2+))) |
37f5caec TUBK |
2225 | |
2226 | (define-public sysfsutils | |
2227 | (package | |
2228 | (name "sysfsutils") | |
2229 | (version "2.1.0") | |
2230 | (source | |
2231 | (origin | |
2232 | (method url-fetch) | |
2233 | (uri | |
2234 | (string-append | |
2235 | "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-" | |
2236 | version ".tar.gz")) | |
2237 | (sha256 | |
2238 | (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8")))) | |
2239 | (build-system gnu-build-system) | |
2240 | (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html") | |
2241 | (synopsis "System utilities based on Linux sysfs") | |
2242 | (description | |
8f65585b | 2243 | "These are a set of utilities built upon sysfs, a virtual file system in |
37f5caec TUBK |
2244 | Linux kernel versions 2.5+ that exposes a system's device tree. The package |
2245 | also contains the libsysfs library.") | |
2246 | ;; The library is under lgpl2.1+ (all files say "or any later version"). | |
2247 | ;; The rest is mostly gpl2, with a few files indicating gpl2+. | |
3ac73271 | 2248 | (license (list license:gpl2 license:gpl2+ license:lgpl2.1+)))) |
a9a1a40b TUBK |
2249 | |
2250 | (define-public sysfsutils-1 | |
2251 | (package | |
2252 | (inherit sysfsutils) | |
2253 | (version "1.3.0") | |
2254 | (source | |
2255 | (origin | |
2256 | (method url-fetch) | |
2257 | (uri | |
2258 | (string-append | |
2259 | "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version | |
2260 | "/sysfsutils-" version ".tar.gz")) | |
2261 | (sha256 | |
2262 | (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3")) | |
2263 | (modules '((guix build utils))) | |
2264 | (snippet | |
2265 | '(begin | |
2266 | (substitute* "Makefile.in" | |
2267 | (("includedir = /usr/include/sysfs") | |
2268 | "includedir = @includedir@")) | |
2269 | (substitute* "configure" | |
2270 | (("includedir='(\\$\\{prefix\\}/include)'" all orig) | |
2271 | (string-append "includedir='" orig "/sysfs'"))))))) | |
2272 | (synopsis "System utilities based on Linux sysfs (version 1.x)"))) | |
e6caa52d TUBK |
2273 | |
2274 | (define-public cpufrequtils | |
2275 | (package | |
2276 | (name "cpufrequtils") | |
2277 | (version "0.3") | |
2278 | (source | |
2279 | (origin | |
2280 | (method url-fetch) | |
2281 | (uri | |
2282 | (string-append | |
2283 | "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-" | |
2284 | version ".tar.gz")) | |
2285 | (sha256 | |
2286 | (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm")) | |
fc1adab1 | 2287 | (patches (search-patches "cpufrequtils-fix-aclocal.patch")))) |
e6caa52d TUBK |
2288 | (build-system gnu-build-system) |
2289 | (native-inputs | |
2290 | `(("sysfsutils" ,sysfsutils-1))) | |
2291 | (arguments | |
2292 | '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" | |
2293 | (assoc-ref %outputs "out") "/lib")))) | |
2294 | (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/") | |
2295 | (synopsis "Utilities to get and set CPU frequency on Linux") | |
2296 | (description | |
e881752c | 2297 | "The cpufrequtils suite contains utilities to retrieve CPU frequency |
e6caa52d TUBK |
2298 | information, and set the CPU frequency if supported, using the cpufreq |
2299 | capabilities of the Linux kernel.") | |
3ac73271 | 2300 | (license license:gpl2))) |
0a588bf9 SB |
2301 | |
2302 | (define-public libraw1394 | |
2303 | (package | |
2304 | (name "libraw1394") | |
2305 | (version "2.1.0") | |
2306 | (source (origin | |
2307 | (method url-fetch) | |
2308 | (uri (string-append | |
2309 | "mirror://kernel.org/linux/libs/ieee1394/" | |
2310 | name "-" version ".tar.xz")) | |
2311 | (sha256 | |
2312 | (base32 | |
2313 | "0kwnf4ha45c04mhc4yla672aqmvqqihxix1gvblns5cd2pc2cc8b")))) | |
2314 | (build-system gnu-build-system) | |
2315 | (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page") | |
2316 | (synopsis "Interface library for the Linux IEEE1394 drivers") | |
2317 | (description | |
2318 | "Libraw1394 is the only supported interface to the kernel side raw1394 of | |
2319 | the Linux IEEE-1394 subsystem, which provides direct access to the connected | |
2320 | 1394 buses to user space. Through libraw1394/raw1394, applications can directly | |
2321 | send to and receive from other nodes without requiring a kernel driver for the | |
2322 | protocol in question.") | |
3ac73271 | 2323 | (license license:lgpl2.1+))) |
68e3c29d SB |
2324 | |
2325 | (define-public libavc1394 | |
2326 | (package | |
2327 | (name "libavc1394") | |
2328 | (version "0.5.4") | |
2329 | (source (origin | |
2330 | (method url-fetch) | |
de67e922 | 2331 | (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/" |
68e3c29d SB |
2332 | name "-" version ".tar.gz")) |
2333 | (sha256 | |
2334 | (base32 | |
2335 | "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw")))) | |
2336 | (build-system gnu-build-system) | |
2337 | (native-inputs | |
2338 | `(("pkg-config" ,pkg-config))) | |
2339 | (propagated-inputs | |
2340 | `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc | |
2341 | (home-page "http://sourceforge.net/projects/libavc1394/") | |
2342 | (synopsis "AV/C protocol library for IEEE 1394") | |
2343 | (description | |
2344 | "Libavc1394 is a programming interface to the AV/C specification from | |
69b4ffcf | 2345 | the 1394 Trade Association. AV/C stands for Audio/Video Control.") |
3ac73271 | 2346 | (license license:lgpl2.1+))) |
3f7bf86a SB |
2347 | |
2348 | (define-public libiec61883 | |
2349 | (package | |
2350 | (name "libiec61883") | |
2351 | (version "1.2.0") | |
2352 | (source (origin | |
2353 | (method url-fetch) | |
2354 | (uri (string-append | |
2355 | "mirror://kernel.org/linux/libs/ieee1394/" | |
2356 | name "-" version ".tar.xz")) | |
2357 | (sha256 | |
2358 | (base32 | |
2359 | "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i")))) | |
2360 | (build-system gnu-build-system) | |
2361 | (native-inputs | |
2362 | `(("pkg-config" ,pkg-config))) | |
2363 | (propagated-inputs | |
2364 | `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc | |
2365 | (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page") | |
2366 | (synopsis "Isochronous streaming media library for IEEE 1394") | |
2367 | (description | |
2368 | "The libiec61883 library provides a higher level API for streaming DV, | |
2369 | MPEG-2 and audio over Linux IEEE 1394.") | |
3ac73271 | 2370 | (license license:lgpl2.1+))) |
69159125 MW |
2371 | |
2372 | (define-public mdadm | |
2373 | (package | |
2374 | (name "mdadm") | |
30897c60 | 2375 | (version "3.4") |
69159125 MW |
2376 | (source (origin |
2377 | (method url-fetch) | |
2378 | (uri (string-append | |
2379 | "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-" | |
2380 | version ".tar.xz")) | |
2381 | (sha256 | |
2382 | (base32 | |
30897c60 | 2383 | "0248v9f28mrbwabl94ck22gfim29sqhkf70wrpfi52nk4x3bxl17")))) |
69159125 MW |
2384 | (build-system gnu-build-system) |
2385 | (inputs | |
2386 | `(("udev" ,eudev))) | |
2387 | (arguments | |
2388 | `(#:make-flags (let ((out (assoc-ref %outputs "out"))) | |
2389 | (list "INSTALL=install" | |
2390 | "CHECK_RUN_DIR=0" | |
2391 | ;; TODO: tell it where to find 'sendmail' | |
2392 | ;; (string-append "MAILCMD=" <???> "/sbin/sendmail") | |
2393 | (string-append "BINDIR=" out "/sbin") | |
2394 | (string-append "MANDIR=" out "/share/man") | |
2395 | (string-append "UDEVDIR=" out "/lib/udev"))) | |
2396 | #:phases (alist-cons-before | |
2397 | 'build 'patch-program-paths | |
2398 | (lambda* (#:key inputs #:allow-other-keys) | |
2399 | (let ((coreutils (assoc-ref inputs "coreutils"))) | |
2400 | (substitute* "udev-md-raid-arrays.rules" | |
2401 | (("/usr/bin/(readlink|basename)" all program) | |
2402 | (string-append coreutils "/bin/" program))))) | |
d76f44e8 LC |
2403 | (alist-cons-before |
2404 | 'build 'remove-W-error | |
2405 | (lambda _ | |
2406 | ;; We cannot build with -Werror on i686 due to a | |
2407 | ;; 'sign-compare' warning in util.c. | |
2408 | (substitute* "Makefile" | |
2409 | (("-Werror") "")) | |
2410 | #t) | |
2411 | (alist-delete 'configure %standard-phases))) | |
69159125 MW |
2412 | ;;tests must be done as root |
2413 | #:tests? #f)) | |
2414 | (home-page "http://neil.brown.name/blog/mdadm") | |
2415 | (synopsis "Tool for managing Linux Software RAID arrays") | |
2416 | (description | |
2417 | "mdadm is a tool for managing Linux Software RAID arrays. It can create, | |
2418 | assemble, report on, and monitor arrays. It can also move spares between raid | |
2419 | arrays when needed.") | |
3ac73271 | 2420 | (license license:gpl2+))) |
01ccdfb6 | 2421 | |
631fda7e LC |
2422 | (define-public mdadm-static |
2423 | (package | |
2424 | (inherit mdadm) | |
2425 | (name "mdadm-static") | |
2426 | (arguments | |
2427 | (substitute-keyword-arguments (package-arguments mdadm) | |
2428 | ((#:make-flags flags) | |
2429 | `(cons "LDFLAGS = -static" ,flags)) | |
2430 | ((#:phases phases) | |
2431 | `(modify-phases ,phases | |
2432 | (add-after 'install 'remove-cruft | |
2433 | (lambda* (#:key outputs #:allow-other-keys) | |
2434 | (let* ((out (assoc-ref outputs "out")) | |
2435 | (precious? (lambda (file) | |
2436 | (member file '("." ".." "sbin")))) | |
2437 | (directories (scandir out (negate precious?)))) | |
2438 | (with-directory-excursion out | |
2439 | (for-each delete-file-recursively directories) | |
2440 | (remove-store-references "sbin/mdadm") | |
2441 | (delete-file "sbin/mdmon") | |
2442 | #t)))))) | |
2443 | ((#:modules modules %gnu-build-system-modules) | |
2444 | `((ice-9 ftw) ,@modules)) | |
2445 | ((#:strip-flags _ '()) | |
2446 | ''("--strip-all")) ;strip a few extra KiB | |
2447 | ((#:allowed-references _ '("out")) | |
2448 | '("out")))) ;refer only self | |
2449 | (synopsis "Statically-linked 'mdadm' command for use in an initrd"))) | |
2450 | ||
01ccdfb6 SB |
2451 | (define-public libaio |
2452 | (package | |
2453 | (name "libaio") | |
2454 | (version "0.3.110") | |
2455 | (source (origin | |
2456 | (method url-fetch) | |
2457 | (uri (list | |
2458 | (string-append "mirror://debian/pool/main/liba/libaio/" | |
2459 | name "_" version ".orig.tar.gz") | |
2460 | (string-append "https://fedorahosted.org/releases/l/i/libaio/" | |
2461 | name "-" version ".tar.gz"))) | |
2462 | (sha256 | |
2463 | (base32 | |
2464 | "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0")))) | |
2465 | (build-system gnu-build-system) | |
2466 | (arguments | |
2467 | '(#:make-flags | |
2468 | (list "CC=gcc" (string-append "prefix=" %output)) | |
2469 | #:test-target "partcheck" ; need root for a full 'check' | |
2470 | #:phases | |
2471 | (alist-delete 'configure %standard-phases))) ; no configure script | |
2472 | (home-page "http://lse.sourceforge.net/io/aio.html") | |
2473 | (synopsis "Linux-native asynchronous I/O access library") | |
2474 | (description | |
2475 | "This library enables userspace to use Linux kernel asynchronous I/O | |
2476 | system calls, important for the performance of databases and other advanced | |
2477 | applications.") | |
3ac73271 | 2478 | (license license:lgpl2.1+))) |
eb7c43c3 | 2479 | |
81b98756 RW |
2480 | (define-public sbc |
2481 | (package | |
2482 | (name "sbc") | |
2483 | (version "1.3") | |
2484 | (source (origin | |
2485 | (method url-fetch) | |
2486 | (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/" | |
2487 | name "-" version ".tar.xz")) | |
2488 | (sha256 | |
2489 | (base32 | |
2490 | "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476")))) | |
2491 | (build-system gnu-build-system) | |
2492 | (inputs | |
2493 | `(("libsndfile" ,libsndfile))) | |
2494 | (native-inputs | |
2495 | `(("pkg-config" ,pkg-config))) | |
2496 | (home-page "https://www.kernel.org/pub/linux/bluetooth/") | |
2497 | (synopsis "Bluetooth subband audio codec") | |
2498 | (description | |
2499 | "The SBC is a digital audio encoder and decoder used to transfer data to | |
2500 | Bluetooth audio output devices like headphones or loudspeakers.") | |
2501 | (license license:gpl2+))) | |
2502 | ||
eb7c43c3 DT |
2503 | (define-public bluez |
2504 | (package | |
2505 | (name "bluez") | |
c8092046 | 2506 | (version "5.40") |
eb7c43c3 DT |
2507 | (source (origin |
2508 | (method url-fetch) | |
2509 | (uri (string-append | |
e9eb24b1 | 2510 | "mirror://kernel.org/linux/bluetooth/bluez-" |
eb7c43c3 DT |
2511 | version ".tar.xz")) |
2512 | (sha256 | |
2513 | (base32 | |
c8092046 | 2514 | "09ywk3lvgis0nbi0d5z8d4qp5r33lzwnd6bdakacmbsm420qpnns")))) |
eb7c43c3 DT |
2515 | (build-system gnu-build-system) |
2516 | (arguments | |
2517 | '(#:configure-flags | |
2518 | (let ((out (assoc-ref %outputs "out"))) | |
f3dbc626 SB |
2519 | (list "--sysconfdir=/etc" |
2520 | "--localstatedir=/var" | |
2521 | "--enable-library" | |
53142109 | 2522 | "--disable-systemd" |
eb7c43c3 DT |
2523 | ;; Install dbus/udev files to the correct location. |
2524 | (string-append "--with-dbusconfdir=" out "/etc") | |
87a16de7 SB |
2525 | (string-append "--with-udevdir=" out "/lib/udev"))) |
2526 | #:phases | |
2527 | (modify-phases %standard-phases | |
2528 | (add-after 'install 'post-install | |
2529 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2530 | (let* ((out (assoc-ref outputs "out")) | |
2531 | (servicedir (string-append out "/share/dbus-1/services")) | |
2532 | (service "obexd/src/org.bluez.obex.service") | |
2533 | (rule (string-append | |
2534 | out "/lib/udev/rules.d/97-hid2hci.rules"))) | |
2535 | ;; Install the obex dbus service file. | |
2536 | (substitute* service | |
2537 | (("/bin/false") | |
2538 | (string-append out "/libexec/bluetooth/obexd"))) | |
2539 | (install-file service servicedir) | |
2540 | ;; Fix paths in the udev rule. | |
2541 | (substitute* rule | |
2542 | (("hid2hci --method") | |
2543 | (string-append out "/lib/udev/hid2hci --method")) | |
2544 | (("/sbin/udevadm") | |
2545 | (string-append (assoc-ref inputs "eudev") "/bin/udevadm"))) | |
2546 | #t)))))) | |
eb7c43c3 DT |
2547 | (native-inputs |
2548 | `(("pkg-config" ,pkg-config) | |
b94a6ca0 | 2549 | ("gettext" ,gettext-minimal))) |
eb7c43c3 DT |
2550 | (inputs |
2551 | `(("glib" ,glib) | |
2552 | ("dbus" ,dbus) | |
2553 | ("eudev" ,eudev) | |
2554 | ("libical" ,libical) | |
2555 | ("readline" ,readline))) | |
2556 | (home-page "http://www.bluez.org/") | |
2557 | (synopsis "Linux Bluetooth protocol stack") | |
2558 | (description | |
2559 | "BlueZ provides support for the core Bluetooth layers and protocols. It | |
2560 | is flexible, efficient and uses a modular implementation.") | |
3ac73271 | 2561 | (license license:gpl2+))) |
3d890318 LC |
2562 | |
2563 | (define-public fuse-exfat | |
2564 | (package | |
2565 | (name "fuse-exfat") | |
2566 | (version "1.1.0") | |
2567 | (source (origin | |
2568 | (method url-fetch) | |
2569 | (uri "https://docs.google.com/uc?export=download&\ | |
2570 | id=0B7CLI-REKbE3VTdaa0EzTkhYdU0") | |
2571 | (sha256 | |
2572 | (base32 | |
2573 | "0glmgwrf0nv09am54i6s35ksbvrywrwc51w6q32mv5by8475530r")) | |
2574 | (file-name (string-append name "-" version ".tar.gz")))) | |
2575 | (build-system gnu-build-system) | |
2576 | (native-inputs | |
2577 | `(("scons" ,scons) | |
2578 | ("pkg-config" ,pkg-config))) | |
2579 | (inputs | |
2580 | `(("fuse" ,fuse))) | |
2581 | (arguments | |
2582 | '(#:tests? #f ;no test suite | |
2583 | ||
2584 | ;; XXX: Factorize with 'exfat-utils'. | |
2585 | #:phases (modify-phases %standard-phases | |
2586 | (delete 'configure) | |
2587 | (add-after 'unpack 'scons-propagate-environment | |
2588 | (lambda _ | |
2589 | ;; Modify the SConstruct file to arrange for | |
2590 | ;; environment variables to be propagated. | |
2591 | (substitute* "SConstruct" | |
2592 | (("^env = Environment\\(") | |
2593 | "env = Environment(ENV=os.environ, ")))) | |
2594 | (replace 'build | |
2595 | (lambda _ | |
2596 | (zero? (system* "scons")))) | |
2597 | (replace 'install | |
2598 | (lambda* (#:key outputs #:allow-other-keys) | |
2599 | (let* ((out (assoc-ref outputs "out")) | |
2600 | (bin (string-append out "/bin")) | |
2601 | (man8 (string-append out | |
2602 | "/share/man/man8"))) | |
2603 | (mkdir-p bin) | |
2604 | (mkdir-p man8) | |
2605 | (for-each (lambda (file) | |
2606 | (copy-file | |
2607 | file | |
2608 | (string-append man8 "/" | |
2609 | (basename file)))) | |
2610 | (find-files "." "\\.8$")) | |
2611 | (zero? (system* "scons" "install" | |
2612 | (string-append "DESTDIR=" | |
2613 | bin))))))))) | |
2614 | (home-page "http://code.google.com/p/exfat/") | |
2615 | (synopsis "Mount exFAT file systems") | |
2616 | (description | |
2617 | "This package provides a FUSE-based file system that provides read and | |
2618 | write access to exFAT devices.") | |
3ac73271 | 2619 | (license license:gpl2+))) |
53ec8d48 LC |
2620 | |
2621 | (define-public gpm | |
2622 | (package | |
2623 | (name "gpm") | |
2624 | (version "1.20.7") | |
2625 | (source (origin | |
2626 | (method url-fetch) | |
2627 | (uri (string-append | |
2628 | "http://www.nico.schottelius.org/software/gpm/archives/gpm-" | |
2629 | version ".tar.bz2")) | |
2630 | (sha256 | |
2631 | (base32 | |
2632 | "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh")))) | |
2633 | (build-system gnu-build-system) | |
2634 | (arguments | |
2635 | '(#:phases (modify-phases %standard-phases | |
2636 | (add-before 'configure 'bootstrap | |
2637 | (lambda _ | |
2638 | ;; The tarball was not generated with 'make dist' so we | |
2639 | ;; need to bootstrap things ourselves. | |
2640 | (and (zero? (system* "./autogen.sh")) | |
2641 | (begin | |
2642 | (patch-makefile-SHELL "Makefile.include.in") | |
2643 | #t))))) | |
2644 | ||
2645 | ;; Make sure programs find libgpm.so. | |
2646 | #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath=" | |
2647 | (assoc-ref %outputs "out") | |
2648 | "/lib")))) | |
2649 | (native-inputs | |
2650 | `(("texinfo" ,texinfo) | |
2651 | ("bison" ,bison) | |
2652 | ("flex" ,flex) | |
2653 | ("autoconf" ,autoconf) | |
2654 | ("automake" ,automake) | |
2655 | ("libtool" ,libtool))) | |
2656 | (home-page "http://www.nico.schottelius.org/software/gpm/") | |
2657 | (synopsis "Mouse support for the Linux console") | |
2658 | (description | |
2659 | "The GPM (general-purpose mouse) daemon is a mouse server for | |
2660 | applications running on the Linux console. It allows users to select items | |
2661 | and copy/paste text in the console and in xterm.") | |
3ac73271 | 2662 | (license license:gpl2+))) |
fc686f9a TGR |
2663 | |
2664 | (define-public btrfs-progs | |
2665 | (package | |
2666 | (name "btrfs-progs") | |
e0593466 | 2667 | (version "4.8.5") |
fc686f9a TGR |
2668 | (source (origin |
2669 | (method url-fetch) | |
2670 | (uri (string-append "mirror://kernel.org/linux/kernel/" | |
2671 | "people/kdave/btrfs-progs/" | |
2672 | "btrfs-progs-v" version ".tar.xz")) | |
2673 | (sha256 | |
2674 | (base32 | |
e0593466 | 2675 | "1vq83a8sz8dnshbyaghacqvcwv2n1kh53yjv87rxx9dc4b0b2iyj")))) |
fc686f9a | 2676 | (build-system gnu-build-system) |
7cad981d TGR |
2677 | (outputs '("out" |
2678 | "static")) ; static versions of binaries in "out" (~16MiB!) | |
fc686f9a | 2679 | (arguments |
7cad981d TGR |
2680 | '(#:phases (modify-phases %standard-phases |
2681 | (add-after 'build 'build-static | |
2682 | (lambda _ (zero? (system* "make" "static")))) | |
2683 | (add-after 'install 'install-static | |
2684 | (let ((staticbin (string-append (assoc-ref %outputs "static") | |
2685 | "/bin"))) | |
2686 | (lambda _ | |
2687 | (zero? (system* "make" | |
2688 | (string-append "bindir=" staticbin) | |
2689 | "install-static")))))) | |
2690 | #:test-target "test" | |
fc686f9a TGR |
2691 | #:parallel-tests? #f)) ; tests fail when run in parallel |
2692 | (inputs `(("e2fsprogs" ,e2fsprogs) | |
2693 | ("libblkid" ,util-linux) | |
7cad981d | 2694 | ("libblkid:static" ,util-linux "static") |
fc686f9a | 2695 | ("libuuid" ,util-linux) |
7cad981d | 2696 | ("libuuid:static" ,util-linux "static") |
fc686f9a TGR |
2697 | ("zlib" ,zlib) |
2698 | ("lzo" ,lzo))) | |
2699 | (native-inputs `(("pkg-config" ,pkg-config) | |
2700 | ("asciidoc" ,asciidoc) | |
2701 | ("xmlto" ,xmlto) | |
2702 | ;; For building documentation | |
2703 | ("libxml2" ,libxml2) | |
2704 | ("docbook-xml" ,docbook-xml) | |
48b7e4a6 | 2705 | ("docbook-xsl" ,docbook-xsl) |
49dbe696 | 2706 | ;; For tests |
48b7e4a6 | 2707 | ("which" ,which))) |
fc686f9a TGR |
2708 | (home-page "https://btrfs.wiki.kernel.org/") |
2709 | (synopsis "Create and manage btrfs copy-on-write file systems") | |
8f65585b | 2710 | (description "Btrfs is a copy-on-write (CoW) file system for Linux aimed at |
fc686f9a TGR |
2711 | implementing advanced features while focusing on fault tolerance, repair and |
2712 | easy administration.") | |
68bcac6b LF |
2713 | ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c. |
2714 | ;; GPL2: Everything else. | |
2715 | (license (list license:gpl2 license:gpl2+)))) | |
08e9daf5 TGR |
2716 | |
2717 | (define-public freefall | |
2718 | (package | |
2719 | (name "freefall") | |
2720 | (version (package-version linux-libre)) | |
2721 | (source (package-source linux-libre)) | |
2722 | (build-system gnu-build-system) | |
2723 | (arguments | |
2724 | '(#:phases (modify-phases %standard-phases | |
2725 | (add-after 'unpack 'enter-subdirectory | |
2726 | (lambda _ | |
2727 | (chdir "tools/laptop/freefall"))) | |
2728 | (delete 'configure) | |
2729 | (add-before 'build 'increase-timeout | |
2730 | (lambda _ | |
2731 | ;; The default of 2 seconds is too low: it assumes an | |
2732 | ;; open lid and AC power without actually checking. | |
2733 | (substitute* "freefall.c" | |
2734 | (("alarm\\(2\\)") "alarm(5)"))))) | |
2735 | #:make-flags (list (string-append "PREFIX=" | |
2736 | (assoc-ref %outputs "out"))) | |
2737 | #:tests? #f)) ;no tests | |
2738 | (home-page (package-home-page linux-libre)) | |
2739 | (synopsis "Free-fall protection for spinning laptop hard drives") | |
2740 | (description | |
2741 | "Prevents shock damage to the internal spinning hard drive(s) of some | |
2742 | HP and Dell laptops. When sudden movement is detected, all input/output | |
2743 | operations on the drive are suspended and its heads are parked on the ramp, | |
2744 | where they are less likely to cause damage to the spinning disc. Requires a | |
2745 | drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload | |
2746 | feature, and a laptop with an accelerometer. It has no effect on SSDs.") | |
2747 | (license license:gpl2))) | |
d17ae8c0 NG |
2748 | |
2749 | (define-public thinkfan | |
2750 | (package | |
2751 | (name "thinkfan") | |
2752 | (version "0.9.3") | |
2753 | (source (origin | |
2754 | (method url-fetch) | |
2755 | (uri (string-append "mirror://sourceforge/thinkfan/" | |
de67e922 | 2756 | "/thinkfan-" version ".tar.gz")) |
d17ae8c0 NG |
2757 | (sha256 |
2758 | (base32 | |
2759 | "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n")) | |
2760 | (modules '((guix build utils))) | |
2761 | ;; Fix erroneous man page location in Makefile leading to | |
2762 | ;; a compilation failure. | |
2763 | (snippet | |
2764 | '(substitute* "CMakeLists.txt" | |
2765 | (("thinkfan\\.1") "src/thinkfan.1"))))) | |
2766 | (build-system cmake-build-system) | |
2767 | (arguments | |
2768 | `(#:modules ((guix build cmake-build-system) | |
2769 | (guix build utils) | |
2770 | (srfi srfi-26)) | |
2771 | #:tests? #f ;no test target | |
2772 | #:configure-flags | |
2773 | ;; Enable reading temperatures from hard disks via S.M.A.R.T. | |
2774 | `("-DUSE_ATASMART:BOOL=ON") | |
2775 | #:phases | |
2776 | (modify-phases %standard-phases | |
75e56aed NG |
2777 | ;; Install scripts for various foreign init systems. Also fix |
2778 | ;; hard-coded path for daemon. | |
d17ae8c0 NG |
2779 | (add-after 'install 'install-rc-scripts |
2780 | (lambda* (#:key outputs #:allow-other-keys) | |
75e56aed NG |
2781 | (let ((out (assoc-ref outputs "out")) |
2782 | (files (find-files | |
2783 | (string-append "../thinkfan-" ,version "/rcscripts") | |
2784 | ".*"))) | |
2785 | (substitute* files | |
2786 | (("/usr/sbin/(\\$NAME|thinkfan)" _ name) | |
2787 | (string-append out "/sbin/" name))) | |
2788 | (for-each (cute install-file <> | |
2789 | (string-append out "/share/thinkfan")) | |
2790 | files)) | |
d17ae8c0 NG |
2791 | #t))))) |
2792 | (inputs | |
2793 | `(("libatasmart" ,libatasmart))) | |
2794 | (home-page "http://thinkfan.sourceforge.net/") | |
2795 | (synopsis "Simple fan control program") | |
2796 | (description | |
2797 | "Thinkfan is a simple fan control program. It reads temperatures, | |
2798 | checks them against configured limits and switches to appropriate (also | |
2799 | pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any | |
2800 | other @code{hwmon} driver that enables temperature reading and fan control | |
2801 | from userspace.") | |
2802 | (license license:gpl3+))) | |
91231156 LC |
2803 | |
2804 | (define-public ntfs-3g | |
2805 | (package | |
2806 | (name "ntfs-3g") | |
2807 | (version "2016.2.22") | |
2808 | (source (origin | |
2809 | (method url-fetch) | |
2810 | (uri (string-append "https://tuxera.com/opensource/" | |
2811 | "ntfs-3g_ntfsprogs-" version ".tgz")) | |
2812 | (sha256 | |
2813 | (base32 | |
2814 | "180y5y09h30ryf2vim8j30a2npwz1iv9ly5yjmh3wjdkwh2jrdyp")) | |
2815 | (modules '((guix build utils))) | |
2816 | (snippet | |
2817 | ;; Install under $prefix. | |
2818 | '(substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in") | |
2819 | (("/sbin") | |
2820 | "@sbindir@"))))) | |
2821 | (build-system gnu-build-system) | |
2822 | (inputs `(("util-linux" ,util-linux) | |
2823 | ("fuse" ,fuse))) ;libuuid | |
2824 | (native-inputs `(("pkg-config" ,pkg-config))) | |
2825 | (arguments | |
2826 | '(#:configure-flags (list "--exec-prefix=${prefix}" | |
2827 | "--with-fuse=external" ;use our own FUSE | |
2828 | "--enable-mount-helper" | |
2829 | "--enable-posix-acls" | |
2830 | "--enable-xattr-mappings"))) | |
2831 | (home-page "http://www.tuxera.com/community/open-source-ntfs-3g/") | |
2832 | (synopsis "Read-write access to NTFS file systems") | |
2833 | (description | |
2834 | "NTFS-3G provides read-write access to NTFS file systems, which are | |
2835 | commonly found on Microsoft Windows. It is implemented as a FUSE file system. | |
2836 | The package provides additional NTFS tools.") | |
2837 | (license license:gpl2+))) | |
9b0942c1 DC |
2838 | |
2839 | (define-public rng-tools | |
2840 | (package | |
2841 | (name "rng-tools") | |
2842 | (version "5") | |
2843 | (source (origin | |
2844 | (method url-fetch) | |
2845 | (uri (string-append | |
2846 | "http://downloads.sourceforge.net/sourceforge/gkernel/" | |
2847 | "rng-tools-" version ".tar.gz")) | |
2848 | (sha256 | |
2849 | (base32 | |
2850 | "13h7lc8wl9khhvkr0i3bl5j9bapf8anhqis1lcnwxg1vc2v058b0")))) | |
2851 | (build-system gnu-build-system) | |
2852 | (synopsis "Random number generator daemon") | |
2853 | (description | |
2854 | "Monitor a hardware random number generator, and supply entropy | |
2855 | from that to the system kernel's @file{/dev/random} machinery.") | |
2856 | (home-page "http://sourceforge.net/projects/gkernel") | |
2857 | ;; The source package is offered under the GPL2+, but the files | |
2858 | ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2. | |
2859 | (license (list license:gpl2 license:gpl2+)))) | |
58d6a1f2 TGR |
2860 | |
2861 | (define-public cpupower | |
2862 | (package | |
2863 | (name "cpupower") | |
2864 | (version (package-version linux-libre)) | |
2865 | (source (package-source linux-libre)) | |
2866 | (build-system gnu-build-system) | |
2867 | (arguments | |
2868 | '(#:phases (modify-phases %standard-phases | |
2869 | (add-after 'unpack 'enter-subdirectory | |
2870 | (lambda _ | |
2871 | (chdir "tools/power/cpupower"))) | |
2872 | (delete 'configure) | |
2873 | (add-before 'build 'fix-makefiles | |
2874 | (lambda _ | |
2875 | (substitute* "Makefile" | |
2876 | (("/usr/") "/") | |
2877 | (("/bin/(install|pwd)" _ command) command)) | |
2878 | (substitute* "bench/Makefile" | |
2879 | (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o"))))) | |
2880 | #:make-flags (let ((out (assoc-ref %outputs "out"))) | |
2881 | (list (string-append "DESTDIR=" out) | |
2882 | (string-append "LDFLAGS=-Wl,-rpath=" out "/lib") | |
2883 | "docdir=/share/doc/cpupower" | |
2884 | "confdir=$(docdir)/examples" | |
2885 | ;; The Makefile recommends the following changes | |
2886 | "DEBUG=false" | |
2887 | "PACKAGE_BUGREPORT=bug-guix@gnu.org")) | |
2888 | #:tests? #f)) ;no tests | |
b94a6ca0 | 2889 | (native-inputs `(("gettext" ,gettext-minimal))) |
58d6a1f2 TGR |
2890 | (inputs `(("pciutils" ,pciutils))) |
2891 | (home-page (package-home-page linux-libre)) | |
2892 | (synopsis "CPU frequency and voltage scaling tools for Linux") | |
2893 | (description | |
2894 | "cpupower is a set of user-space tools that use the cpufreq feature of the | |
2895 | Linux kernel to retrieve and control processor features related to power saving, | |
2896 | such as frequency and voltage scaling.") | |
2897 | (license license:gpl2))) | |
2b76f135 TGR |
2898 | |
2899 | (define-public haveged | |
2900 | (package | |
2901 | (name "haveged") | |
2902 | (version "1.9.1") | |
2903 | (source | |
2904 | (origin | |
2905 | (method url-fetch) | |
2906 | (uri (string-append "http://www.issihosts.com/haveged/haveged-" | |
2907 | version ".tar.gz")) | |
2908 | (sha256 | |
2909 | (base32 | |
2910 | "059pxlfd4l5dqhd6r3lynzfz4wby2f17294fy17pi9j2jpnn68ww")))) | |
2911 | (build-system gnu-build-system) | |
2912 | (home-page "http://www.issihosts.com/haveged") | |
2913 | (synopsis "Entropy source for the Linux random number generator") | |
2914 | (description | |
2915 | "haveged generates an unpredictable stream of random numbers for use by | |
2916 | Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's | |
2917 | standard mechanisms for filling the entropy pool may not be sufficient for | |
2918 | systems with high needs or limited user interaction, such as headless servers. | |
2919 | @command{haveged} runs as a privileged daemon, harvesting randomness from the | |
2920 | indirect effects of hardware events on hidden processor state using the HArdware | |
2921 | Volatile Entropy Gathering and Expansion (HAVEGE) algorithm. It tunes itself to | |
2922 | its environment and provides the same built-in test suite for the output stream | |
2923 | as used on certified hardware security devices.") | |
2924 | (license (list (license:non-copyleft "file://nist/mconf.h") | |
2925 | (license:non-copyleft "file://nist/packtest.c") | |
2926 | license:public-domain ; nist/dfft.c | |
2927 | license:gpl3+)))) ; everything else | |
e385e957 TGR |
2928 | |
2929 | (define-public ecryptfs-utils | |
2930 | (package | |
2931 | (name "ecryptfs-utils") | |
2932 | (version "111") | |
2933 | (source | |
2934 | (origin | |
2935 | (method url-fetch) | |
2936 | (uri (string-append "https://launchpad.net/ecryptfs/trunk/" | |
2937 | version "/+download/ecryptfs-utils_" | |
2938 | version ".orig.tar.gz")) | |
2939 | (sha256 | |
2940 | (base32 | |
2941 | "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i")))) | |
2942 | (build-system gnu-build-system) | |
2943 | (arguments | |
2944 | `(#:configure-flags (list "--disable-pywrap"))) | |
2945 | (native-inputs | |
2946 | `(("intltool" ,intltool) | |
2947 | ("perl" ,perl) ; for pod2man | |
2948 | ("pkg-config" ,pkg-config))) | |
2949 | (inputs | |
2950 | `(("keyutils" ,keyutils) | |
2951 | ("linux-pam" ,linux-pam) | |
2952 | ("nss" ,nss))) | |
2953 | (home-page "http://ecryptfs.org/") | |
2954 | (synopsis "eCryptfs cryptographic file system utilities") | |
2955 | (description | |
2956 | "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux. | |
2957 | Each file's cryptographic meta-data is stored inside the file itself, along | |
2958 | with the encrypted contents. This allows individual encrypted files to be | |
2959 | copied between hosts and still be decrypted with the proper key. eCryptfs is a | |
2960 | native Linux file system, and has been part of the Linux kernel since version | |
2961 | 2.6.19. This package contains the userland utilities to manage it.") | |
2962 | ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c | |
2963 | ;; grant additional permission to link with OpenSSL. | |
2964 | (license license:gpl2+))) | |
cff0adec DC |
2965 | |
2966 | (define-public libnfsidmap | |
2967 | (package | |
2968 | (name "libnfsidmap") | |
2969 | (version "0.25") | |
2970 | (source (origin | |
2971 | (method url-fetch) | |
2972 | (uri (string-append | |
2973 | "http://www.citi.umich.edu/projects/nfsv4/linux/" | |
2974 | name "/" name "-" version ".tar.gz")) | |
2975 | (sha256 | |
2976 | (base32 | |
2977 | "1kzgwxzh83qi97rblcm9qj80cdvnv8kml2plz0q103j0hifj8vb5")))) | |
2978 | (build-system gnu-build-system) | |
2979 | (arguments | |
2980 | `(#:configure-flags (list | |
2981 | (string-append "--with-pluginpath=" | |
2982 | (assoc-ref %outputs "out") | |
2983 | "/lib/libnfsidmap")))) | |
2984 | (home-page | |
2985 | "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html") | |
2986 | (synopsis | |
2987 | "NFSv4 support library for name/ID mapping") | |
2988 | (description "Libnfsidmap is a library holding mulitiple methods of | |
2989 | mapping names to ids and visa versa, mainly for NFSv4. It provides an | |
2990 | extensible array of mapping functions, currently consisting of two choices: | |
2991 | the default @code{nsswitch} and the experimental @code{umich_ldap}.") | |
2992 | (license (license:non-copyleft "file://COPYING" | |
2993 | "See COPYING in the distribution.")))) | |
035d3593 DC |
2994 | |
2995 | (define-public module-init-tools | |
2996 | (package | |
2997 | (name "module-init-tools") | |
2998 | (version "3.16") | |
2999 | (source (origin | |
3000 | (method url-fetch) | |
3001 | (uri (string-append | |
3002 | "mirror://kernel.org/linux/utils/kernel/module-init-tools/" | |
3003 | "module-init-tools-" version ".tar.bz2")) | |
3004 | (sha256 | |
3005 | (base32 | |
3006 | "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1")) | |
3007 | (patches (search-patches "module-init-tools-moduledir.patch")))) | |
3008 | (build-system gnu-build-system) | |
3009 | (arguments | |
3010 | ;; FIXME: The upstream tarball lacks man pages, and building them would | |
3011 | ;; require DocBook & co. We used to use Gentoo's pre-built man pages, | |
3012 | ;; but they vanished. In the meantime, fake it. | |
3013 | '(#:phases (alist-cons-before | |
3014 | 'configure 'fake-docbook | |
3015 | (lambda _ | |
3016 | (substitute* "Makefile.in" | |
3017 | (("^DOCBOOKTOMAN.*$") | |
3018 | "DOCBOOKTOMAN = true\n"))) | |
3019 | %standard-phases))) | |
3020 | (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/") | |
3021 | (synopsis "Tools for loading and managing Linux kernel modules") | |
3022 | (description | |
3023 | "Tools for loading and managing Linux kernel modules, such as `modprobe', | |
3024 | `insmod', `lsmod', and more.") | |
3025 | (license license:gpl2+))) | |
dd65f3b7 TGR |
3026 | |
3027 | (define-public mcelog | |
3028 | (package | |
3029 | (name "mcelog") | |
483b7ce7 | 3030 | (version "144") |
dd65f3b7 TGR |
3031 | (source (origin |
3032 | (method url-fetch) | |
3033 | (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/" | |
3034 | "mcelog.git/snapshot/v" version ".tar.gz")) | |
3035 | (sha256 | |
3036 | (base32 | |
483b7ce7 | 3037 | "03jyhsl0s59sfqykj5p6gkb03k4w1h9ay31yxym1dnzis5sq99pa")) |
dd65f3b7 TGR |
3038 | (file-name (string-append name "-" version ".tar.gz")) |
3039 | (modules '((guix build utils))) | |
3040 | (snippet | |
3041 | ;; The snapshots lack a .git directory, breaking ‘git describe’. | |
3042 | `(substitute* "Makefile" | |
3043 | (("\"unknown\"") (string-append "\"v" ,version "\"")))))) | |
3044 | (build-system gnu-build-system) | |
3045 | (arguments | |
3046 | `(#:phases (modify-phases %standard-phases | |
3047 | (delete 'configure)) ; no configure script | |
3048 | #:make-flags (let ((out (assoc-ref %outputs "out"))) | |
3049 | (list "CC=gcc" | |
3050 | (string-append "prefix=" out) | |
3051 | (string-append "DOCDIR=" out "/share/doc/mcelog") | |
3052 | "etcprefix=$(DOCDIR)/examples")) | |
3053 | ;; The tests will only run as root on certain supported CPU models. | |
3054 | #:tests? #f)) | |
3055 | (supported-systems (list "i686-linux" "x86_64-linux")) | |
3056 | (home-page "http://mcelog.org/") | |
3057 | (synopsis "Machine check monitor for x86 Linux systems") | |
3058 | (description | |
3059 | "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU, | |
3060 | and other hardware errors on x86 systems. It can also perform user-defined | |
3061 | tasks, such as bringing bad pages off-line, when configurable error thresholds | |
3062 | are exceeded.") | |
3063 | (license license:gpl2))) | |
0c60cc53 DM |
3064 | |
3065 | (define-public mtd-utils | |
3066 | (package | |
3067 | (name "mtd-utils") | |
3068 | (version "1.5.2") | |
3069 | (source (origin | |
3070 | (method url-fetch) | |
3071 | (uri (string-append | |
3072 | "ftp://ftp.infradead.org/pub/mtd-utils/" | |
3073 | "mtd-utils-" version ".tar.bz2")) | |
3074 | (sha256 | |
3075 | (base32 | |
3076 | "007lhsd8yb34l899r4m37whhzdw815cz4fnjbpnblfha524p7dax")))) | |
3077 | (inputs | |
3078 | `(("acl" ,acl) | |
3079 | ("libuuid" ,util-linux) | |
3080 | ("lzo", lzo) | |
3081 | ("zlib" ,zlib))) | |
3082 | (build-system gnu-build-system) | |
3083 | (arguments | |
3084 | `(#:test-target "tests" | |
3085 | #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
3086 | #:phases (modify-phases %standard-phases | |
3087 | (delete 'configure)))) | |
3088 | (synopsis "MTD Flash Storage Utilities") | |
3089 | (description "This package provides utilities for testing, partitioning, etc | |
3090 | of flash storage.") | |
3091 | (home-page "http://www.linux-mtd.infradead.org/") | |
3092 | (license | |
3093 | (list license:gpl2 ; Almost everything is gpl2 or gpl2+ | |
3094 | license:mpl1.1 ; All ftl* files | |
3095 | license:expat)))) ; libiniparser | |
def6213f LF |
3096 | |
3097 | (define-public libseccomp | |
3098 | (package | |
3099 | (name "libseccomp") | |
3100 | (version "2.3.1") | |
3101 | (source (origin | |
3102 | (method url-fetch) | |
3103 | (uri (string-append "https://github.com/seccomp/libseccomp/" | |
3104 | "releases/download/v" version | |
3105 | "/libseccomp-" version ".tar.gz")) | |
3106 | (sha256 | |
3107 | (base32 | |
3108 | "0asnlkzqms520r0dra08dzcz5hh6hs7lkajfw9wij3vrd0hxsnzz")))) | |
3109 | (build-system gnu-build-system) | |
3110 | (native-inputs | |
3111 | `(("which" ,which))) | |
3112 | (synopsis "Interface to Linux's seccomp syscall filtering mechanism") | |
3113 | (description "The libseccomp library provides an easy to use, platform | |
3114 | independent, interface to the Linux Kernel's syscall filtering mechanism. The | |
3115 | libseccomp API is designed to abstract away the underlying BPF based syscall | |
3116 | filter language and present a more conventional function-call based filtering | |
3117 | interface that should be familiar to, and easily adopted by, application | |
3118 | developers.") | |
3119 | (home-page "https://github.com/seccomp/libseccomp") | |
3120 | (license license:lgpl2.1))) | |
58c4f11e TGR |
3121 | |
3122 | (define-public radeontop | |
3123 | (package | |
3124 | (name "radeontop") | |
3125 | (version "0.9") | |
3126 | (home-page "https://github.com/clbr/radeontop/") | |
3127 | (source (origin | |
3128 | (method url-fetch) | |
3129 | (uri (string-append home-page "/archive/v" version ".tar.gz")) | |
3130 | (file-name (string-append name "-" version ".tar.gz")) | |
3131 | (sha256 | |
3132 | (base32 | |
3133 | "07fnimn6wwablmdjw0av11hk9a6xilbryh09izq4b2ic4b8md2p7")))) | |
3134 | (build-system gnu-build-system) | |
3135 | (arguments | |
3136 | `(#:phases (modify-phases %standard-phases | |
3137 | ;; getver.sh uses ‘git --describe’, isn't worth an extra git | |
3138 | ;; dependency, and doesn't even work on release(!) tarballs. | |
3139 | (add-after 'unpack 'report-correct-version | |
3140 | (lambda _ (substitute* "getver.sh" | |
3141 | (("ver=unknown") | |
3142 | (string-append "ver=" ,version))))) | |
3143 | (delete 'configure)) ; no configure script | |
3144 | #:make-flags (list "CC=gcc" | |
3145 | (string-append "PREFIX=" %output)) | |
3146 | #:tests? #f)) ; no tests | |
3147 | (native-inputs | |
7c90d0f4 | 3148 | `(("gettext" ,gettext-minimal) |
58c4f11e TGR |
3149 | ("pkg-config" ,pkg-config))) |
3150 | (inputs | |
3151 | `(("libdrm" ,libdrm) | |
3152 | ("libpciaccess" ,libpciaccess) | |
3153 | ("ncurses" ,ncurses))) | |
3154 | (synopsis "Usage monitor for AMD Radeon graphics") | |
3155 | (description "RadeonTop monitors resource consumption on supported AMD | |
3156 | Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on | |
3157 | a terminal or saved to a file for further processing. It measures both the | |
3158 | activity of the GPU as a whole, which is also accurate during OpenCL | |
3159 | computations, as well as separate component statistics that are only meaningful | |
3160 | under OpenGL graphics workloads.") | |
3161 | (license license:gpl3))) | |
0d74462a MB |
3162 | |
3163 | (define-public efivar | |
3164 | (package | |
3165 | (name "efivar") | |
3166 | (version "30") | |
3167 | (source (origin | |
3168 | (method url-fetch) | |
3169 | (uri (string-append "https://github.com/rhinstaller/" name | |
3170 | "/releases/download/" version "/" name | |
3171 | "-" version ".tar.bz2")) | |
3172 | (sha256 | |
3173 | (base32 | |
3174 | "12qjnm44yi55ffqxjpgrxy82s89yjziy84w2rfjjknsd8flj0mqz")))) | |
3175 | (build-system gnu-build-system) | |
3176 | (arguments | |
3177 | `(;; Tests require a UEFI system and is not detected in the chroot. | |
3178 | #:tests? #f | |
3179 | #:make-flags (list (string-append "prefix=" %output) | |
3180 | (string-append "libdir=" %output "/lib") | |
3181 | (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")) | |
3182 | #:phases | |
3183 | (modify-phases %standard-phases | |
3184 | (delete 'configure)))) | |
3185 | (native-inputs | |
3186 | `(("pkg-config" ,pkg-config))) | |
3187 | (inputs | |
3188 | `(("popt" ,popt))) | |
3189 | (home-page "https://github.com/rhinstaller/efivar") | |
3190 | (synopsis "Tool and library to manipulate EFI variables") | |
3191 | (description "This package provides a library and a command line | |
3192 | interface to the variable facility of UEFI boot firmware.") | |
3193 | (license license:lgpl2.1+))) | |
1581406e MB |
3194 | |
3195 | (define-public efibootmgr | |
3196 | (package | |
3197 | (name "efibootmgr") | |
3198 | (version "14") | |
3199 | (source (origin | |
3200 | (method url-fetch) | |
3201 | (uri (string-append "https://github.com/rhinstaller/" name | |
3202 | "/releases/download/" version "/" name | |
3203 | "-" version ".tar.bz2")) | |
3204 | (sha256 | |
3205 | (base32 | |
3206 | "1n3sydvpr6yl040hhf460k7mrxby7laqd9dqs6pq0js1hijc2zip")))) | |
3207 | (build-system gnu-build-system) | |
3208 | (arguments | |
3209 | `(#:tests? #f ; No tests. | |
3210 | #:make-flags (list (string-append "prefix=" %output) | |
3211 | (string-append "libdir=" %output "/lib") | |
3212 | ;; Override CFLAGS to add efivar include directory. | |
3213 | (string-append "CFLAGS=-O2 -g -flto -I" | |
3214 | (assoc-ref %build-inputs "efivar") | |
3215 | "/include/efivar")) | |
3216 | #:phases | |
3217 | (modify-phases %standard-phases | |
3218 | (add-after 'unpack 'branding | |
3219 | ;; Replace default loader path with something more familiar. | |
3220 | (lambda _ | |
3221 | (substitute* "src/efibootmgr.c" | |
3222 | (("EFI\\\\\\\\redhat") ; Matches 'EFI\\redhat'. | |
3223 | "EFI\\\\gnu")) | |
3224 | #t)) | |
3225 | (delete 'configure)))) | |
3226 | (native-inputs | |
3227 | `(("pkg-config" ,pkg-config))) | |
3228 | (inputs | |
3229 | `(("efivar" ,efivar) | |
3230 | ("popt" ,popt))) | |
3231 | (home-page "https://github.com/rhinstaller/efibootmgr") | |
3232 | (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager") | |
3233 | (description | |
3234 | "@code{efibootmgr} is a user-space application to modify the Intel | |
3235 | Extensible Firmware Interface (EFI) Boot Manager. This application can | |
3236 | create and destroy boot entries, change the boot order, change the next | |
3237 | running boot option, and more.") | |
3238 | (license license:gpl2+))) |