diff mbox series

[bug#53523,2/2] gnu: Add neovim-luajit.

Message ID 5d93b3a5c97096e5ae10adada97ea9800d057195.1643129740.git.luishenriquegh2701@gmail.com
State Accepted
Headers show
Series [bug#53523,1/2] gnu: neovim: Update to 0.6.1. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Luis Henrique Gomes Higino Jan. 25, 2022, 4:56 p.m. UTC
* gnu/packages/vim.scm (neovim-luajit): New variable.
---
 gnu/packages/vim.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

M Jan. 25, 2022, 5:39 p.m. UTC | #1
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.
Luis Henrique Gomes Higino Jan. 26, 2022, 11:28 a.m. UTC | #2
Maxime Devos <maximedevos@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.
Efraim Flashner Jan. 26, 2022, 11:48 a.m. UTC | #3
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))
Luis Henrique Gomes Higino Jan. 26, 2022, 12:07 p.m. UTC | #4
Efraim Flashner <efraim@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.
Efraim Flashner Jan. 26, 2022, 2:22 p.m. UTC | #5
On Wed, Jan 26, 2022 at 09:07:04AM -0300, Luis Henrique Gomes Higino wrote:
> 
> Efraim Flashner <efraim@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.
diff mbox series

Patch

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")