guix-commits
[Top][All Lists]
Advanced

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

08/10: gnu: emms: Use 'modify-phases'.


From: Efraim Flashner
Subject: 08/10: gnu: emms: Use 'modify-phases'.
Date: Tue, 31 May 2016 19:11:57 +0000 (UTC)

efraim pushed a commit to branch master
in repository guix.

commit 2fe176be0fc612370a22105a736fc7f70b7da7cf
Author: Efraim Flashner <address@hidden>
Date:   Tue May 31 22:05:26 2016 +0300

    gnu: emms: Use 'modify-phases'.
    
    * gnu/packages/emacs.scm (emms)[arguments]: Use 'modify-phases'.
---
 gnu/packages/emacs.scm |  123 +++++++++++++++++++++++-------------------------
 1 file changed, 60 insertions(+), 63 deletions(-)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 1b0fecb..16ef72e 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -859,69 +859,66 @@ provides an optional IDE-like error list.")
        #:imported-modules (,@%gnu-build-system-modules
                            (guix build emacs-utils))
 
-       #:phases (alist-replace
-                 'configure
-                 (lambda* (#:key inputs outputs #:allow-other-keys)
-                   (let ((out     (assoc-ref outputs "out"))
-                         (vorbis  (assoc-ref inputs "vorbis-tools"))
-                         (alsa    (assoc-ref inputs "alsa-utils"))
-                         (mpg321  (assoc-ref inputs "mpg321"))
-                         (mp3info (assoc-ref inputs "mp3info")))
-                     ;; Specify the installation directory.
-                     (substitute* "Makefile"
-                       (("PREFIX=.*$")
-                        (string-append "PREFIX := " out "\n")))
-
-                     (setenv "SHELL" (which "sh"))
-                     (setenv "CC" "gcc")
-
-                     ;; Specify the absolute file names of the various
-                     ;; programs so that everything works out-of-the-box.
-                     (with-directory-excursion "lisp"
-                       (emacs-substitute-variables
-                           "emms-player-mpg321-remote.el"
-                         ("emms-player-mpg321-remote-command"
-                          (string-append mpg321 "/bin/mpg321")))
-                       (substitute* "emms-player-simple.el"
-                         (("\"ogg123\"")
-                          (string-append "\"" vorbis "/bin/ogg123\"")))
-                       (emacs-substitute-variables "emms-info-ogginfo.el"
-                         ("emms-info-ogginfo-program-name"
-                          (string-append vorbis "/bin/ogginfo")))
-                       (emacs-substitute-variables "emms-info-libtag.el"
-                         ("emms-info-libtag-program-name"
-                          (string-append out "/bin/emms-print-metadata")))
-                       (emacs-substitute-variables "emms-info-mp3info.el"
-                         ("emms-info-mp3info-program-name"
-                          (string-append mp3info "/bin/mp3info")))
-                       (substitute* "emms-volume-amixer.el"
-                         (("\"amixer\"")
-                          (string-append "\"" alsa "/bin/amixer\"")))
-                       (substitute* "emms-tag-editor.el"
-                         (("\"mp3info\"")
-                          (string-append "\"" mp3info "/bin/mp3info\""))))))
-                 (alist-cons-before
-                  'install 'pre-install
-                  (lambda* (#:key outputs #:allow-other-keys)
-                    ;; The 'install' rule expects the target directory to
-                    ;; exist.
-                    (let* ((out  (assoc-ref outputs "out"))
-                           (man1 (string-append out "/share/man/man1")))
-                      (mkdir-p man1)
-                      #t))
-                  (alist-cons-after
-                   'install 'post-install
-                   (lambda* (#:key outputs #:allow-other-keys)
-                     (let* ((out    (assoc-ref outputs "out"))
-                            (target (string-append
-                                     out "/bin/emms-print-metadata")))
-                       (symlink "emms-auto.el"
-                                (string-append out "/share/emacs/site-lisp/"
-                                               "emms-autoloads.el"))
-                       (mkdir-p (dirname target))
-                       (copy-file "src/emms-print-metadata" target)
-                       (chmod target #o555)))
-                   %standard-phases)))
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out     (assoc-ref outputs "out"))
+                   (vorbis  (assoc-ref inputs "vorbis-tools"))
+                   (alsa    (assoc-ref inputs "alsa-utils"))
+                   (mpg321  (assoc-ref inputs "mpg321"))
+                   (mp3info (assoc-ref inputs "mp3info")))
+               ;; Specify the installation directory.
+               (substitute* "Makefile"
+                 (("PREFIX=.*$")
+                  (string-append "PREFIX := " out "\n")))
+
+               (setenv "SHELL" (which "sh"))
+               (setenv "CC" "gcc")
+
+               ;; Specify the absolute file names of the various
+               ;; programs so that everything works out-of-the-box.
+               (with-directory-excursion "lisp"
+                 (emacs-substitute-variables
+                     "emms-player-mpg321-remote.el"
+                   ("emms-player-mpg321-remote-command"
+                    (string-append mpg321 "/bin/mpg321")))
+                 (substitute* "emms-player-simple.el"
+                   (("\"ogg123\"")
+                    (string-append "\"" vorbis "/bin/ogg123\"")))
+                 (emacs-substitute-variables "emms-info-ogginfo.el"
+                   ("emms-info-ogginfo-program-name"
+                    (string-append vorbis "/bin/ogginfo")))
+                 (emacs-substitute-variables "emms-info-libtag.el"
+                   ("emms-info-libtag-program-name"
+                    (string-append out "/bin/emms-print-metadata")))
+                 (emacs-substitute-variables "emms-info-mp3info.el"
+                   ("emms-info-mp3info-program-name"
+                    (string-append mp3info "/bin/mp3info")))
+                 (substitute* "emms-volume-amixer.el"
+                   (("\"amixer\"")
+                    (string-append "\"" alsa "/bin/amixer\"")))
+                 (substitute* "emms-tag-editor.el"
+                   (("\"mp3info\"")
+                    (string-append "\"" mp3info "/bin/mp3info\"")))))))
+         (add-before 'install 'pre-install
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; The 'install' rule expects the target directory to exist.
+             (let* ((out  (assoc-ref outputs "out"))
+                    (man1 (string-append out "/share/man/man1")))
+               (mkdir-p man1)
+               #t)))
+         (add-after 'install 'post-install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out    (assoc-ref outputs "out"))
+                    (target (string-append
+                             out "/bin/emms-print-metadata")))
+               (symlink "emms-auto.el"
+                        (string-append out "/share/emacs/site-lisp/"
+                                       "emms-autoloads.el"))
+               (mkdir-p (dirname target))
+               (copy-file "src/emms-print-metadata" target)
+               (chmod target #o555)))))
        #:tests? #f))
     (native-inputs `(("emacs" ,emacs-minimal)    ;for (guix build emacs-utils)
                      ("texinfo" ,texinfo)))



reply via email to

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