(address . guix-patches@gnu.org)
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
-----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-----