diff mbox series

[bug#60549,2/5] gnu: Add emacs-citre.

Message ID 20230104124644.19925-1-tumashu@163.com
State New
Headers show
Series [bug#60548,1/5] gnu: Add emacs-cal-china-x. | expand

Commit Message

Feng Shu Jan. 4, 2023, 12:46 p.m. UTC
From: Feng Shu <tumashu@163.com>

* gnu/packages/emacs-xyz.scm (emacs-citre): New variable.
---
 gnu/packages/emacs-xyz.scm | 57 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

Comments

Nicolas Goaziou Jan. 7, 2023, midnight UTC | #1
Hello,

tumashu@163.com writes:

> * gnu/packages/emacs-xyz.scm (emacs-citre): New variable.

Applied, with the changes detailed below. Thank you.

> +      #~(modify-phases %standard-phases
> +          (add-after 'unpack 'patch-citre-ctags-program
> +            (lambda* (#:key inputs #:allow-other-keys)
> +              (emacs-substitute-sexps "citre-ctags.el"
> +                ("defcustom citre-ctags-program"
> +                 (string-append (assoc-ref inputs "universal-ctags")
> +                                "/bin/ctags")))))
> +          (add-after 'unpack 'patch-citre-readtags-program
> +            (lambda* (#:key inputs #:allow-other-keys)
> +              (emacs-substitute-sexps "citre-readtags.el"
> +                ("defcustom citre-readtags-program"
> +                 (string-append (assoc-ref inputs "universal-ctags")
> +                                "/bin/readtags")))))
> +          (add-after 'unpack 'patch-citre-gtags-program
> +            (lambda* (#:key inputs #:allow-other-keys)
> +              (emacs-substitute-sexps "citre-global.el"
> +                ("defcustom citre-gtags-program"
> +                 (string-append (assoc-ref inputs "global")
> +                                "/bin/gtags")))))
> +          (add-after 'unpack 'patch-citre-global-program
> +            (lambda* (#:key inputs #:allow-other-keys)
> +              (emacs-substitute-sexps "citre-global.el"
> +                ("defcustom citre-global-program"
> +                 (string-append (assoc-ref inputs "global")
> +                                "/bin/global"))))))))

I merged everything into a single phase and used more specific
`emacs-substitute-variables' instead of `emacs-substitute-sexps'.

> +    (inputs (list global universal-ctags))
> +    (home-page "https://github.com/universal-ctags/citre")
> +    (synopsis "Ctags IDE on the True Editor")
> +    (description
> +     "Citre is an advanced Ctags (or actually, readtags) frontend for
> +Emacs. It offers:
> +
> +@itemize
> +@item completion-at-point, xref and imenu integration.
> +@item citre-jump: A completing-read UI for jumping to definition.
> +@item citre-peek: A powerful code reading tool that lets you go down the
> +rabbit hole without leaving current buffer.
> +@end itemize\n")

I reworded the description.

Regards,
diff mbox series

Patch

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index d4f0dc82a0..507ba3be61 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -34104,6 +34104,63 @@  (define-public emacs-global-tags
 project.el and xref.el.")
       (license license:gpl3+))))
 
+(define-public emacs-citre
+  (package
+    (name "emacs-citre")
+    (version "0.3.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/universal-ctags/citre/")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "168z6yidh2nxkmdlx9cqdzzb7achxdipnbk5pj9787m9bp1sdpkd"))
+       (file-name (git-file-name name version))))
+    (build-system emacs-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-citre-ctags-program
+            (lambda* (#:key inputs #:allow-other-keys)
+              (emacs-substitute-sexps "citre-ctags.el"
+                ("defcustom citre-ctags-program"
+                 (string-append (assoc-ref inputs "universal-ctags")
+                                "/bin/ctags")))))
+          (add-after 'unpack 'patch-citre-readtags-program
+            (lambda* (#:key inputs #:allow-other-keys)
+              (emacs-substitute-sexps "citre-readtags.el"
+                ("defcustom citre-readtags-program"
+                 (string-append (assoc-ref inputs "universal-ctags")
+                                "/bin/readtags")))))
+          (add-after 'unpack 'patch-citre-gtags-program
+            (lambda* (#:key inputs #:allow-other-keys)
+              (emacs-substitute-sexps "citre-global.el"
+                ("defcustom citre-gtags-program"
+                 (string-append (assoc-ref inputs "global")
+                                "/bin/gtags")))))
+          (add-after 'unpack 'patch-citre-global-program
+            (lambda* (#:key inputs #:allow-other-keys)
+              (emacs-substitute-sexps "citre-global.el"
+                ("defcustom citre-global-program"
+                 (string-append (assoc-ref inputs "global")
+                                "/bin/global"))))))))
+    (inputs (list global universal-ctags))
+    (home-page "https://github.com/universal-ctags/citre")
+    (synopsis "Ctags IDE on the True Editor")
+    (description
+     "Citre is an advanced Ctags (or actually, readtags) frontend for
+Emacs. It offers:
+
+@itemize
+@item completion-at-point, xref and imenu integration.
+@item citre-jump: A completing-read UI for jumping to definition.
+@item citre-peek: A powerful code reading tool that lets you go down the
+rabbit hole without leaving current buffer.
+@end itemize\n")
+    (license license:gpl3+)))
+
 (define-public emacs-seq
   (package
     (name "emacs-seq")