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