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