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