aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2022-10-13 11:53:39 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2022-10-13 22:16:33 +0200
commit21b698c503c075768d7a30c4920d8a7627b42b75 (patch)
tree84dfb689e20149ecd753749d0dc4368b823857f7 /gnu
parent00fa3777104cfaebeed25874390a870ba9bc8899 (diff)
downloadguix-21b698c503c075768d7a30c4920d8a7627b42b75.tar.gz
guix-21b698c503c075768d7a30c4920d8a7627b42b75.zip
gnu: emacs-emacsql: Improve package style.
* gnu/packages/emacs-xyz.scm (emacs-emacsql)[arguments]: Use G-expressions. <#:phases>: Use EMACS-SUBSTITUTE-VARIABLES instead of EMACS-SUBSTITUTE-SEXPS.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/emacs-xyz.scm61
1 files changed, 29 insertions, 32 deletions
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 8f0b28a658..cf6c1c3637 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -19158,41 +19158,38 @@ object has been freed.")
(base32 "1iibfb5l94i8p5kqb54wxpbsflh3v7d36kfn34pg16839hs54410"))))
(build-system emacs-build-system)
(arguments
- `(#:modules ((guix build emacs-build-system)
+ (list
+ #:modules '((guix build emacs-build-system)
(guix build utils)
(guix build emacs-utils)
(srfi srfi-26))
- #:phases
- (modify-phases %standard-phases
- (add-before 'install 'patch-elisp-shell-shebangs
- (lambda _
- (substitute* (find-files "." "\\.el")
- (("/bin/sh") (which "sh")))))
- (add-after 'patch-elisp-shell-shebangs 'setenv-shell
- (lambda _
- (setenv "SHELL" "sh")))
- (add-after 'setenv-shell 'build-emacsql-sqlite
- (lambda _
- (invoke "make" "binary" (string-append "CC=" ,(cc-for-target)))))
- (add-after 'build-emacsql-sqlite 'install-emacsql-sqlite
- ;; This build phase installs emacs-emacsql binary.
- (lambda* (#:key outputs #:allow-other-keys)
- (install-file "sqlite/emacsql-sqlite"
- (string-append (assoc-ref outputs "out") "/bin"))))
- (add-after 'install-emacsql-sqlite 'patch-emacsql-sqlite.el
- ;; This build phase removes interactive prompts
- ;; and makes sure Emacs look for binaries in the right places.
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((file "emacsql-sqlite.el"))
- (chmod file #o644)
- (emacs-substitute-sexps file
- ;; Make sure Emacs looks for ‘GCC’ binary in the right place.
- ("(executable-find" (which "gcc"))
- ;; Make sure Emacs looks for ‘emacsql-sqlite’ binary
- ;; in the right place.
- ("(defvar emacsql-sqlite-executable"
- (string-append (assoc-ref outputs "out")
- "/bin/emacsql-sqlite")))))))))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'install 'patch-elisp-shell-shebangs
+ (lambda _
+ (substitute* (find-files "." "\\.el")
+ (("/bin/sh") (which "sh")))))
+ (add-after 'patch-elisp-shell-shebangs 'setenv-shell
+ (lambda _
+ (setenv "SHELL" "sh")))
+ (add-after 'setenv-shell 'build-emacsql-sqlite
+ (lambda _
+ (invoke "make" "binary" (string-append "CC=" #$(cc-for-target)))))
+ (add-after 'build-emacsql-sqlite 'install-emacsql-sqlite
+ ;; This build phase installs emacs-emacsql binary.
+ (lambda _
+ (install-file "sqlite/emacsql-sqlite"
+ (string-append #$output "/bin"))))
+ (add-after 'install-emacsql-sqlite 'patch-emacsql-sqlite.el
+ ;; This build phase removes interactive prompts
+ ;; and makes sure Emacs look for binaries in the right places.
+ (lambda _
+ (emacs-substitute-variables "emacsql-sqlite.el"
+ ("emacsql-sqlite-executable"
+ (string-append #$output "/bin/emacsql-sqlite"))
+ ;; Make sure Emacs looks for ‘GCC’ binary in the right place.
+ ("emacsql-sqlite-c-compilers"
+ `(list ,(which "gcc")))))))))
(inputs
(list emacs-minimal `(,mariadb "dev") `(,mariadb "lib") postgresql))
(propagated-inputs