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>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU 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.
12 ;;; GNU 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.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (distro packages linux)
21 #:use-module (guix licenses)
22 #:use-module ((distro packages compression)
23 #:renamer (symbol-prefix-proc 'guix:))
24 #:use-module (distro packages flex)
25 #:use-module (distro packages libusb)
26 #:use-module (distro packages ncurses)
27 #:use-module (distro packages perl)
28 #:use-module (distro packages pkg-config)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix build-system gnu))
33 (define-public linux-libre-headers
34 (let* ((version* "3.3.8")
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")))))
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)
46 (mkdir (string-append out "/include/config"))
47 (call-with-output-file
49 "/include/config/kernel.release")
51 (format p "~a-default~%" ,version*))))))))
53 (name "linux-libre-headers")
58 "http://linux-libre.fsfla.org/pub/linux-libre/releases/3.3.8-gnu/linux-libre-"
59 version "-gnu.tar.xz"))
62 "0jkfh0z1s6izvdnc3njm39dhzp1cg8i06jv06izwqz9w9qsprvnl"))))
63 (build-system gnu-build-system)
64 (native-inputs `(("perl" ,perl)))
66 `(#:modules ((guix build gnu-build-system)
69 #:phases (alist-replace
72 'install ,install-phase
73 (alist-delete 'configure %standard-phases)))
75 (synopsis "GNU Linux-Libre kernel headers")
76 (description "Headers of the Linux-Libre kernel.")
78 (home-page "http://www.gnu.org/software/linux-libre/"))))
80 (define-public linux-pam
87 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
89 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
93 "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s"))))
94 (build-system gnu-build-system)
98 ;; TODO: optional dependencies
99 ;; ("libxcrypt" ,libxcrypt)
100 ;; ("cracklib" ,cracklib)
103 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
106 (home-page "http://www.linux-pam.org/")
107 (synopsis "Pluggable authentication modules for Linux")
109 "A *Free* project to implement OSF's RFC 86.0.
110 Pluggable authentication modules are small shared object files that can
111 be used through the PAM API to perform tasks, like authenticating a user
112 at login. Local and dynamic reconfiguration are its key features")
115 (define-public psmisc
122 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
126 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
127 (build-system gnu-build-system)
128 (inputs `(("ncurses" ,ncurses)))
129 (home-page "http://psmisc.sourceforge.net/")
131 "set of utilities that use the proc filesystem, such as fuser, killall, and pstree")
133 "This PSmisc package is a set of some small useful utilities that
134 use the proc filesystem. We're not about changing the world, but
135 providing the system administrator with some help in common tasks.")
138 (define-public util-linux
145 (uri (string-append "mirror://kernel.org/linux/utils/"
146 name "/v" version "/"
147 name "-" version ".2" ".tar.xz"))
150 "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir"))))
151 (build-system gnu-build-system)
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"))))
162 (inputs `(("zlib" ,guix:zlib)
165 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
167 "util-linux is a random collection of utilities for the Linux kernel")
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.
173 (license '(gpl3+ gpl2+ gpl2 lgpl2.0+
174 bsd-4 public-domain))))
176 (define-public usbutils
183 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
184 "usbutils-" version ".tar.xz"))
187 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
188 (build-system gnu-build-system)
190 `(("libusb" ,libusb) ("pkg-config" ,pkg-config)))
191 (home-page "http://www.linux-usb.org/")
193 "Tools for working with USB devices, such as lsusb")
195 "Tools for working with USB devices, such as lsusb.")