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