guix-commits
[Top][All Lists]
Advanced

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

branch master updated: gnu: global: Add ctags support.


From: guix-commits
Subject: branch master updated: gnu: global: Add ctags support.
Date: Tue, 31 Aug 2021 06:12:59 -0400

This is an automated email from the git hooks/post-receive script.

efraim pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 590be0a  gnu: global: Add ctags support.
590be0a is described below

commit 590be0a1ed7f6467fe39cb95889e54d2addabd46
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Sun Aug 22 10:55:33 2021 +0300

    gnu: global: Add ctags support.
    
    * gnu/packages/code.scm (global)[inputs]: Add bash-minimal,
    universal-ctags, python-pygments.
    [arguments]: Add configure-flags to find ctags. Add phases to install
    plugins and to wrap python script with PYTHONPATH.
---
 gnu/packages/code.scm | 34 +++++++++++++++++++++++++++++-----
 1 file changed, 29 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index a414cde3..04b354b 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -64,6 +64,7 @@
   #:use-module (gnu packages perl-compression)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages texinfo)
@@ -137,17 +138,26 @@ highlighting your own code that seemed comprehensible 
when you wrote it.")
               (base32
                "0g4aslm2zajq605py11s4rs1wdnzcqhkh7bc2xl5az42adzzg839"))))
     (build-system gnu-build-system)
-    (inputs `(("coreutils" ,coreutils)
-              ("ncurses" ,ncurses)
-              ("libltdl" ,libltdl)
-              ("sqlite" ,sqlite)
-              ("python-wrapper" ,python-wrapper)))
+    (inputs
+      `(("bash" ,bash-minimal)                    ; for wrap-program
+        ("coreutils" ,coreutils)
+        ("ctags" ,universal-ctags)
+        ("libltdl" ,libltdl)
+        ("ncurses" ,ncurses)
+        ("python-pygments" ,python-pygments)
+        ("python-wrapper" ,python-wrapper)
+        ("sqlite" ,sqlite)))
     (arguments
      `(#:configure-flags
        (list (string-append "--with-ncurses="
                             (assoc-ref %build-inputs "ncurses"))
              (string-append "--with-sqlite3="
                             (assoc-ref %build-inputs "sqlite"))
+             (string-append "--with-universal-ctags="
+                            (assoc-ref %build-inputs "ctags") "/bin/ctags")
+             (string-append "--sysconfdir="
+                            (assoc-ref %outputs "out") "/share/gtags")
+             "--localstatedir=/var"         ; This needs to be a writable 
location.
              "--disable-static")
 
        #:phases
@@ -158,6 +168,20 @@ highlighting your own code that seemed comprehensible when 
you wrote it.")
                            (assoc-ref inputs "coreutils") "/bin/echo")))
                (substitute* "globash/globash.in"
                  (("/bin/echo") echo)))))
+         (add-after 'post-install 'install-plugins
+           (lambda _
+             (with-directory-excursion "plugin-factory"
+               (invoke "make" "install"))))
+         (add-before 'install 'dont-install-to-/var
+           (lambda _
+             (substitute* "gozilla/Makefile"
+               (("DESTDIR\\)\\$\\{localstatedir\\}") "TMPDIR)"))))
+         (add-after 'install-plugins 'wrap-program
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (wrap-program
+               (string-append (assoc-ref outputs "out")
+                              "/share/gtags/script/pygments_parser.py")
+               `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))))
         (add-after 'install 'post-install
           (lambda* (#:key outputs #:allow-other-keys)
             ;; Install the plugin files in the right place.



reply via email to

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