distro: Add psmisc.
[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>
3;;;
4;;; This file is part of Guix.
5;;;
6;;; Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (distro packages linux)
20 #:use-module (guix packages)
21 #:use-module (guix download)
22 #:use-module (distro packages flex)
80fe5c60 23 #:use-module (distro packages perl)
686f14e8 24 #:use-module (distro packages ncurses)
fd76c904
LC
25 #:use-module (guix build-system gnu))
26
80fe5c60
LC
27(define-public linux-libre-headers
28 (let* ((version* "3.3.8")
29 (build-phase
30 '(lambda* (#:key outputs #:allow-other-keys)
31 (setenv "ARCH" "x86_64") ; XXX
32 (and (zero? (system* "make" "defconfig"))
33 (zero? (system* "make" "mrproper" "headers_check")))))
34 (install-phase
35 `(lambda* (#:key outputs #:allow-other-keys)
36 (let ((out (assoc-ref outputs "out")))
37 (and (zero? (system* "make"
38 (string-append "INSTALL_HDR_PATH=" out)
39 "headers_install"))
40 (mkdir (string-append out "/include/config"))
41 (call-with-output-file
42 (string-append out
43 "/include/config/kernel.release")
44 (lambda (p)
45 (format p "~a-default~%" ,version*))))))))
46 (package
47 (name "linux-libre-headers")
48 (version version*)
49 (source (origin
50 (method url-fetch)
51 (uri (string-append
52 "http://linux-libre.fsfla.org/pub/linux-libre/releases/3.3.8-gnu/linux-libre-"
53 version "-gnu.tar.xz"))
54 (sha256
55 (base32
56 "0jkfh0z1s6izvdnc3njm39dhzp1cg8i06jv06izwqz9w9qsprvnl"))))
57 (build-system gnu-build-system)
58 (native-inputs `(("perl" ,perl)))
59 (arguments
60 `(#:modules ((guix build gnu-build-system)
61 (guix build utils)
62 (srfi srfi-1))
63 #:phases (alist-replace
64 'build ,build-phase
65 (alist-replace
66 'install ,install-phase
67 (alist-delete 'configure %standard-phases)))
68 #:tests? #f))
69 (synopsis "GNU Linux-Libre kernel headers")
70 (description "Headers of the Linux-Libre kernel.")
71 (license "GPLv2")
72 (home-page "http://www.gnu.org/software/linux-libre/"))))
73
fd76c904
LC
74(define-public linux-pam
75 (package
76 (name "linux-pam")
77 (version "1.1.6")
78 (source
79 (origin
80 (method url-fetch)
81 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
82 version ".tar.bz2")
83 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
84 version ".tar.bz2")))
85 (sha256
86 (base32
87 "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s"))))
88 (build-system gnu-build-system)
89 (inputs
90 `(("flex" ,flex)
91
92 ;; TODO: optional dependencies
93 ;; ("libxcrypt" ,libxcrypt)
94 ;; ("cracklib" ,cracklib)
95 ))
96 (arguments
97 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
98 ;; isn't available.
99 '(#:tests? #f))
100 (home-page "http://www.linux-pam.org/")
101 (synopsis "Pluggable authentication modules for Linux")
102 (description
103 "A *Free* project to implement OSF's RFC 86.0.
104Pluggable authentication modules are small shared object files that can
105be used through the PAM API to perform tasks, like authenticating a user
106at login. Local and dynamic reconfiguration are its key features")
107 (license "BSD")))
686f14e8
LC
108
109(define-public psmisc
110 (package
111 (name "psmisc")
112 (version "22.20")
113 (source
114 (origin
115 (method url-fetch)
116 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
117 version ".tar.gz"))
118 (sha256
119 (base32
120 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
121 (build-system gnu-build-system)
122 (inputs `(("ncurses" ,ncurses)))
123 (home-page "http://psmisc.sourceforge.net/")
124 (synopsis
125 "set of utilities that use the proc filesystem, such as fuser, killall, and pstree")
126 (description
127 "This PSmisc package is a set of some small useful utilities that
128use the proc filesystem. We're not about changing the world, but
129providing the system administrator with some help in common tasks.")
130 (license "GPLv2+")))