guix-package: Make `--search' queries case-insensitive.
[jackhill/guix/guix.git] / gnu / packages / linux.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
e47e3eff 2;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
233e7676 3;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
fd76c904 4;;;
233e7676 5;;; This file is part of GNU Guix.
fd76c904 6;;;
233e7676 7;;; GNU Guix is free software; you can redistribute it and/or modify it
fd76c904
LC
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
233e7676 12;;; GNU Guix is distributed in the hope that it will be useful, but
fd76c904
LC
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
233e7676 18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
fd76c904 19
1ffa7090 20(define-module (gnu packages linux)
4a44e743 21 #:use-module (guix licenses)
59a43334 22 #:use-module (gnu packages)
1ffa7090 23 #:use-module ((gnu packages compression)
4a44e743 24 #:renamer (symbol-prefix-proc 'guix:))
1ffa7090
LC
25 #:use-module (gnu packages flex)
26 #:use-module (gnu packages libusb)
27 #:use-module (gnu packages ncurses)
28 #:use-module (gnu packages perl)
29 #:use-module (gnu packages pkg-config)
02b80c3f
NK
30 #:use-module (guix packages)
31 #:use-module (guix download)
fd76c904
LC
32 #:use-module (guix build-system gnu))
33
80fe5c60
LC
34(define-public linux-libre-headers
35 (let* ((version* "3.3.8")
36 (build-phase
45298f8f
LC
37 '(lambda* (#:key system #:allow-other-keys)
38 (let ((arch (car (string-split system #\-))))
39 (setenv "ARCH"
40 (cond ((string=? arch "i686") "i386")
41 (else arch)))
42 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
43
80fe5c60
LC
44 (and (zero? (system* "make" "defconfig"))
45 (zero? (system* "make" "mrproper" "headers_check")))))
46 (install-phase
47 `(lambda* (#:key outputs #:allow-other-keys)
48 (let ((out (assoc-ref outputs "out")))
49 (and (zero? (system* "make"
50 (string-append "INSTALL_HDR_PATH=" out)
51 "headers_install"))
52 (mkdir (string-append out "/include/config"))
53 (call-with-output-file
54 (string-append out
55 "/include/config/kernel.release")
56 (lambda (p)
57 (format p "~a-default~%" ,version*))))))))
58 (package
59 (name "linux-libre-headers")
60 (version version*)
61 (source (origin
62 (method url-fetch)
63 (uri (string-append
64 "http://linux-libre.fsfla.org/pub/linux-libre/releases/3.3.8-gnu/linux-libre-"
65 version "-gnu.tar.xz"))
66 (sha256
67 (base32
68 "0jkfh0z1s6izvdnc3njm39dhzp1cg8i06jv06izwqz9w9qsprvnl"))))
69 (build-system gnu-build-system)
70 (native-inputs `(("perl" ,perl)))
71 (arguments
72 `(#:modules ((guix build gnu-build-system)
73 (guix build utils)
74 (srfi srfi-1))
75 #:phases (alist-replace
76 'build ,build-phase
77 (alist-replace
78 'install ,install-phase
79 (alist-delete 'configure %standard-phases)))
80 #:tests? #f))
81 (synopsis "GNU Linux-Libre kernel headers")
82 (description "Headers of the Linux-Libre kernel.")
83 (license "GPLv2")
84 (home-page "http://www.gnu.org/software/linux-libre/"))))
85
fd76c904
LC
86(define-public linux-pam
87 (package
88 (name "linux-pam")
89 (version "1.1.6")
90 (source
91 (origin
92 (method url-fetch)
93 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
94 version ".tar.bz2")
95 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
96 version ".tar.bz2")))
97 (sha256
98 (base32
99 "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s"))))
100 (build-system gnu-build-system)
101 (inputs
102 `(("flex" ,flex)
103
104 ;; TODO: optional dependencies
105 ;; ("libxcrypt" ,libxcrypt)
106 ;; ("cracklib" ,cracklib)
107 ))
108 (arguments
109 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
110 ;; isn't available.
111 '(#:tests? #f))
112 (home-page "http://www.linux-pam.org/")
113 (synopsis "Pluggable authentication modules for Linux")
114 (description
115 "A *Free* project to implement OSF's RFC 86.0.
116Pluggable authentication modules are small shared object files that can
117be used through the PAM API to perform tasks, like authenticating a user
118at login. Local and dynamic reconfiguration are its key features")
4a44e743 119 (license bsd-3)))
686f14e8
LC
120
121(define-public psmisc
122 (package
123 (name "psmisc")
124 (version "22.20")
125 (source
126 (origin
127 (method url-fetch)
128 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
129 version ".tar.gz"))
130 (sha256
131 (base32
132 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
133 (build-system gnu-build-system)
134 (inputs `(("ncurses" ,ncurses)))
135 (home-page "http://psmisc.sourceforge.net/")
136 (synopsis
137 "set of utilities that use the proc filesystem, such as fuser, killall, and pstree")
138 (description
139 "This PSmisc package is a set of some small useful utilities that
140use the proc filesystem. We're not about changing the world, but
141providing the system administrator with some help in common tasks.")
4a44e743 142 (license gpl2+)))
02b80c3f
NK
143
144(define-public util-linux
145 (package
146 (name "util-linux")
147 (version "2.21")
148 (source
149 (origin
150 (method url-fetch)
151 (uri (string-append "mirror://kernel.org/linux/utils/"
152 name "/v" version "/"
153 name "-" version ".2" ".tar.xz"))
154 (sha256
155 (base32
156 "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir"))))
157 (build-system gnu-build-system)
158 (arguments
159 `(#:configure-flags '("--disable-use-tty-group")
160 #:phases (alist-cons-after
161 'install 'patch-chkdupexe
162 (lambda* (#:key outputs #:allow-other-keys)
163 (let ((out (assoc-ref outputs "out")))
164 (substitute* (string-append out "/bin/chkdupexe")
165 ;; Allow 'patch-shebang' to do its work.
166 (("@PERL@") "/bin/perl"))))
167 %standard-phases)))
4a44e743 168 (inputs `(("zlib" ,guix:zlib)
02b80c3f
NK
169 ("ncurses" ,ncurses)
170 ("perl" ,perl)))
171 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
172 (synopsis
173 "util-linux is a random collection of utilities for the Linux kernel")
174 (description
175 "util-linux is a random collection of utilities for the Linux kernel.")
fe8ccfcc 176
02b80c3f 177 ;; Note that util-linux doesn't use the same license for all the
fe8ccfcc 178 ;; code. GPLv2+ is the default license for a code without an
02b80c3f 179 ;; explicitly defined license.
fe8ccfcc
LC
180 (license (list gpl3+ gpl2+ gpl2 lgpl2.0+
181 bsd-4 public-domain))))
5d5c4278 182
e47e3eff
LC
183(define-public procps
184 (package
185 (name "procps")
186 (version "3.2.8")
187 (source (origin
188 (method url-fetch)
189 (uri (string-append "http://procps.sourceforge.net/procps-"
190 version ".tar.gz"))
191 (sha256
192 (base32
193 "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i"))))
194 (build-system gnu-build-system)
195 (inputs `(("ncurses" ,ncurses)
196 ("patch/make-3.82" ,(search-patch "procps-make-3.82.patch"))))
197 (arguments
198 '(#:patches (list (assoc-ref %build-inputs "patch/make-3.82"))
199 #:phases (alist-replace
200 'configure
201 (lambda* (#:key outputs #:allow-other-keys)
202 ;; No `configure', just a single Makefile.
203 (let ((out (assoc-ref outputs "out")))
204 (substitute* "Makefile"
205 (("/usr/") "/")
206 (("--(owner|group) 0") "")
207 (("ldconfig") "true")
208 (("^LDFLAGS[[:blank:]]*:=(.*)$" _ value)
209 ;; Add libproc to the RPATH.
210 (string-append "LDFLAGS := -Wl,-rpath="
211 out "/lib" value))))
212 (setenv "CC" "gcc"))
213 (alist-replace
214 'install
215 (lambda* (#:key outputs #:allow-other-keys)
216 (let ((out (assoc-ref outputs "out")))
217 (and (zero?
218 (system* "make" "install"
219 (string-append "DESTDIR=" out)))
220
221 ;; Sanity check.
222 (zero?
223 (system* (string-append out "/bin/ps")
224 "--version")))))
225 %standard-phases))
226
227 ;; What did you expect? Tests?
228 #:tests? #f))
229 (home-page "http://procps.sourceforge.net/")
230 (synopsis
231 "Utilities that give information about processes using the /proc filesystem")
232 (description
233 "procps is the package that has a bunch of small useful utilities
234that give information about processes using the Linux /proc file system.
235The package includes the programs ps, top, vmstat, w, kill, free,
236slabtop, and skill.")
237 (license gpl2)))
238
5d5c4278
NK
239(define-public usbutils
240 (package
241 (name "usbutils")
242 (version "006")
243 (source
244 (origin
245 (method url-fetch)
246 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
247 "usbutils-" version ".tar.xz"))
248 (sha256
249 (base32
250 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
251 (build-system gnu-build-system)
252 (inputs
253 `(("libusb" ,libusb) ("pkg-config" ,pkg-config)))
254 (home-page "http://www.linux-usb.org/")
255 (synopsis
256 "Tools for working with USB devices, such as lsusb")
257 (description
258 "Tools for working with USB devices, such as lsusb.")
4050e5d6 259 (license gpl2+)))