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