Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
fb9b7ce2 | 2 | ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> |
53142109 | 3 | ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr> |
233e7676 | 4 | ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> |
bdac3d4b | 5 | ;;; Copyright © 2014, 2015 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> |
fd76c904 | 8 | ;;; |
233e7676 | 9 | ;;; This file is part of GNU Guix. |
fd76c904 | 10 | ;;; |
233e7676 | 11 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
fd76c904 LC |
12 | ;;; under the terms of the GNU General Public License as published by |
13 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
14 | ;;; your option) any later version. | |
15 | ;;; | |
233e7676 | 16 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
fd76c904 LC |
17 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
18 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | ;;; GNU General Public License for more details. | |
20 | ;;; | |
21 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 22 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
fd76c904 | 23 | |
1ffa7090 | 24 | (define-module (gnu packages linux) |
023fef7d LC |
25 | #:use-module ((guix licenses) |
26 | #:hide (zlib)) | |
59a43334 | 27 | #:use-module (gnu packages) |
f61e0e79 | 28 | #:use-module (gnu packages compression) |
3b027388 | 29 | #:use-module (gnu packages gcc) |
1ffa7090 | 30 | #:use-module (gnu packages flex) |
90a0048f | 31 | #:use-module (gnu packages bison) |
9f533d60 | 32 | #:use-module (gnu packages admin) |
d7d42d6b | 33 | #:use-module (gnu packages gperf) |
1ffa7090 LC |
34 | #:use-module (gnu packages libusb) |
35 | #:use-module (gnu packages ncurses) | |
d7d42d6b | 36 | #:use-module (gnu packages pciutils) |
5f96f303 | 37 | #:use-module (gnu packages databases) |
1ffa7090 LC |
38 | #:use-module (gnu packages perl) |
39 | #:use-module (gnu packages pkg-config) | |
7c0dbe78 | 40 | #:use-module (gnu packages python) |
b1fb4b23 | 41 | #:use-module (gnu packages slang) |
e7b38500 | 42 | #:use-module (gnu packages algebra) |
1dba6407 | 43 | #:use-module (gnu packages gettext) |
db288efa | 44 | #:use-module (gnu packages glib) |
17b293a0 | 45 | #:use-module (gnu packages pulseaudio) |
c762e82e | 46 | #:use-module (gnu packages attr) |
17b293a0 | 47 | #:use-module (gnu packages xml) |
215b6431 | 48 | #:use-module (gnu packages autotools) |
f57d2639 | 49 | #:use-module (gnu packages texinfo) |
b10e9ff6 | 50 | #:use-module (gnu packages check) |
30016044 | 51 | #:use-module (gnu packages maths) |
ce0614dd | 52 | #:use-module (gnu packages base) |
30016044 | 53 | #:use-module (gnu packages rrdtool) |
b62fe07f | 54 | #:use-module (gnu packages elf) |
b087d413 | 55 | #:use-module (gnu packages gtk) |
d7ece67a LC |
56 | #:use-module (gnu packages docbook) |
57 | #:use-module (gnu packages asciidoc) | |
eb7c43c3 DT |
58 | #:use-module (gnu packages readline) |
59 | #:use-module (gnu packages calendar) | |
02b80c3f NK |
60 | #:use-module (guix packages) |
61 | #:use-module (guix download) | |
dc2d59af | 62 | #:use-module (guix utils) |
7c0dbe78 | 63 | #:use-module (guix build-system gnu) |
220193ad | 64 | #:use-module (guix build-system cmake) |
e102f940 | 65 | #:use-module (guix build-system python) |
a94546ec LC |
66 | #:use-module (guix build-system trivial) |
67 | #:use-module (srfi srfi-26) | |
68 | #:use-module (ice-9 match)) | |
fd76c904 | 69 | |
aaf4cb20 LC |
70 | (define-public (system->linux-architecture arch) |
71 | "Return the Linux architecture name for ARCH, a Guix system name such as | |
72 | \"x86_64-linux\"." | |
618cea69 NK |
73 | (let ((arch (car (string-split arch #\-)))) |
74 | (cond ((string=? arch "i686") "i386") | |
75 | ((string-prefix? "mips" arch) "mips") | |
aaf4cb20 | 76 | ((string-prefix? "arm" arch) "arm") |
618cea69 NK |
77 | (else arch)))) |
78 | ||
6023cc74 LC |
79 | (define (linux-libre-urls version) |
80 | "Return a list of URLs for Linux-Libre VERSION." | |
81 | (list (string-append | |
82 | "http://linux-libre.fsfla.org/pub/linux-libre/releases/" | |
83 | version "-gnu/linux-libre-" version "-gnu.tar.xz") | |
84 | ||
85 | ;; XXX: Work around <http://bugs.gnu.org/14851>. | |
86 | (string-append | |
87 | "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-" | |
88 | version "-gnu.tar.xz") | |
89 | ||
90 | ;; Maybe this URL will become valid eventually. | |
91 | (string-append | |
92 | "mirror://gnu/linux-libre/" version "-gnu/linux-libre-" | |
93 | version "-gnu.tar.xz"))) | |
94 | ||
80fe5c60 | 95 | (define-public linux-libre-headers |
e081385a | 96 | (let* ((version "3.14.37") |
80fe5c60 | 97 | (build-phase |
618cea69 NK |
98 | (lambda (arch) |
99 | `(lambda _ | |
100 | (setenv "ARCH" ,(system->linux-architecture arch)) | |
101 | (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")) | |
45298f8f | 102 | |
618cea69 NK |
103 | (and (zero? (system* "make" "defconfig")) |
104 | (zero? (system* "make" "mrproper" "headers_check")))))) | |
80fe5c60 LC |
105 | (install-phase |
106 | `(lambda* (#:key outputs #:allow-other-keys) | |
107 | (let ((out (assoc-ref outputs "out"))) | |
108 | (and (zero? (system* "make" | |
109 | (string-append "INSTALL_HDR_PATH=" out) | |
110 | "headers_install")) | |
b15389e1 LC |
111 | (begin |
112 | (mkdir (string-append out "/include/config")) | |
113 | (call-with-output-file | |
114 | (string-append out | |
115 | "/include/config/kernel.release") | |
116 | (lambda (p) | |
117 | (format p "~a-default~%" ,version))) | |
118 | ||
119 | ;; Remove the '.install' and '..install.cmd' files; the | |
120 | ;; latter contains store paths, which pulls in bootstrap | |
121 | ;; binaries in the build environment, and prevents bit | |
122 | ;; reproducibility for the bootstrap binaries. | |
123 | (for-each delete-file (find-files out "\\.install")) | |
124 | ||
125 | #t)))))) | |
80fe5c60 LC |
126 | (package |
127 | (name "linux-libre-headers") | |
dfb52abb | 128 | (version version) |
80fe5c60 LC |
129 | (source (origin |
130 | (method url-fetch) | |
6023cc74 | 131 | (uri (linux-libre-urls version)) |
80fe5c60 LC |
132 | (sha256 |
133 | (base32 | |
e081385a | 134 | "1blxr2bsvfqi9khj4cpspv434bmx252zak2wsbi2mgl60zh77gza")))) |
80fe5c60 LC |
135 | (build-system gnu-build-system) |
136 | (native-inputs `(("perl" ,perl))) | |
137 | (arguments | |
138 | `(#:modules ((guix build gnu-build-system) | |
139 | (guix build utils) | |
56c092ce | 140 | (srfi srfi-1)) |
80fe5c60 | 141 | #:phases (alist-replace |
fb6c2fa8 LC |
142 | 'build ,(build-phase (or (%current-target-system) |
143 | (%current-system))) | |
80fe5c60 LC |
144 | (alist-replace |
145 | 'install ,install-phase | |
56c092ce | 146 | (alist-delete 'configure %standard-phases))) |
b15389e1 | 147 | #:allowed-references () |
80fe5c60 LC |
148 | #:tests? #f)) |
149 | (synopsis "GNU Linux-Libre kernel headers") | |
150 | (description "Headers of the Linux-Libre kernel.") | |
38bbd61d | 151 | (license gpl2) |
80fe5c60 LC |
152 | (home-page "http://www.gnu.org/software/linux-libre/")))) |
153 | ||
b4fcb735 LC |
154 | (define-public module-init-tools |
155 | (package | |
156 | (name "module-init-tools") | |
157 | (version "3.16") | |
158 | (source (origin | |
159 | (method url-fetch) | |
160 | (uri (string-append | |
161 | "mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-" | |
162 | version ".tar.bz2")) | |
163 | (sha256 | |
164 | (base32 | |
d3bbe992 LC |
165 | "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1")) |
166 | (patches | |
167 | (list (search-patch "module-init-tools-moduledir.patch"))))) | |
b4fcb735 | 168 | (build-system gnu-build-system) |
b4fcb735 | 169 | (arguments |
5c413a9c LC |
170 | ;; FIXME: The upstream tarball lacks man pages, and building them would |
171 | ;; require DocBook & co. We used to use Gentoo's pre-built man pages, | |
172 | ;; but they vanished. In the meantime, fake it. | |
b4fcb735 | 173 | '(#:phases (alist-cons-before |
5c413a9c LC |
174 | 'configure 'fake-docbook |
175 | (lambda _ | |
176 | (substitute* "Makefile.in" | |
177 | (("^DOCBOOKTOMAN.*$") | |
178 | "DOCBOOKTOMAN = true\n"))) | |
b4fcb735 LC |
179 | %standard-phases))) |
180 | (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/") | |
181 | (synopsis "Tools for loading and managing Linux kernel modules") | |
182 | (description | |
183 | "Tools for loading and managing Linux kernel modules, such as `modprobe', | |
184 | `insmod', `lsmod', and more.") | |
185 | (license gpl2+))) | |
186 | ||
ac47a7c2 LC |
187 | (define %boot-logo-patch |
188 | ;; Linux-Libre boot logo featuring Freedo and a gnu. | |
189 | (origin | |
190 | (method url-fetch) | |
191 | (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/" | |
74dde9e9 | 192 | "lemote/gnewsense/branches/3.16/100gnu+freedo.patch")) |
ac47a7c2 LC |
193 | (sha256 |
194 | (base32 | |
195 | "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06")))) | |
196 | ||
a94546ec LC |
197 | (define (kernel-config system) |
198 | "Return the absolute file name of the Linux-Libre build configuration file | |
1650dd8a | 199 | for SYSTEM, or #f if there is no configuration for SYSTEM." |
a94546ec LC |
200 | (define (lookup file) |
201 | (let ((file (string-append "gnu/packages/" file))) | |
202 | (search-path %load-path file))) | |
203 | ||
204 | (match system | |
205 | ("i686-linux" | |
206 | (lookup "linux-libre-i686.conf")) | |
207 | ("x86_64-linux" | |
208 | (lookup "linux-libre-x86_64.conf")) | |
209 | (_ | |
1650dd8a | 210 | #f))) |
a94546ec | 211 | |
beacfcab | 212 | (define-public linux-libre |
63398a25 | 213 | (let* ((version "4.0.5") |
beacfcab | 214 | (build-phase |
ac47a7c2 LC |
215 | '(lambda* (#:key system inputs #:allow-other-keys #:rest args) |
216 | ;; Apply the neat patch. | |
9a224ac2 | 217 | (system* "patch" "-p1" "--force" |
ac47a7c2 LC |
218 | "-i" (assoc-ref inputs "patch/freedo+gnu")) |
219 | ||
beacfcab LC |
220 | (let ((arch (car (string-split system #\-)))) |
221 | (setenv "ARCH" | |
222 | (cond ((string=? arch "i686") "i386") | |
223 | (else arch))) | |
224 | (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))) | |
225 | ||
a94546ec LC |
226 | (let ((build (assoc-ref %standard-phases 'build)) |
227 | (config (assoc-ref inputs "kconfig"))) | |
1650dd8a LC |
228 | |
229 | ;; Use the architecture-specific config if available, and | |
230 | ;; 'defconfig' otherwise. | |
231 | (if config | |
232 | (begin | |
233 | (copy-file config ".config") | |
234 | (chmod ".config" #o666)) | |
235 | (system* "make" "defconfig")) | |
a94546ec LC |
236 | |
237 | ;; Appending works even when the option wasn't in the | |
238 | ;; file. The last one prevails if duplicated. | |
239 | (let ((port (open-file ".config" "a"))) | |
240 | (display (string-append "CONFIG_NET_9P=m\n" | |
241 | "CONFIG_NET_9P_VIRTIO=m\n" | |
242 | "CONFIG_VIRTIO_BLK=m\n" | |
243 | "CONFIG_VIRTIO_NET=m\n" | |
244 | ;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html | |
245 | "CONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n" | |
246 | "CONFIG_VIRTIO_PCI=m\n" | |
247 | "CONFIG_VIRTIO_BALLOON=m\n" | |
248 | "CONFIG_VIRTIO_MMIO=m\n" | |
249 | "CONFIG_FUSE_FS=m\n" | |
250 | "CONFIG_CIFS=m\n" | |
251 | "CONFIG_9P_FS=m\n") | |
252 | port) | |
253 | (close-port port)) | |
254 | ||
255 | (zero? (system* "make" "oldconfig")) | |
256 | ||
257 | ;; Call the default `build' phase so `-j' is correctly | |
258 | ;; passed. | |
259 | (apply build #:make-flags "all" args)))) | |
beacfcab LC |
260 | (install-phase |
261 | `(lambda* (#:key inputs outputs #:allow-other-keys) | |
262 | (let* ((out (assoc-ref outputs "out")) | |
263 | (moddir (string-append out "/lib/modules")) | |
264 | (mit (assoc-ref inputs "module-init-tools"))) | |
265 | (mkdir-p moddir) | |
266 | (for-each (lambda (file) | |
267 | (copy-file file | |
268 | (string-append out "/" (basename file)))) | |
269 | (find-files "." "^(bzImage|System\\.map)$")) | |
270 | (copy-file ".config" (string-append out "/config")) | |
271 | (zero? (system* "make" | |
272 | (string-append "DEPMOD=" mit "/sbin/depmod") | |
273 | (string-append "MODULE_DIR=" moddir) | |
274 | (string-append "INSTALL_PATH=" out) | |
275 | (string-append "INSTALL_MOD_PATH=" out) | |
cda3d81e | 276 | "INSTALL_MOD_STRIP=1" |
beacfcab LC |
277 | "modules_install")))))) |
278 | (package | |
279 | (name "linux-libre") | |
dfb52abb | 280 | (version version) |
beacfcab LC |
281 | (source (origin |
282 | (method url-fetch) | |
6023cc74 | 283 | (uri (linux-libre-urls version)) |
beacfcab LC |
284 | (sha256 |
285 | (base32 | |
63398a25 | 286 | "0g8a4h8gjw51pp02hjfrp6bk2nkrclm3krp9mpjh3iwbf4vfh2al")))) |
beacfcab LC |
287 | (build-system gnu-build-system) |
288 | (native-inputs `(("perl" ,perl) | |
e7b38500 | 289 | ("bc" ,bc) |
ac47a7c2 | 290 | ("module-init-tools" ,module-init-tools) |
a94546ec | 291 | ("patch/freedo+gnu" ,%boot-logo-patch) |
1650dd8a LC |
292 | |
293 | ,@(let ((conf (kernel-config (or (%current-target-system) | |
294 | (%current-system))))) | |
295 | (if conf | |
296 | `(("kconfig" ,conf)) | |
297 | '())))) | |
3b027388 LC |
298 | |
299 | ;; XXX: Work around an ICE with our patched GCC 4.8.3 while compiling | |
300 | ;; 'drivers/staging/vt6656/michael.o': <http://hydra.gnu.org/build/96389/>. | |
301 | (inputs `(("gcc" ,gcc-4.9))) | |
302 | ||
beacfcab LC |
303 | (arguments |
304 | `(#:modules ((guix build gnu-build-system) | |
305 | (guix build utils) | |
306 | (srfi srfi-1) | |
307 | (ice-9 match)) | |
308 | #:phases (alist-replace | |
309 | 'build ,build-phase | |
310 | (alist-replace | |
311 | 'install ,install-phase | |
312 | (alist-delete 'configure %standard-phases))) | |
313 | #:tests? #f)) | |
f50d2669 | 314 | (synopsis "100% free redistribution of a cleaned Linux kernel") |
a22dc0c4 | 315 | (description |
79c311b8 LC |
316 | "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel. |
317 | It has been modified to remove all non-free binary blobs.") | |
beacfcab LC |
318 | (license gpl2) |
319 | (home-page "http://www.gnu.org/software/linux-libre/")))) | |
320 | ||
53142109 | 321 | |
c84d0eca LC |
322 | ;;; |
323 | ;;; Pluggable authentication modules (PAM). | |
324 | ;;; | |
325 | ||
fd76c904 LC |
326 | (define-public linux-pam |
327 | (package | |
328 | (name "linux-pam") | |
329 | (version "1.1.6") | |
330 | (source | |
331 | (origin | |
332 | (method url-fetch) | |
333 | (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-" | |
334 | version ".tar.bz2") | |
335 | (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-" | |
336 | version ".tar.bz2"))) | |
337 | (sha256 | |
338 | (base32 | |
339 | "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s")))) | |
340 | (build-system gnu-build-system) | |
c4c4cc05 | 341 | (native-inputs |
fd76c904 LC |
342 | `(("flex" ,flex) |
343 | ||
344 | ;; TODO: optional dependencies | |
345 | ;; ("libxcrypt" ,libxcrypt) | |
346 | ;; ("cracklib" ,cracklib) | |
347 | )) | |
348 | (arguments | |
c134056a LC |
349 | '(;; Most users, such as `shadow', expect the headers to be under |
350 | ;; `security'. | |
351 | #:configure-flags (list (string-append "--includedir=" | |
352 | (assoc-ref %outputs "out") | |
353 | "/include/security")) | |
354 | ||
355 | ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d | |
356 | ;; isn't available. | |
357 | #:tests? #f)) | |
fd76c904 LC |
358 | (home-page "http://www.linux-pam.org/") |
359 | (synopsis "Pluggable authentication modules for Linux") | |
360 | (description | |
361 | "A *Free* project to implement OSF's RFC 86.0. | |
362 | Pluggable authentication modules are small shared object files that can | |
363 | be used through the PAM API to perform tasks, like authenticating a user | |
364 | at login. Local and dynamic reconfiguration are its key features") | |
4a44e743 | 365 | (license bsd-3))) |
686f14e8 | 366 | |
53142109 | 367 | |
c84d0eca LC |
368 | ;;; |
369 | ;;; Miscellaneous. | |
370 | ;;; | |
371 | ||
686f14e8 LC |
372 | (define-public psmisc |
373 | (package | |
374 | (name "psmisc") | |
375 | (version "22.20") | |
376 | (source | |
377 | (origin | |
378 | (method url-fetch) | |
379 | (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-" | |
380 | version ".tar.gz")) | |
381 | (sha256 | |
382 | (base32 | |
383 | "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi")))) | |
384 | (build-system gnu-build-system) | |
385 | (inputs `(("ncurses" ,ncurses))) | |
386 | (home-page "http://psmisc.sourceforge.net/") | |
387 | (synopsis | |
35b9e423 | 388 | "Small utilities that use the proc filesystem") |
686f14e8 LC |
389 | (description |
390 | "This PSmisc package is a set of some small useful utilities that | |
35b9e423 | 391 | use the proc filesystem. We're not about changing the world, but |
686f14e8 | 392 | providing the system administrator with some help in common tasks.") |
4a44e743 | 393 | (license gpl2+))) |
02b80c3f NK |
394 | |
395 | (define-public util-linux | |
396 | (package | |
397 | (name "util-linux") | |
9f533d60 | 398 | (version "2.25.2") |
5a6a3ba4 LC |
399 | (source (origin |
400 | (method url-fetch) | |
401 | (uri (string-append "mirror://kernel.org/linux/utils/" | |
9f533d60 LC |
402 | name "/v" (version-major+minor version) "/" |
403 | name "-" version ".tar.xz")) | |
5a6a3ba4 LC |
404 | (sha256 |
405 | (base32 | |
9f533d60 LC |
406 | "1miwwdq1zwvhf0smrxx3fjddq3mz22s8rc5cw54s7x3kbdqpyig0")) |
407 | (patches (list (search-patch "util-linux-tests.patch"))) | |
9d77da2a LC |
408 | (modules '((guix build utils))) |
409 | (snippet | |
ec2da92c LC |
410 | ;; We take the 'logger' program from GNU Inetutils and 'kill' |
411 | ;; from GNU Coreutils. | |
9f533d60 | 412 | '(substitute* "configure" |
ec2da92c LC |
413 | (("build_logger=yes") "build_logger=no") |
414 | (("build_kill=yes") "build_kill=no"))))) | |
02b80c3f NK |
415 | (build-system gnu-build-system) |
416 | (arguments | |
29ec55ee LC |
417 | `(#:configure-flags (list "--disable-use-tty-group" |
418 | "--enable-ddate" | |
419 | ||
420 | ;; Install completions where our | |
421 | ;; bash-completion package expects them. | |
422 | (string-append "--with-bashcompletiondir=" | |
423 | (assoc-ref %outputs "out") | |
424 | "/etc/bash_completion.d")) | |
9f533d60 LC |
425 | #:phases (alist-cons-before |
426 | 'check 'pre-check | |
427 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
428 | (let ((out (assoc-ref outputs "out")) | |
429 | (net (assoc-ref inputs "net-base"))) | |
430 | ;; Change the test to refer to the right file. | |
431 | (substitute* "tests/ts/misc/mcookie" | |
432 | (("/etc/services") | |
433 | (string-append net "/etc/services"))) | |
434 | #t)) | |
02b80c3f | 435 | %standard-phases))) |
f61e0e79 | 436 | (inputs `(("zlib" ,zlib) |
c4c4cc05 JD |
437 | ("ncurses" ,ncurses))) |
438 | (native-inputs | |
9f533d60 LC |
439 | `(("perl" ,perl) |
440 | ("net-base" ,net-base))) ;for tests | |
02b80c3f | 441 | (home-page "https://www.kernel.org/pub/linux/utils/util-linux/") |
35ec07c7 | 442 | (synopsis "Collection of utilities for the Linux kernel") |
02b80c3f | 443 | (description |
35b9e423 | 444 | "Util-linux is a random collection of utilities for the Linux kernel.") |
fe8ccfcc | 445 | |
02b80c3f | 446 | ;; Note that util-linux doesn't use the same license for all the |
fe8ccfcc | 447 | ;; code. GPLv2+ is the default license for a code without an |
02b80c3f | 448 | ;; explicitly defined license. |
fe8ccfcc LC |
449 | (license (list gpl3+ gpl2+ gpl2 lgpl2.0+ |
450 | bsd-4 public-domain)))) | |
5d5c4278 | 451 | |
e47e3eff LC |
452 | (define-public procps |
453 | (package | |
454 | (name "procps") | |
455 | (version "3.2.8") | |
456 | (source (origin | |
457 | (method url-fetch) | |
0e259d7e TUBK |
458 | ;; A mirror://sourceforge URI doesn't work, presumably becuase |
459 | ;; the SourceForge project is misconfigured. | |
e47e3eff LC |
460 | (uri (string-append "http://procps.sourceforge.net/procps-" |
461 | version ".tar.gz")) | |
462 | (sha256 | |
463 | (base32 | |
01eafd38 LC |
464 | "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i")) |
465 | (patches (list (search-patch "procps-make-3.82.patch"))))) | |
e47e3eff | 466 | (build-system gnu-build-system) |
01eafd38 | 467 | (inputs `(("ncurses" ,ncurses))) |
e47e3eff | 468 | (arguments |
80393eed LC |
469 | '(#:modules ((guix build utils) |
470 | (guix build gnu-build-system) | |
471 | (srfi srfi-1) | |
472 | (srfi srfi-26)) | |
473 | #:phases (alist-replace | |
e47e3eff LC |
474 | 'configure |
475 | (lambda* (#:key outputs #:allow-other-keys) | |
476 | ;; No `configure', just a single Makefile. | |
477 | (let ((out (assoc-ref outputs "out"))) | |
478 | (substitute* "Makefile" | |
479 | (("/usr/") "/") | |
480 | (("--(owner|group) 0") "") | |
481 | (("ldconfig") "true") | |
482 | (("^LDFLAGS[[:blank:]]*:=(.*)$" _ value) | |
483 | ;; Add libproc to the RPATH. | |
484 | (string-append "LDFLAGS := -Wl,-rpath=" | |
485 | out "/lib" value)))) | |
486 | (setenv "CC" "gcc")) | |
487 | (alist-replace | |
488 | 'install | |
489 | (lambda* (#:key outputs #:allow-other-keys) | |
490 | (let ((out (assoc-ref outputs "out"))) | |
491 | (and (zero? | |
492 | (system* "make" "install" | |
493 | (string-append "DESTDIR=" out))) | |
494 | ||
80393eed LC |
495 | ;; Remove commands and man pages redundant with |
496 | ;; Coreutils. | |
497 | (let ((dup (append-map (cut find-files out <>) | |
498 | '("^kill" "^uptime")))) | |
499 | (for-each delete-file dup) | |
500 | #t) | |
501 | ||
e47e3eff LC |
502 | ;; Sanity check. |
503 | (zero? | |
504 | (system* (string-append out "/bin/ps") | |
505 | "--version"))))) | |
506 | %standard-phases)) | |
507 | ||
508 | ;; What did you expect? Tests? | |
509 | #:tests? #f)) | |
510 | (home-page "http://procps.sourceforge.net/") | |
35ec07c7 | 511 | (synopsis "Utilities that give information about processes") |
e47e3eff | 512 | (description |
35b9e423 | 513 | "Procps is the package that has a bunch of small useful utilities |
e47e3eff LC |
514 | that give information about processes using the Linux /proc file system. |
515 | The package includes the programs ps, top, vmstat, w, kill, free, | |
516 | slabtop, and skill.") | |
517 | (license gpl2))) | |
518 | ||
5d5c4278 NK |
519 | (define-public usbutils |
520 | (package | |
521 | (name "usbutils") | |
522 | (version "006") | |
523 | (source | |
524 | (origin | |
525 | (method url-fetch) | |
526 | (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/" | |
527 | "usbutils-" version ".tar.xz")) | |
528 | (sha256 | |
529 | (base32 | |
530 | "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr")))) | |
531 | (build-system gnu-build-system) | |
532 | (inputs | |
c4c4cc05 JD |
533 | `(("libusb" ,libusb))) |
534 | (native-inputs | |
535 | `(("pkg-config" ,pkg-config))) | |
5d5c4278 NK |
536 | (home-page "http://www.linux-usb.org/") |
537 | (synopsis | |
538 | "Tools for working with USB devices, such as lsusb") | |
539 | (description | |
540 | "Tools for working with USB devices, such as lsusb.") | |
4050e5d6 | 541 | (license gpl2+))) |
0750452a LC |
542 | |
543 | (define-public e2fsprogs | |
544 | (package | |
545 | (name "e2fsprogs") | |
183eaf87 | 546 | (version "1.42.12") |
0750452a LC |
547 | (source (origin |
548 | (method url-fetch) | |
549 | (uri (string-append "mirror://sourceforge/e2fsprogs/e2fsprogs-" | |
550 | version ".tar.gz")) | |
551 | (sha256 | |
552 | (base32 | |
183eaf87 | 553 | "0v0qcfyls0dlrjy8gx9m3s2wbkp5z3lbsr5hb7x8kp8f3bclcy71")) |
7c594a2c LC |
554 | (modules '((guix build utils))) |
555 | (snippet | |
556 | '(substitute* "MCONFIG.in" | |
557 | (("INSTALL_SYMLINK = /bin/sh") | |
558 | "INSTALL_SYMLINK = sh"))))) | |
0750452a | 559 | (build-system gnu-build-system) |
c4c4cc05 | 560 | (inputs `(("util-linux" ,util-linux))) |
f57d2639 | 561 | (native-inputs `(("pkg-config" ,pkg-config) |
7c594a2c | 562 | ("texinfo" ,texinfo))) ;for the libext2fs Info manual |
0750452a | 563 | (arguments |
c44ed26c LC |
564 | '(;; util-linux is not the preferred source for some of the libraries and |
565 | ;; commands, so disable them (see, e.g., | |
ddfc2fd8 | 566 | ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b336339909c90559b7db40b455f172>.) |
c44ed26c LC |
567 | #:configure-flags '("--disable-libblkid" |
568 | "--disable-libuuid" "--disable-uuidd" | |
569 | "--disable-fsck" | |
7c594a2c LC |
570 | |
571 | ;; Install libext2fs et al. | |
572 | "--enable-elf-shlibs") | |
573 | ||
574 | #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" | |
575 | (assoc-ref %outputs "out") | |
576 | "/lib")) | |
ddfc2fd8 LC |
577 | |
578 | #:phases (alist-cons-before | |
0750452a LC |
579 | 'configure 'patch-shells |
580 | (lambda _ | |
581 | (substitute* "configure" | |
582 | (("/bin/sh (.*)parse-types.sh" _ dir) | |
583 | (string-append (which "sh") " " dir | |
584 | "parse-types.sh"))) | |
585 | (substitute* (find-files "." "^Makefile.in$") | |
586 | (("#!/bin/sh") | |
587 | (string-append "#!" (which "sh"))))) | |
1c975f60 LC |
588 | (alist-cons-after |
589 | 'install 'install-libs | |
853c2f18 LC |
590 | (lambda* (#:key outputs #:allow-other-keys) |
591 | (let* ((out (assoc-ref outputs "out")) | |
592 | (lib (string-append out "/lib"))) | |
593 | (and (zero? (system* "make" "install-libs")) | |
594 | ||
595 | ;; Make the .a writable so that 'strip' works. | |
596 | ;; Failing to do that, due to debug symbols, we | |
597 | ;; retain a reference to the final | |
598 | ;; linux-libre-headers, which refer to the | |
599 | ;; bootstrap binaries. | |
600 | (let ((archives (find-files lib "\\.a$"))) | |
601 | (for-each (lambda (file) | |
602 | (chmod file #o666)) | |
603 | archives) | |
604 | #t)))) | |
1c975f60 | 605 | %standard-phases)) |
0750452a LC |
606 | |
607 | ;; FIXME: Tests work by comparing the stdout/stderr of programs, that | |
608 | ;; they fail because we get an extra line that says "Can't check if | |
609 | ;; filesystem is mounted due to missing mtab file". | |
610 | #:tests? #f)) | |
611 | (home-page "http://e2fsprogs.sourceforge.net/") | |
35ec07c7 | 612 | (synopsis "Creating and checking ext2/ext3/ext4 file systems") |
0750452a LC |
613 | (description |
614 | "This package provides tools for manipulating ext2/ext3/ext4 file systems.") | |
615 | (license (list gpl2 ; programs | |
616 | lgpl2.0 ; libext2fs | |
617 | x11)))) ; libuuid | |
d8482ad0 | 618 | |
e48977e7 LC |
619 | (define e2fsprogs/static |
620 | (static-package | |
621 | (package (inherit e2fsprogs) | |
622 | (arguments | |
623 | ;; Do not build shared libraries. | |
624 | (substitute-keyword-arguments (package-arguments e2fsprogs) | |
625 | ((#:configure-flags _) | |
626 | '(list "--disable-blkid")) | |
627 | ((#:make-flags _) | |
628 | '(list))))))) | |
629 | ||
e102f940 LC |
630 | (define-public e2fsck/static |
631 | (package | |
632 | (name "e2fsck-static") | |
0997771a | 633 | (version (package-version e2fsprogs)) |
e102f940 LC |
634 | (build-system trivial-build-system) |
635 | (source #f) | |
636 | (arguments | |
637 | `(#:modules ((guix build utils)) | |
638 | #:builder | |
639 | (begin | |
640 | (use-modules (guix build utils) | |
641 | (ice-9 ftw) | |
642 | (srfi srfi-26)) | |
643 | ||
644 | (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs") | |
645 | "/sbin")) | |
646 | (bin (string-append (assoc-ref %outputs "out") "/sbin"))) | |
647 | (mkdir-p bin) | |
648 | (with-directory-excursion bin | |
649 | (for-each (lambda (file) | |
650 | (copy-file (string-append source "/" file) | |
651 | file) | |
652 | (remove-store-references file) | |
653 | (chmod file #o555)) | |
654 | (scandir source (cut string-prefix? "fsck." <>)))))))) | |
e48977e7 | 655 | (inputs `(("e2fsprogs" ,e2fsprogs/static))) |
e102f940 LC |
656 | (synopsis "Statically-linked fsck.* commands from e2fsprogs") |
657 | (description | |
658 | "This package provides statically-linked command of fsck.ext[234] taken | |
659 | from the e2fsprogs package. It is meant to be used in initrds.") | |
0997771a LC |
660 | (home-page (package-home-page e2fsprogs)) |
661 | (license (package-license e2fsprogs)))) | |
e102f940 | 662 | |
1c975f60 LC |
663 | (define-public zerofree |
664 | (package | |
665 | (name "zerofree") | |
666 | (version "1.0.3") | |
667 | (home-page "http://intgat.tigress.co.uk/rmy/uml/") | |
668 | (source (origin | |
669 | (method url-fetch) | |
670 | (uri (string-append home-page name "-" version | |
671 | ".tgz")) | |
672 | (sha256 | |
673 | (base32 | |
674 | "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs")))) | |
675 | (build-system gnu-build-system) | |
676 | (arguments | |
677 | '(#:phases (alist-replace | |
678 | 'install | |
679 | (lambda* (#:key outputs #:allow-other-keys) | |
680 | (let* ((out (assoc-ref outputs "out")) | |
681 | (bin (string-append out "/bin"))) | |
682 | (mkdir-p bin) | |
683 | (copy-file "zerofree" | |
684 | (string-append bin "/zerofree")) | |
685 | (chmod (string-append bin "/zerofree") | |
686 | #o555) | |
687 | #t)) | |
688 | (alist-delete 'configure %standard-phases)) | |
689 | #:tests? #f)) ;no tests | |
690 | (inputs `(("libext2fs" ,e2fsprogs))) | |
691 | (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems") | |
692 | (description | |
693 | "The zerofree command scans the free blocks in an ext2 file system and | |
694 | fills any non-zero blocks with zeroes. This is a useful way to make disk | |
695 | images more compressible.") | |
696 | (license gpl2))) | |
697 | ||
d8482ad0 LC |
698 | (define-public strace |
699 | (package | |
700 | (name "strace") | |
701 | (version "4.7") | |
702 | (source (origin | |
703 | (method url-fetch) | |
704 | (uri (string-append "mirror://sourceforge/strace/strace-" | |
705 | version ".tar.xz")) | |
706 | (sha256 | |
707 | (base32 | |
708 | "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764")))) | |
709 | (build-system gnu-build-system) | |
c4c4cc05 | 710 | (native-inputs `(("perl" ,perl))) |
d8482ad0 LC |
711 | (home-page "http://strace.sourceforge.net/") |
712 | (synopsis "System call tracer for Linux") | |
713 | (description | |
714 | "strace is a system call tracer, i.e. a debugging tool which prints out a | |
715 | trace of all the system calls made by a another process/program.") | |
716 | (license bsd-3))) | |
ba04571a | 717 | |
e1e27737 TUBK |
718 | (define-public ltrace |
719 | (package | |
720 | (name "ltrace") | |
721 | (version "0.7.3") | |
722 | (source (origin | |
723 | (method url-fetch) | |
724 | (uri (string-append "http://www.ltrace.org/ltrace_" version | |
725 | ".orig.tar.bz2")) | |
726 | (sha256 | |
727 | (base32 | |
728 | "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf")))) | |
729 | (build-system gnu-build-system) | |
730 | (inputs `(("libelf" ,libelf))) | |
731 | (arguments | |
732 | ;; Compilation uses -Werror by default, but it fails. | |
733 | '(#:configure-flags '("--disable-werror"))) | |
734 | (home-page "http://www.ltrace.org/") | |
735 | (synopsis "Library call tracer for Linux") | |
736 | (description | |
737 | "ltrace intercepts and records dynamic library calls which are called by | |
738 | an executed process and the signals received by that process. It can also | |
739 | intercept and print the system calls executed by the program.") | |
740 | (license gpl2+))) | |
741 | ||
ba04571a LC |
742 | (define-public alsa-lib |
743 | (package | |
744 | (name "alsa-lib") | |
745 | (version "1.0.27.1") | |
746 | (source (origin | |
747 | (method url-fetch) | |
748 | (uri (string-append | |
749 | "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-" | |
750 | version ".tar.bz2")) | |
751 | (sha256 | |
752 | (base32 | |
bcd94e19 MW |
753 | "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9")) |
754 | (patches (list (search-patch "alsa-lib-mips-atomic-fix.patch"))))) | |
ba04571a LC |
755 | (build-system gnu-build-system) |
756 | (home-page "http://www.alsa-project.org/") | |
757 | (synopsis "The Advanced Linux Sound Architecture libraries") | |
758 | (description | |
759 | "The Advanced Linux Sound Architecture (ALSA) provides audio and | |
760 | MIDI functionality to the Linux-based operating system.") | |
761 | (license lgpl2.1+))) | |
10afdf50 | 762 | |
17b293a0 LC |
763 | (define-public alsa-utils |
764 | (package | |
765 | (name "alsa-utils") | |
766 | (version "1.0.27.2") | |
767 | (source (origin | |
768 | (method url-fetch) | |
769 | (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-" | |
770 | version ".tar.bz2")) | |
771 | (sha256 | |
772 | (base32 | |
773 | "1sjjngnq50jv5ilwsb4zys6smifni3bd6fn28gbnhfrg14wsrgq2")))) | |
774 | (build-system gnu-build-system) | |
775 | (arguments | |
776 | ;; XXX: Disable man page creation until we have DocBook. | |
777 | '(#:configure-flags (list "--disable-xmlto" | |
f2817d43 LC |
778 | |
779 | ;; The udev rule is responsible for restoring | |
780 | ;; the volume. | |
17b293a0 LC |
781 | (string-append "--with-udev-rules-dir=" |
782 | (assoc-ref %outputs "out") | |
783 | "/lib/udev/rules.d")) | |
784 | #:phases (alist-cons-before | |
785 | 'install 'pre-install | |
786 | (lambda _ | |
787 | ;; Don't try to mkdir /var/lib/alsa. | |
788 | (substitute* "Makefile" | |
789 | (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*") | |
790 | "true\n"))) | |
791 | %standard-phases))) | |
792 | (inputs | |
793 | `(("libsamplerate" ,libsamplerate) | |
794 | ("ncurses" ,ncurses) | |
795 | ("alsa-lib" ,alsa-lib) | |
796 | ("xmlto" ,xmlto) | |
1dba6407 | 797 | ("gettext" ,gnu-gettext))) |
17b293a0 LC |
798 | (home-page "http://www.alsa-project.org/") |
799 | (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)") | |
800 | (description | |
801 | "The Advanced Linux Sound Architecture (ALSA) provides audio and | |
802 | MIDI functionality to the Linux-based operating system.") | |
803 | ||
804 | ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are | |
805 | ;; GPLv2-only. | |
806 | (license gpl2))) | |
807 | ||
10afdf50 LC |
808 | (define-public iptables |
809 | (package | |
810 | (name "iptables") | |
811 | (version "1.4.16.2") | |
812 | (source (origin | |
813 | (method url-fetch) | |
814 | (uri (string-append | |
815 | "http://www.netfilter.org/projects/iptables/files/iptables-" | |
816 | version ".tar.bz2")) | |
817 | (sha256 | |
818 | (base32 | |
819 | "0vkg5lzkn4l3i1sm6v3x96zzvnv9g7mi0qgj6279ld383mzcws24")))) | |
820 | (build-system gnu-build-system) | |
50c26d9e SB |
821 | (arguments |
822 | '(#:tests? #f ; no test suite | |
823 | #:configure-flags ; add $libdir to the RUNPATH of executables | |
824 | (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")))) | |
10afdf50 LC |
825 | (home-page "http://www.netfilter.org/projects/iptables/index.html") |
826 | (synopsis "Program to configure the Linux IP packet filtering rules") | |
827 | (description | |
828 | "iptables is the userspace command line program used to configure the | |
829 | Linux 2.4.x and later IPv4 packet filtering ruleset. It is targeted towards | |
830 | system administrators. Since Network Address Translation is also configured | |
831 | from the packet filter ruleset, iptables is used for this, too. The iptables | |
832 | package also includes ip6tables. ip6tables is used for configuring the IPv6 | |
833 | packet filter.") | |
834 | (license gpl2+))) | |
90a0048f LC |
835 | |
836 | (define-public iproute | |
837 | (package | |
838 | (name "iproute2") | |
5fd7f3e0 | 839 | (version "3.12.0") |
90a0048f LC |
840 | (source (origin |
841 | (method url-fetch) | |
842 | (uri (string-append | |
843 | "mirror://kernel.org/linux/utils/net/iproute2/iproute2-" | |
844 | version ".tar.xz")) | |
845 | (sha256 | |
846 | (base32 | |
5fd7f3e0 | 847 | "04gi11gh087bg2nlxhj0lxrk8l9qxkpr88nsiil23917bm3h1xj4")))) |
90a0048f LC |
848 | (build-system gnu-build-system) |
849 | (arguments | |
850 | `(#:tests? #f ; no test suite | |
851 | #:make-flags (let ((out (assoc-ref %outputs "out"))) | |
852 | (list "DESTDIR=" | |
853 | (string-append "LIBDIR=" out "/lib") | |
854 | (string-append "SBINDIR=" out "/sbin") | |
855 | (string-append "CONFDIR=" out "/etc") | |
856 | (string-append "DOCDIR=" out "/share/doc/" | |
857 | ,name "-" ,version) | |
858 | (string-append "MANDIR=" out "/share/man"))) | |
859 | #:phases (alist-cons-before | |
860 | 'install 'pre-install | |
861 | (lambda _ | |
862 | ;; Don't attempt to create /var/lib/arpd. | |
863 | (substitute* "Makefile" | |
864 | (("^.*ARPDDIR.*$") ""))) | |
865 | %standard-phases))) | |
866 | (inputs | |
867 | `(("iptables" ,iptables) | |
c4c4cc05 JD |
868 | ("db4" ,bdb))) |
869 | (native-inputs | |
870 | `(("pkg-config" ,pkg-config) | |
90a0048f LC |
871 | ("flex" ,flex) |
872 | ("bison" ,bison))) | |
873 | (home-page | |
874 | "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2") | |
875 | (synopsis | |
9e771e3b | 876 | "Utilities for controlling TCP/IP networking and traffic in Linux") |
90a0048f LC |
877 | (description |
878 | "Iproute2 is a collection of utilities for controlling TCP/IP | |
879 | networking and traffic with the Linux kernel. | |
880 | ||
881 | Most network configuration manuals still refer to ifconfig and route as the | |
882 | primary network configuration tools, but ifconfig is known to behave | |
883 | inadequately in modern network environments. They should be deprecated, but | |
884 | most distros still include them. Most network configuration systems make use | |
885 | of ifconfig and thus provide a limited feature set. The /etc/net project aims | |
886 | to support most modern network technologies, as it doesn't use ifconfig and | |
887 | allows a system administrator to make use of all iproute2 features, including | |
888 | traffic control. | |
889 | ||
890 | iproute2 is usually shipped in a package called iproute or iproute2 and | |
891 | consists of several tools, of which the most important are ip and tc. ip | |
892 | controls IPv4 and IPv6 configuration and tc stands for traffic control. Both | |
893 | tools print detailed usage messages and are accompanied by a set of | |
894 | manpages.") | |
895 | (license gpl2+))) | |
85e0dc6a LC |
896 | |
897 | (define-public net-tools | |
898 | ;; XXX: This package is basically unmaintained, but it provides a few | |
899 | ;; commands not yet provided by Inetutils, such as 'route', so we have to | |
900 | ;; live with it. | |
901 | (package | |
902 | (name "net-tools") | |
903 | (version "1.60") | |
904 | (home-page "http://www.tazenda.demon.co.uk/phil/net-tools/") | |
905 | (source (origin | |
906 | (method url-fetch) | |
907 | (uri (string-append home-page "/" name "-" | |
908 | version ".tar.bz2")) | |
909 | (sha256 | |
910 | (base32 | |
177088a3 LC |
911 | "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s")) |
912 | (patches | |
913 | (list (search-patch "net-tools-bitrot.patch"))))) | |
85e0dc6a LC |
914 | (build-system gnu-build-system) |
915 | (arguments | |
c9e0a44e LC |
916 | '(#:modules ((guix build gnu-build-system) |
917 | (guix build utils) | |
918 | (srfi srfi-1) | |
919 | (srfi srfi-26)) | |
920 | #:phases (alist-cons-after | |
cd143df0 | 921 | 'unpack 'patch |
85e0dc6a LC |
922 | (lambda* (#:key inputs #:allow-other-keys) |
923 | (define (apply-patch file) | |
9a224ac2 | 924 | (zero? (system* "patch" "-p1" "--force" |
85e0dc6a LC |
925 | "--input" file))) |
926 | ||
927 | (let ((patch.gz (assoc-ref inputs "patch"))) | |
928 | (format #t "applying Debian patch set '~a'...~%" | |
929 | patch.gz) | |
930 | (system (string-append "gunzip < " patch.gz " > the-patch")) | |
85e0dc6a LC |
931 | (and (apply-patch "the-patch") |
932 | (for-each apply-patch | |
933 | (find-files "debian/patches" | |
934 | "\\.patch"))))) | |
935 | (alist-replace | |
936 | 'configure | |
937 | (lambda* (#:key outputs #:allow-other-keys) | |
938 | (let ((out (assoc-ref outputs "out"))) | |
939 | (mkdir-p (string-append out "/bin")) | |
940 | (mkdir-p (string-append out "/sbin")) | |
941 | ||
942 | ;; Pretend we have everything... | |
943 | (system "yes | make config") | |
944 | ||
a153ff80 MW |
945 | ;; ... except for the things we don't have. |
946 | ;; HAVE_AFDECnet requires libdnet, which we don't have. | |
947 | ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers | |
948 | ;; that have been removed. | |
85e0dc6a | 949 | (substitute* '("config.make" "config.h") |
a153ff80 | 950 | (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") "")))) |
c9e0a44e LC |
951 | (alist-cons-after |
952 | 'install 'remove-redundant-commands | |
953 | (lambda* (#:key outputs #:allow-other-keys) | |
954 | ;; Remove commands and man pages redundant with | |
955 | ;; Inetutils. | |
956 | (let* ((out (assoc-ref outputs "out")) | |
957 | (dup (append-map (cut find-files out <>) | |
958 | '("^hostname" | |
959 | "^(yp|nis|dns)?domainname")))) | |
960 | (for-each delete-file dup) | |
961 | #t)) | |
962 | %standard-phases))) | |
85e0dc6a LC |
963 | |
964 | ;; Binaries that depend on libnet-tools.a don't declare that | |
965 | ;; dependency, making it parallel-unsafe. | |
966 | #:parallel-build? #f | |
967 | ||
968 | #:tests? #f ; no test suite | |
0d55c356 MW |
969 | #:make-flags (let ((out (assoc-ref %outputs "out"))) |
970 | (list "CC=gcc" | |
971 | (string-append "BASEDIR=" out) | |
972 | (string-append "INSTALLNLSDIR=" out "/share/locale") | |
973 | (string-append "mandir=/share/man"))))) | |
85e0dc6a LC |
974 | |
975 | ;; Use the big Debian patch set (the thing does not even compile out of | |
976 | ;; the box.) | |
977 | (inputs `(("patch" ,(origin | |
978 | (method url-fetch) | |
979 | (uri | |
980 | "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz") | |
981 | (sha256 | |
982 | (base32 | |
983 | "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p")))))) | |
1dba6407 | 984 | (native-inputs `(("gettext" ,gnu-gettext))) |
85e0dc6a LC |
985 | |
986 | (synopsis "Tools for controlling the network subsystem in Linux") | |
987 | (description | |
988 | "This package includes the important tools for controlling the network | |
989 | subsystem of the Linux kernel. This includes arp, hostname, ifconfig, | |
990 | netstat, rarp and route. Additionally, this package contains utilities | |
991 | relating to particular network hardware types (plipconfig, slattach) and | |
992 | advanced aspects of IP configuration (iptunnel, ipmaddr).") | |
993 | (license gpl2+))) | |
c762e82e LC |
994 | |
995 | (define-public libcap | |
996 | (package | |
997 | (name "libcap") | |
998 | (version "2.22") | |
999 | (source (origin | |
1000 | (method url-fetch) | |
1001 | ||
1002 | ;; Tarballs used to be available from | |
1003 | ;; <https://www.kernel.org/pub/linux/libs/security/linux-privs/> | |
1004 | ;; but they never came back after kernel.org was compromised. | |
1005 | (uri (string-append | |
1006 | "mirror://debian/pool/main/libc/libcap2/libcap2_" | |
1007 | version ".orig.tar.gz")) | |
1008 | (sha256 | |
1009 | (base32 | |
1010 | "07vjhkznm82p8dm4w6j8mmg7h5c70lp5s9bwwfdmgwpbixfydjp1")))) | |
1011 | (build-system gnu-build-system) | |
6d889daf SB |
1012 | (arguments '(#:phases |
1013 | (modify-phases %standard-phases | |
1014 | (replace 'configure | |
1015 | ;; Add $libdir to the RUNPATH of executables. | |
1016 | (lambda _ | |
1017 | (substitute* "Make.Rules" | |
1018 | (("LDFLAGS := #-g") | |
1019 | (string-append "LDFLAGS := -Wl,-rpath=" | |
1020 | %output "/lib")))))) | |
c762e82e LC |
1021 | #:tests? #f ; no 'check' target |
1022 | #:make-flags (list "lib=lib" | |
1023 | (string-append "prefix=" | |
1024 | (assoc-ref %outputs "out")) | |
1025 | "RAISE_SETFCAP=no"))) | |
1026 | (native-inputs `(("perl" ,perl))) | |
1027 | (inputs `(("attr" ,attr))) | |
1028 | (home-page "https://sites.google.com/site/fullycapable/") | |
1029 | (synopsis "Library for working with POSIX capabilities") | |
1030 | (description | |
35b9e423 | 1031 | "Libcap2 provides a programming interface to POSIX capabilities on |
c762e82e LC |
1032 | Linux-based operating systems.") |
1033 | ||
1034 | ;; License is BSD-3 or GPLv2, at the user's choice. | |
1035 | (license gpl2))) | |
215b6431 LC |
1036 | |
1037 | (define-public bridge-utils | |
1038 | (package | |
1039 | (name "bridge-utils") | |
1040 | (version "1.5") | |
1041 | (source (origin | |
1042 | (method url-fetch) | |
1043 | (uri (string-append "mirror://sourceforge/bridge/bridge-utils-" | |
1044 | version ".tar.gz")) | |
1045 | (sha256 | |
1046 | (base32 | |
1047 | "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2")))) | |
1048 | (build-system gnu-build-system) | |
1049 | ||
1050 | ;; The tarball lacks all the generated files. | |
1051 | (native-inputs `(("autoconf" ,autoconf) | |
1052 | ("automake" ,automake))) | |
1053 | (arguments | |
722ec722 MW |
1054 | '(#:phases (alist-cons-after |
1055 | 'unpack 'bootstrap | |
215b6431 | 1056 | (lambda _ |
e5c8e4f3 DT |
1057 | ;; Fix "field ‘ip6’ has incomplete type" errors. |
1058 | (substitute* "libbridge/libbridge.h" | |
1059 | (("#include <linux/if_bridge.h>") | |
1060 | "#include <linux/in6.h>\n#include <linux/if_bridge.h>")) | |
1061 | ||
1062 | ;; Ensure that the entire build fails if one of the | |
1063 | ;; sub-Makefiles fails. | |
1064 | (substitute* "Makefile.in" | |
1065 | (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;") | |
1066 | "$(MAKE) $(MFLAGS) -C $$x || exit 1;")) | |
1067 | ||
215b6431 LC |
1068 | (zero? (system* "autoreconf" "-vf"))) |
1069 | %standard-phases) | |
1070 | #:tests? #f)) ; no 'check' target | |
1071 | ||
1072 | (home-page | |
1073 | "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge") | |
1074 | (synopsis "Manipulate Ethernet bridges") | |
1075 | (description | |
1076 | "Utilities for Linux's Ethernet bridging facilities. A bridge is a way | |
1077 | to connect two Ethernet segments together in a protocol independent way. | |
1078 | Packets are forwarded based on Ethernet address, rather than IP address (like | |
1079 | a router). Since forwarding is done at Layer 2, all protocols can go | |
1080 | transparently through a bridge.") | |
1081 | (license gpl2+))) | |
3cc20675 LC |
1082 | |
1083 | (define-public libnl | |
1084 | (package | |
1085 | (name "libnl") | |
bdac3d4b | 1086 | (version "3.2.25") |
3cc20675 LC |
1087 | (source (origin |
1088 | (method url-fetch) | |
1089 | (uri (string-append | |
1090 | "http://www.infradead.org/~tgr/libnl/files/libnl-" | |
1091 | version ".tar.gz")) | |
1092 | (sha256 | |
1093 | (base32 | |
bdac3d4b | 1094 | "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb")))) |
3cc20675 LC |
1095 | (build-system gnu-build-system) |
1096 | (native-inputs `(("flex" ,flex) ("bison" ,bison))) | |
1097 | (home-page "http://www.infradead.org/~tgr/libnl/") | |
1098 | (synopsis "NetLink protocol library suite") | |
1099 | (description | |
1100 | "The libnl suite is a collection of libraries providing APIs to netlink | |
1101 | protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarly | |
1102 | between the kernel and user space processes. It was designed to be a more | |
1103 | flexible successor to ioctl to provide mainly networking related kernel | |
1104 | configuration and monitoring interfaces.") | |
1105 | ||
1106 | ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like | |
1107 | ;; 'nl-addr-add.c'), so the result is GPLv2-only. | |
1108 | (license gpl2))) | |
023fef7d | 1109 | |
65cd77db MW |
1110 | (define-public iw |
1111 | (package | |
1112 | (name "iw") | |
1113 | (version "3.17") | |
1114 | (source (origin | |
1115 | (method url-fetch) | |
1116 | (uri (string-append | |
1117 | "https://www.kernel.org/pub/software/network/iw/iw-" | |
1118 | version ".tar.xz")) | |
1119 | (sha256 | |
1120 | (base32 | |
1121 | "14zsapqhivk0ws5z21y1ys2c2czi05mzk7bl2yb7qxcfrnsjx9j8")))) | |
1122 | (build-system gnu-build-system) | |
1123 | (native-inputs `(("pkg-config" ,pkg-config))) | |
1124 | (inputs `(("libnl" ,libnl))) | |
1125 | (arguments | |
1126 | `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) | |
1127 | "CC=gcc") | |
1128 | #:phases (alist-delete 'configure %standard-phases))) | |
1129 | (home-page "http://wireless.kernel.org/en/users/Documentation/iw") | |
1130 | (synopsis "Tool for configuring wireless devices") | |
1131 | (description | |
1132 | "iw is a new nl80211 based CLI configuration utility for wireless | |
1133 | devices. It replaces 'iwconfig', which is deprecated.") | |
1134 | (license isc))) | |
1135 | ||
023fef7d LC |
1136 | (define-public powertop |
1137 | (package | |
1138 | (name "powertop") | |
1139 | (version "2.5") | |
1140 | (source | |
1141 | (origin | |
1142 | (method url-fetch) | |
1143 | (uri (string-append | |
1144 | "https://01.org/powertop/sites/default/files/downloads/powertop-" | |
1145 | version ".tar.gz")) | |
1146 | (sha256 | |
1147 | (base32 | |
1148 | "02rwqbpasdayl201v0549gbp2f82rd0hqiv3i111r7npanjhhb4b")))) | |
1149 | (build-system gnu-build-system) | |
1150 | (inputs | |
1151 | ;; TODO: Add pciutils. | |
f61e0e79 | 1152 | `(("zlib" ,zlib) |
023fef7d LC |
1153 | ;; ("pciutils" ,pciutils) |
1154 | ("ncurses" ,ncurses) | |
1155 | ("libnl" ,libnl))) | |
c4c4cc05 JD |
1156 | (native-inputs |
1157 | `(("pkg-config" ,pkg-config))) | |
023fef7d LC |
1158 | (home-page "https://01.org/powertop/") |
1159 | (synopsis "Analyze power consumption on Intel-based laptops") | |
1160 | (description | |
1161 | "PowerTOP is a Linux tool to diagnose issues with power consumption and | |
1162 | power management. In addition to being a diagnostic tool, PowerTOP also has | |
1163 | an interactive mode where the user can experiment various power management | |
1164 | settings for cases where the operating system has not enabled these | |
1165 | settings.") | |
1166 | (license gpl2))) | |
6869e5c9 LC |
1167 | |
1168 | (define-public aumix | |
1169 | (package | |
1170 | (name "aumix") | |
1171 | (version "2.9.1") | |
1172 | (source (origin | |
1173 | (method url-fetch) | |
1174 | (uri (string-append | |
1175 | "http://www.jpj.net/~trevor/aumix/releases/aumix-" | |
1176 | version ".tar.bz2")) | |
1177 | (sha256 | |
1178 | (base32 | |
1179 | "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj")))) | |
1180 | (build-system gnu-build-system) | |
1181 | (inputs `(("ncurses" ,ncurses))) | |
1182 | (home-page "http://www.jpj.net/~trevor/aumix.html") | |
1183 | (synopsis "Audio mixer for X and the console") | |
1184 | (description | |
1185 | "Aumix adjusts an audio mixer from X, the console, a terminal, | |
1186 | the command line or a script.") | |
1187 | (license gpl2+))) | |
7c0dbe78 SHT |
1188 | |
1189 | (define-public iotop | |
1190 | (package | |
1191 | (name "iotop") | |
1192 | (version "0.6") | |
1193 | (source | |
1194 | (origin | |
1195 | (method url-fetch) | |
1196 | (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-" | |
1197 | version ".tar.gz")) | |
1198 | (sha256 (base32 | |
1199 | "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s")))) | |
1200 | (build-system python-build-system) | |
1201 | (arguments | |
35cebf01 | 1202 | ;; The setup.py script expects python-2. |
7c0dbe78 | 1203 | `(#:python ,python-2 |
35cebf01 | 1204 | ;; There are currently no checks in the package. |
7c0dbe78 SHT |
1205 | #:tests? #f)) |
1206 | (native-inputs `(("python" ,python-2))) | |
1207 | (home-page "http://guichaz.free.fr/iotop/") | |
1208 | (synopsis | |
1209 | "Displays the IO activity of running processes") | |
1210 | (description | |
1211 | "Iotop is a Python program with a top like user interface to show the | |
1212 | processes currently causing I/O.") | |
35cebf01 | 1213 | (license gpl2+))) |
e30835e2 LC |
1214 | |
1215 | (define-public fuse | |
1216 | (package | |
1217 | (name "fuse") | |
1218 | (version "2.9.3") | |
1219 | (source (origin | |
1220 | (method url-fetch) | |
1221 | (uri (string-append "mirror://sourceforge/fuse/fuse-" | |
1222 | version ".tar.gz")) | |
1223 | (sha256 | |
1224 | (base32 | |
4de02f36 MW |
1225 | "071r6xjgssy8vwdn6m28qq1bqxsd2bphcd2mzhq0grf5ybm87sqb")) |
1226 | (patches (list (search-patch "fuse-CVE-2015-3202.patch"))))) | |
e30835e2 | 1227 | (build-system gnu-build-system) |
b148bd71 | 1228 | (inputs `(("util-linux" ,util-linux))) |
e30835e2 LC |
1229 | (arguments |
1230 | '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH=" | |
1231 | (assoc-ref %outputs "out") | |
1232 | "/sbin") | |
1233 | (string-append "INIT_D_PATH=" | |
1234 | (assoc-ref %outputs "out") | |
1235 | "/etc/init.d") | |
9a4efac9 LC |
1236 | |
1237 | ;; The rule makes /dev/fuse 666. | |
e30835e2 LC |
1238 | (string-append "UDEV_RULES_PATH=" |
1239 | (assoc-ref %outputs "out") | |
9a4efac9 | 1240 | "/lib/udev/rules.d")) |
b148bd71 LC |
1241 | #:phases (alist-cons-before |
1242 | 'build 'set-file-names | |
1243 | (lambda* (#:key inputs #:allow-other-keys) | |
1244 | ;; libfuse calls out to mount(8) and umount(8). Make sure | |
1245 | ;; it refers to the right ones. | |
1246 | (substitute* '("lib/mount_util.c" "util/mount_util.c") | |
1247 | (("/bin/(u?)mount" _ maybe-u) | |
1248 | (string-append (assoc-ref inputs "util-linux") | |
1249 | "/bin/" maybe-u "mount"))) | |
1250 | (substitute* '("util/mount.fuse.c") | |
1251 | (("/bin/sh") | |
bd663902 LC |
1252 | (which "sh"))) |
1253 | ||
1254 | ;; This hack leads libfuse to search for 'fusermount' in | |
1255 | ;; $PATH, where it may find a setuid-root binary, instead of | |
1256 | ;; trying solely $out/sbin/fusermount and failing because | |
1257 | ;; it's not setuid. | |
1258 | (substitute* "lib/Makefile" | |
1259 | (("-DFUSERMOUNT_DIR=[[:graph:]]+") | |
1260 | "-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))) | |
b148bd71 | 1261 | %standard-phases))) |
e30835e2 LC |
1262 | (home-page "http://fuse.sourceforge.net/") |
1263 | (synopsis "Support file systems implemented in user space") | |
1264 | (description | |
1265 | "As a consequence of its monolithic design, file system code for Linux | |
1266 | normally goes into the kernel itself---which is not only a robustness issue, | |
1267 | but also an impediment to system extensibility. FUSE, for \"file systems in | |
1268 | user space\", is a kernel module and user-space library that tries to address | |
1269 | part of this problem by allowing users to run file system implementations as | |
1270 | user-space processes.") | |
1271 | (license (list lgpl2.1 ; library | |
1272 | gpl2+)))) ; command-line utilities | |
220193ad LC |
1273 | |
1274 | (define-public unionfs-fuse | |
1275 | (package | |
1276 | (name "unionfs-fuse") | |
1277 | (version "0.26") | |
1278 | (source (origin | |
1279 | (method url-fetch) | |
1280 | (uri (string-append | |
1281 | "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-" | |
1282 | version ".tar.xz")) | |
1283 | (sha256 | |
1284 | (base32 | |
1285 | "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d")))) | |
1286 | (build-system cmake-build-system) | |
1287 | (inputs `(("fuse" ,fuse))) | |
1288 | (arguments '(#:tests? #f)) ; no tests | |
1289 | (home-page "http://podgorny.cz/moin/UnionFsFuse") | |
1290 | (synopsis "User-space union file system") | |
1291 | (description | |
1292 | "UnionFS-FUSE is a flexible union file system implementation in user | |
1293 | space, using the FUSE library. Mounting a union file system allows you to | |
1294 | \"aggregate\" the contents of several directories into a single mount point. | |
1295 | UnionFS-FUSE additionally supports copy-on-write.") | |
1296 | (license bsd-3))) | |
ed748588 | 1297 | |
0b7a0c20 LC |
1298 | (define fuse-static |
1299 | (package (inherit fuse) | |
1300 | (name "fuse-static") | |
1301 | (source (origin (inherit (package-source fuse)) | |
1302 | (modules '((guix build utils))) | |
1303 | (snippet | |
1304 | ;; Normally libfuse invokes mount(8) so that /etc/mtab is | |
1305 | ;; updated. Change calls to 'mtab_needs_update' to 0 so that | |
1306 | ;; it doesn't do that, allowing us to remove the dependency on | |
1307 | ;; util-linux (something that is useful in initrds.) | |
1308 | '(substitute* '("lib/mount_util.c" | |
1309 | "util/mount_util.c") | |
1310 | (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)") | |
1311 | "0") | |
1312 | (("/bin/") | |
1313 | ""))))))) | |
1314 | ||
ed748588 LC |
1315 | (define-public unionfs-fuse/static |
1316 | (package (inherit unionfs-fuse) | |
1317 | (synopsis "User-space union file system (statically linked)") | |
1318 | (name (string-append (package-name unionfs-fuse) "-static")) | |
1319 | (source (origin (inherit (package-source unionfs-fuse)) | |
1320 | (modules '((guix build utils))) | |
1321 | (snippet | |
1322 | ;; Add -ldl to the libraries, because libfuse.a needs that. | |
1323 | '(substitute* "src/CMakeLists.txt" | |
1324 | (("target_link_libraries(.*)\\)" _ libs) | |
1325 | (string-append "target_link_libraries" | |
1326 | libs " dl)")))))) | |
1327 | (arguments | |
1328 | '(#:tests? #f | |
1456cff1 LC |
1329 | #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static") |
1330 | #:phases (alist-cons-after | |
1331 | 'install 'post-install | |
1332 | (lambda* (#:key outputs #:allow-other-keys) | |
1333 | (let* ((out (assoc-ref outputs "out")) | |
1334 | (exe (string-append out "/bin/unionfs"))) | |
1335 | ;; By default, 'unionfs' keeps references to | |
1336 | ;; $glibc/share/locale and similar stuff. Remove them. | |
1337 | (remove-store-references exe))) | |
1338 | %standard-phases))) | |
0b7a0c20 | 1339 | (inputs `(("fuse" ,fuse-static))))) |
67b66003 | 1340 | |
db288efa LC |
1341 | (define-public sshfs-fuse |
1342 | (package | |
1343 | (name "sshfs-fuse") | |
1344 | (version "2.5") | |
1345 | (source (origin | |
1346 | (method url-fetch) | |
1347 | (uri (string-append "mirror://sourceforge/fuse/sshfs-fuse-" | |
1348 | version ".tar.gz")) | |
1349 | (sha256 | |
1350 | (base32 | |
1351 | "0gp6qr33l2p0964j0kds0dfmvyyf5lpgsn11daf0n5fhwm9185z9")))) | |
1352 | (build-system gnu-build-system) | |
1353 | (inputs | |
1354 | `(("fuse" ,fuse) | |
1355 | ("glib" ,glib))) | |
1356 | (native-inputs | |
1357 | `(("pkg-config" ,pkg-config))) | |
1358 | (home-page "http://fuse.sourceforge.net/sshfs.html") | |
1359 | (synopsis "Mount remote file systems over SSH") | |
1360 | (description | |
1361 | "This is a file system client based on the SSH File Transfer Protocol. | |
1362 | Since most SSH servers already support this protocol it is very easy to set | |
1363 | up: on the server side there's nothing to do; on the client side mounting the | |
1364 | file system is as easy as logging into the server with an SSH client.") | |
1365 | (license gpl2+))) | |
1366 | ||
67b66003 LC |
1367 | (define-public numactl |
1368 | (package | |
1369 | (name "numactl") | |
1370 | (version "2.0.9") | |
1371 | (source (origin | |
1372 | (method url-fetch) | |
1373 | (uri (string-append | |
1374 | "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-" | |
1375 | version | |
1376 | ".tar.gz")) | |
1377 | (sha256 | |
1378 | (base32 | |
1379 | "073myxlyyhgxh1w3r757ajixb7s2k69czc3r0g12c3scq7k3784w")))) | |
1380 | (build-system gnu-build-system) | |
1381 | (arguments | |
1382 | '(#:phases (alist-replace | |
1383 | 'configure | |
1384 | (lambda* (#:key outputs #:allow-other-keys) | |
1385 | ;; There's no 'configure' script, just a raw makefile. | |
1386 | (substitute* "Makefile" | |
1387 | (("^prefix := .*$") | |
1388 | (string-append "prefix := " (assoc-ref outputs "out") | |
1389 | "\n")) | |
1390 | (("^libdir := .*$") | |
1391 | ;; By default the thing tries to install under | |
1392 | ;; $prefix/lib64 when on a 64-bit platform. | |
1393 | (string-append "libdir := $(prefix)/lib\n")))) | |
1394 | %standard-phases) | |
1395 | ||
1396 | #:make-flags (list | |
1397 | ;; By default the thing tries to use 'cc'. | |
1398 | "CC=gcc" | |
1399 | ||
1400 | ;; Make sure programs have an RPATH so they can find | |
1401 | ;; libnuma.so. | |
1402 | (string-append "LDLIBS=-Wl,-rpath=" | |
1403 | (assoc-ref %outputs "out") "/lib")) | |
1404 | ||
1405 | ;; There's a 'test' target, but it requires NUMA support in the kernel | |
1406 | ;; to run, which we can't assume to have. | |
1407 | #:tests? #f)) | |
1408 | (home-page "http://oss.sgi.com/projects/libnuma/") | |
1409 | (synopsis "Tools for non-uniform memory access (NUMA) machines") | |
1410 | (description | |
1411 | "NUMA stands for Non-Uniform Memory Access, in other words a system whose | |
1412 | memory is not all in one place. The numactl program allows you to run your | |
1413 | application program on specific CPU's and memory nodes. It does this by | |
1414 | supplying a NUMA memory policy to the operating system before running your | |
1415 | program. | |
1416 | ||
1417 | The package contains other commands, such as numademo, numastat and memhog. | |
1418 | The numademo command provides a quick overview of NUMA performance on your | |
1419 | system.") | |
1420 | (license (list gpl2 ; programs | |
1421 | lgpl2.1)))) ; library | |
b10e9ff6 LC |
1422 | |
1423 | (define-public kbd | |
1424 | (package | |
1425 | (name "kbd") | |
710b4928 | 1426 | (version "2.0.2") |
b10e9ff6 LC |
1427 | (source (origin |
1428 | (method url-fetch) | |
1429 | (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-" | |
710b4928 | 1430 | version ".tar.xz")) |
b10e9ff6 LC |
1431 | (sha256 |
1432 | (base32 | |
710b4928 | 1433 | "04mrms12nm5sas0nxs94yrr3hz7gmqhnmfgb9ff34bh1jszxmzcx")) |
c8f60748 LC |
1434 | (modules '((guix build utils))) |
1435 | (snippet | |
f2cdcafb LC |
1436 | '(begin |
1437 | (substitute* "tests/Makefile.in" | |
1438 | ;; The '%: %.in' rule incorrectly uses @VERSION@. | |
1439 | (("@VERSION@") | |
1440 | "[@]VERSION[@]")) | |
1441 | (substitute* '("src/unicode_start" "src/unicode_stop") | |
1442 | ;; Assume the Coreutils are in $PATH. | |
1443 | (("/usr/bin/tty") | |
1444 | "tty")))))) | |
b10e9ff6 LC |
1445 | (build-system gnu-build-system) |
1446 | (arguments | |
1447 | '(#:phases (alist-cons-before | |
1448 | 'build 'pre-build | |
1449 | (lambda* (#:key inputs #:allow-other-keys) | |
1450 | (let ((gzip (assoc-ref %build-inputs "gzip")) | |
1451 | (bzip2 (assoc-ref %build-inputs "bzip2"))) | |
1452 | (substitute* "src/libkeymap/findfile.c" | |
1453 | (("gzip") | |
1454 | (string-append gzip "/bin/gzip")) | |
1455 | (("bzip2") | |
1456 | (string-append bzip2 "/bin/bzip2"))))) | |
f2cdcafb LC |
1457 | (alist-cons-after |
1458 | 'install 'post-install | |
1459 | (lambda* (#:key outputs #:allow-other-keys) | |
1460 | ;; Make sure these programs find their comrades. | |
1461 | (let* ((out (assoc-ref outputs "out")) | |
1462 | (bin (string-append out "/bin"))) | |
1463 | (for-each (lambda (prog) | |
1464 | (wrap-program (string-append bin "/" prog) | |
1465 | `("PATH" ":" prefix (,bin)))) | |
1466 | '("unicode_start" "unicode_stop")))) | |
1467 | %standard-phases)))) | |
b10e9ff6 | 1468 | (inputs `(("check" ,check) |
f61e0e79 LC |
1469 | ("gzip" ,gzip) |
1470 | ("bzip2" ,bzip2) | |
b10e9ff6 LC |
1471 | ("pam" ,linux-pam))) |
1472 | (native-inputs `(("pkg-config" ,pkg-config))) | |
1473 | (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/") | |
1474 | (synopsis "Linux keyboard utilities and keyboard maps") | |
1475 | (description | |
1476 | "This package contains keytable files and keyboard utilities compatible | |
1477 | for systems using the Linux kernel. This includes commands such as | |
1478 | 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.") | |
1479 | (license gpl2+))) | |
de0b620e LC |
1480 | |
1481 | (define-public inotify-tools | |
1482 | (package | |
1483 | (name "inotify-tools") | |
1484 | (version "3.13") | |
1485 | (source (origin | |
1486 | (method url-fetch) | |
1487 | (uri (string-append | |
1488 | "mirror://sourceforge/inotify-tools/inotify-tools/" | |
1489 | version "/inotify-tools-" version ".tar.gz")) | |
1490 | (sha256 | |
1491 | (base32 | |
1492 | "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6")))) | |
1493 | (build-system gnu-build-system) | |
1494 | (home-page "http://inotify-tools.sourceforge.net/") | |
1495 | (synopsis "Monitor file accesses") | |
1496 | (description | |
1497 | "The inotify-tools packages provides a C library and command-line tools | |
1498 | to use Linux' inotify mechanism, which allows file accesses to be monitored.") | |
1499 | (license gpl2+))) | |
e062d542 AE |
1500 | |
1501 | (define-public kmod | |
1502 | (package | |
1503 | (name "kmod") | |
1504 | (version "17") | |
1505 | (source (origin | |
1506 | (method url-fetch) | |
1507 | (uri | |
1508 | (string-append "mirror://kernel.org/linux/utils/kernel/kmod/" | |
1509 | "kmod-" version ".tar.xz")) | |
1510 | (sha256 | |
1511 | (base32 | |
528b6a3d LC |
1512 | "1yid3a9b64a60ybj66fk2ysrq5klnl0ijl4g624cl16y8404g9rv")) |
1513 | (patches (list (search-patch "kmod-module-directory.patch"))))) | |
e062d542 AE |
1514 | (build-system gnu-build-system) |
1515 | (native-inputs | |
1516 | `(("pkg-config" ,pkg-config))) | |
1517 | (inputs | |
f61e0e79 LC |
1518 | `(("xz" ,xz) |
1519 | ("zlib" ,zlib))) | |
e062d542 AE |
1520 | (arguments |
1521 | `(#:tests? #f ; FIXME: Investigate test failures | |
4a8b4c25 LC |
1522 | #:configure-flags '("--with-xz" "--with-zlib") |
1523 | #:phases (alist-cons-after | |
1524 | 'install 'install-modprobe&co | |
1525 | (lambda* (#:key outputs #:allow-other-keys) | |
1526 | (let* ((out (assoc-ref outputs "out")) | |
1527 | (bin (string-append out "/bin"))) | |
1528 | (for-each (lambda (tool) | |
1529 | (symlink "kmod" | |
1530 | (string-append bin "/" tool))) | |
1531 | '("insmod" "rmmod" "lsmod" "modprobe" | |
1532 | "modinfo" "depmod")))) | |
1533 | %standard-phases))) | |
e062d542 AE |
1534 | (home-page "https://www.kernel.org/") |
1535 | (synopsis "Kernel module tools") | |
35b9e423 | 1536 | (description "Kmod is a set of tools to handle common tasks with Linux |
e062d542 AE |
1537 | kernel modules like insert, remove, list, check properties, resolve |
1538 | dependencies and aliases. | |
1539 | ||
1540 | These tools are designed on top of libkmod, a library that is shipped with | |
1541 | kmod. The aim is to be compatible with tools, configurations and indices | |
1542 | from the module-init-tools project.") | |
1543 | (license gpl2+))) ; library under lgpl2.1+ | |
d7d42d6b | 1544 | |
7fa715e7 LC |
1545 | (define-public eudev |
1546 | ;; The post-systemd fork, maintained by Gentoo. | |
fe32c7f7 | 1547 | (package |
7fa715e7 | 1548 | (name "eudev") |
b6e5e1b7 | 1549 | (version "2.1.1") |
7fa715e7 LC |
1550 | (source (origin |
1551 | (method url-fetch) | |
1552 | (uri (string-append | |
1553 | "http://dev.gentoo.org/~blueness/eudev/eudev-" | |
1554 | version ".tar.gz")) | |
1555 | (sha256 | |
1556 | (base32 | |
b6e5e1b7 | 1557 | "0shf5vqiz9fdxl95aa1a8vh0xjxwim3psc39wr2xr8lnahf11vva")) |
eb564fc3 LC |
1558 | (patches (list (search-patch "eudev-rules-directory.patch"))) |
1559 | (modules '((guix build utils))) | |
1560 | (snippet | |
1561 | ;; 'configure' checks uses <linux/btrfs.h> as an indication of | |
1562 | ;; whether Linux headers are available, but it doesn't actually | |
1563 | ;; use it, and our 'linux-libre-headers' package doesn't | |
1564 | ;; provide it. So just remove that. | |
1565 | '(substitute* "configure" | |
1566 | (("linux/btrfs\\.h") | |
1567 | ""))))) | |
fe32c7f7 MW |
1568 | (build-system gnu-build-system) |
1569 | (native-inputs | |
1570 | `(("pkg-config" ,pkg-config) | |
1571 | ("gperf" ,gperf) | |
1572 | ("glib" ,glib "bin") ; glib-genmarshal, etc. | |
1573 | ("perl" ,perl) ; for the tests | |
1574 | ("python" ,python-2))) ; ditto | |
1575 | (inputs | |
1576 | `(("kmod" ,kmod) | |
1577 | ("pciutils" ,pciutils) | |
1578 | ("usbutils" ,usbutils) | |
1579 | ("util-linux" ,util-linux) | |
1580 | ("glib" ,glib) | |
1581 | ("gobject-introspection" ,gobject-introspection))) | |
dc2d59af | 1582 | (arguments |
fe32c7f7 MW |
1583 | `(#:configure-flags (list "--enable-libkmod" |
1584 | ||
1585 | (string-append | |
1586 | "--with-pci-ids-path=" | |
1587 | (assoc-ref %build-inputs "pciutils") | |
1588 | "/share/pci.ids.gz") | |
1589 | ||
1590 | "--with-firmware-path=/no/firmware" | |
1591 | ||
1592 | ;; Work around undefined reference to | |
1593 | ;; 'mq_getattr' in sc-daemon.c. | |
31aa4379 | 1594 | "LDFLAGS=-lrt") |
53142109 | 1595 | #:phases |
31aa4379 FB |
1596 | (alist-cons-before |
1597 | 'build 'pre-build | |
1598 | ;; The program 'g-ir-scanner' (part of the package | |
1599 | ;; 'gobject-introspection'), to generate .gir files, makes some | |
1600 | ;; library pre-processing. During that phase it looks for the C | |
1601 | ;; compiler as either 'cc' or as defined by the environment variable | |
1602 | ;; 'CC' (with code in 'giscanner/dumper.py'). | |
1603 | (lambda* _ | |
1604 | (setenv "CC" "gcc")) | |
1605 | %standard-phases))) | |
fe32c7f7 MW |
1606 | (home-page "http://www.gentoo.org/proj/en/eudev/") |
1607 | (synopsis "Userspace device management") | |
1608 | (description "Udev is a daemon which dynamically creates and removes | |
1609 | device nodes from /dev/, handles hotplug events and loads drivers at boot | |
1610 | time.") | |
1611 | (license gpl2+))) | |
7fa715e7 | 1612 | |
66269d47 LC |
1613 | (define-public lvm2 |
1614 | (package | |
1615 | (name "lvm2") | |
1616 | (version "2.02.109") | |
1617 | (source (origin | |
1618 | (method url-fetch) | |
1619 | (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2." | |
1620 | version ".tgz")) | |
1621 | (sha256 | |
1622 | (base32 | |
1623 | "1rv5ivg0l1w3nwzwdkqixm96h5bzg7ib4rr196ysb2lw42jmpjbv")) | |
1624 | (modules '((guix build utils))) | |
1625 | (snippet | |
1626 | '(begin | |
1627 | (use-modules (guix build utils)) | |
1628 | ||
1629 | ;; Honor sysconfdir. | |
1630 | (substitute* "make.tmpl.in" | |
1631 | (("confdir = .*$") | |
1632 | "confdir = @sysconfdir@\n") | |
1633 | (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@") | |
1634 | "DEFAULT_SYS_DIR = @sysconfdir@")))))) | |
1635 | (build-system gnu-build-system) | |
1636 | (native-inputs | |
1637 | `(("pkg-config" ,pkg-config) | |
1638 | ("procps" ,procps))) ;tests use 'pgrep' | |
1639 | (inputs | |
8fcaf8b1 | 1640 | `(("udev" ,eudev))) |
66269d47 LC |
1641 | (arguments |
1642 | '(#:phases (alist-cons-after | |
1643 | 'configure 'set-makefile-shell | |
1644 | (lambda _ | |
1645 | ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as | |
1646 | ;; expected. | |
1647 | (setenv "SHELL" (which "sh")) | |
1648 | ||
1649 | ;; Replace /bin/sh with the right file name. | |
1650 | (patch-makefile-SHELL "make.tmpl")) | |
1651 | %standard-phases) | |
1652 | ||
1653 | #:configure-flags (list (string-append "--sysconfdir=" | |
1654 | (assoc-ref %outputs "out") | |
1655 | "/etc/lvm") | |
1656 | "--enable-udev_sync" | |
f2817d43 LC |
1657 | "--enable-udev_rules" |
1658 | ||
1659 | ;; Make sure programs such as 'dmsetup' can | |
1660 | ;; find libdevmapper.so. | |
1661 | (string-append "LDFLAGS=-Wl,-rpath=" | |
1662 | (assoc-ref %outputs "out") | |
1663 | "/lib")) | |
66269d47 LC |
1664 | |
1665 | ;; The tests use 'mknod', which requires root access. | |
1666 | #:tests? #f)) | |
1667 | (home-page "http://sourceware.org/lvm2/") | |
1668 | (synopsis "Logical volume management for Linux") | |
1669 | (description | |
1670 | "LVM2 is the logical volume management tool set for Linux-based systems. | |
1671 | This package includes the user-space libraries and tools, including the device | |
1672 | mapper. Kernel components are part of Linux-libre.") | |
1673 | ||
1674 | ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1. | |
1675 | ;; Command-line tools are GPLv2. | |
1676 | (license (list gpl2 lgpl2.1)))) | |
1677 | ||
000f7559 DT |
1678 | (define-public wireless-tools |
1679 | (package | |
1680 | (name "wireless-tools") | |
1681 | (version "30.pre9") | |
1682 | (source (origin | |
1683 | (method url-fetch) | |
1684 | (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools." | |
1685 | version ".tar.gz")) | |
1686 | (sha256 | |
1687 | (base32 | |
ec01f22d SB |
1688 | "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb")) |
1689 | (modules '((guix build utils))) | |
1690 | (snippet | |
1691 | ;; Install the manual pages in the right place. | |
1692 | '(substitute* "Makefile" | |
1693 | (("INSTALL_MAN= .*") | |
1694 | "INSTALL_MAN= $(PREFIX)/share/man"))))) | |
000f7559 DT |
1695 | (build-system gnu-build-system) |
1696 | (arguments | |
1697 | `(#:phases (alist-replace | |
1698 | 'configure | |
1699 | (lambda* (#:key outputs #:allow-other-keys) | |
1700 | (setenv "PREFIX" (assoc-ref outputs "out"))) | |
1701 | %standard-phases) | |
1702 | #:tests? #f)) | |
1703 | (synopsis "Tools for manipulating Linux Wireless Extensions") | |
fb9b7ce2 LC |
1704 | (description "Wireless Tools are used to manipulate the now-deprecated |
1705 | Linux Wireless Extensions; consider using 'iw' instead. The Wireless | |
1706 | Extension was an interface allowing you to set Wireless LAN specific | |
1707 | parameters and get the specific stats. It is deprecated in favor the nl80211 | |
1708 | interface.") | |
000f7559 DT |
1709 | (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html") |
1710 | (license gpl2+))) | |
30016044 MW |
1711 | |
1712 | (define-public lm-sensors | |
1713 | (package | |
1714 | (name "lm-sensors") | |
1715 | (version "3.3.5") | |
1716 | (source (origin | |
1717 | (method url-fetch) | |
1718 | (uri (string-append | |
1719 | "http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-" | |
1720 | version ".tar.bz2")) | |
1721 | (sha256 | |
1722 | (base32 | |
1723 | "1ksgrynxgrq590nb2fwxrl1gwzisjkqlyg3ljfd1al0ibrk6mbjx")) | |
1724 | (patches (list (search-patch "lm-sensors-hwmon-attrs.patch"))))) | |
1725 | (build-system gnu-build-system) | |
1726 | (inputs `(("rrdtool" ,rrdtool) | |
1727 | ("perl" ,perl) | |
1728 | ("kmod" ,kmod) | |
1729 | ("gnuplot" ,gnuplot))) | |
1730 | (native-inputs `(("pkg-config" ,pkg-config) | |
1731 | ("flex" ,flex) | |
1732 | ("bison" ,bison) | |
1733 | ("which" ,which))) | |
1734 | (arguments | |
1735 | `(#:tests? #f ; no 'check' target | |
1736 | #:make-flags (list (string-append "PREFIX=" %output) | |
1737 | (string-append "ETCDIR=" %output "/etc") | |
1738 | (string-append "MANDIR=" %output "/share/man")) | |
1739 | #:phases | |
1740 | (alist-delete | |
1741 | 'configure | |
1742 | (alist-cons-before | |
1743 | 'build 'patch-exec-paths | |
1744 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1745 | (substitute* "prog/detect/sensors-detect" | |
1746 | (("`uname") | |
1747 | (string-append "`" (assoc-ref inputs "coreutils") | |
1748 | "/bin/uname")) | |
1749 | (("(`|\")modprobe" all open-quote) | |
1750 | (string-append open-quote | |
1751 | (assoc-ref inputs "kmod") | |
1752 | "/bin/modprobe"))) | |
1753 | (substitute* '("prog/pwm/pwmconfig" | |
1754 | "prog/pwm/fancontrol") | |
1755 | (("gnuplot") | |
1756 | (string-append (assoc-ref inputs "gnuplot") | |
1757 | "/bin/gnuplot")) | |
1758 | (("cat ") | |
1759 | (string-append (assoc-ref inputs "coreutils") | |
1760 | "/bin/cat ")) | |
1761 | (("egrep ") | |
1762 | (string-append (assoc-ref inputs "grep") | |
1763 | "/bin/egrep ")) | |
1764 | (("sed -e") | |
1765 | (string-append (assoc-ref inputs "sed") | |
1766 | "/bin/sed -e")) | |
1767 | (("cut -d") | |
1768 | (string-append (assoc-ref inputs "coreutils") | |
1769 | "/bin/cut -d")) | |
1770 | (("sleep ") | |
1771 | (string-append (assoc-ref inputs "coreutils") | |
1772 | "/bin/sleep ")) | |
1773 | (("readlink -f") | |
1774 | (string-append (assoc-ref inputs "coreutils") | |
1775 | "/bin/readlink -f")))) | |
1776 | %standard-phases)))) | |
1777 | (home-page "http://www.lm-sensors.org/") | |
1778 | (synopsis "Utilities to read temperature/voltage/fan sensors") | |
1779 | (description | |
35b9e423 | 1780 | "Lm-sensors is a hardware health monitoring package for Linux. It allows |
30016044 MW |
1781 | you to access information from temperature, voltage, and fan speed sensors. |
1782 | It works with most newer systems.") | |
1783 | (license gpl2+))) | |
b087d413 | 1784 | |
f5b2a53d RW |
1785 | (define-public i2c-tools |
1786 | (package | |
1787 | (name "i2c-tools") | |
1788 | (version "3.1.1") | |
1789 | (source (origin | |
1790 | (method url-fetch) | |
1791 | (uri (string-append | |
1792 | "http://dl.lm-sensors.org/i2c-tools/releases/i2c-tools-" | |
1793 | version ".tar.bz2")) | |
1794 | (sha256 | |
1795 | (base32 | |
1796 | "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l")))) | |
1797 | (build-system gnu-build-system) | |
1798 | (arguments | |
1799 | `(#:tests? #f ; no 'check' target | |
1800 | #:make-flags (list (string-append "prefix=" %output) | |
1801 | "CC=gcc") | |
1802 | ;; no configure script | |
1803 | #:phases (alist-delete 'configure %standard-phases))) | |
bccf27cb RW |
1804 | (inputs |
1805 | `(("perl" ,perl))) | |
f5b2a53d RW |
1806 | (home-page "http://www.lm-sensors.org/wiki/I2CTools") |
1807 | (synopsis "I2C tools for Linux") | |
1808 | (description | |
1809 | "The i2c-tools package contains a heterogeneous set of I2C tools for | |
1810 | Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers, | |
1811 | EEPROM decoding scripts, EEPROM programming tools, and a python module for | |
1812 | SMBus access.") | |
1813 | (license gpl2+))) | |
1814 | ||
b087d413 MW |
1815 | (define-public xsensors |
1816 | (package | |
1817 | (name "xsensors") | |
1818 | (version "0.70") | |
1819 | (source (origin | |
1820 | (method url-fetch) | |
1821 | (uri (string-append | |
1822 | "http://www.linuxhardware.org/xsensors/xsensors-" | |
1823 | version ".tar.gz")) | |
1824 | (sha256 | |
1825 | (base32 | |
1826 | "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh")))) | |
1827 | (build-system gnu-build-system) | |
1828 | (inputs `(("lm-sensors" ,lm-sensors) | |
1829 | ("gtk" ,gtk+-2))) | |
1830 | (native-inputs `(("pkg-config" ,pkg-config))) | |
1831 | (arguments | |
1832 | `(#:phases (alist-cons-before | |
1833 | 'configure 'enable-deprecated | |
1834 | (lambda _ | |
1835 | (substitute* "src/Makefile.in" | |
1836 | (("-DGDK_DISABLE_DEPRECATED") "") | |
1837 | (("-DGTK_DISABLE_DEPRECATED") ""))) | |
1838 | (alist-cons-before | |
1839 | 'configure 'remove-Werror | |
1840 | (lambda _ | |
1841 | (substitute* '("configure" "src/Makefile.in") | |
1842 | (("-Werror") ""))) | |
1843 | %standard-phases)))) | |
1844 | (home-page "http://www.linuxhardware.org/xsensors/") | |
1845 | (synopsis "Hardware health information viewer") | |
1846 | (description | |
35b9e423 | 1847 | "Xsensors reads data from the libsensors library regarding hardware |
b087d413 MW |
1848 | health such as temperature, voltage and fan speed and displays the information |
1849 | in a digital read-out.") | |
1850 | (license gpl2+))) | |
b62fe07f LC |
1851 | |
1852 | (define-public perf | |
1853 | (package | |
1854 | (name "perf") | |
1855 | (version (package-version linux-libre)) | |
1856 | (source (package-source linux-libre)) | |
1857 | (build-system gnu-build-system) | |
1858 | (arguments | |
1859 | '(#:phases (alist-replace | |
1860 | 'configure | |
1861 | (lambda* (#:key inputs #:allow-other-keys) | |
1862 | (setenv "SHELL_PATH" (which "bash")) | |
1863 | (chdir "tools/perf")) | |
1864 | %standard-phases) | |
1865 | #:make-flags (list (string-append "DESTDIR=" | |
1866 | (assoc-ref %outputs "out")) | |
2af29d23 LC |
1867 | "WERROR=0" |
1868 | ||
1869 | ;; By default, 'config/Makefile' uses lib64 on | |
1870 | ;; x86_64. Work around that. | |
1871 | "lib=lib") | |
b62fe07f LC |
1872 | #:tests? #f)) ;no tests |
1873 | (native-inputs | |
1874 | `(("pkg-config" ,pkg-config) | |
1875 | ("bison" ,bison) | |
1876 | ("flex" ,flex) | |
1877 | ||
1878 | ;; There are build scripts written in these languages. | |
1879 | ("perl" ,perl) | |
1880 | ("python" ,python-2))) | |
1881 | (inputs | |
b1fb4b23 | 1882 | `(("slang" ,slang) ;for the interactive TUI |
b62fe07f | 1883 | ;; ("newt" ,newt) |
6c030d10 | 1884 | ("python" ,python-2) ;'perf' links against libpython |
b62fe07f LC |
1885 | ("elfutils" ,elfutils) |
1886 | ||
d7ece67a LC |
1887 | ;; Documentation. |
1888 | ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES | |
1889 | ("libxslt" ,libxslt) | |
1890 | ("docbook-xml" ,docbook-xml) | |
1891 | ("docbook-xsl" ,docbook-xsl) | |
1892 | ("xmlto" ,xmlto) | |
1893 | ("asciidoc" ,asciidoc))) | |
b62fe07f LC |
1894 | (home-page "https://perf.wiki.kernel.org/") |
1895 | (synopsis "Linux profiling with performance counters") | |
1896 | (description | |
1897 | "perf is a tool suite for profiling using hardware performance counters, | |
1898 | with support in the Linux kernel. perf can instrument CPU performance | |
1899 | counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable | |
1900 | of lightweight profiling. This package contains the user-land tools and in | |
1901 | particular the 'perf' command.") | |
1902 | (license (package-license linux-libre)))) | |
c09e60e4 DT |
1903 | |
1904 | (define-public pflask | |
1905 | (package | |
1906 | (name "pflask") | |
1907 | (version "0.2") | |
1908 | (source (origin | |
1909 | (method url-fetch) | |
1910 | (uri (string-append "https://github.com/ghedo/pflask/archive/v" | |
1911 | version ".tar.gz")) | |
f586c877 | 1912 | (file-name (string-append name "-" version ".tar.gz")) |
c09e60e4 DT |
1913 | (sha256 |
1914 | (base32 | |
1915 | "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys")))) | |
1916 | (build-system cmake-build-system) | |
1917 | (arguments | |
1918 | '(#:tests? #f)) ; no tests | |
1919 | (home-page "http://ghedo.github.io/pflask/") | |
1920 | (synopsis "Simple tool for creating Linux namespace containers") | |
1921 | (description "pflask is a simple tool for creating Linux namespace | |
1922 | containers. It can be used for running a command or even booting an OS inside | |
1923 | an isolated container, created with the help of Linux namespaces. It is | |
1924 | similar in functionality to chroot, although pflask provides better isolation | |
1925 | thanks to the use of namespaces.") | |
1926 | (license bsd-2))) | |
288084d5 MW |
1927 | |
1928 | (define-public hdparm | |
1929 | (package | |
1930 | (name "hdparm") | |
1931 | (version "9.45") | |
1932 | (source (origin | |
1933 | (method url-fetch) | |
1934 | (uri (string-append "mirror://sourceforge/" name "/" | |
1935 | name "-" version ".tar.gz")) | |
1936 | (sha256 | |
1937 | (base32 | |
1938 | "0sc6yf3k6sd7n6a2ig2my9fjlqpak3znlyw7jw4cz5d9asm1rc13")))) | |
1939 | (build-system gnu-build-system) | |
1940 | (arguments | |
1941 | `(#:make-flags (let ((out (assoc-ref %outputs "out"))) | |
1942 | (list (string-append "binprefix=" out) | |
1943 | (string-append "manprefix=" out) | |
1944 | "CC=gcc")) | |
1945 | #:phases (alist-delete 'configure %standard-phases) | |
1946 | #:tests? #f)) ; no test suite | |
1947 | (home-page "http://sourceforge.net/projects/hdparm/") | |
1948 | (synopsis "tune hard disk parameters for high performance") | |
1949 | (description | |
1950 | "Get/set device parameters for Linux SATA/IDE drives. It's primary use | |
1951 | is for enabling irq-unmasking and IDE multiplemode.") | |
166191b3 | 1952 | (license (non-copyleft "file://LICENSE.TXT")))) |
288084d5 | 1953 | |
57a516d3 LC |
1954 | (define-public acpid |
1955 | (package | |
1956 | (name "acpid") | |
1957 | (version "2.0.23") | |
1958 | (source (origin | |
1959 | (method url-fetch) | |
1960 | (uri (string-append "mirror://sourceforge/acpid2/acpid-" | |
1961 | version ".tar.xz")) | |
1962 | (sha256 | |
1963 | (base32 | |
1964 | "1vl7c6vc724v4jwki17czgj6lnrknnj1a6llm8gkl32i2gnam5j3")))) | |
1965 | (build-system gnu-build-system) | |
1966 | (home-page "http://sourceforge.net/projects/acpid2/") | |
1967 | (synopsis "Daemon for delivering ACPI events to user-space programs") | |
1968 | (description | |
1969 | "acpid is designed to notify user-space programs of Advanced | |
1970 | Configuration and Power Interface (ACPI) events. acpid should be started | |
1971 | during the system boot, and will run as a background process. When an ACPI | |
1972 | event is received from the kernel, acpid will examine the list of rules | |
1973 | specified in /etc/acpi/events and execute the rules that match the event.") | |
1974 | (license gpl2+))) | |
37f5caec TUBK |
1975 | |
1976 | (define-public sysfsutils | |
1977 | (package | |
1978 | (name "sysfsutils") | |
1979 | (version "2.1.0") | |
1980 | (source | |
1981 | (origin | |
1982 | (method url-fetch) | |
1983 | (uri | |
1984 | (string-append | |
1985 | "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-" | |
1986 | version ".tar.gz")) | |
1987 | (sha256 | |
1988 | (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8")))) | |
1989 | (build-system gnu-build-system) | |
1990 | (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html") | |
1991 | (synopsis "System utilities based on Linux sysfs") | |
1992 | (description | |
1993 | "These are a set of utilites built upon sysfs, a virtual filesystem in | |
1994 | Linux kernel versions 2.5+ that exposes a system's device tree. The package | |
1995 | also contains the libsysfs library.") | |
1996 | ;; The library is under lgpl2.1+ (all files say "or any later version"). | |
1997 | ;; The rest is mostly gpl2, with a few files indicating gpl2+. | |
1998 | (license (list gpl2 gpl2+ lgpl2.1+)))) | |
a9a1a40b TUBK |
1999 | |
2000 | (define-public sysfsutils-1 | |
2001 | (package | |
2002 | (inherit sysfsutils) | |
2003 | (version "1.3.0") | |
2004 | (source | |
2005 | (origin | |
2006 | (method url-fetch) | |
2007 | (uri | |
2008 | (string-append | |
2009 | "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version | |
2010 | "/sysfsutils-" version ".tar.gz")) | |
2011 | (sha256 | |
2012 | (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3")) | |
2013 | (modules '((guix build utils))) | |
2014 | (snippet | |
2015 | '(begin | |
2016 | (substitute* "Makefile.in" | |
2017 | (("includedir = /usr/include/sysfs") | |
2018 | "includedir = @includedir@")) | |
2019 | (substitute* "configure" | |
2020 | (("includedir='(\\$\\{prefix\\}/include)'" all orig) | |
2021 | (string-append "includedir='" orig "/sysfs'"))))))) | |
0e396872 MW |
2022 | ;; XXX sysfsutils-1.3.0's config.guess fails on mips64el |
2023 | (arguments `(#:configure-flags | |
2024 | '(,@(if (%current-target-system) | |
2025 | '() | |
2026 | (let ((triplet | |
2027 | (nix-system->gnu-triplet (%current-system)))) | |
2028 | (list (string-append "--build=" triplet))))))) | |
a9a1a40b | 2029 | (synopsis "System utilities based on Linux sysfs (version 1.x)"))) |
e6caa52d TUBK |
2030 | |
2031 | (define-public cpufrequtils | |
2032 | (package | |
2033 | (name "cpufrequtils") | |
2034 | (version "0.3") | |
2035 | (source | |
2036 | (origin | |
2037 | (method url-fetch) | |
2038 | (uri | |
2039 | (string-append | |
2040 | "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-" | |
2041 | version ".tar.gz")) | |
2042 | (sha256 | |
2043 | (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm")) | |
2044 | (patches (list (search-patch "cpufrequtils-fix-aclocal.patch"))))) | |
2045 | (build-system gnu-build-system) | |
2046 | (native-inputs | |
2047 | `(("sysfsutils" ,sysfsutils-1))) | |
2048 | (arguments | |
2049 | '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" | |
2050 | (assoc-ref %outputs "out") "/lib")))) | |
2051 | (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/") | |
2052 | (synopsis "Utilities to get and set CPU frequency on Linux") | |
2053 | (description | |
2054 | "The cpufrequtils suite contains utilities to retreive CPU frequency | |
2055 | information, and set the CPU frequency if supported, using the cpufreq | |
2056 | capabilities of the Linux kernel.") | |
2057 | (license gpl2))) | |
0a588bf9 SB |
2058 | |
2059 | (define-public libraw1394 | |
2060 | (package | |
2061 | (name "libraw1394") | |
2062 | (version "2.1.0") | |
2063 | (source (origin | |
2064 | (method url-fetch) | |
2065 | (uri (string-append | |
2066 | "mirror://kernel.org/linux/libs/ieee1394/" | |
2067 | name "-" version ".tar.xz")) | |
2068 | (sha256 | |
2069 | (base32 | |
2070 | "0kwnf4ha45c04mhc4yla672aqmvqqihxix1gvblns5cd2pc2cc8b")))) | |
2071 | (build-system gnu-build-system) | |
2072 | (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page") | |
2073 | (synopsis "Interface library for the Linux IEEE1394 drivers") | |
2074 | (description | |
2075 | "Libraw1394 is the only supported interface to the kernel side raw1394 of | |
2076 | the Linux IEEE-1394 subsystem, which provides direct access to the connected | |
2077 | 1394 buses to user space. Through libraw1394/raw1394, applications can directly | |
2078 | send to and receive from other nodes without requiring a kernel driver for the | |
2079 | protocol in question.") | |
2080 | (license lgpl2.1+))) | |
68e3c29d SB |
2081 | |
2082 | (define-public libavc1394 | |
2083 | (package | |
2084 | (name "libavc1394") | |
2085 | (version "0.5.4") | |
2086 | (source (origin | |
2087 | (method url-fetch) | |
2088 | (uri (string-append "mirror://sourceforge/libavc1394/" | |
2089 | name "-" version ".tar.gz")) | |
2090 | (sha256 | |
2091 | (base32 | |
2092 | "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw")))) | |
2093 | (build-system gnu-build-system) | |
2094 | (native-inputs | |
2095 | `(("pkg-config" ,pkg-config))) | |
2096 | (propagated-inputs | |
2097 | `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc | |
2098 | (home-page "http://sourceforge.net/projects/libavc1394/") | |
2099 | (synopsis "AV/C protocol library for IEEE 1394") | |
2100 | (description | |
2101 | "Libavc1394 is a programming interface to the AV/C specification from | |
2102 | the 1394 Trade Assocation. AV/C stands for Audio/Video Control.") | |
2103 | (license lgpl2.1+))) | |
3f7bf86a SB |
2104 | |
2105 | (define-public libiec61883 | |
2106 | (package | |
2107 | (name "libiec61883") | |
2108 | (version "1.2.0") | |
2109 | (source (origin | |
2110 | (method url-fetch) | |
2111 | (uri (string-append | |
2112 | "mirror://kernel.org/linux/libs/ieee1394/" | |
2113 | name "-" version ".tar.xz")) | |
2114 | (sha256 | |
2115 | (base32 | |
2116 | "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i")))) | |
2117 | (build-system gnu-build-system) | |
2118 | (native-inputs | |
2119 | `(("pkg-config" ,pkg-config))) | |
2120 | (propagated-inputs | |
2121 | `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc | |
2122 | (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page") | |
2123 | (synopsis "Isochronous streaming media library for IEEE 1394") | |
2124 | (description | |
2125 | "The libiec61883 library provides a higher level API for streaming DV, | |
2126 | MPEG-2 and audio over Linux IEEE 1394.") | |
2127 | (license lgpl2.1+))) | |
69159125 MW |
2128 | |
2129 | (define-public mdadm | |
2130 | (package | |
2131 | (name "mdadm") | |
2132 | (version "3.3.2") | |
2133 | (source (origin | |
2134 | (method url-fetch) | |
2135 | (uri (string-append | |
2136 | "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-" | |
2137 | version ".tar.xz")) | |
2138 | (sha256 | |
2139 | (base32 | |
2140 | "132vdvh3myjgcjn6i9w90ck16ddjxjcszklzkyvr4f5ifqd7wfhg")))) | |
2141 | (build-system gnu-build-system) | |
2142 | (inputs | |
2143 | `(("udev" ,eudev))) | |
2144 | (arguments | |
2145 | `(#:make-flags (let ((out (assoc-ref %outputs "out"))) | |
2146 | (list "INSTALL=install" | |
2147 | "CHECK_RUN_DIR=0" | |
2148 | ;; TODO: tell it where to find 'sendmail' | |
2149 | ;; (string-append "MAILCMD=" <???> "/sbin/sendmail") | |
2150 | (string-append "BINDIR=" out "/sbin") | |
2151 | (string-append "MANDIR=" out "/share/man") | |
2152 | (string-append "UDEVDIR=" out "/lib/udev"))) | |
2153 | #:phases (alist-cons-before | |
2154 | 'build 'patch-program-paths | |
2155 | (lambda* (#:key inputs #:allow-other-keys) | |
2156 | (let ((coreutils (assoc-ref inputs "coreutils"))) | |
2157 | (substitute* "udev-md-raid-arrays.rules" | |
2158 | (("/usr/bin/(readlink|basename)" all program) | |
2159 | (string-append coreutils "/bin/" program))))) | |
2160 | (alist-delete 'configure %standard-phases)) | |
2161 | ;;tests must be done as root | |
2162 | #:tests? #f)) | |
2163 | (home-page "http://neil.brown.name/blog/mdadm") | |
2164 | (synopsis "Tool for managing Linux Software RAID arrays") | |
2165 | (description | |
2166 | "mdadm is a tool for managing Linux Software RAID arrays. It can create, | |
2167 | assemble, report on, and monitor arrays. It can also move spares between raid | |
2168 | arrays when needed.") | |
2169 | (license gpl2+))) | |
01ccdfb6 SB |
2170 | |
2171 | (define-public libaio | |
2172 | (package | |
2173 | (name "libaio") | |
2174 | (version "0.3.110") | |
2175 | (source (origin | |
2176 | (method url-fetch) | |
2177 | (uri (list | |
2178 | (string-append "mirror://debian/pool/main/liba/libaio/" | |
2179 | name "_" version ".orig.tar.gz") | |
2180 | (string-append "https://fedorahosted.org/releases/l/i/libaio/" | |
2181 | name "-" version ".tar.gz"))) | |
2182 | (sha256 | |
2183 | (base32 | |
2184 | "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0")))) | |
2185 | (build-system gnu-build-system) | |
2186 | (arguments | |
2187 | '(#:make-flags | |
2188 | (list "CC=gcc" (string-append "prefix=" %output)) | |
2189 | #:test-target "partcheck" ; need root for a full 'check' | |
2190 | #:phases | |
2191 | (alist-delete 'configure %standard-phases))) ; no configure script | |
2192 | (home-page "http://lse.sourceforge.net/io/aio.html") | |
2193 | (synopsis "Linux-native asynchronous I/O access library") | |
2194 | (description | |
2195 | "This library enables userspace to use Linux kernel asynchronous I/O | |
2196 | system calls, important for the performance of databases and other advanced | |
2197 | applications.") | |
2198 | (license lgpl2.1+))) | |
eb7c43c3 DT |
2199 | |
2200 | (define-public bluez | |
2201 | (package | |
2202 | (name "bluez") | |
2203 | (version "5.30") | |
2204 | (source (origin | |
2205 | (method url-fetch) | |
2206 | (uri (string-append | |
2207 | "https://www.kernel.org/pub/linux/bluetooth/bluez-" | |
2208 | version ".tar.xz")) | |
2209 | (sha256 | |
2210 | (base32 | |
2211 | "0b1qbnq1xzcdw5rajg9yyg31bf21jnff0n6gnf1snz89bbdllfhy")))) | |
2212 | (build-system gnu-build-system) | |
2213 | (arguments | |
2214 | '(#:configure-flags | |
2215 | (let ((out (assoc-ref %outputs "out"))) | |
53142109 AE |
2216 | (list "--enable-library" |
2217 | "--disable-systemd" | |
eb7c43c3 DT |
2218 | ;; Install dbus/udev files to the correct location. |
2219 | (string-append "--with-dbusconfdir=" out "/etc") | |
2220 | (string-append "--with-udevdir=" out "/lib/udev"))))) | |
2221 | (native-inputs | |
2222 | `(("pkg-config" ,pkg-config) | |
2223 | ("gettext" ,gnu-gettext))) | |
2224 | (inputs | |
2225 | `(("glib" ,glib) | |
2226 | ("dbus" ,dbus) | |
2227 | ("eudev" ,eudev) | |
2228 | ("libical" ,libical) | |
2229 | ("readline" ,readline))) | |
2230 | (home-page "http://www.bluez.org/") | |
2231 | (synopsis "Linux Bluetooth protocol stack") | |
2232 | (description | |
2233 | "BlueZ provides support for the core Bluetooth layers and protocols. It | |
2234 | is flexible, efficient and uses a modular implementation.") | |
2235 | (license gpl2+))) |