gnu: emacs-auctex: Improve package style.

* gnu/packages/emacs-xyz.scm (emacs-auctex)[arguments]: Use G-expressions.
<#:include>: Use %DEFAULT-INCLUDE.
<#:exclude>: Use %DEFAULT-EXCLUDE.
This commit is contained in:
Nicolas Goaziou 2023-07-07 23:38:26 +02:00
parent 3729c3adf7
commit f34a654206
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D

View file

@ -3952,31 +3952,32 @@ (define-public emacs-auctex
;; We use 'emacs' because AUCTeX requires dbus at compile time ;; We use 'emacs' because AUCTeX requires dbus at compile time
;; ('emacs-minimal' does not provide dbus). ;; ('emacs-minimal' does not provide dbus).
(arguments (arguments
`(#:emacs ,emacs (list
#:include '("\\.el$" "^images/" "^latex/" "\\.info$") #:emacs emacs
#:exclude '("^tests/" "^latex/README") #:include #~(cons* "^images/" "^latex/" %default-include)
#:phases #:exclude #~(cons "^latex/README" %default-exclude)
(modify-phases %standard-phases #:phases
(add-after 'unpack 'configure #~(modify-phases %standard-phases
(lambda* (#:key inputs #:allow-other-keys) (add-after 'unpack 'configure
(emacs-substitute-variables "preview.el" (lambda* (#:key inputs #:allow-other-keys)
("preview-gs-command" (emacs-substitute-variables "preview.el"
(search-input-file inputs "/bin/gs"))) ("preview-gs-command"
;; Leave "dvipng" and "dvips" executables as-is. Otherwise, this (search-input-file inputs "/bin/gs")))
;; would require to add a TeX Live system to inputs, which is ;; Leave "dvipng" and "dvips" executables as-is. Otherwise, this
;; much for an Emacs package. ;; would require to add a TeX Live system to inputs, which is
(substitute* "preview.el" ;; much for an Emacs package.
(("\"pdf2dsc ") (substitute* "preview.el"
(let ((pdf2dsc (search-input-file inputs "/bin/pdf2dsc"))) (("\"pdf2dsc ")
(string-append "\"" pdf2dsc " ")))))) (let ((pdf2dsc (search-input-file inputs "/bin/pdf2dsc")))
(add-after 'install 'install-doc (string-append "\"" pdf2dsc " "))))))
(lambda* (#:key outputs #:allow-other-keys) (add-after 'install 'install-doc
(let* ((out (assoc-ref outputs "out")) (lambda _
(doc-dir (string-append out "/share/doc/" ,name "-" ,version))) (let ((doc-dir (string-append #$output "/share/doc/"
(with-directory-excursion "doc" #$name "-" #$version)))
(setenv "HOME" (getenv "TMPDIR")) ; for mktextfm (with-directory-excursion "doc"
(invoke "pdftex" "tex-ref") (setenv "HOME" (getenv "TMPDIR")) ; for mktextfm
(install-file "tex-ref.pdf" doc-dir)))))))) (invoke "pdftex" "tex-ref")
(install-file "tex-ref.pdf" doc-dir))))))))
(native-inputs (native-inputs
(list perl (texlive-updmap.cfg))) (list perl (texlive-updmap.cfg)))
(inputs (inputs