distro: tcl, expect: Enable tests.
[jackhill/guix/guix.git] / distro / packages / linux.scm
CommitLineData
233e7676
LC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org>
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
LC
19
20(define-module (distro packages linux)
4a44e743
NK
21 #:use-module (guix licenses)
22 #:use-module ((distro packages compression)
23 #:renamer (symbol-prefix-proc 'guix:))
fd76c904 24 #:use-module (distro packages flex)
5d5c4278 25 #:use-module (distro packages libusb)
02b80c3f 26 #:use-module (distro packages ncurses)
80fe5c60 27 #:use-module (distro packages perl)
5d5c4278 28 #:use-module (distro packages pkg-config)
02b80c3f
NK
29 #:use-module (guix packages)
30 #:use-module (guix download)
fd76c904
LC
31 #:use-module (guix build-system gnu))
32
80fe5c60
LC
33(define-public linux-libre-headers
34 (let* ((version* "3.3.8")
35 (build-phase
45298f8f
LC
36 '(lambda* (#:key system #:allow-other-keys)
37 (let ((arch (car (string-split system #\-))))
38 (setenv "ARCH"
39 (cond ((string=? arch "i686") "i386")
40 (else arch)))
41 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
42
80fe5c60
LC
43 (and (zero? (system* "make" "defconfig"))
44 (zero? (system* "make" "mrproper" "headers_check")))))
45 (install-phase
46 `(lambda* (#:key outputs #:allow-other-keys)
47 (let ((out (assoc-ref outputs "out")))
48 (and (zero? (system* "make"
49 (string-append "INSTALL_HDR_PATH=" out)
50 "headers_install"))
51 (mkdir (string-append out "/include/config"))
52 (call-with-output-file
53 (string-append out
54 "/include/config/kernel.release")
55 (lambda (p)
56 (format p "~a-default~%" ,version*))))))))
57 (package
58 (name "linux-libre-headers")
59 (version version*)
60 (source (origin
61 (method url-fetch)
62 (uri (string-append
63 "http://linux-libre.fsfla.org/pub/linux-libre/releases/3.3.8-gnu/linux-libre-"
64 version "-gnu.tar.xz"))
65 (sha256
66 (base32
67 "0jkfh0z1s6izvdnc3njm39dhzp1cg8i06jv06izwqz9w9qsprvnl"))))
68 (build-system gnu-build-system)
69 (native-inputs `(("perl" ,perl)))
70 (arguments
71 `(#:modules ((guix build gnu-build-system)
72 (guix build utils)
73 (srfi srfi-1))
74 #:phases (alist-replace
75 'build ,build-phase
76 (alist-replace
77 'install ,install-phase
78 (alist-delete 'configure %standard-phases)))
79 #:tests? #f))
80 (synopsis "GNU Linux-Libre kernel headers")
81 (description "Headers of the Linux-Libre kernel.")
82 (license "GPLv2")
83 (home-page "http://www.gnu.org/software/linux-libre/"))))
84
fd76c904
LC
85(define-public linux-pam
86 (package
87 (name "linux-pam")
88 (version "1.1.6")
89 (source
90 (origin
91 (method url-fetch)
92 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
93 version ".tar.bz2")
94 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
95 version ".tar.bz2")))
96 (sha256
97 (base32
98 "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s"))))
99 (build-system gnu-build-system)
100 (inputs
101 `(("flex" ,flex)
102
103 ;; TODO: optional dependencies
104 ;; ("libxcrypt" ,libxcrypt)
105 ;; ("cracklib" ,cracklib)
106 ))
107 (arguments
108 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
109 ;; isn't available.
110 '(#:tests? #f))
111 (home-page "http://www.linux-pam.org/")
112 (synopsis "Pluggable authentication modules for Linux")
113 (description
114 "A *Free* project to implement OSF's RFC 86.0.
115Pluggable authentication modules are small shared object files that can
116be used through the PAM API to perform tasks, like authenticating a user
117at login. Local and dynamic reconfiguration are its key features")
4a44e743 118 (license bsd-3)))
686f14e8
LC
119
120(define-public psmisc
121 (package
122 (name "psmisc")
123 (version "22.20")
124 (source
125 (origin
126 (method url-fetch)
127 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
128 version ".tar.gz"))
129 (sha256
130 (base32
131 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
132 (build-system gnu-build-system)
133 (inputs `(("ncurses" ,ncurses)))
134 (home-page "http://psmisc.sourceforge.net/")
135 (synopsis
136 "set of utilities that use the proc filesystem, such as fuser, killall, and pstree")
137 (description
138 "This PSmisc package is a set of some small useful utilities that
139use the proc filesystem. We're not about changing the world, but
140providing the system administrator with some help in common tasks.")
4a44e743 141 (license gpl2+)))
02b80c3f
NK
142
143(define-public util-linux
144 (package
145 (name "util-linux")
146 (version "2.21")
147 (source
148 (origin
149 (method url-fetch)
150 (uri (string-append "mirror://kernel.org/linux/utils/"
151 name "/v" version "/"
152 name "-" version ".2" ".tar.xz"))
153 (sha256
154 (base32
155 "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir"))))
156 (build-system gnu-build-system)
157 (arguments
158 `(#:configure-flags '("--disable-use-tty-group")
159 #:phases (alist-cons-after
160 'install 'patch-chkdupexe
161 (lambda* (#:key outputs #:allow-other-keys)
162 (let ((out (assoc-ref outputs "out")))
163 (substitute* (string-append out "/bin/chkdupexe")
164 ;; Allow 'patch-shebang' to do its work.
165 (("@PERL@") "/bin/perl"))))
166 %standard-phases)))
4a44e743 167 (inputs `(("zlib" ,guix:zlib)
02b80c3f
NK
168 ("ncurses" ,ncurses)
169 ("perl" ,perl)))
170 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
171 (synopsis
172 "util-linux is a random collection of utilities for the Linux kernel")
173 (description
174 "util-linux is a random collection of utilities for the Linux kernel.")
175 ;; Note that util-linux doesn't use the same license for all the
176 ;; code. GPLv2+ is the default license for a code without an
177 ;; explicitly defined license.
4a44e743
NK
178 (license '(gpl3+ gpl2+ gpl2 lgpl2.0+
179 bsd-4 public-domain))))
5d5c4278
NK
180
181(define-public usbutils
182 (package
183 (name "usbutils")
184 (version "006")
185 (source
186 (origin
187 (method url-fetch)
188 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
189 "usbutils-" version ".tar.xz"))
190 (sha256
191 (base32
192 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
193 (build-system gnu-build-system)
194 (inputs
195 `(("libusb" ,libusb) ("pkg-config" ,pkg-config)))
196 (home-page "http://www.linux-usb.org/")
197 (synopsis
198 "Tools for working with USB devices, such as lsusb")
199 (description
200 "Tools for working with USB devices, such as lsusb.")
4050e5d6 201 (license gpl2+)))