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