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