Add vim-build-system

  • Done
  • quality assurance status badge
Details
8 participants
  • Foo Chuan Wei
  • Efraim Flashner
  • Ludovic Courtès
  • Christopher Baines
  • ng0
  • ng0
  • Ricardo Wurmus
  • zimoun
Owner
unassigned
Submitted by
ng0
Severity
normal
Merged with
N
(address . guix-patches@gnu.org)
87a7wkv3eh.fsf@abyayala.i-did-not-set--mail-host-address--so-tickle-me
This adds a first version of a functional vim-build-system.

As explained today on IRC, and as you can guess by reading
gnu/packages/vim.scm Vim has a concept of folders and files in
standard places, but Makefiles and similar tools are an
exception. Usually you have to copy them somewhere (or use
external Vim package managers that pull the files for yoz and set
the "run time path" (rtp) for you).

There's also (to my best knowledge, keep in mind I've last read
into Vim when I did the last commits in the Vim module) no ENV
VAR or anything we could export, you have to manually set

set rtp+=~/.guix-profile/share/vim/vimfiles/

in your $home/.vimrc

The build system comes with a FIXME note, but it works. I'm in
the middle of tests and exams, so this is the best I can correct
from my earlier attempt in '17 on this. What I can apply are
changes and adjustments to what I submit now.

4 Patches attached, 3 of them are for proof of work.
From 1b0a5ec5e59f65cfd6424a53e3bb24ad40586ed5 Mon Sep 17 00:00:00 2001
From: ng0 <ng0@infotropique.org>
Date: Sun, 2 Jul 2017 16:11:19 +0000
Subject: [PATCH 2/4] gnu: vim-neocomplete: Use 'vim-build-system'.

* gnu/packages/vim.scm (vim-neocomplete): Switch to 'vim-build-system'.
---
gnu/packages/vim.scm | 20 ++------------------
1 file changed, 2 insertions(+), 18 deletions(-)

Toggle diff (40 lines)
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index abd25bc9d..7a843a0ab 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -29,6 +29,7 @@
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system vim)
#:use-module (gnu packages)
#:use-module (gnu packages acl)
#:use-module (gnu packages admin) ; For GNU hostname
@@ -209,24 +210,7 @@ with the editor vim.")))
(sha256
(base32
"1307gbrdwam2akq9w2lpijc41740i4layk2qkd9sjkqxfch5lni2"))))
- (build-system gnu-build-system)
- (arguments
- `(#:tests? #f
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (delete 'build)
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (vimfiles (string-append out "/share/vim/vimfiles"))
- (autoload (string-append vimfiles "/autoload"))
- (doc (string-append vimfiles "/doc"))
- (plugin (string-append vimfiles "/plugin")))
- (copy-recursively "autoload" autoload)
- (copy-recursively "doc" doc)
- (copy-recursively "plugin" plugin)
- #t))))))
+ (build-system vim-build-system)
(synopsis "Next generation completion framework for Vim")
(description
"@code{neocomplete}, an abbreviation of 'neo-completion with cache',
--
2.16.1
From cdbd15cf00e0bc1489437845f6c7f60fd517ab9a Mon Sep 17 00:00:00 2001
From: ng0 <ng0@crash.cx>
Date: Wed, 7 Feb 2018 22:07:14 +0000
Subject: [PATCH 3/4] gnu: vim-neosnippet-snippets: Use 'vim-build-system'.

* gnu/packages/vim.scm (vim-neosnippet-snippets): Switch to 'vim-build-system'.
---
gnu/packages/vim.scm | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)

Toggle diff (37 lines)
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 7a843a0ab..13afbaeb4 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2016, 2017 ng0 <ng0@infotropique.org>
+;;; Copyright © 2016, 2017, 2018 ng0 <ng0@crash.cx>
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -238,20 +238,7 @@ features than Vim's built-in completion.")
(sha256
(base32
"151wpvbj6jb9jdkbhj3b77f5sq7y328spvwfbqyj1y32rg4ifmc6"))))
- (build-system gnu-build-system)
- (arguments
- `(#:tests? #f
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (delete 'build)
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (vimfiles (string-append out "/share/vim/vimfiles")))
- (copy-recursively "neosnippets"
- (string-append vimfiles "/neosnippets"))
- #t))))))
+ (build-system vim-build-system)
(synopsis "Snippets for neosnippet")
(description
"@code{neosnippet-snippets} provides standard snippets for the Vim plugin
--
2.16.1
From 09cc9c735da27d0adb1ef141bbd2b7d37e1d6754 Mon Sep 17 00:00:00 2001
From: ng0 <ng0@crash.cx>
Date: Wed, 7 Feb 2018 22:14:58 +0000
Subject: [PATCH 4/4] gnu: vim-neosnippet: Use 'vim-build-system'.

* gnu/packages/vim.scm (vim-neosnippet): Switch to 'vim-build-system'.
---
gnu/packages/vim.scm | 29 +----------------------------
1 file changed, 1 insertion(+), 28 deletions(-)

Toggle diff (42 lines)
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 13afbaeb4..99361fa5d 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -264,34 +264,7 @@ you can fill in on the fly.")
(sha256
(base32
"0k80syscmpnj38ks1fq02ds59g0r4jlg9ll7z4qc048mgi35alw5"))))
- (build-system gnu-build-system)
- (arguments
- `(#:tests? #f
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (delete 'build)
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (vimfiles (string-append out "/share/vim/vimfiles"))
- (autoload (string-append vimfiles "/autoload"))
- (doc (string-append vimfiles "/doc"))
- (ftdetect (string-append vimfiles "/ftdetect"))
- (ftplugin (string-append vimfiles "/ftplugin"))
- (indent (string-append vimfiles "/indent"))
- (plugin (string-append vimfiles "/plugin"))
- (rplugin (string-append vimfiles "/rplugin"))
- (syntax (string-append vimfiles "/syntax")))
- (copy-recursively "autoload" autoload)
- (copy-recursively "doc" doc)
- (copy-recursively "ftdetect" ftdetect)
- (copy-recursively "ftplugin" ftplugin)
- (copy-recursively "indent" indent)
- (copy-recursively "plugin" plugin)
- (copy-recursively "rplugin" rplugin)
- (copy-recursively "syntax" syntax)
- #t))))))
+ (build-system vim-build-system)
(synopsis "Snippet support for Vim")
(description
"@code{neosnippet}, is a plugin for Vim which adds snippet support to Vim.
--
2.16.1
--
A88C8ADD129828D7EAC02E52E22F9BBFEE348588 :: https://ea.n0.is/keys/
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEqIyK3RKYKNfqwC5S4i+bv+40hYgFAlp7fgYACgkQ4i+bv+40
hYjf0RAAhUe72DTRU8UhnbKsKqqC2T6bBgB6OrfZe7srKRJnOlWxrUA3WyVoZ0SB
f2sRlknTQz6ESQhPwbDqqqaR4KLd7hWuAtImWrnO/Y8H+W2ydCMqOCgN85SZ1Dgs
fAFAee0LoI1MUMADEV0u9W/YNYv0GlEAVw9fuMbxq2pAZJjpgGfkDGDFG4iosxDP
vWZkVNPBWuLb3vTdsyl1pO3UeoKo2n/9X0AmJezIVg4eqmtCZmieoMfYERVNerpD
V3pqZTJWksiUwIxVyJL/dX/1a56PnsbGEl9Sypgg3/efuH4Itfpts1mttCkrsSB+
AbdSY8KPIwwJsplYtmdJuJjfCEV+ZxoS692ARYpPcjR2KNCLu9Mwhg2EzoIiVFFW
mCYziYIIE+BiLiMDVmuFtZH4/IhFb4f4b6w6o3a6V9qqihbV81MrYPAYChIFEBHh
2EiCzQ40Y17Oj4XaHuX0YfhocSJsiqi3UqXKWZi6ZDhSKYmH6+niwLTEOuJwNof/
4bsgFsWy5tscDCZB/wHhfxHfDVmjqM5DrmjK7EFKeoPRo9vZukaKfOySY9GHhvdJ
g4GSW1xmdtIsCWuw0XUavegTwZ+1hvvwgzXzX0hmTp3y4CgxCDHk7todI/SeoS50
KjlFnepyQt/I4RYwIsX5km7TJehcIV7db0QS7QfA1VpTC41qyzE=
=4NjI
-----END PGP SIGNATURE-----

N
(address . 30385@debbugs.gnu.org)
20180228085417.b2o725dxstovrwic@abyayala
Attachment: file
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEqIyK3RKYKNfqwC5S4i+bv+40hYgFAlqWbjkACgkQ4i+bv+40
hYiHFxAAqi0H/0Nouq+xpaokYIoP6ExTY25ZlcT1SN0MTCuvb5ituav2+suS/Aq8
iYqXgUdKwm/XmZf7xupEjD/3lMR+0Vq+6+ESe0hiQuuswTT1GHs1JFpYUN8h5zkv
7l6Yw0yo6T2BTP83+8ZguzFxIzEG1OwDh04P1cn8kE4jc0J0n3RsxlPP0iDLdWpt
jQfd1LSkYMiXl9KHACJyU6p7ftpgSnv98Z1MRq4KcVa1Uco0n9Ebx4DVwH8h5QRU
WFg+sChRZ6FJ+jOnrPG6MG+otUxosiyvzX3Fjtu6/vT1Sg24AIuY4igCCNQuNUip
zSJ34mf5tXKZXp7DiSVv2cBVHeLf4fv8yUUEzubxxp9BQ8ZfVNBW2x4yAnZRXFu0
lvq3CTiTtK23P8lXZ5jatyhZ3dZT0k+OMbkHR1co/nPz1LctLcVMiECIVvUqvyYu
zIPJec13EElgrzrpFiI/WtTLUTOvI8DVD0S+nvNXWEZPTT5sLjhhTcWELSkwW4Vp
97oOc1Q9UwBf0hLRsTgHXc4wppT9cw+SU3Cej5IkelbCPHBAcfaDKuutsHRef6oE
Kq8kI11C33uK7xkBesbe97bVBKXMx5VgGzTmtBhmlP7FunulV1dXu1JVET1zg5bq
LDSUApLKtc+7MBO3V8FcJVus9crloN2zKQToOc5AiiS/VOtKoDg=
=wUbP
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 28 Feb 2018 23:08
(name . ng0)(address . ng0@n0.is)(address . 30385@debbugs.gnu.org)
87tvu0u5qn.fsf@gnu.org
Hello ng0,

ng0 <ng0@n0.is> skribis:

Toggle quote (2 lines)
> Are 4 patches too much?

As you can see on https://bugs.gnu.org/guix-patches, this is not the
only patch waiting for review.

All I can suggest is being patient, I’m sure everyone is doing their
best. :-)

Thanks,
Ludo’.
C
C
Christopher Baines wrote on 19 Mar 2018 09:00
control message for bug #30385
(address . control@debbugs.gnu.org)
87605s7aw6.fsf@cbaines.net
tags 30385 patch
R
R
Ricardo Wurmus wrote on 21 Jun 2018 15:20
Re: [bug#30385] Add vim-build-system
(address . ng0@n0.is)(address . 30385@debbugs.gnu.org)
871sd0tgwb.fsf@mdc-berlin.de
Toggle quote (2 lines)
> This adds a first version of a functional vim-build-system.

Thank you.

Sorry for the delay. I just went through this but found a couple of
defects.

I fixed the regular expressions in %default-exclude, removed unused
module imports, and fixed minor indentation problems, but then I noticed
a few more fundamental problems.

* %default-exclude is not used. The “install” phase unconditionally
installs everything

* The build system does not support an #:exclude argument that would
allow a user to override the behaviour. (Compare this to the
ant-build-system, which supports excluding tests, for example.)

* The build system allows users to specify a test-target and disable
tests (they default to #t), but there is no check phase anyway. It
also supports configure-flags, but it would not use them.

Attached is the patch with my minor changes.

Could you please send an updated patch where these problems are
addressed?

Thanks!

--
Ricardo
R
R
Ricardo Wurmus wrote on 21 Jun 2018 15:21
control message for bug #30385
(address . control@debbugs.gnu.org)
6ef1930f-f259-49c4-a811-148a559c28c2@SW-IT-P-CAS4.mdc-berlin.net
tags 30385 moreinfo
N
N
Nils Gillmann wrote on 26 Jun 2018 16:47
Re: [bug#30385] Add vim-build-system
(name . Ricardo Wurmus)(address . ricardo.wurmus@mdc-berlin.de)
20180626144728.i6cwloiexh3rp4ey@abyayala
Attachment: file
R
R
Ricardo Wurmus wrote on 2 Jul 2018 23:26
control message for bug #31989
(address . control@debbugs.gnu.org)
df08bea9-faa4-4384-be02-89089c22fbbd@SW-IT-P-CAS4.mdc-berlin.net
merge 31989 30385
Z
Z
zimoun wrote on 25 Nov 2021 00:45
Re: [bug#31989] vim-build-system
(name . Efraim Flashner)(address . efraim@flashner.co.il)
86zgptrucv.fsf@gmail.com
Hi,

On Wed, 27 Jun 2018 at 23:04, Efraim Flashner <efraim@flashner.co.il> wrote:
Toggle quote (18 lines)
> This patch got forgotten about a year ago
>
> --
> Efraim Flashner <efraim@flashner.co.il> ????? ?????
> GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
> Confidentiality cannot be guaranteed on emails sent or received unencrypted
>
> From: ng0 <ng0@infotropique.org>
> Subject: Re: PATCH in need for discussion: vim-build-system
> To: Efraim Flashner <efraim@flashner.co.il>, guix-devel@gnu.org
> Date: Sun, 2 Jul 2017 19:56:07 +0000 (4 years, 20 weeks, 5 days ago)
> Mail-Followup-To: Efraim Flashner <efraim@flashner.co.il>, guix-devel@gnu.org
>
> ng0 transcribed 1.3K bytes:
>> I found the mistake, a simple typo. Updated patch coming soon.
>
> That would've been too easy, but there was a typo.

This is marked as moreinfo since 2018. After reading the thread, I am
closing because Vim users do not seem to manifest an interest for having
vim-build-system.

If I misread something, feel free to reopen. It appears to me better to
still keep close this one, and send a fresh set of patches to review.

Cheers,
simon
Closed
E
E
Efraim Flashner wrote on 26 Nov 2021 12:13
(name . zimoun)(address . zimon.toutoune@gmail.com)
YaDBYh1rItU/PfWT@3900XT
On Thu, Nov 25, 2021 at 12:45:20AM +0100, zimoun wrote:
Toggle quote (31 lines)
> Hi,
>
> On Wed, 27 Jun 2018 at 23:04, Efraim Flashner <efraim@flashner.co.il> wrote:
> > This patch got forgotten about a year ago
> >
> > --
> > Efraim Flashner <efraim@flashner.co.il> ????? ?????
> > GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
> > Confidentiality cannot be guaranteed on emails sent or received unencrypted
> >
> > From: ng0 <ng0@infotropique.org>
> > Subject: Re: PATCH in need for discussion: vim-build-system
> > To: Efraim Flashner <efraim@flashner.co.il>, guix-devel@gnu.org
> > Date: Sun, 2 Jul 2017 19:56:07 +0000 (4 years, 20 weeks, 5 days ago)
> > Mail-Followup-To: Efraim Flashner <efraim@flashner.co.il>, guix-devel@gnu.org
> >
> > ng0 transcribed 1.3K bytes:
> >> I found the mistake, a simple typo. Updated patch coming soon.
> >
> > That would've been too easy, but there was a typo.
>
> This is marked as moreinfo since 2018. After reading the thread, I am
> closing because Vim users do not seem to manifest an interest for having
> vim-build-system.
>
> If I misread something, feel free to reopen. It appears to me better to
> still keep close this one, and send a fresh set of patches to review.
>
> Cheers,
> simon

We do pretty well with the copy-build-system, with the occasional extra
phase(s).

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmGgwV8ACgkQQarn3Mo9
g1HQvhAAmTqRlhbg9EyvEcKbBMxC0NB9s13+u+/FQDrTOj7xHav4HBo8nODPsVeM
36U8tse8Ei8veY4bXd0N/64eHuGN5y5JOyDMV0Q/k/YZgnFkGn+Wfv/mUF71ExY9
fs7tls7l5b3kxCHhr3NrFOSq0oHCpAwtD7X5tTy/f+dh1qtn4DglvaC3OrN/ycU1
n4q6N9rYpVSV/WE5hxbZkR3oayYpwroFyk7yHCF49BlBn28t0O9qHqUOHEabx+7Z
pQJIRIIT8Xjk7IbZJeBNFYPDIV1WQt6/nsD9l8hlJA1wRt8kyMu1xq754dRb4Rd5
mCGZWtUZsPzSICfLHIeMfV+FD0oAF4TibEqHAHsGhk3dLE9iz7Fcu6eARW6Zb43Z
JnWKgN5sAYXzCyUW1jun0SebMLXPYa1ygMMWeT60w/FEAMKgLaHXw4sM+kf4UU0l
ahB6akdj6InBkcZcnOSdMu7BXkfuGXmdh6dibu7g1J7qsfdbJdWkS/q8rj0LCrTP
+6BHNvKBXNYBxJmLKtnUU9gSj/WhB/ORtF2XNjPbsOX8mLhaDtPLSoTaIYIMDVQ6
yTBa8l8FUAXy4Mb0SL1CDhCyj05z7pP5n+hVn7xpv3uE67U6Zbq/4onqgu2O7/2U
l+W9tcIPtJTX07QJJUHhFrI8X4MWxuu+TNY9xqsqXmjFnrRIqhY=
=G4XR
-----END PGP SIGNATURE-----


Closed
F
F
Foo Chuan Wei wrote on 28 Nov 2021 10:23
(address . efraim@flashner.co.il)(address . 30385@debbugs.gnu.org)
PU1PR01MB215519BC63AF5C72157E60908D659@PU1PR01MB2155.apcprd01.prod.exchangelabs.com
On 2021-11-26 13:13:38 +0200, Efraim Flashner wrote:
Toggle quote (3 lines)
> We do pretty well with the copy-build-system, with the occasional extra
> phase(s).

But the help tags files (`:help helptags`) are not generated when using
the copy-build-system. Help tag files should be generated during the
build phase for Vim plugins, because the user cannot generate help tags
after plugin installation. The user does not have permission to modify
anything in ~/.guix-profile/share/vim/vimfiles/, so `:helptags
~/.guix-profile/share/vim/vimfiles/` will fail.
E
E
Efraim Flashner wrote on 28 Nov 2021 10:28
(name . Foo Chuan Wei)(address . chuanwei.foo@hotmail.com)(address . 30385@debbugs.gnu.org)
YaNLqn+KdyRVoo2D@3900XT
On Sun, Nov 28, 2021 at 09:23:30AM +0000, Foo Chuan Wei wrote:
Toggle quote (11 lines)
> On 2021-11-26 13:13:38 +0200, Efraim Flashner wrote:
> > We do pretty well with the copy-build-system, with the occasional extra
> > phase(s).
>
> But the help tags files (`:help helptags`) are not generated when using
> the copy-build-system. Help tag files should be generated during the
> build phase for Vim plugins, because the user cannot generate help tags
> after plugin installation. The user does not have permission to modify
> anything in ~/.guix-profile/share/vim/vimfiles/, so `:helptags
> ~/.guix-profile/share/vim/vimfiles/` will fail.

I'm a bit rusty on the help tags. I thought they would all clober each
other if they were built during the package building, since they all
have the same name and we can only install one, but if we built them as
a profile hook then they'd all be able to co-exist.

Thoughts?

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmGjS6cACgkQQarn3Mo9
g1Eu2g//ZZDcaZcbKpIVgSgTalag8prpYM1Z0SqHt7e0WlsL81kWuIGCdPrc6EVl
JaFB/KNX2I4MaymHdoyRObkJ6kySIIk3n3oUcgKERhg6LzMHZIlXTTpfiObc4k7x
0JwjdrvBo8WjHiO0F4IvXbcFmi/0gOSNP9cY8BAs4tGlBnHSzw76aAxAuPTKxWJM
FyY2QOpMP9RdiTIJtsksG44a0Zwy2xV26uAbhPTx2tV60Rsek1l5eOc5Vi+GYow1
YmJO8inoZVGhAuasy8L+Opeu4k+gPaEuFMabejU0+L2cE0cwyOCb2DLm6jvM3wj/
AoHdTm4QNTpw4eVVU/0zuims/XjSwST1xsO2Xtw458uoQ1tUsg9/Ax4kzrkBgsaZ
nI1hC6dcYbKEveyZCgkZre4CYz4j/UMUAOpPGCHAYswGQiYYtOiJ33zACvpzB/Vr
BBjpKN9KPer3HdDmHRIMCxWPpulv8btfAjK3WOGQKts0Li1tZsSS7w6TxI1GAgFQ
T3WEtdhxuIn7LlgZXp2zajHV4dkE/uzWDars5JQQw9fkLjC8s+1z9libi/GiKMmd
YsdLk+jFPjyMmKPPMgXFTcrxvxslNoh0dk3GUABFwiECrwdYtVtVtGHro9LXK/im
OfzqLQw3y9vZKLhIPtixr0iD0TzfzmDIP7YU+yA4vgbM1Nqaosk=
=lhZh
-----END PGP SIGNATURE-----


?