Subject: [PATCH emacs-team] gnu: emacs-idris-mode: Customize and test.

From: Liliana Marie Prikler <[email-masked]>
Date: Mon, 21 Apr 2025 21:29:54 +0200

* gnu/packages/emacs-xyz.scm (emacs-idris-mode)[inputs]: Add idris.
[arguments]: Add #:test-command.
<#:phases>: Add ‘customize’, ‘set-home’, and ‘skip-pre-check-build’.
---
 gnu/packages/emacs-xyz.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 0b490def203..f7522f689f4 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -218,6 +218,7 @@ (define-module (gnu packages emacs-xyz)
   #:use-module (gnu packages graphviz)
   #:use-module (gnu packages haskell-apps)
   #:use-module (gnu packages ibus)
+  #:use-module (gnu packages idris)
   #:use-module (gnu packages java)
   #:use-module (gnu packages julia-xyz)
   #:use-module (gnu packages ncurses)
@@ -23814,8 +23815,24 @@ (define-public emacs-idris-mode
           (base32
            "1d1f7kx0fw632js7qd1sra5wbpwyamcqs5wpzhyynmr5ybb0vyl7"))))
       (build-system emacs-build-system)
+      (arguments (list #:test-command
+                       #~(list "make" "test")
+                       #:phases
+                       #~(modify-phases %standard-phases
+                           (add-after 'unpack 'customize
+                             (lambda* (#:key inputs #:allow-other-keys)
+                               (emacs-substitute-variables "idris-settings.el"
+                                 ("idris-interpreter-path"
+                                  (search-input-file inputs "bin/idris")))))
+                           (add-before 'check 'set-home
+                             (lambda _ (setenv "HOME" (getenv "TMPDIR"))))
+                           (add-before 'check 'skip-pre-check-build
+                             (lambda _
+                               (substitute* "Makefile"
+                                 ((": getdeps build") ":")))))))
       (propagated-inputs
        (list emacs-prop-menu))
+      (inputs (list idris))
       (home-page
        "https://github.com/idris-hackers/idris-mode")
       (synopsis "Major mode for editing Idris code")

base-commit: 4a3a206465fb0d7b2c444c43655ad744b195c5bf
-- 
2.49.0