gnu: emacs-xelb: Improve package style.

* gnu/packages/emacs-xyz.scm (emacs-xelb)[arguments]: Use G-expressions.
<#:phases>: Allow package transformations and cross-compiling.

Change-Id: I2814230abed881d04b708bddf9b7ef1551a78bdf
This commit is contained in:
Nicolas Goaziou 2024-06-18 22:21:29 +02:00
parent 6c2a65e566
commit fdeed12299
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D

View file

@ -19743,20 +19743,20 @@ (define-public emacs-xelb
;; x-hyper-keysym, x-super-keysym, libxml-parse-xml-region
;; x-display-pixel-width, x-display-pixel-height
(arguments
`(#:emacs ,emacs
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'regenerate-el-files
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "xelb-gen"
(("/usr/bin/env") (which "env")))
(invoke "make"
(string-append "PROTO_PATH="
(assoc-ref inputs "xcb-proto")
"/share/xcb")
(string-append "EMACS_BIN="
(assoc-ref inputs "emacs")
"/bin/emacs -Q")))))))
(list
#:emacs emacs
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'regenerate-el-files
(lambda* (#:key inputs native-inputs #:allow-other-keys)
(substitute* "xelb-gen"
(("/usr/bin/env") (which "env")))
(let ((xcb-proto #$(this-package-native-input "xcb-proto"))
(emacs (search-input-file (or native-inputs inputs)
"/bin/emacs")))
(invoke "make"
(format #f "PROTO_PATH=~a/share/xcb" xcb-proto)
(format #f "EMACS_BIN=~a -Q" emacs))))))))
(native-inputs (list xcb-proto))
(home-page "https://github.com/ch11ng/xelb")
(synopsis "X protocol Emacs Lisp binding")