guix-commits
[Top][All Lists]
Advanced

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

57/78: gnu: emacs-nodejs-repl: Improve package style.


From: guix-commits
Subject: 57/78: gnu: emacs-nodejs-repl: Improve package style.
Date: Fri, 23 Feb 2024 03:12:12 -0500 (EST)

sharlatan pushed a commit to branch go-team
in repository guix.

commit adedf338912f0ae4d6f5eda1cea63d64d36bb77c
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Thu Feb 22 14:48:50 2024 +0100

    gnu: emacs-nodejs-repl: Improve package style.
    
    * gnu/packages/emacs-xyz.scm (emacs-nodejs-repl)[arguments]: Use
    G-expressions.  Use SEARCH-INPUT-FILES.  Remove trailing #T.  Remove
    unnecessary call to MAKE-FILE-WRITABLE.
    
    Change-Id: I9da1e24566359970cbf24129acb67f9f0610fb80
---
 gnu/packages/emacs-xyz.scm | 43 ++++++++++++++++++++-----------------------
 1 file changed, 20 insertions(+), 23 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index f8cf5bf986..2bab584478 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -14146,29 +14146,26 @@ an Emacs buffer.")
     (native-inputs
      (list emacs-ert-expectations))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'set-shell
-           ;; Setting the SHELL environment variable is required for the tests
-           ;; to find sh.
-           (lambda _
-             (setenv "SHELL" (which "sh"))
-             #t))
-         (add-after 'unpack 'configure
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((node (assoc-ref inputs "node")))
-               ;; Specify the absolute file names of the various
-               ;; programs so that everything works out-of-the-box.
-               (make-file-writable "nodejs-repl.el")
-               (emacs-substitute-variables
-                   "nodejs-repl.el"
-                 ("nodejs-repl-command"
-                  (string-append node "/bin/node")))))))
-       #:tests? #t
-       #:test-command '("emacs" "-Q" "--batch"
-                        "-L" "."
-                        "-l" "test/test.el"
-                        "-f" "ert-run-tests-batch-and-exit")))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'set-shell
+            ;; Setting the SHELL environment variable is required for the tests
+            ;; to find sh.
+            (lambda _
+              (setenv "SHELL" (which "sh"))))
+          (add-after 'unpack 'configure
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((node (search-input-file inputs "/bin/node")))
+                ;; Specify the absolute file names of the various
+                ;; programs so that everything works out-of-the-box.
+                (emacs-substitute-variables "nodejs-repl.el"
+                  ("nodejs-repl-command" node))))))
+      #:tests? #t
+      #:test-command #~(list "emacs" "-Q" "--batch"
+                             "-L" "."
+                             "-l" "test/test.el"
+                             "-f" "ert-run-tests-batch-and-exit")))
     (home-page "https://github.com/abicky/nodejs-repl.el";)
     (synopsis "Node.js REPL inside Emacs")
     (description



reply via email to

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