[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/05: gnu: emacs-emacsql: Improve package style.
From: |
guix-commits |
Subject: |
02/05: gnu: emacs-emacsql: Improve package style. |
Date: |
Thu, 13 Oct 2022 16:20:53 -0400 (EDT) |
ngz pushed a commit to branch master
in repository guix.
commit 21b698c503c075768d7a30c4920d8a7627b42b75
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Thu Oct 13 11:53:39 2022 +0200
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.
---
gnu/packages/emacs-xyz.scm | 61 ++++++++++++++++++++++------------------------
1 file 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