unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: 50162-done@debbugs.gnu.org
Subject: bug#50162: [PATCH] gnu: global: Add ctags support.
Date: Tue, 31 Aug 2021 13:11:14 +0300	[thread overview]
Message-ID: <YS4AQidSh2JF6vDp@3900XT> (raw)
In-Reply-To: <87h7f6ln7w.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4578 bytes --]

On Mon, Aug 30, 2021 at 03:57:39PM -0400, Maxim Cournoyer wrote:
> Hello!
> 
> Efraim Flashner <efraim@flashner.co.il> writes:
> 
> > * 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.
> > ---
> >
> > I've been using this variant of global for a couple of weeks now to get
> > global to work with Guix.
> >
> > ---
> >
> >  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 a414cde3de..04b354b71e 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
> 
> This is news to me; must we now provide bash-minimal every time
> wrap-program is used?

Its new, I think the aim was to make sure that even if a package is
cross compiled it uses the correct bash when wrapping the
program/script.

> > +        ("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.
> 
> I have built it (but not tested it), but the rest this LGTM!  Feel free
> to push.
> 
> Thank you,
> 
> Maxim

Thanks! Patch pushed.

-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-08-31 10:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-22  8:04 [bug#50162] [PATCH] gnu: global: Add ctags support Efraim Flashner
2021-08-30 19:57 ` Maxim Cournoyer
2021-08-31 10:11   ` Efraim Flashner [this message]
2021-08-31 14:31     ` Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YS4AQidSh2JF6vDp@3900XT \
    --to=efraim@flashner.co.il \
    --cc=50162-done@debbugs.gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).