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