summary refs log tree commit diff
path: root/distro
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-01-12 16:51:16 +0100
committerLudovic Courtès <ludo@gnu.org>2013-01-12 16:51:16 +0100
commite47e3effafa0d2ae7526ad99b81b0926b1f07a34 (patch)
tree6f130741d86a569924f48729cf8fbe06a6c48360 /distro
parenteb6d676e2aa19f9f971956bce2236f20d83ff472 (diff)
downloadguix-e47e3effafa0d2ae7526ad99b81b0926b1f07a34.tar.gz
distro: Add procps.
* distro/packages/linux.scm (procps): New variable.
Diffstat (limited to 'distro')
-rw-r--r--distro/packages/linux.scm59
1 files changed, 58 insertions, 1 deletions
diff --git a/distro/packages/linux.scm b/distro/packages/linux.scm
index a40cc27c3e..7e18e393b9 100644
--- a/distro/packages/linux.scm
+++ b/distro/packages/linux.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -19,6 +19,7 @@
 
 (define-module (distro packages linux)
   #:use-module (guix licenses)
+  #:use-module (distro)
   #:use-module ((distro packages compression)
                 #:renamer (symbol-prefix-proc 'guix:))
   #:use-module (distro packages flex)
@@ -178,6 +179,62 @@ providing the system administrator with some help in common tasks.")
     (license '(gpl3+ gpl2+ gpl2 lgpl2.0+
                bsd-4 public-domain))))
 
+(define-public procps
+  (package
+    (name "procps")
+    (version "3.2.8")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "http://procps.sourceforge.net/procps-"
+                                 version ".tar.gz"))
+             (sha256
+              (base32
+               "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i"))))
+    (build-system gnu-build-system)
+    (inputs `(("ncurses" ,ncurses)
+              ("patch/make-3.82" ,(search-patch "procps-make-3.82.patch"))))
+    (arguments
+     '(#:patches (list (assoc-ref %build-inputs "patch/make-3.82"))
+       #:phases (alist-replace
+                 'configure
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   ;; No `configure', just a single Makefile.
+                   (let ((out (assoc-ref outputs "out")))
+                     (substitute* "Makefile"
+                       (("/usr/") "/")
+                       (("--(owner|group) 0") "")
+                       (("ldconfig") "true")
+                       (("^LDFLAGS[[:blank:]]*:=(.*)$" _ value)
+                        ;; Add libproc to the RPATH.
+                        (string-append "LDFLAGS := -Wl,-rpath="
+                                       out "/lib" value))))
+                   (setenv "CC" "gcc"))
+                 (alist-replace
+                  'install
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    (let ((out (assoc-ref outputs "out")))
+                      (and (zero?
+                            (system* "make" "install"
+                                     (string-append "DESTDIR=" out)))
+
+                           ;; Sanity check.
+                           (zero?
+                            (system* (string-append out "/bin/ps")
+                                     "--version")))))
+                  %standard-phases))
+
+       ;; What did you expect?  Tests?
+       #:tests? #f))
+    (home-page "http://procps.sourceforge.net/")
+    (synopsis
+     "Utilities that give information about processes using the /proc filesystem")
+    (description
+     "procps is the package that has a bunch of small useful utilities
+that give information about processes using the Linux /proc file system.
+The package includes the programs ps, top, vmstat, w, kill, free,
+slabtop, and skill.")
+    (license gpl2)))
+
 (define-public usbutils
   (package
     (name "usbutils")