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