guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/04: gnu: lsof: Use 'modify-phases' syntax.


From: Efraim Flashner
Subject: 02/04: gnu: lsof: Use 'modify-phases' syntax.
Date: Sat, 29 Apr 2017 16:41:30 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit b6ea329a32f1d1da17ff72affab2e1fe16aff51f
Author: Efraim Flashner <address@hidden>
Date:   Sat Apr 29 23:23:54 2017 +0300

    gnu: lsof: Use 'modify-phases' syntax.
    
    * gnu/packages/lsof.scm (lsof)[arguments]: Use 'modify-phases' syntax.
---
 gnu/packages/lsof.scm | 47 ++++++++++++++++++++++-------------------------
 1 file changed, 22 insertions(+), 25 deletions(-)

diff --git a/gnu/packages/lsof.scm b/gnu/packages/lsof.scm
index e4730ba..97658c8 100644
--- a/gnu/packages/lsof.scm
+++ b/gnu/packages/lsof.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Andreas Enge <address@hidden>
+;;; Copyright © 2017 Efraim Flashner <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -57,31 +58,27 @@
    (arguments
     `(#:tests? #f ; no test target
       #:phases
-      (alist-replace
-       'unpack
-       (lambda* (#:key source #:allow-other-keys)
-         (let ((unpack (assoc-ref %standard-phases 'unpack)))
-           (unpack #:source source)
-           (unpack #:source (car (find-files "." "\\.tar$")))))
-      (alist-replace
-       'configure
-       (lambda _
-         (setenv "LSOF_CC" "gcc")
-         (setenv "LSOF_MAKE" "make")
-         (system* "./Configure" "linux"))
-      (alist-replace
-       'install
-       (lambda* (#:key outputs #:allow-other-keys)
-         (let ((out (assoc-ref outputs "out")))
-           (mkdir out)
-           (mkdir (string-append out "/bin"))
-           (copy-file "lsof" (string-append out "/bin/lsof"))
-           (mkdir (string-append out "/share"))
-           (mkdir (string-append out "/share/man"))
-           (mkdir (string-append out "/share/man/man8"))
-           (copy-file "lsof.8" (string-append out "/share/man/man8/lsof.8"))
-         ))
-       %standard-phases)))))
+      (modify-phases %standard-phases
+        (replace 'unpack
+          (lambda* (#:key source #:allow-other-keys)
+            (let ((unpack (assoc-ref %standard-phases 'unpack)))
+              (unpack #:source source)
+              (unpack #:source (car (find-files "." "\\.tar$"))))))
+        (replace 'configure
+          (lambda _
+            (setenv "LSOF_CC" "gcc")
+            (setenv "LSOF_MAKE" "make")
+            (zero? (system* "./Configure" "linux"))))
+        (replace 'install
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let ((out (assoc-ref outputs "out")))
+              (mkdir out)
+              (mkdir (string-append out "/bin"))
+              (copy-file "lsof" (string-append out "/bin/lsof"))
+              (mkdir (string-append out "/share"))
+              (mkdir (string-append out "/share/man"))
+              (mkdir (string-append out "/share/man/man8"))
+              (copy-file "lsof.8" (string-append out 
"/share/man/man8/lsof.8"))))))))
    (synopsis "Display information about open files")
    (description
     "Lsof stands for LiSt Open Files, and it does just that.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]