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