guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

26/67: gnu: emacs-xelb: Improve package style.


From: guix-commits
Subject: 26/67: gnu: emacs-xelb: Improve package style.
Date: Tue, 18 Jun 2024 18:08:37 -0400 (EDT)

ngz pushed a commit to branch master
in repository guix.

commit fdeed12299dd6c231a739e74fbc4d06972dfa4fe
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Tue Jun 18 22:21:29 2024 +0200

    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
---
 gnu/packages/emacs-xyz.scm | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 529213ae93..604f2d5b90 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -19743,20 +19743,20 @@ conflicts.")
     ;; 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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]