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

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,20 +58,18 @@ (define-public lsof
(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")
(system* "./Configure" "linux")) (zero? (system* "./Configure" "linux"))))
(alist-replace (replace 'install
'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out")))
(mkdir out) (mkdir out)
@ -79,9 +78,7 @@ (define-public lsof
(mkdir (string-append out "/share")) (mkdir (string-append out "/share"))
(mkdir (string-append out "/share/man")) (mkdir (string-append out "/share/man"))
(mkdir (string-append out "/share/man/man8")) (mkdir (string-append out "/share/man/man8"))
(copy-file "lsof.8" (string-append out "/share/man/man8/lsof.8")) (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.