me
/
guix
Archived
1
0
Fork 0

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.
Nicolas Goaziou 2022-10-13 11:53:39 +02:00
parent 00fa377710
commit 21b698c503
No known key found for this signature in database
GPG Key ID: DA00B4F048E92F2D
1 changed files with 29 additions and 32 deletions

View File

@ -19158,12 +19158,13 @@ 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
#~(modify-phases %standard-phases
(add-before 'install 'patch-elisp-shell-shebangs
(lambda _
(substitute* (find-files "." "\\.el")
@ -19173,26 +19174,22 @@ object has been freed.")
(setenv "SHELL" "sh")))
(add-after 'setenv-shell 'build-emacsql-sqlite
(lambda _
(invoke "make" "binary" (string-append "CC=" ,(cc-for-target)))))
(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)
(lambda _
(install-file "sqlite/emacsql-sqlite"
(string-append (assoc-ref outputs "out") "/bin"))))
(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* (#:key outputs #:allow-other-keys)
(let ((file "emacsql-sqlite.el"))
(chmod file #o644)
(emacs-substitute-sexps file
(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.
("(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")))))))))
("emacsql-sqlite-c-compilers"
`(list ,(which "gcc")))))))))
(inputs
(list emacs-minimal `(,mariadb "dev") `(,mariadb "lib") postgresql))
(propagated-inputs