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
This commit is contained in:
Nicolas Goaziou 2024-02-22 14:48:50 +01:00
parent 5ea5124cb5
commit eefd12d404
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D

View file

@ -14146,26 +14146,23 @@ an Emacs buffer.")
(native-inputs (native-inputs
(list emacs-ert-expectations)) (list emacs-ert-expectations))
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'set-shell (add-after 'unpack 'set-shell
;; Setting the SHELL environment variable is required for the tests ;; Setting the SHELL environment variable is required for the tests
;; to find sh. ;; to find sh.
(lambda _ (lambda _
(setenv "SHELL" (which "sh")) (setenv "SHELL" (which "sh"))))
#t))
(add-after 'unpack 'configure (add-after 'unpack 'configure
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let ((node (assoc-ref inputs "node"))) (let ((node (search-input-file inputs "/bin/node")))
;; Specify the absolute file names of the various ;; Specify the absolute file names of the various
;; programs so that everything works out-of-the-box. ;; programs so that everything works out-of-the-box.
(make-file-writable "nodejs-repl.el") (emacs-substitute-variables "nodejs-repl.el"
(emacs-substitute-variables ("nodejs-repl-command" node))))))
"nodejs-repl.el"
("nodejs-repl-command"
(string-append node "/bin/node")))))))
#:tests? #t #:tests? #t
#:test-command '("emacs" "-Q" "--batch" #:test-command #~(list "emacs" "-Q" "--batch"
"-L" "." "-L" "."
"-l" "test/test.el" "-l" "test/test.el"
"-f" "ert-run-tests-batch-and-exit"))) "-f" "ert-run-tests-batch-and-exit")))