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