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