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