gnu: lsof: Use 'modify-phases' syntax.

* gnu/packages/lsof.scm (lsof)[arguments]: Use 'modify-phases' syntax.
This commit is contained in:
Efraim Flashner 2017-04-29 23:23:54 +03:00
parent d5fa9fd1fe
commit b6ea329a32
No known key found for this signature in database
GPG Key ID: F4C1D3917EACEE93
1 changed files with 22 additions and 25 deletions

View File

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