Subject: [bug#60380] [PATCH] gnu: Add emacs-eat.

From: Zhu Zihao <[email-masked]>
Date: Wed, 28 Dec 2022 23:17:28 +0800

* gnu/packages/emacs-xyz.scm (emacs-eat): New variable.
---
 gnu/packages/emacs-xyz.scm | 48 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 47 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 8b0bb58275..9765ca2bbf 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -81,7 +81,7 @@
 ;;; Copyright © 2020, 2021, 2022 Niklas Eklund <[email-masked]>
 ;;; Copyright © 2020 Marco Grassi <[email-masked]>
 ;;; Copyright © 2020 Tomás Ortín Fernández <[email-masked]>
-;;; Copyright © 2020, 2021 Zhu Zihao <[email-masked]>
+;;; Copyright © 2020, 2021, 2022 Zhu Zihao <[email-masked]>
 ;;; Copyright © 2020 Adam Kandur <[email-masked]>
 ;;; Copyright © 2020 Tim Howes <[email-masked]>
 ;;; Copyright © 2020 Noah Landis <[email-masked]>
@@ -26592,6 +26592,52 @@ (define-public emacs-navigel
 tabulated-lists).")
     (license license:gpl3+)))
 
+(define-public emacs-eat
+  (package
+    (name "emacs-eat")
+    (version "0.3.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://codeberg.org/akib/emacs-eat")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1ha9qc8ll41bc187vzpnnwb06jywvfzh7kxy4rfcdj6dc21wvb87"))
+       (modules '((guix build utils)))
+       (snippet
+        #~(begin
+            ;; Remove generated terminfo database.
+            (delete-file-recursively "terminfo")
+            #t))))
+    (build-system emacs-build-system)
+    (arguments
+     (list
+      #:tests? #t
+      #:include #~(cons* "^term/"
+                         "^terminfo/"
+                         "^integration/"
+                         "\\.ti$"
+                         %default-include)
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'install 'build-info
+            (lambda _
+              (invoke "make" "info")))
+          (add-before 'install 'build-terminfo-database
+            (lambda _
+              (invoke "make" "terminfo"))))))
+    (native-inputs
+     (list ncurses texinfo))
+    (home-page "https://codeberg.org/akib/emacs-eat")
+    (synopsis "Terminal emulator in Emacs")
+    (description
+     "This package provides a terminal emulator in Emacs, written in pure
+Elisp.  It has features like complete mouse support and shell integration.")
+    (license license:gpl3+)))
+
 (define-public emacs-vterm
   (let ((version "0.0.1")
         (revision "1")
-- 
2.38.1