summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2016-05-31 22:05:26 +0300
committerEfraim Flashner <efraim@flashner.co.il>2016-05-31 22:05:44 +0300
commit2fe176be0fc612370a22105a736fc7f70b7da7cf (patch)
tree105fe93d12b5def50e77ed11a138a0eec7022fad /gnu/packages
parent0985f5269c0b06f5a836b5406e35cc60fb038512 (diff)
downloadguix-2fe176be0fc612370a22105a736fc7f70b7da7cf.tar.gz
gnu: emms: Use 'modify-phases'.
* gnu/packages/emacs.scm (emms)[arguments]: Use 'modify-phases'.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/emacs.scm123
1 files changed, 60 insertions, 63 deletions
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 1b0fecbeaf..16ef72ee55 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)))