GNU bug report logs - #53523
[PATCH] gnu: Add tree-sitter.

Previous Next

Package: guix-patches;

Reported by: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>

Date: Tue, 25 Jan 2022 15:39:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53523 in the body.
You can then email your comments to 53523 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Tue, 25 Jan 2022 15:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 25 Jan 2022 15:39:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Subject: [PATCH] gnu: Add tree-sitter.
Date: Tue, 25 Jan 2022 11:33:51 -0300
Hi guixers,

this series of patches adds the new required dependency for neovim,
tree-sitter, updates neovim to the newest upstream version and adds
the package variant neovim-luajit, which switches the lua
implementation used from Lua 5.1 to LuaJIT 2.1.0-beta3.

* gnu/packages/text-editors.scm (tree-sitter): New variable.
---
 gnu/packages/text-editors.scm | 45 +++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 2c5f5de719..9273a8f10b 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2021 Leo Famulari <leo <at> famulari.name>
 ;;; Copyright © 2021 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;; Copyright © 2021 Calum Irwin <calumirwin1 <at> gmail.com>
+;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1165,3 +1166,47 @@ (define-public virtaal
 provided by the Translate Toolkit, including XLIFF and PO.")
     (home-page "https://virtaal.translatehouse.org/")
     (license license:gpl2+)))
+
+(define-public tree-sitter
+  (package
+    (name "tree-sitter")
+    (version "0.20.4")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/tree-sitter/tree-sitter")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1yldgdbf3l5l4ki52abdf81nwkcbvg219gwr3ydcjwfsg7hf7zhz"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (add-after 'unpack 'fix-hardcoded-paths
+                    (lambda _
+                      (substitute* "Makefile"
+                        (("/usr/local") (assoc-ref %outputs "out"))))))
+       #:tests? #f
+       #:make-flags
+       (list (string-append "prefix="
+                            (assoc-ref %outputs "out"))
+             (string-append "CC="
+                            ,(cc-for-target)))))
+    (home-page "https://tree-sitter.github.io/tree-sitter/")
+    (synopsis "Incremental parsing system for programming tools")
+    (description
+     "Tree-sitter is a parser generator tool and an incremental parsing
+library.  It can build a concrete syntax tree for a source file and efficiently
+update the syntax tree as the source file is edited.  Tree-sitter aims to be:
+
+@itemize
+@item General enough to parse any programming language
+@item Fast enough to parse on every keystroke in a text editor
+@item Robust enough to provide useful results even in the presence of syntax errors
+@item Dependency-free so that the runtime library (which is written in pure C)
+can be embedded in any application
+@end itemize
+")
+    (license license:expat)))
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Tue, 25 Jan 2022 16:57:02 GMT) Full text and rfc822 format available.

Message #8 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Cc: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Subject: [PATCH 1/2] gnu: neovim: Update to 0.6.1.
Date: Tue, 25 Jan 2022 13:56:12 -0300
* gnu/packages/vim.scm (neovim): Update to 0.6.1.
---
 gnu/packages/vim.scm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index d5667851a8..7a43044caa 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2021 Tissevert <tissevert+guix <at> marvid.fr>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
+;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -661,7 +662,7 @@ (define-public neovim-syntastic
 (define-public neovim
   (package
     (name "neovim")
-    (version "0.4.4")
+    (version "0.6.1")
     (source
      (origin
        (method git-fetch)
@@ -670,7 +671,7 @@ (define-public neovim
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "11zyj6jvkwas3n6w1ckj3pk6jf81z1g7ngg4smmwm7c27y2a6f2m"))))
+        (base32 "10p6lg5yv9n6wcwdprwvvi56dfcm4wsj54nm0invyx3mhf7374lx"))))
     (build-system cmake-build-system)
     (arguments
      `(#:modules ((srfi srfi-26)
@@ -721,7 +722,8 @@ (define-public neovim
        ("lua-luv" ,lua5.1-luv)
        ("lua-lpeg" ,lua5.1-lpeg)
        ("lua-bitop" ,lua5.1-bitop)
-       ("lua-libmpack" ,lua5.1-libmpack)))
+       ("lua-libmpack" ,lua5.1-libmpack)
+       ("tree-sitter" ,tree-sitter)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("gettext" ,gettext-minimal)
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Tue, 25 Jan 2022 16:57:02 GMT) Full text and rfc822 format available.

Message #11 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Cc: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Subject: [PATCH 2/2] gnu: Add neovim-luajit.
Date: Tue, 25 Jan 2022 13:56:13 -0300
* gnu/packages/vim.scm (neovim-luajit): New variable.
---
 gnu/packages/vim.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 7a43044caa..9d06089492 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -743,6 +743,19 @@ (define-public neovim
     ;; except for parts that were contributed under the Vim license.
     (license (list license:asl2.0 license:vim))))
 
+(define-public neovim-luajit
+  (package
+    (inherit neovim)
+    (name "neovim-luajit")
+    (inputs (modify-inputs (package-inputs neovim)
+              (replace "lua" luajit)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments neovim)
+       ((#:configure-flags cf) `(delete "-DPREFER_LUA:BOOL=YES"
+                                        ,cf))))
+    (synopsis
+     "Fork of vim focused on extensibility and agility - built with LuaJIT")))
+
 (define-public eovim
   (package
     (name "eovim")
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Tue, 25 Jan 2022 17:40:02 GMT) Full text and rfc822 format available.

Message #14 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>, 
 53523 <at> debbugs.gnu.org
Subject: Re: [bug#53523] [PATCH 2/2] gnu: Add neovim-luajit.
Date: Tue, 25 Jan 2022 17:39:05 +0000
[Message part 1 (text/plain, inline)]
Luis Henrique Gomes Higino schreef op di 25-01-2022 om 13:56 [-0300]:
> * gnu/packages/vim.scm (neovim-luajit): New variable.
> +(define-public neovim-luajit
> +  (package
> +    (inherit neovim)
> +    (name "neovim-luajit")
> +    (inputs (modify-inputs (package-inputs neovim)
> +              (replace "lua" luajit)))
> +    (arguments
> +     (substitute-keyword-arguments (package-arguments neovim)
> +       ((#:configure-flags cf) `(delete "-DPREFER_LUA:BOOL=YES"
> +                                        ,cf))))
> +    (synopsis
> +     "Fork of vim focused on extensibility and agility - built with LuaJIT")))

Does this need to be a separate package?  I.e., can we use luajit
in the 'neovim' package on systems that support luajit, so not for
powerpc)?

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Wed, 26 Jan 2022 11:49:01 GMT) Full text and rfc822 format available.

Message #17 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 53523 <at> debbugs.gnu.org
Subject: Re: [bug#53523] [PATCH 2/2] gnu: Add neovim-luajit.
Date: Wed, 26 Jan 2022 08:28:20 -0300
Maxime Devos <maximedevos <at> telenet.be> writes:

> [[PGP Signed Part:Undecided]]
> Luis Henrique Gomes Higino schreef op di 25-01-2022 om 13:56 
> [-0300]:
>> * gnu/packages/vim.scm (neovim-luajit): New variable.
>> +(define-public neovim-luajit
>> +  (package
>> +    (inherit neovim)
>> +    (name "neovim-luajit")
>> +    (inputs (modify-inputs (package-inputs neovim)
>> +              (replace "lua" luajit)))
>> +    (arguments
>> +     (substitute-keyword-arguments (package-arguments neovim)
>> +       ((#:configure-flags cf) `(delete 
>> "-DPREFER_LUA:BOOL=YES"
>> +                                        ,cf))))
>> +    (synopsis
>> +     "Fork of vim focused on extensibility and agility - built 
>> with LuaJIT")))
>
> Does this need to be a separate package?  I.e., can we use 
> luajit
> in the 'neovim' package on systems that support luajit, so not 
> for
> powerpc)?
>
> Greetings,
> Maxime.
>
> [[End of PGP Signed Part]]

I initially choose a package variant because it seemed the easiest 
way to permit
both, but I think we can choose which implementation of Lua to use 
based on
the target's architecture and it is possibly a better solution. My 
only
problem with it is that I'm not sure this conforms to the 
reproducible
building mindset. If choosing a dependency based on hardware is
OK for Guix, I'll configure `qemu-binfmt-service-type` and try to
implement this.

-- 
Regards,
Luis H. Higino




Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Wed, 26 Jan 2022 11:50:02 GMT) Full text and rfc822 format available.

Message #20 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>,
 53523 <at> debbugs.gnu.org
Subject: Re: [bug#53523] [PATCH 2/2] gnu: Add neovim-luajit.
Date: Wed, 26 Jan 2022 13:48:49 +0200
[Message part 1 (text/plain, inline)]
On Tue, Jan 25, 2022 at 05:39:05PM +0000, Maxime Devos wrote:
> Luis Henrique Gomes Higino schreef op di 25-01-2022 om 13:56 [-0300]:
> > * gnu/packages/vim.scm (neovim-luajit): New variable.
> > +(define-public neovim-luajit
> > +  (package
> > +    (inherit neovim)
> > +    (name "neovim-luajit")
> > +    (inputs (modify-inputs (package-inputs neovim)
> > +              (replace "lua" luajit)))
> > +    (arguments
> > +     (substitute-keyword-arguments (package-arguments neovim)
> > +       ((#:configure-flags cf) `(delete "-DPREFER_LUA:BOOL=YES"
> > +                                        ,cf))))
> > +    (synopsis
> > +     "Fork of vim focused on extensibility and agility - built with LuaJIT")))
> 
> Does this need to be a separate package?  I.e., can we use luajit
> in the 'neovim' package on systems that support luajit, so not for
> powerpc)?

I believe in the past we've discussed using luajit as the default lua
for neovim. My guess is we should fall back to lua(-5.1?) on
(not (package-supported-system luajit))


-- 
Efraim Flashner   <efraim <at> 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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Wed, 26 Jan 2022 12:15:01 GMT) Full text and rfc822 format available.

Message #23 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: Maxime Devos <maximedevos <at> telenet.be>, 53523 <at> debbugs.gnu.org
Subject: Re: [bug#53523] [PATCH 2/2] gnu: Add neovim-luajit.
Date: Wed, 26 Jan 2022 09:07:04 -0300
Efraim Flashner <efraim <at> flashner.co.il> writes:

> [[PGP Signed Part:Undecided]]
> On Tue, Jan 25, 2022 at 05:39:05PM +0000, Maxime Devos wrote:
>> Luis Henrique Gomes Higino schreef op di 25-01-2022 om 13:56 
>> [-0300]:
>> > * gnu/packages/vim.scm (neovim-luajit): New variable.
>> > +(define-public neovim-luajit
>> > +  (package
>> > +    (inherit neovim)
>> > +    (name "neovim-luajit")
>> > +    (inputs (modify-inputs (package-inputs neovim)
>> > +              (replace "lua" luajit)))
>> > +    (arguments
>> > +     (substitute-keyword-arguments (package-arguments 
>> > neovim)
>> > +       ((#:configure-flags cf) `(delete 
>> > "-DPREFER_LUA:BOOL=YES"
>> > +                                        ,cf))))
>> > +    (synopsis
>> > + "Fork of vim focused on extensibility and agility - built 
>> > with
LuaJIT")))
>> 
>> Does this need to be a separate package?  I.e., can we use 
>> luajit
>> in the 'neovim' package on systems that support luajit, so not 
>> for
>> powerpc)?
>
> I believe in the past we've discussed using luajit as the 
> default lua
> for neovim. My guess is we should fall back to lua(-5.1?) on
> (not (package-supported-system luajit))

Yes, I believe this is the best solution if it is acceptable by 
Guix standards.

-- 
Regards,
Luis H. Higino




Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Wed, 26 Jan 2022 14:33:01 GMT) Full text and rfc822 format available.

Message #26 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Cc: Maxime Devos <maximedevos <at> telenet.be>, 53523 <at> debbugs.gnu.org
Subject: Re: [bug#53523] [PATCH 2/2] gnu: Add neovim-luajit.
Date: Wed, 26 Jan 2022 16:22:10 +0200
[Message part 1 (text/plain, inline)]
On Wed, Jan 26, 2022 at 09:07:04AM -0300, Luis Henrique Gomes Higino wrote:
> 
> Efraim Flashner <efraim <at> flashner.co.il> writes:
> 
> > [[PGP Signed Part:Undecided]]
> > On Tue, Jan 25, 2022 at 05:39:05PM +0000, Maxime Devos wrote:
> > > Luis Henrique Gomes Higino schreef op di 25-01-2022 om 13:56
> > > [-0300]:
> > > > * gnu/packages/vim.scm (neovim-luajit): New variable.
> > > > +(define-public neovim-luajit
> > > > +  (package
> > > > +    (inherit neovim)
> > > > +    (name "neovim-luajit")
> > > > +    (inputs (modify-inputs (package-inputs neovim)
> > > > +              (replace "lua" luajit)))
> > > > +    (arguments
> > > > +     (substitute-keyword-arguments (package-arguments > neovim)
> > > > +       ((#:configure-flags cf) `(delete > "-DPREFER_LUA:BOOL=YES"
> > > > +                                        ,cf))))
> > > > +    (synopsis
> > > > + "Fork of vim focused on extensibility and agility - built > with
> LuaJIT")))
> > > 
> > > Does this need to be a separate package?  I.e., can we use luajit
> > > in the 'neovim' package on systems that support luajit, so not for
> > > powerpc)?
> > 
> > I believe in the past we've discussed using luajit as the default lua
> > for neovim. My guess is we should fall back to lua(-5.1?) on
> > (not (package-supported-system luajit))
> 
> Yes, I believe this is the best solution if it is acceptable by Guix
> standards.

IMO it's basically the same as only adding pandoc for systems with
Haskell support. I think we have a couple of other examples I can't
think of right now.

-- 
Efraim Flashner   <efraim <at> 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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Fri, 28 Jan 2022 10:01:01 GMT) Full text and rfc822 format available.

Message #29 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Cc: 53523 <at> debbugs.gnu.org
Subject: Re: [bug#53523] [PATCH] gnu: Add tree-sitter.
Date: Fri, 28 Jan 2022 11:00:17 +0100
Hello,

Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com> writes:

> this series of patches adds the new required dependency for neovim,
> tree-sitter, updates neovim to the newest upstream version and adds
> the package variant neovim-luajit, which switches the lua
> implementation used from Lua 5.1 to LuaJIT 2.1.0-beta3.
>
> * gnu/packages/text-editors.scm (tree-sitter): New variable.

Thank you.

Note there is already a pending patch set to add tree-sitter in Guix:
<https://issues.guix.gnu.org/issue/49946/>. You may want to look at it
and see if both works can be merged somehow.

Regards,
-- 
Nicolas Goaziou




Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Fri, 28 Jan 2022 12:56:01 GMT) Full text and rfc822 format available.

Message #32 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Cc: Efraim Flashner <efraim <at> flashner.co.il>,
 Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Date: Fri, 28 Jan 2022 09:39:34 -0300
I'll try implementing what Efraim Flashner suggested. Then, I'll 
see if I can merge my first patch, the one that adds tree-sitter, with the one mentioned by 
Nicolas Goaziou. If anyone can point me to a resource on how this 
could be done in regards to the technicalities, feel free to share 
it! Thanks for the feedback!

Regards,
-- 
Luis H. Higino




Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Tue, 01 Feb 2022 13:07:01 GMT) Full text and rfc822 format available.

Message #35 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Cc: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Subject: [PATCH v2 1/2] gnu: Add tree-sitter.
Date: Tue,  1 Feb 2022 10:04:23 -0300
Hi guixers,

this adds tree-sitter, just as the previous patch series, but now
there is no neovim-luajit and neovim uses LuaJIT on supported
platforms.

--
Regards,
Luis H. Higino

* gnu/packages/text-editors.scm (tree-sitter): New variable.
---
 gnu/packages/text-editors.scm | 45 +++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 2c5f5de719..9273a8f10b 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2021 Leo Famulari <leo <at> famulari.name>
 ;;; Copyright © 2021 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;; Copyright © 2021 Calum Irwin <calumirwin1 <at> gmail.com>
+;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1165,3 +1166,47 @@ (define-public virtaal
 provided by the Translate Toolkit, including XLIFF and PO.")
     (home-page "https://virtaal.translatehouse.org/")
     (license license:gpl2+)))
+
+(define-public tree-sitter
+  (package
+    (name "tree-sitter")
+    (version "0.20.4")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/tree-sitter/tree-sitter")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1yldgdbf3l5l4ki52abdf81nwkcbvg219gwr3ydcjwfsg7hf7zhz"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (add-after 'unpack 'fix-hardcoded-paths
+                    (lambda _
+                      (substitute* "Makefile"
+                        (("/usr/local") (assoc-ref %outputs "out"))))))
+       #:tests? #f
+       #:make-flags
+       (list (string-append "prefix="
+                            (assoc-ref %outputs "out"))
+             (string-append "CC="
+                            ,(cc-for-target)))))
+    (home-page "https://tree-sitter.github.io/tree-sitter/")
+    (synopsis "Incremental parsing system for programming tools")
+    (description
+     "Tree-sitter is a parser generator tool and an incremental parsing
+library.  It can build a concrete syntax tree for a source file and efficiently
+update the syntax tree as the source file is edited.  Tree-sitter aims to be:
+
+@itemize
+@item General enough to parse any programming language
+@item Fast enough to parse on every keystroke in a text editor
+@item Robust enough to provide useful results even in the presence of syntax errors
+@item Dependency-free so that the runtime library (which is written in pure C)
+can be embedded in any application
+@end itemize
+")
+    (license license:expat)))
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Tue, 01 Feb 2022 13:07:02 GMT) Full text and rfc822 format available.

Message #38 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Cc: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Subject: [PATCH v2 2/2] gnu: neovim: Update to 0.6.1.
Date: Tue,  1 Feb 2022 10:04:24 -0300
* gnu/packages/vim.scm (neovim): Update to 0.6.1.

Build neovim with LuaJIT in the supported platforms.
---
 gnu/packages/vim.scm | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index d5667851a8..942df27107 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2021 Tissevert <tissevert+guix <at> marvid.fr>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
+;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -661,7 +662,7 @@ (define-public neovim-syntastic
 (define-public neovim
   (package
     (name "neovim")
-    (version "0.4.4")
+    (version "0.6.1")
     (source
      (origin
        (method git-fetch)
@@ -670,13 +671,18 @@ (define-public neovim
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "11zyj6jvkwas3n6w1ckj3pk6jf81z1g7ngg4smmwm7c27y2a6f2m"))))
+        (base32 "10p6lg5yv9n6wcwdprwvvi56dfcm4wsj54nm0invyx3mhf7374lx"))))
     (build-system cmake-build-system)
     (arguments
      `(#:modules ((srfi srfi-26)
                   (guix build cmake-build-system)
                   (guix build utils))
-       #:configure-flags '("-DPREFER_LUA:BOOL=YES")
+       #:configure-flags
+       (list ,@(if (member (or (%current-target-system)
+                               (%current-system))
+                           (package-supported-systems luajit))
+                   '()
+                   '("-DPREFER_LUA:BOOL=YES")))
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'set-lua-paths
@@ -717,11 +723,16 @@ (define-public neovim
        ("unibilium" ,unibilium)
        ("jemalloc" ,jemalloc)
        ("libiconv" ,libiconv)
-       ("lua" ,lua-5.1)
+       ("lua" ,(if (member (or (%current-target-system)
+                               (%current-system))
+                           (package-supported-systems luajit))
+                   luajit
+                   lua-5.1))
        ("lua-luv" ,lua5.1-luv)
        ("lua-lpeg" ,lua5.1-lpeg)
        ("lua-bitop" ,lua5.1-bitop)
-       ("lua-libmpack" ,lua5.1-libmpack)))
+       ("lua-libmpack" ,lua5.1-libmpack)
+       ("tree-sitter" ,tree-sitter)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("gettext" ,gettext-minimal)
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Sat, 05 Feb 2022 11:03:02 GMT) Full text and rfc822 format available.

Message #41 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>, 
 53523 <at> debbugs.gnu.org
Subject: Re: [bug#53523] [PATCH v2 2/2] gnu: neovim: Update to 0.6.1.
Date: Sat, 05 Feb 2022 12:02:35 +0100
[Message part 1 (text/plain, inline)]
Luis Henrique Gomes Higino schreef op di 01-02-2022 om 10:04 [-0300]:
> +       #:configure-flags
> +       (list ,@(if (member (or (%current-target-system)
> +                               (%current-system))
> +                           (package-supported-systems luajit))

This does not work, (%current-target-system) is a GNU triplet
whereas (%current-system) is a nix system, see

<https://issues.guix.gnu.org/49672>

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Sat, 05 Feb 2022 11:10:01 GMT) Full text and rfc822 format available.

Message #44 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>, 
 53523 <at> debbugs.gnu.org
Subject: Re: [bug#53523] [PATCH v2 1/2] gnu: Add tree-sitter.
Date: Sat, 05 Feb 2022 12:09:11 +0100
[Message part 1 (text/plain, inline)]
Luis Henrique Gomes Higino schreef op di 01-02-2022 om 10:04 [-0300]:
> +                  (add-after 'unpack 'fix-hardcoded-paths
> +                    (lambda _
> +                      (substitute* "Makefile"
> +                        (("/usr/local") (assoc-ref %outputs "out"))))))

%outputs and friends are being phased out, use G-exps instead:

 (list #:phases
       #~(modify-phases ...
           (add-after 'unpack ...
             (lambda _
               (substitute* "Makefile"
                 (("/usr/local") #$output))))
           [...])
      [...])

> +       #:tests? #f

Why are they disabled?

> +       #:make-flags
> +       (list (string-append "prefix="
> +                            (assoc-ref %outputs "out"))

Likewise (G-exps).

> +             (string-append "CC="
> +                            ,(cc-for-target)))))

If G-exps are used, ',' needs to be replaced by #$.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Sat, 05 Feb 2022 11:12:01 GMT) Full text and rfc822 format available.

Message #47 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>, 
 53523 <at> debbugs.gnu.org
Subject: Re: [bug#53523] [PATCH v2 1/2] gnu: Add tree-sitter.
Date: Sat, 05 Feb 2022 12:11:05 +0100
[Message part 1 (text/plain, inline)]
Luis Henrique Gomes Higino schreef op di 01-02-2022 om 10:04 [-0300]:
> +                      (substitute* "Makefile"
> +                        (("/usr/local") (assoc-ref %outputs "out"))))))

Is this necessary?  The Makefile does 'PREFIX ?= /usr/local', so it
would seem to me that overriding PREFIX by setting #:make-flags
appropriately should be sufficient.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Sat, 05 Feb 2022 11:13:02 GMT) Full text and rfc822 format available.

Message #50 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>, 
 53523 <at> debbugs.gnu.org
Subject: Re: [bug#53523] [PATCH v2 1/2] gnu: Add tree-sitter.
Date: Sat, 05 Feb 2022 12:12:17 +0100
[Message part 1 (text/plain, inline)]
Luis Henrique Gomes Higino schreef op di 01-02-2022 om 10:04 [-0300]:
> +              (uri (git-reference
> +                    (url "https://github.com/tree-sitter/tree-sitter")
> +                    (commit (string-append "v" version))))

tree-sitter is bundling some parts of ICU
(https://github.com/tree-sitter/tree-sitter/tree/master/lib/src/unicode),
can they be unbundled?

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Sat, 05 Feb 2022 11:15:01 GMT) Full text and rfc822 format available.

Message #53 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>, 
 53523 <at> debbugs.gnu.org
Subject: Re: [bug#53523] [PATCH v2 1/2] gnu: Add tree-sitter.
Date: Sat, 05 Feb 2022 12:14:36 +0100
[Message part 1 (text/plain, inline)]
Luis Henrique Gomes Higino schreef op di 01-02-2022 om 10:04 [-0300]:
> +       (list (string-append "prefix="
> +                            (assoc-ref %outputs "out"))

The Makefile has a 'PREFIX' variable, not a 'prefix' variable,
so this doesn't seem to have any effect?

Greetings,
Maxime
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Sat, 05 Feb 2022 18:23:02 GMT) Full text and rfc822 format available.

Message #56 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 53523 <at> debbugs.gnu.org
Subject: Re: [bug#53523] [PATCH v2 1/2] gnu: Add tree-sitter.
Date: Sat, 05 Feb 2022 15:17:37 -0300
Maxime Devos <maximedevos <at> telenet.be> writes:

> Luis Henrique Gomes Higino schreef op di 01-02-2022 om 10:04 
> [-0300]:
>
>> +       #:tests? #f
>
> Why are they disabled?
>

tree-sitter's test suite depends on downloading additional 
grammars, so I found it easier to just disable testing. If you 
think tests should be added as an additional origin field, I can 
try doing it.

-- 
Luis H. Higino




Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Sat, 05 Feb 2022 18:34:01 GMT) Full text and rfc822 format available.

Message #59 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 53523 <at> debbugs.gnu.org
Subject: Re: [bug#53523] [PATCH v2 1/2] gnu: Add tree-sitter.
Date: Sat, 05 Feb 2022 15:23:03 -0300
Maxime Devos <maximedevos <at> telenet.be> writes:

> Luis Henrique Gomes Higino schreef op di 01-02-2022 om 10:04 
> [-0300]:
>> +                      (substitute* "Makefile"
>> +                        (("/usr/local") (assoc-ref %outputs 
>> "out"))))))
>
> Is this necessary?  The Makefile does 'PREFIX ?= /usr/local', so 
> it
> would seem to me that overriding PREFIX by setting #:make-flags
> appropriately should be sufficient.
>

You're right, I was using "prefix" on #:make-flags when it should 
be "PREFIX", thanks for pointing it out!

-- 
Luis H. Higino




Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Sat, 05 Feb 2022 18:39:02 GMT) Full text and rfc822 format available.

Message #62 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Cc: 53523 <at> debbugs.gnu.org
Subject: Re: [bug#53523] [PATCH v2 1/2] gnu: Add tree-sitter.
Date: Sat, 05 Feb 2022 19:38:21 +0100
[Message part 1 (text/plain, inline)]
Luis Henrique Gomes Higino schreef op za 05-02-2022 om 15:17 [-0300]:
> Maxime Devos <maximedevos <at> telenet.be> writes:
> 
> > Luis Henrique Gomes Higino schreef op di 01-02-2022 om 10:04 
> > [-0300]:
> > 
> > > +       #:tests? #f
> > 
> > Why are they disabled?
> > 
> 
> tree-sitter's test suite depends on downloading additional 
> grammars, so I found it easier to just disable testing. If you 
> think tests should be added as an additional origin field, I can 
> try doing it.

If you figure out how to eliminate the downloads, great.
If it's too complicated, #:tests? #f could be acceptable, though it
deserves a comment in the source code.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Sat, 05 Feb 2022 19:42:01 GMT) Full text and rfc822 format available.

Message #65 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 53523 <at> debbugs.gnu.org
Subject: Re: [bug#53523] [PATCH v2 1/2] gnu: Add tree-sitter.
Date: Sat, 05 Feb 2022 16:36:53 -0300
Maxime Devos <maximedevos <at> telenet.be> writes:

> [[PGP Signed Part:Undecided]]
> Luis Henrique Gomes Higino schreef op di 01-02-2022 om 10:04 
> [-0300]:
>
> tree-sitter is bundling some parts of ICU
> (https://github.com/tree-sitter/tree-sitter/tree/master/lib/src/unicode),
> can they be unbundled?
>

I managed to remove the "src/unicode" directory with an origin 
snippet and, after some patching through `substitute*`, I have a 
working build again. I'll be sending the new patch series 
soon. Thanks for your expressive feedback Maxime, learned a lot 
about Guix today :D. 

-- 
Luis H. Higino




Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Sat, 05 Feb 2022 19:46:02 GMT) Full text and rfc822 format available.

Message #68 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Subject: About luajit supported platforms
Date: Sat, 05 Feb 2022 16:41:40 -0300
I was doing some tests today with the Guile REPL and it seems like 
luajit has been ported to more platforms recently. From my 
impression, it seems like now there's no need to fallback to Lua 
5.1 on any system. Running `(eq? (package-supported-systems 
luajit) (package-supported-systems lua))` returns `#t`. Can anyone 
confirm this?

-- 
Luis H. Higino




Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Mon, 14 Mar 2022 05:57:01 GMT) Full text and rfc822 format available.

Message #71 received at submit <at> debbugs.gnu.org (full text, mbox):

From: li zongyuan <lyzongyuan <at> gmail.com>
To: luishenriquegh2701 <at> gmail.com, guix-patches <at> gnu.org
Subject: [bug#53523] About luajit supported platforms
Date: Mon, 14 Mar 2022 11:35:17 +0800
[Message part 1 (text/plain, inline)]
I did some research on the source code of lua package. From

https://github.com/guix-mirror/guix/blob/f9c62b23cc88541756656b3ec602ce987828d906/gnu/packages/lua.scm#L179

we can find that luajit deleted "powerpc64le-linux" from the supported
system list, which lua package didn't. So I think we should keep that
fallback.

Hope this helps.

----

Zongyuan Li
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Mon, 14 Mar 2022 05:57:02 GMT) Full text and rfc822 format available.

Message #74 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: li zongyuan <lyzongyuan <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Subject: [PATCH]%20gnu:%20Add%20tree-sitter.
Date: Mon, 14 Mar 2022 10:30:33 +0800
[Message part 1 (text/plain, inline)]
Any further working on this patch, or if any help is still needed? I'm very
excited to have neovim 0.6.1 in guix!

I did some research on source code of lua package. From

https://github.com/guix-mirror/guix/blob/f9c62b23cc88541756656b3ec602ce987828d906/gnu/packages/lua.scm#L179

we can find that luajit deleted "powerpc64le-linux" from the supported
system list, which lua package didn't. So I think we should keep that
fallback.
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Mon, 14 Mar 2022 17:08:02 GMT) Full text and rfc822 format available.

Message #77 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: li zongyuan <lyzongyuan <at> gmail.com>
Cc: guix-patches <at> gnu.org
Subject: Re: [bug#53523] About luajit supported platforms
Date: Mon, 14 Mar 2022 14:03:58 -0300
li zongyuan <lyzongyuan <at> gmail.com> writes:

> we can find that luajit deleted "powerpc64le-linux" from the 
> supported system list, which lua package didn't. So I think we 
> should keep that fallback.

Thanks for bringing attention to this! I'll keep it then.

Regards,

-- 
Luis H. Higino




Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Mon, 14 Mar 2022 23:33:01 GMT) Full text and rfc822 format available.

Message #80 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Cc: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Subject: [PATCH v3 1/2] gnu: Add tree-sitter.
Date: Mon, 14 Mar 2022 20:31:45 -0300
* gnu/packages/text-editors.scm (tree-sitter): New variable.
---
 gnu/packages/text-editors.scm | 54 +++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 2c5f5de719..d333d78e22 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2021 Leo Famulari <leo <at> famulari.name>
 ;;; Copyright © 2021 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;; Copyright © 2021 Calum Irwin <calumirwin1 <at> gmail.com>
+;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -39,6 +40,7 @@ (define-module (gnu packages text-editors)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix utils)
+  #:use-module (guix build utils)
   #:use-module (guix build-system cargo)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
@@ -61,6 +63,7 @@ (define-module (gnu packages text-editors)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages haskell-xyz)
+  #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages libbsd)
   #:use-module (gnu packages libreoffice)
@@ -1165,3 +1168,54 @@ (define-public virtaal
 provided by the Translate Toolkit, including XLIFF and PO.")
     (home-page "https://virtaal.translatehouse.org/")
     (license license:gpl2+)))
+
+(define-public tree-sitter
+  (package
+    (name "tree-sitter")
+    (version "0.20.6")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/tree-sitter/tree-sitter")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1z20518snyg0zp75qgs5bxmzjqws4dd19vnp6sya494za3qp5b6d"))
+              (modules '((guix build utils)))
+              (snippet '(begin
+                          ;; Remove bundled ICU parts
+                          (delete-file-recursively "lib/src/unicode")
+                          #t))))
+    (build-system gnu-build-system)
+    (inputs (list icu4c))
+    (arguments
+     (list #:phases
+           '(modify-phases %standard-phases
+              (delete 'configure))
+           #:tests? #f
+           #:make-flags
+           #~(list (string-append "PREFIX="
+                                  #$output)
+                   (string-append "CC="
+                                  #$(cc-for-target)))))
+    (home-page "https://tree-sitter.github.io/tree-sitter/")
+    (synopsis "Incremental parsing system for programming tools")
+    (description
+     "Tree-sitter is a parser generator tool and an incremental parsing
+library.  It can build a concrete syntax tree for a source file and efficiently
+update the syntax tree as the source file is edited.
+
+Tree-sitter aims to be:
+
+@itemize
+@item General enough to parse any programming language
+@item Fast enough to parse on every keystroke in a text editor
+@item Robust enough to provide useful results even in the presence of syntax errors
+@item Dependency-free so that the runtime library (which is written in pure C)
+can be embedded in any application
+@end itemize
+
+This package includes the @code{libtree-sitter} runtime library.
+")
+    (license license:expat)))
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Mon, 14 Mar 2022 23:33:02 GMT) Full text and rfc822 format available.

Message #83 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Cc: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Subject: [PATCH v3 2/2] gnu: neovim: Update to 0.6.1.
Date: Mon, 14 Mar 2022 20:31:46 -0300
* gnu/packages/vim.scm (neovim): Update to 0.6.1.

Build neovim with LuaJIT in the supported platforms.
---
 gnu/packages/vim.scm | 25 ++++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index d5667851a8..10fb20a5e7 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2021 Tissevert <tissevert+guix <at> marvid.fr>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
+;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -661,7 +662,7 @@ (define-public neovim-syntastic
 (define-public neovim
   (package
     (name "neovim")
-    (version "0.4.4")
+    (version "0.6.1")
     (source
      (origin
        (method git-fetch)
@@ -670,13 +671,20 @@ (define-public neovim
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "11zyj6jvkwas3n6w1ckj3pk6jf81z1g7ngg4smmwm7c27y2a6f2m"))))
+        (base32 "10p6lg5yv9n6wcwdprwvvi56dfcm4wsj54nm0invyx3mhf7374lx"))))
     (build-system cmake-build-system)
     (arguments
      `(#:modules ((srfi srfi-26)
                   (guix build cmake-build-system)
                   (guix build utils))
-       #:configure-flags '("-DPREFER_LUA:BOOL=YES")
+       #:configure-flags
+       (list ,@(if (member (or (if (%current-target-system)
+                                   (gnu-triplet->nix-system (%current-target-system))
+                                   #f)
+                               (%current-system))
+                           (package-supported-systems luajit))
+                   '()
+                   '("-DPREFER_LUA:BOOL=YES")))
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'set-lua-paths
@@ -717,11 +725,18 @@ (define-public neovim
        ("unibilium" ,unibilium)
        ("jemalloc" ,jemalloc)
        ("libiconv" ,libiconv)
-       ("lua" ,lua-5.1)
+       ("lua" ,(if (member (or (if (%current-target-system)
+                                   (gnu-triplet->nix-system (%current-target-system))
+                                   #f)
+                               (%current-system))
+                           (package-supported-systems luajit))
+                   luajit
+                   lua-5.1))
        ("lua-luv" ,lua5.1-luv)
        ("lua-lpeg" ,lua5.1-lpeg)
        ("lua-bitop" ,lua5.1-bitop)
-       ("lua-libmpack" ,lua5.1-libmpack)))
+       ("lua-libmpack" ,lua5.1-libmpack)
+       ("tree-sitter" ,tree-sitter)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("gettext" ,gettext-minimal)
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Mon, 14 Mar 2022 23:52:02 GMT) Full text and rfc822 format available.

Message #86 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Cc: guix-patches <at> gnu.org, 53523 <at> debbugs.gnu.org
Subject: Re: [bug#53523] [PATCH v3 1/2] gnu: Add tree-sitter.
Date: Mon, 14 Mar 2022 23:43:20 +0000
Hi Luis,

Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com> writes:

> * gnu/packages/text-editors.scm (tree-sitter): New variable.

I'm not a maintainer, but the patch looks good to me with just a minor
comment!

As mentioned before, I'll rebase on top of this after its merged, I
still have a bit more work to do on the emacs support for tree-sitter.

> ---
>  gnu/packages/text-editors.scm | 54 +++++++++++++++++++++++++++++++++++
>  1 file changed, 54 insertions(+)
>
> diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
> index 2c5f5de719..d333d78e22 100644
> --- a/gnu/packages/text-editors.scm
> +++ b/gnu/packages/text-editors.scm
> @@ -17,6 +17,7 @@
>  ;;; Copyright © 2021 Leo Famulari <leo <at> famulari.name>
>  ;;; Copyright © 2021 Pierre Langlois <pierre.langlois <at> gmx.com>
>  ;;; Copyright © 2021 Calum Irwin <calumirwin1 <at> gmail.com>
> +;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -39,6 +40,7 @@ (define-module (gnu packages text-editors)
>    #:use-module (guix gexp)
>    #:use-module (guix git-download)
>    #:use-module (guix utils)
> +  #:use-module (guix build utils)
>    #:use-module (guix build-system cargo)
>    #:use-module (guix build-system cmake)
>    #:use-module (guix build-system gnu)
> @@ -61,6 +63,7 @@ (define-module (gnu packages text-editors)
>    #:use-module (gnu packages gtk)
>    #:use-module (gnu packages guile)
>    #:use-module (gnu packages haskell-xyz)
> +  #:use-module (gnu packages icu4c)
>    #:use-module (gnu packages image)
>    #:use-module (gnu packages libbsd)
>    #:use-module (gnu packages libreoffice)
> @@ -1165,3 +1168,54 @@ (define-public virtaal
>  provided by the Translate Toolkit, including XLIFF and PO.")
>      (home-page "https://virtaal.translatehouse.org/")
>      (license license:gpl2+)))
> +
> +(define-public tree-sitter
> +  (package
> +    (name "tree-sitter")
> +    (version "0.20.6")
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "https://github.com/tree-sitter/tree-sitter")
> +                    (commit (string-append "v" version))))
> +              (file-name (git-file-name name version))
> +              (sha256
> +               (base32
> +                "1z20518snyg0zp75qgs5bxmzjqws4dd19vnp6sya494za3qp5b6d"))
> +              (modules '((guix build utils)))
> +              (snippet '(begin
> +                          ;; Remove bundled ICU parts
> +                          (delete-file-recursively "lib/src/unicode")
> +                          #t))))
> +    (build-system gnu-build-system)
> +    (inputs (list icu4c))
> +    (arguments
> +     (list #:phases
> +           '(modify-phases %standard-phases
> +              (delete 'configure))
> +           #:tests? #f

It might be nice to add a short comment to say that there are no tests
for the runtime library itself.  A "; no check target." comment might
suffice, we do that often.

> +           #:make-flags
> +           #~(list (string-append "PREFIX="
> +                                  #$output)
> +                   (string-append "CC="
> +                                  #$(cc-for-target)))))
> +    (home-page "https://tree-sitter.github.io/tree-sitter/")
> +    (synopsis "Incremental parsing system for programming tools")
> +    (description
> +     "Tree-sitter is a parser generator tool and an incremental parsing
> +library.  It can build a concrete syntax tree for a source file and efficiently
> +update the syntax tree as the source file is edited.
> +
> +Tree-sitter aims to be:
> +
> +@itemize
> +@item General enough to parse any programming language
> +@item Fast enough to parse on every keystroke in a text editor
> +@item Robust enough to provide useful results even in the presence of syntax errors
> +@item Dependency-free so that the runtime library (which is written in pure C)
> +can be embedded in any application
> +@end itemize
> +
> +This package includes the @code{libtree-sitter} runtime library.
> +")
> +    (license license:expat)))

Thanks,
Pierre




Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Mon, 14 Mar 2022 23:52:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Wed, 16 Mar 2022 03:08:02 GMT) Full text and rfc822 format available.

Message #92 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Zongyuan Li <lyzongyuan <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Cc: luishenriquegh2701 <at> gmail.com
Subject: Re: [PATCH v3 2/2] gnu: neovim: Update to 0.6.1.
Date: Wed, 16 Mar 2022 11:07:46 +0800
Hi Luis,

I tried to apply `[PATCH v3 2/2] gnu: neovim: Update to 0.6.1.` to the 
current main branch of Guix, but failed.

It seems like we import 'libiconv' which is not used as dependency in 
previous neovim, from these code:

> @@ -717,11 +725,18 @@ (define-public neovim
>         ("unibilium" ,unibilium)
>         ("jemalloc" ,jemalloc)
>         ("libiconv" ,libiconv)
> -       ("lua" ,lua-5.1)
> +      ("lua" ,(if (member (or (if (%current-target-system)
> +                                   (gnu-triplet->nix-system 
(%current-target-system))
> +                                   #f)
> +                               (%current-system))
> +                           (package-supported-systems luajit))
> +                   luajit
> +                   lua-5.1))
>         ("lua-luv" ,lua5.1-luv)
>         ("lua-lpeg" ,lua5.1-lpeg)
>         ("lua-bitop" ,lua5.1-bitop)
> -       ("lua-libmpack" ,lua5.1-libmpack)))
> +      ("lua-libmpack" ,lua5.1-libmpack)
> +      ("tree-sitter" ,tree-sitter)))

Did you write this patch on any commit which is not included in the Guix 
main branch?

Maybe we should rebase this patch set on main branch.

Li




Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Thu, 17 Mar 2022 13:45:01 GMT) Full text and rfc822 format available.

Message #95 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Cc: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Subject: [PATCH v4 1/2] gnu: Add tree-sitter.
Date: Thu, 17 Mar 2022 10:44:13 -0300
* gnu/packages/text-editors.scm (tree-sitter): New variable.
---
 gnu/packages/text-editors.scm | 54 +++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 45cc61765a..d6ec000dc6 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2021 Leo Famulari <leo <at> famulari.name>
 ;;; Copyright © 2021 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;; Copyright © 2021 Calum Irwin <calumirwin1 <at> gmail.com>
+;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -39,6 +40,7 @@ (define-module (gnu packages text-editors)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix utils)
+  #:use-module (guix build utils)
   #:use-module (guix build-system cargo)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
@@ -62,6 +64,7 @@ (define-module (gnu packages text-editors)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages haskell-xyz)
+  #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages libbsd)
   #:use-module (gnu packages libreoffice)
@@ -1165,3 +1168,54 @@ (define-public virtaal
 provided by the Translate Toolkit, including XLIFF and PO.")
     (home-page "https://virtaal.translatehouse.org/")
     (license license:gpl2+)))
+
+(define-public tree-sitter
+  (package
+    (name "tree-sitter")
+    (version "0.20.6")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/tree-sitter/tree-sitter")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1z20518snyg0zp75qgs5bxmzjqws4dd19vnp6sya494za3qp5b6d"))
+              (modules '((guix build utils)))
+              (snippet '(begin
+                          ;; Remove bundled ICU parts
+                          (delete-file-recursively "lib/src/unicode")
+                          #t))))
+    (build-system gnu-build-system)
+    (inputs (list icu4c))
+    (arguments
+     (list #:phases
+           '(modify-phases %standard-phases
+              (delete 'configure))
+           #:tests? #f ; there are no tests for the runtime library
+           #:make-flags
+           #~(list (string-append "PREFIX="
+                                  #$output)
+                   (string-append "CC="
+                                  #$(cc-for-target)))))
+    (home-page "https://tree-sitter.github.io/tree-sitter/")
+    (synopsis "Incremental parsing system for programming tools")
+    (description
+     "Tree-sitter is a parser generator tool and an incremental parsing
+library.  It can build a concrete syntax tree for a source file and efficiently
+update the syntax tree as the source file is edited.
+
+Tree-sitter aims to be:
+
+@itemize
+@item General enough to parse any programming language
+@item Fast enough to parse on every keystroke in a text editor
+@item Robust enough to provide useful results even in the presence of syntax errors
+@item Dependency-free so that the runtime library (which is written in pure C)
+can be embedded in any application
+@end itemize
+
+This package includes the @code{libtree-sitter} runtime library.
+")
+    (license license:expat)))

base-commit: bae2201a8ddf789dff3f625327f5b2d0a686bc77
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Thu, 17 Mar 2022 13:45:02 GMT) Full text and rfc822 format available.

Message #98 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Cc: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Subject: [PATCH v4 2/2] gnu: neovim: Update to 0.6.1.
Date: Thu, 17 Mar 2022 10:44:14 -0300
* gnu/packages/vim.scm (neovim): Update to 0.6.1.

Build neovim with LuaJIT in the supported platforms.
---
 gnu/packages/vim.scm | 26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 28944dd640..1d5904935f 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2021 Tissevert <tissevert+guix <at> marvid.fr>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
+;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -661,7 +662,7 @@ (define-public neovim-syntastic
 (define-public neovim
   (package
     (name "neovim")
-    (version "0.4.4")
+    (version "0.6.1")
     (source
      (origin
        (method git-fetch)
@@ -670,13 +671,20 @@ (define-public neovim
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "11zyj6jvkwas3n6w1ckj3pk6jf81z1g7ngg4smmwm7c27y2a6f2m"))))
+        (base32 "10p6lg5yv9n6wcwdprwvvi56dfcm4wsj54nm0invyx3mhf7374lx"))))
     (build-system cmake-build-system)
     (arguments
      `(#:modules ((srfi srfi-26)
                   (guix build cmake-build-system)
                   (guix build utils))
-       #:configure-flags '("-DPREFER_LUA:BOOL=YES")
+       #:configure-flags
+       (list ,@(if (member (or (if (%current-target-system)
+                                   (gnu-triplet->nix-system (%current-target-system))
+                                   #f)
+                               (%current-system))
+                           (package-supported-systems luajit))
+                   '()
+                   '("-DPREFER_LUA:BOOL=YES")))
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'set-lua-paths
@@ -716,11 +724,19 @@ (define-public neovim
        ("libvterm" ,libvterm)
        ("unibilium" ,unibilium)
        ("jemalloc" ,jemalloc)
-       ("lua" ,lua-5.1)
+       ("libiconv" ,libiconv)
+       ("lua" ,(if (member (or (if (%current-target-system)
+                                   (gnu-triplet->nix-system (%current-target-system))
+                                   #f)
+                               (%current-system))
+                           (package-supported-systems luajit))
+                   luajit
+                   lua-5.1))
        ("lua-luv" ,lua5.1-luv)
        ("lua-lpeg" ,lua5.1-lpeg)
        ("lua-bitop" ,lua5.1-bitop)
-       ("lua-libmpack" ,lua5.1-libmpack)))
+       ("lua-libmpack" ,lua5.1-libmpack)
+       ("tree-sitter" ,tree-sitter)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("gettext" ,gettext-minimal)
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Thu, 17 Mar 2022 13:51:02 GMT) Full text and rfc822 format available.

Message #101 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: Zongyuan Li <lyzongyuan <at> gmail.com>
Cc: 53523 <at> debbugs.gnu.org
Subject: Re: [PATCH v3 2/2] gnu: neovim: Update to 0.6.1.
Date: Thu, 17 Mar 2022 10:47:23 -0300
Zongyuan Li <lyzongyuan <at> gmail.com> writes:

> Did you write this patch on any commit which is not included in 
> the
> Guix main branch?

I wrote the patch on the latest master commit at the time and have 
no idea why didn't work for you. I just sent the new version of 
the patch series with the `--base=auto` option so that we can find 
out what's happening.

Regards,

-- 
Luis H. Higino




Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Thu, 17 Mar 2022 14:02:01 GMT) Full text and rfc822 format available.

Message #104 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: Zongyuan Li <lyzongyuan <at> gmail.com>
Cc: 53523 <at> debbugs.gnu.org
Subject: Re: [PATCH v3 2/2] gnu: neovim: Update to 0.6.1.
Date: Thu, 17 Mar 2022 10:58:26 -0300
Zongyuan Li <lyzongyuan <at> gmail.com> writes:

> It seems like we import 'libiconv' which is not used as 
> dependency in
> previous neovim, from these code:

I just noticed you're right, libiconv is not present at master 
since this commit: 
https://github.com/guix-mirror/guix/commit/1bd1f42a31a970489583682434cda706b0269c26. Thanks 
for noticing it, I'll remove it and send the patches again.

Regards,

-- 
Luis H. Higino




Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Thu, 17 Mar 2022 14:03:02 GMT) Full text and rfc822 format available.

Message #107 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Cc: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Subject: [PATCH v5 1/2] gnu: Add tree-sitter.
Date: Thu, 17 Mar 2022 11:01:54 -0300
* gnu/packages/text-editors.scm (tree-sitter): New variable.
---
 gnu/packages/text-editors.scm | 54 +++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 45cc61765a..d6ec000dc6 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2021 Leo Famulari <leo <at> famulari.name>
 ;;; Copyright © 2021 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;; Copyright © 2021 Calum Irwin <calumirwin1 <at> gmail.com>
+;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -39,6 +40,7 @@ (define-module (gnu packages text-editors)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix utils)
+  #:use-module (guix build utils)
   #:use-module (guix build-system cargo)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
@@ -62,6 +64,7 @@ (define-module (gnu packages text-editors)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages haskell-xyz)
+  #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages libbsd)
   #:use-module (gnu packages libreoffice)
@@ -1165,3 +1168,54 @@ (define-public virtaal
 provided by the Translate Toolkit, including XLIFF and PO.")
     (home-page "https://virtaal.translatehouse.org/")
     (license license:gpl2+)))
+
+(define-public tree-sitter
+  (package
+    (name "tree-sitter")
+    (version "0.20.6")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/tree-sitter/tree-sitter")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1z20518snyg0zp75qgs5bxmzjqws4dd19vnp6sya494za3qp5b6d"))
+              (modules '((guix build utils)))
+              (snippet '(begin
+                          ;; Remove bundled ICU parts
+                          (delete-file-recursively "lib/src/unicode")
+                          #t))))
+    (build-system gnu-build-system)
+    (inputs (list icu4c))
+    (arguments
+     (list #:phases
+           '(modify-phases %standard-phases
+              (delete 'configure))
+           #:tests? #f ; there are no tests for the runtime library
+           #:make-flags
+           #~(list (string-append "PREFIX="
+                                  #$output)
+                   (string-append "CC="
+                                  #$(cc-for-target)))))
+    (home-page "https://tree-sitter.github.io/tree-sitter/")
+    (synopsis "Incremental parsing system for programming tools")
+    (description
+     "Tree-sitter is a parser generator tool and an incremental parsing
+library.  It can build a concrete syntax tree for a source file and efficiently
+update the syntax tree as the source file is edited.
+
+Tree-sitter aims to be:
+
+@itemize
+@item General enough to parse any programming language
+@item Fast enough to parse on every keystroke in a text editor
+@item Robust enough to provide useful results even in the presence of syntax errors
+@item Dependency-free so that the runtime library (which is written in pure C)
+can be embedded in any application
+@end itemize
+
+This package includes the @code{libtree-sitter} runtime library.
+")
+    (license license:expat)))

base-commit: bae2201a8ddf789dff3f625327f5b2d0a686bc77
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Thu, 17 Mar 2022 14:03:02 GMT) Full text and rfc822 format available.

Message #110 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Cc: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Subject: [PATCH v5 2/2] gnu: neovim: Update to 0.6.1.
Date: Thu, 17 Mar 2022 11:01:55 -0300
* gnu/packages/vim.scm (neovim): Update to 0.6.1.

Build neovim with LuaJIT in the supported platforms.
---
 gnu/packages/vim.scm | 25 ++++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 28944dd640..62c0bc2b5c 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2021 Tissevert <tissevert+guix <at> marvid.fr>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
+;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -661,7 +662,7 @@ (define-public neovim-syntastic
 (define-public neovim
   (package
     (name "neovim")
-    (version "0.4.4")
+    (version "0.6.1")
     (source
      (origin
        (method git-fetch)
@@ -670,13 +671,20 @@ (define-public neovim
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "11zyj6jvkwas3n6w1ckj3pk6jf81z1g7ngg4smmwm7c27y2a6f2m"))))
+        (base32 "10p6lg5yv9n6wcwdprwvvi56dfcm4wsj54nm0invyx3mhf7374lx"))))
     (build-system cmake-build-system)
     (arguments
      `(#:modules ((srfi srfi-26)
                   (guix build cmake-build-system)
                   (guix build utils))
-       #:configure-flags '("-DPREFER_LUA:BOOL=YES")
+       #:configure-flags
+       (list ,@(if (member (or (if (%current-target-system)
+                                   (gnu-triplet->nix-system (%current-target-system))
+                                   #f)
+                               (%current-system))
+                           (package-supported-systems luajit))
+                   '()
+                   '("-DPREFER_LUA:BOOL=YES")))
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'set-lua-paths
@@ -716,11 +724,18 @@ (define-public neovim
        ("libvterm" ,libvterm)
        ("unibilium" ,unibilium)
        ("jemalloc" ,jemalloc)
-       ("lua" ,lua-5.1)
+       ("lua" ,(if (member (or (if (%current-target-system)
+                                   (gnu-triplet->nix-system (%current-target-system))
+                                   #f)
+                               (%current-system))
+                           (package-supported-systems luajit))
+                   luajit
+                   lua-5.1))
        ("lua-luv" ,lua5.1-luv)
        ("lua-lpeg" ,lua5.1-lpeg)
        ("lua-bitop" ,lua5.1-bitop)
-       ("lua-libmpack" ,lua5.1-libmpack)))
+       ("lua-libmpack" ,lua5.1-libmpack)
+       ("tree-sitter" ,tree-sitter)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("gettext" ,gettext-minimal)
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Thu, 17 Mar 2022 17:30:02 GMT) Full text and rfc822 format available.

Message #113 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>, 
 53523 <at> debbugs.gnu.org
Subject: Re: [bug#53523] [PATCH v4 2/2] gnu: neovim: Update to 0.6.1.
Date: Thu, 17 Mar 2022 18:29:18 +0100
[Message part 1 (text/plain, inline)]
Luis Henrique Gomes Higino schreef op do 17-03-2022 om 10:44 [-0300]:
> +       ("lua" ,(if (member (or (if (%current-target-system)
> +                                   (gnu-triplet->nix-system (%current-target-system))
> +                                   #f)
> +                               (%current-system))

This can be simplified to

(member
  (if (%current-target-system) (gnu-triplet->...) (%current-system))
  (package-supported-systems ...))

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Thu, 17 Mar 2022 22:29:02 GMT) Full text and rfc822 format available.

Message #116 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Cc: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Subject: [PATCH v6 1/2] gnu: Add tree-sitter.
Date: Thu, 17 Mar 2022 19:27:54 -0300
* gnu/packages/text-editors.scm (tree-sitter): New variable.
---
 gnu/packages/text-editors.scm | 54 +++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 45cc61765a..d6ec000dc6 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2021 Leo Famulari <leo <at> famulari.name>
 ;;; Copyright © 2021 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;; Copyright © 2021 Calum Irwin <calumirwin1 <at> gmail.com>
+;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -39,6 +40,7 @@ (define-module (gnu packages text-editors)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix utils)
+  #:use-module (guix build utils)
   #:use-module (guix build-system cargo)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
@@ -62,6 +64,7 @@ (define-module (gnu packages text-editors)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages haskell-xyz)
+  #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages libbsd)
   #:use-module (gnu packages libreoffice)
@@ -1165,3 +1168,54 @@ (define-public virtaal
 provided by the Translate Toolkit, including XLIFF and PO.")
     (home-page "https://virtaal.translatehouse.org/")
     (license license:gpl2+)))
+
+(define-public tree-sitter
+  (package
+    (name "tree-sitter")
+    (version "0.20.6")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/tree-sitter/tree-sitter")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1z20518snyg0zp75qgs5bxmzjqws4dd19vnp6sya494za3qp5b6d"))
+              (modules '((guix build utils)))
+              (snippet '(begin
+                          ;; Remove bundled ICU parts
+                          (delete-file-recursively "lib/src/unicode")
+                          #t))))
+    (build-system gnu-build-system)
+    (inputs (list icu4c))
+    (arguments
+     (list #:phases
+           '(modify-phases %standard-phases
+              (delete 'configure))
+           #:tests? #f ; there are no tests for the runtime library
+           #:make-flags
+           #~(list (string-append "PREFIX="
+                                  #$output)
+                   (string-append "CC="
+                                  #$(cc-for-target)))))
+    (home-page "https://tree-sitter.github.io/tree-sitter/")
+    (synopsis "Incremental parsing system for programming tools")
+    (description
+     "Tree-sitter is a parser generator tool and an incremental parsing
+library.  It can build a concrete syntax tree for a source file and efficiently
+update the syntax tree as the source file is edited.
+
+Tree-sitter aims to be:
+
+@itemize
+@item General enough to parse any programming language
+@item Fast enough to parse on every keystroke in a text editor
+@item Robust enough to provide useful results even in the presence of syntax errors
+@item Dependency-free so that the runtime library (which is written in pure C)
+can be embedded in any application
+@end itemize
+
+This package includes the @code{libtree-sitter} runtime library.
+")
+    (license license:expat)))

base-commit: bae2201a8ddf789dff3f625327f5b2d0a686bc77
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Thu, 17 Mar 2022 22:29:02 GMT) Full text and rfc822 format available.

Message #119 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Cc: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Subject: [PATCH v6 2/2] gnu: neovim: Update to 0.6.1.
Date: Thu, 17 Mar 2022 19:27:55 -0300
* gnu/packages/vim.scm (neovim): Update to 0.6.1.

Build neovim with LuaJIT in the supported platforms.
---
 gnu/packages/vim.scm | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 28944dd640..e7f4464429 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2021 Tissevert <tissevert+guix <at> marvid.fr>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
+;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -661,7 +662,7 @@ (define-public neovim-syntastic
 (define-public neovim
   (package
     (name "neovim")
-    (version "0.4.4")
+    (version "0.6.1")
     (source
      (origin
        (method git-fetch)
@@ -670,13 +671,20 @@ (define-public neovim
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "11zyj6jvkwas3n6w1ckj3pk6jf81z1g7ngg4smmwm7c27y2a6f2m"))))
+        (base32 "10p6lg5yv9n6wcwdprwvvi56dfcm4wsj54nm0invyx3mhf7374lx"))))
     (build-system cmake-build-system)
     (arguments
      `(#:modules ((srfi srfi-26)
                   (guix build cmake-build-system)
                   (guix build utils))
-       #:configure-flags '("-DPREFER_LUA:BOOL=YES")
+       #:configure-flags
+       (list ,@(if (member (or (if (%current-target-system)
+                                   (gnu-triplet->nix-system (%current-target-system))
+                                   #f)
+                               (%current-system))
+                           (package-supported-systems luajit))
+                   '()
+                   '("-DPREFER_LUA:BOOL=YES")))
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'set-lua-paths
@@ -716,11 +724,17 @@ (define-public neovim
        ("libvterm" ,libvterm)
        ("unibilium" ,unibilium)
        ("jemalloc" ,jemalloc)
-       ("lua" ,lua-5.1)
+       ("lua" ,(if (member (if (%current-target-system)
+                               (gnu-triplet->nix-system (%current-target-system))
+                               (%current-system))
+                           (package-supported-systems luajit))
+                   luajit
+                   lua-5.1))
        ("lua-luv" ,lua5.1-luv)
        ("lua-lpeg" ,lua5.1-lpeg)
        ("lua-bitop" ,lua5.1-bitop)
-       ("lua-libmpack" ,lua5.1-libmpack)))
+       ("lua-libmpack" ,lua5.1-libmpack)
+       ("tree-sitter" ,tree-sitter)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("gettext" ,gettext-minimal)
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Thu, 17 Mar 2022 23:05:01 GMT) Full text and rfc822 format available.

Message #122 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Cc: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Subject: [PATCH v7 1/2] gnu: Add tree-sitter.
Date: Thu, 17 Mar 2022 20:04:10 -0300
* gnu/packages/text-editors.scm (tree-sitter): New variable.
---
 gnu/packages/text-editors.scm | 54 +++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 45cc61765a..d6ec000dc6 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2021 Leo Famulari <leo <at> famulari.name>
 ;;; Copyright © 2021 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;; Copyright © 2021 Calum Irwin <calumirwin1 <at> gmail.com>
+;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -39,6 +40,7 @@ (define-module (gnu packages text-editors)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix utils)
+  #:use-module (guix build utils)
   #:use-module (guix build-system cargo)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
@@ -62,6 +64,7 @@ (define-module (gnu packages text-editors)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages haskell-xyz)
+  #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages libbsd)
   #:use-module (gnu packages libreoffice)
@@ -1165,3 +1168,54 @@ (define-public virtaal
 provided by the Translate Toolkit, including XLIFF and PO.")
     (home-page "https://virtaal.translatehouse.org/")
     (license license:gpl2+)))
+
+(define-public tree-sitter
+  (package
+    (name "tree-sitter")
+    (version "0.20.6")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/tree-sitter/tree-sitter")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1z20518snyg0zp75qgs5bxmzjqws4dd19vnp6sya494za3qp5b6d"))
+              (modules '((guix build utils)))
+              (snippet '(begin
+                          ;; Remove bundled ICU parts
+                          (delete-file-recursively "lib/src/unicode")
+                          #t))))
+    (build-system gnu-build-system)
+    (inputs (list icu4c))
+    (arguments
+     (list #:phases
+           '(modify-phases %standard-phases
+              (delete 'configure))
+           #:tests? #f ; there are no tests for the runtime library
+           #:make-flags
+           #~(list (string-append "PREFIX="
+                                  #$output)
+                   (string-append "CC="
+                                  #$(cc-for-target)))))
+    (home-page "https://tree-sitter.github.io/tree-sitter/")
+    (synopsis "Incremental parsing system for programming tools")
+    (description
+     "Tree-sitter is a parser generator tool and an incremental parsing
+library.  It can build a concrete syntax tree for a source file and efficiently
+update the syntax tree as the source file is edited.
+
+Tree-sitter aims to be:
+
+@itemize
+@item General enough to parse any programming language
+@item Fast enough to parse on every keystroke in a text editor
+@item Robust enough to provide useful results even in the presence of syntax errors
+@item Dependency-free so that the runtime library (which is written in pure C)
+can be embedded in any application
+@end itemize
+
+This package includes the @code{libtree-sitter} runtime library.
+")
+    (license license:expat)))

base-commit: bae2201a8ddf789dff3f625327f5b2d0a686bc77
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Thu, 17 Mar 2022 23:05:02 GMT) Full text and rfc822 format available.

Message #125 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Cc: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Subject: [PATCH v7 2/2] gnu: neovim: Update to 0.6.1.
Date: Thu, 17 Mar 2022 20:04:11 -0300
* gnu/packages/vim.scm (neovim): Update to 0.6.1.

Build neovim with LuaJIT in the supported platforms.
---
 gnu/packages/vim.scm | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 28944dd640..5a417cb456 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2021 Tissevert <tissevert+guix <at> marvid.fr>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
+;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -661,7 +662,7 @@ (define-public neovim-syntastic
 (define-public neovim
   (package
     (name "neovim")
-    (version "0.4.4")
+    (version "0.6.1")
     (source
      (origin
        (method git-fetch)
@@ -670,13 +671,19 @@ (define-public neovim
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "11zyj6jvkwas3n6w1ckj3pk6jf81z1g7ngg4smmwm7c27y2a6f2m"))))
+        (base32 "10p6lg5yv9n6wcwdprwvvi56dfcm4wsj54nm0invyx3mhf7374lx"))))
     (build-system cmake-build-system)
     (arguments
      `(#:modules ((srfi srfi-26)
                   (guix build cmake-build-system)
                   (guix build utils))
-       #:configure-flags '("-DPREFER_LUA:BOOL=YES")
+       #:configure-flags
+       (list ,@(if (member (if (%current-target-system)
+                               (gnu-triplet->nix-system (%current-target-system))
+                               (%current-system))
+                           (package-supported-systems luajit))
+                   '()
+                   '("-DPREFER_LUA:BOOL=YES")))
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'set-lua-paths
@@ -716,11 +723,17 @@ (define-public neovim
        ("libvterm" ,libvterm)
        ("unibilium" ,unibilium)
        ("jemalloc" ,jemalloc)
-       ("lua" ,lua-5.1)
+       ("lua" ,(if (member (if (%current-target-system)
+                               (gnu-triplet->nix-system (%current-target-system))
+                               (%current-system))
+                           (package-supported-systems luajit))
+                   luajit
+                   lua-5.1))
        ("lua-luv" ,lua5.1-luv)
        ("lua-lpeg" ,lua5.1-lpeg)
        ("lua-bitop" ,lua5.1-bitop)
-       ("lua-libmpack" ,lua5.1-libmpack)))
+       ("lua-libmpack" ,lua5.1-libmpack)
+       ("tree-sitter" ,tree-sitter)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("gettext" ,gettext-minimal)
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Fri, 18 Mar 2022 03:52:02 GMT) Full text and rfc822 format available.

Message #128 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: li zongyuan <lyzongyuan <at> gmail.com>
To: luishenriquegh2701 <at> gmail.com
Cc: 53523 <at> debbugs.gnu.org
Subject: Re: [PATCH v7 2/2] gnu: neovim: Update to 0.6.1.
Date: Fri, 18 Mar 2022 11:50:51 +0800
Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com> writes:

> @@ -670,13 +671,19 @@ (define-public neovim
>               (commit (string-append "v" version))))
>         (file-name (git-file-name name version))
>         (sha256
> -        (base32 "11zyj6jvkwas3n6w1ckj3pk6jf81z1g7ngg4smmwm7c27y2a6f2m"))))
> +        (base32 "10p6lg5yv9n6wcwdprwvvi56dfcm4wsj54nm0invyx3mhf7374lx"))))
>      (build-system cmake-build-system)
>      (arguments
>       `(#:modules ((srfi srfi-26)
>                    (guix build cmake-build-system)
>                    (guix build utils))
> -       #:configure-flags '("-DPREFER_LUA:BOOL=YES")
> +       #:configure-flags
> +       (list ,@(if (member (if (%current-target-system)
> +                               (gnu-triplet->nix-system (%current-target-system))
> +                               (%current-system))
> +                           (package-supported-systems luajit))
> +                   '()
> +                   '("-DPREFER_LUA:BOOL=YES")))
>         #:phases
>         (modify-phases %standard-phases
>           (add-after 'unpack 'set-lua-paths

We can just remove `-DPREFER_LUA:BOOL` flags. Since we have a fallback
from luajit to lua,
this macro won't take any effect.

FYI, you can take a look about usage of this macro from here:

https://github.com/neovim/neovim/blob/8ed9c84481a7d0df0708d11ffa538f832591240f/CMakeLists.txt#L431

BTW, I have tested this patch set on the x86_64 platform and it works
perfectly. Maybe it's time to involve committers  for reviewing this
patch.




Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Sat, 19 Mar 2022 19:50:02 GMT) Full text and rfc822 format available.

Message #131 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: li zongyuan <lyzongyuan <at> gmail.com>
Cc: 53523 <at> debbugs.gnu.org
Subject: Re: [PATCH v7 2/2] gnu: neovim: Update to 0.6.1.
Date: Sat, 19 Mar 2022 15:38:49 -0300
li zongyuan <lyzongyuan <at> gmail.com> writes:

> We can just remove `-DPREFER_LUA:BOOL` flags. Since we have a 
> fallback
> from luajit to lua,
> this macro won't take any effect.

I tried building it on powerpc64le-linux, through `--system`, 
without this flag and had this error:

--8<---------------cut here---------------start------------->8---
CMake Error at 
/gnu/store/7vfcp65x5ys1a3jal9qys1davs2zk9rs-cmake-minimal-3.21.4/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 
(message):
 Could NOT find LuaJit (missing: LUAJIT_LIBRARY 
 LUAJIT_INCLUDE_DIR)
Call Stack (most recent call first):
 /gnu/store/7vfcp65x5ys1a3jal9qys1davs2zk9rs-cmake-minimal-3.21.4/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:594 
 (_FPHSA_FAILURE_MESSAGE)
 cmake/FindLuaJit.cmake:35 (find_package_handle_standard_args)
 CMakeLists.txt:422 (find_package)
--8<---------------cut here---------------end--------------->8---


> BTW, I have tested this patch set on the x86_64 platform and it 
> works
> perfectly. Maybe it's time to involve committers  for reviewing 
> this
> patch.

I agree! I sense it is really close to done.

Regards,

-- 
Luis H. Higino




Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Wed, 23 Mar 2022 07:44:02 GMT) Full text and rfc822 format available.

Message #134 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: li zongyuan <lyzongyuan <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Cc: iyzsong <at> outlook.com
Subject: [PATCH v7 1/2] gnu: Add tree-sitter.
Date: Wed, 23 Mar 2022 15:42:45 +0800
Hi Song,

Would you mind take a look about this patch?

This could be great for vim user if it can be applied.

Thanks,
Li




Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Fri, 25 Mar 2022 12:58:01 GMT) Full text and rfc822 format available.

Message #137 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Cc: guix-patches <at> gnu.org, 53523 <at> debbugs.gnu.org
Subject: Re: [bug#53523] [PATCH v7 1/2] gnu: Add tree-sitter.
Date: Fri, 25 Mar 2022 12:49:02 +0000
[Message part 1 (text/plain, inline)]
Hi!

> * gnu/packages/text-editors.scm (tree-sitter): New variable.

I applied the patch locally and tested it, just one small nit otherwise
LGTM.  

Tested-by: Pierre Langlois <pierre.langlois <at> gmx.com>
Reviewed-by: Pierre Langlois <pierre.langlois <at> gmx.com>

Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com> writes:
> ---
>  gnu/packages/text-editors.scm | 54 +++++++++++++++++++++++++++++++++++
>  1 file changed, 54 insertions(+)
>
> diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
> index 45cc61765a..d6ec000dc6 100644
> --- a/gnu/packages/text-editors.scm
> +++ b/gnu/packages/text-editors.scm
> @@ -17,6 +17,7 @@
>  ;;; Copyright © 2021 Leo Famulari <leo <at> famulari.name>
>  ;;; Copyright © 2021 Pierre Langlois <pierre.langlois <at> gmx.com>
>  ;;; Copyright © 2021 Calum Irwin <calumirwin1 <at> gmail.com>
> +;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -39,6 +40,7 @@ (define-module (gnu packages text-editors)
>    #:use-module (guix gexp)
>    #:use-module (guix git-download)
>    #:use-module (guix utils)
> +  #:use-module (guix build utils)

I don't think you need this import right?  You'll have probably noticed
a warning:

  WARNING: (gnu packages text-editors): `which' imported from both (guix build utils) and (gnu packages base)
  
When this happens we can resolve the conflict with a prefix, so we can
have the `which' procedure and the `base::which' package.

  #:use-module ((gnu packages base) #:prefix base:)
  
In this case though we just don't need the import at all though I think.

Thanks!
Pierre
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Fri, 25 Mar 2022 12:58:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Sun, 27 Mar 2022 22:31:01 GMT) Full text and rfc822 format available.

Message #143 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: Pierre Langlois <pierre.langlois <at> gmx.com>
Cc: guix-patches <at> gnu.org, 53523 <at> debbugs.gnu.org
Subject: Re: [bug#53523] [PATCH v7 1/2] gnu: Add tree-sitter.
Date: Sun, 27 Mar 2022 19:25:15 -0300
Pierre Langlois <pierre.langlois <at> gmx.com> writes:

> In this case though we just don't need the import at all though 
> I think.

You are right. I thought it was necessary to import a module 
externally to be able to use it on an origin snippet, through the 
`modules` field. However, after reading the guix manual with more 
attention, I understood it is not. Just to be sure, I tested 
building tree-sitter without this import and it was 
successful. I'll be sending the new patch series in a minute.

Regards,

-- 
Luis H. Higino




Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Sun, 27 Mar 2022 22:32:02 GMT) Full text and rfc822 format available.

Message #146 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Cc: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Subject: [PATCH v8 2/2] gnu: neovim: Update to 0.6.1.
Date: Sun, 27 Mar 2022 19:31:28 -0300
* gnu/packages/vim.scm (neovim): Update to 0.6.1.

Build neovim with LuaJIT in the supported platforms.
---
 gnu/packages/vim.scm | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index ef6c62cc69..bc5e36c6f2 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2021 Tissevert <tissevert+guix <at> marvid.fr>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
+;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -662,7 +663,7 @@ (define-public neovim-syntastic
 (define-public neovim
   (package
     (name "neovim")
-    (version "0.4.4")
+    (version "0.6.1")
     (source
      (origin
        (method git-fetch)
@@ -671,13 +672,19 @@ (define-public neovim
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "11zyj6jvkwas3n6w1ckj3pk6jf81z1g7ngg4smmwm7c27y2a6f2m"))))
+        (base32 "10p6lg5yv9n6wcwdprwvvi56dfcm4wsj54nm0invyx3mhf7374lx"))))
     (build-system cmake-build-system)
     (arguments
      `(#:modules ((srfi srfi-26)
                   (guix build cmake-build-system)
                   (guix build utils))
-       #:configure-flags '("-DPREFER_LUA:BOOL=YES")
+       #:configure-flags
+       (list ,@(if (member (if (%current-target-system)
+                               (gnu-triplet->nix-system (%current-target-system))
+                               (%current-system))
+                           (package-supported-systems luajit))
+                   '()
+                   '("-DPREFER_LUA:BOOL=YES")))
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'set-lua-paths
@@ -717,11 +724,17 @@ (define-public neovim
        ("libvterm" ,libvterm)
        ("unibilium" ,unibilium)
        ("jemalloc" ,jemalloc)
-       ("lua" ,lua-5.1)
+       ("lua" ,(if (member (if (%current-target-system)
+                               (gnu-triplet->nix-system (%current-target-system))
+                               (%current-system))
+                           (package-supported-systems luajit))
+                   luajit
+                   lua-5.1))
        ("lua-luv" ,lua5.1-luv)
        ("lua-lpeg" ,lua5.1-lpeg)
        ("lua-bitop" ,lua5.1-bitop)
-       ("lua-libmpack" ,lua5.1-libmpack)))
+       ("lua-libmpack" ,lua5.1-libmpack)
+       ("tree-sitter" ,tree-sitter)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("gettext" ,gettext-minimal)
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Sun, 27 Mar 2022 22:32:02 GMT) Full text and rfc822 format available.

Message #149 received at 53523 <at> debbugs.gnu.org (full text, mbox):

From: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
To: 53523 <at> debbugs.gnu.org
Cc: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Subject: [PATCH v8 1/2] gnu: Add tree-sitter.
Date: Sun, 27 Mar 2022 19:31:27 -0300
* gnu/packages/text-editors.scm (tree-sitter): New variable.
---
 gnu/packages/text-editors.scm | 53 +++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 45cc61765a..7cbad042c9 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2021 Leo Famulari <leo <at> famulari.name>
 ;;; Copyright © 2021 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;; Copyright © 2021 Calum Irwin <calumirwin1 <at> gmail.com>
+;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -62,6 +63,7 @@ (define-module (gnu packages text-editors)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages haskell-xyz)
+  #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages libbsd)
   #:use-module (gnu packages libreoffice)
@@ -1165,3 +1167,54 @@ (define-public virtaal
 provided by the Translate Toolkit, including XLIFF and PO.")
     (home-page "https://virtaal.translatehouse.org/")
     (license license:gpl2+)))
+
+(define-public tree-sitter
+  (package
+    (name "tree-sitter")
+    (version "0.20.6")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/tree-sitter/tree-sitter")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1z20518snyg0zp75qgs5bxmzjqws4dd19vnp6sya494za3qp5b6d"))
+              (modules '((guix build utils)))
+              (snippet '(begin
+                          ;; Remove bundled ICU parts
+                          (delete-file-recursively "lib/src/unicode")
+                          #t))))
+    (build-system gnu-build-system)
+    (inputs (list icu4c))
+    (arguments
+     (list #:phases
+           '(modify-phases %standard-phases
+              (delete 'configure))
+           #:tests? #f ; there are no tests for the runtime library
+           #:make-flags
+           #~(list (string-append "PREFIX="
+                                  #$output)
+                   (string-append "CC="
+                                  #$(cc-for-target)))))
+    (home-page "https://tree-sitter.github.io/tree-sitter/")
+    (synopsis "Incremental parsing system for programming tools")
+    (description
+     "Tree-sitter is a parser generator tool and an incremental parsing
+library.  It can build a concrete syntax tree for a source file and efficiently
+update the syntax tree as the source file is edited.
+
+Tree-sitter aims to be:
+
+@itemize
+@item General enough to parse any programming language
+@item Fast enough to parse on every keystroke in a text editor
+@item Robust enough to provide useful results even in the presence of syntax errors
+@item Dependency-free so that the runtime library (which is written in pure C)
+can be embedded in any application
+@end itemize
+
+This package includes the @code{libtree-sitter} runtime library.
+")
+    (license license:expat)))

base-commit: 2344fb10972a4cefead8e7aa3e0b807da4cf4570
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53523; Package guix-patches. (Sun, 27 Mar 2022 22:38:02 GMT) Full text and rfc822 format available.

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Tue, 29 Mar 2022 10:03:02 GMT) Full text and rfc822 format available.

Notification sent to Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>:
bug acknowledged by developer. (Tue, 29 Mar 2022 10:03:02 GMT) Full text and rfc822 format available.

Message #157 received at 53523-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
Cc: 53523-done <at> debbugs.gnu.org, Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: Re: bug#53523: [PATCH] gnu: Add tree-sitter.
Date: Tue, 29 Mar 2022 12:02:25 +0200
Hi Luis,

Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com> skribis:

> * gnu/packages/text-editors.scm (tree-sitter): New variable.

[...]

> * gnu/packages/vim.scm (neovim): Update to 0.6.1.

Applied.

Thank you and thanks everyone who commented!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 26 Apr 2022 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 51 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.