[PATCH core-updates 0/4] vim-build-system

  • Open
  • quality assurance status badge
Details
2 participants
  • Jonathan Scoresby
  • (
Owner
unassigned
Submitted by
Jonathan Scoresby
Severity
normal
J
J
Jonathan Scoresby wrote on 13 Dec 2022 01:38
[PATCH core-updates 0/4] vim-build-system
(address . guix-patches@gnu.org)(name . Jonathan Scoresby)(address . me@jonscoresby.com)
cover.1670891520.git.me@jonscoresby.com
Hey guix! I know there have been attempts to do this in the past, and I
know that emacs is the thing to use in the guix world, but I made a
build system for vim plugins. I had a few goals in this attempt:

1. Better understand Guile Scheme and Guix, as I am new to both
2. Make help tags available on vim plugins installed with guix
(see issues 51540 30385)
3. Take advantage of vim's built-in package manager
4. Make installing plugins for vim and neovim as easy as possible

There are a lot of plugin managers for vim, but I figured that if guix
is such a great package manager, you shouldn't need third party
solutions.

I thought of a lot of ways to separate vim and neovim plugins. It's
not neccesarily a trivial problem because:
1. neovim can use vim plugins, but not usually vice-versa.
2. I wanted to use vim to generate helptags for vim plugins and
neovim to generate helptags for neovim plugins as the
implemenations are slightly different and I wanted avoid any
possible errors, but I also didn't want to have to include
neovim as an input when unneccesary.
3. I wanted there to be as much code reuse as possible.

For these reasons, I decided that for plugins that are compatible with
both, a package would specify a neovim output. For both vim and neovim,
all plugins are installed to the "pack" folder where neovim and vim both
look for packages automatically. By default, plugins are installed to
the "start" folder, but that can be changed for a specific package using
the "mode" keyword.

I based this off of 'core-updates' just because I made a slight change
to the copy-build-system so that files could potentially be installed to
an output other than "out." I believe this causes a lot of packages to
rebuild even though it doesn't have any actuall effects. If this
doesn't belong in core-updates, let me know.

Jonathan Scoresby (4):
guix: copy-build-system: allow install plan directives to specify
output
gnu: vim: add relevant locations to 'package-path' instead of
'runtime-path'
guix: add vim-build-system
gnu: have vim packages use vim-build-system

gnu/packages/aux-files/guix.vim | 10 +-
gnu/packages/vim.scm | 234 +++++--------------------------
guix/build-system/vim.scm | 160 +++++++++++++++++++++
guix/build/copy-build-system.scm | 12 +-
guix/build/vim-build-system.scm | 137 ++++++++++++++++++
5 files changed, 345 insertions(+), 208 deletions(-)
create mode 100644 guix/build-system/vim.scm
create mode 100644 guix/build/vim-build-system.scm


base-commit: 6454208222d6e7760daa964b590f35ea75ffe0e5
--
2.38.1
J
J
Jonathan Scoresby wrote on 13 Dec 2022 09:34
[PATCH 1/4] guix: copy-build-system: allow install plan directives to specify output
(address . 60029@debbugs.gnu.org)(name . Jonathan Scoresby)(address . me@jonscoresby.com)
57f2e77fc975bf00d1222729b0e41aef5c8a00a0.1670891520.git.me@jonscoresby.com
---
guix/build/copy-build-system.scm | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

Toggle diff (25 lines)
diff --git a/guix/build/copy-build-system.scm b/guix/build/copy-build-system.scm
index fb2d1db056..5d2a137268 100644
--- a/guix/build/copy-build-system.scm
+++ b/guix/build/copy-build-system.scm
@@ -133,8 +133,16 @@ (define* (install #:key install-plan outputs #:allow-other-keys)
(string-append target "/")))
file-list))))
- (define* (install source target #:key include exclude include-regexp exclude-regexp)
- (let ((final-target (string-append (assoc-ref outputs "out") "/" target))
+ (define* (install source
+ target
+ #:key include
+ exclude
+ include-regexp
+ exclude-regexp
+ output)
+ (let ((final-target (string-append (assoc-ref outputs
+ (or output "out")) "/"
+ target))
(filters? (or include exclude include-regexp exclude-regexp)))
(when (and (not (file-is-directory? source))
filters?)
--
2.38.1
J
J
Jonathan Scoresby wrote on 13 Dec 2022 09:34
[PATCH 2/4] gnu: vim: add relevant locations to 'package-path' instead of 'runtime-path'
(address . 60029@debbugs.gnu.org)(name . Jonathan Scoresby)(address . me@jonscoresby.com)
cd1a382fd5034e697bca86428cfd2d07dc11b76f.1670891520.git.me@jonscoresby.com
---
gnu/packages/aux-files/guix.vim | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/aux-files/guix.vim b/gnu/packages/aux-files/guix.vim
index 9397c53701..7e7f8d653a 100644
--- a/gnu/packages/aux-files/guix.vim
+++ b/gnu/packages/aux-files/guix.vim
@@ -1,13 +1,7 @@
-" This appends all of the vim plugins to the end of Vim's runtimepath.
+" This apends all applicable vim paths to the end of packagepath
for directory in ["/run/current-system/profile", $HOME . "/.guix-profile", $HOME ."/.guix-home/profile", $GUIX_PROFILE, $GUIX_ENVIRONMENT]
let vimplugins = directory . "/share/vim/vimfiles"
if isdirectory(vimplugins)
- let &rtp = join([&rtp,vimplugins], ',')
+ let &pp = join([&pp,vimplugins], ',')
endif
endfor
-" Unconditionally add */after directories last, as intended by upstream
-" TODO: Remove duplicate */after directories
-for directory in [$VIM . "/vimfiles", $HOME ."/.vim"]
- let vimplugins = directory . "/after"
- let &rtp = join([&rtp,vimplugins], ',')
-endfor
--
2.38.1
J
J
Jonathan Scoresby wrote on 13 Dec 2022 09:34
[PATCH 3/4] guix: add vim-build-system
(address . 60029@debbugs.gnu.org)(name . Jonathan Scoresby)(address . me@jonscoresby.com)
96764b0038f17f7dd67d800a0143cdbbfb727ddb.1670891520.git.me@jonscoresby.com
---
guix/build-system/vim.scm | 160 ++++++++++++++++++++++++++++++++
guix/build/vim-build-system.scm | 137 +++++++++++++++++++++++++++
2 files changed, 297 insertions(+)
create mode 100644 guix/build-system/vim.scm
create mode 100644 guix/build/vim-build-system.scm

Toggle diff (311 lines)
diff --git a/guix/build-system/vim.scm b/guix/build-system/vim.scm
new file mode 100644
index 0000000000..4b74c24e10
--- /dev/null
+++ b/guix/build-system/vim.scm
@@ -0,0 +1,160 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2022 Jonathan Scoresby <me@jonscoresby.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix build-system vim)
+ #:use-module (guix store)
+ #:use-module (guix utils)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
+ #:use-module (guix packages)
+ #:use-module (guix search-paths)
+ #:use-module (guix build-system)
+ #:use-module (guix build-system copy)
+ #:use-module (guix build-system gnu)
+ #:export (%vim-build-system-modules vim-build vim-build-system))
+
+;; Commentary:
+;;
+;; Standard package installer for vim and neovim plugins.
+;; This is implemented as an extension of `copy-build-system'
+;; and takes advantage of vim and neovim's built-in package manager.
+;; It extends the installation procedure from the copy-build-system
+;; to put files in the correct place and then generates help tags.
+;;
+;; Code:
+
+(define %vim-build-system-modules
+ ;; Build-side modules imported by default.
+ `((guix build vim-build-system)
+ ,@%copy-build-system-modules))
+
+(define (default-vim)
+ "Return the default Vim package."
+ ;; Lazily resolve the binding to avoid a circular dependency.
+ (let ((vim (resolve-interface '(gnu packages vim))))
+ (module-ref vim
+ 'vim)))
+
+(define (default-neovim)
+ "Return the default Neovim package."
+ (let ((vim (resolve-interface '(gnu packages vim))))
+ (module-ref vim
+ 'neovim)))
+
+(define* (lower name
+ #:key source
+ inputs
+ native-inputs
+ outputs
+ system
+ target
+ (vim? #f)
+ (neovim? #f)
+ (vim (default-vim))
+ (neovim (default-neovim))
+ #:allow-other-keys #:rest arguments)
+ "Return a bag for NAME."
+ (let* ((private-keywords '(#:target #:vim #:neovim #:inputs #:native-inputs))
+ (vim? (or (= 0
+ (string-contains name "vim")) vim?))
+ (neovim? (or (not (not (or (string-contains name "neovim")
+ (member "neovim" outputs)))) neovim?))
+ (vim-inputs (append (if vim?
+ `(("vim" ,vim))
+ '())
+ (if neovim?
+ `(("neovim" ,neovim))
+ '())))
+ (vim-arguments (append arguments
+ `(#:vim? ,vim?
+ #:neovim? ,neovim?))))
+ (bag (name name)
+ (system system)
+ (host-inputs `(,@(if source
+ `(("source" ,source))
+ '()) ,@inputs
+
+ ;; Keep the standard inputs of 'gnu-build-system'.
+ ,@(standard-packages)))
+ (build-inputs `(,@vim-inputs ,@native-inputs))
+ (outputs outputs)
+ (build vim-build)
+ (arguments (strip-keyword-arguments private-keywords vim-arguments)))))
+
+(define* (vim-build name
+ inputs
+ #:key guile
+ source
+ (vim? #f)
+ (neovim? #f)
+ (mode "start")
+ (install-plan ''())
+ (phases '(@ (guix build vim-build-system) %standard-phases))
+ (outputs '("out"))
+ (search-paths '())
+ (system (%current-system))
+ (imported-modules %vim-build-system-modules)
+ (modules '((guix build vim-build-system)
+ (guix build utils))))
+
+ (define build
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@modules)
+ #$(with-build-variables inputs outputs
+ #~(vim-build #:name #$name
+ #:vim? #$vim?
+ #:neovim? #$neovim?
+ #:mode #$mode
+ #:install-plan #$(if
+ (pair?
+ install-plan)
+ (sexp->gexp
+ install-plan)
+ install-plan)
+ #:source #+source
+ #:system #$system
+ #:phases #$(if (pair?
+ phases)
+ (sexp->gexp
+ phases)
+ phases)
+ #:outputs %outputs
+ #:search-paths '#$(sexp->gexp
+ (map
+ search-path-specification->sexp
+ search-paths))
+ #:inputs
+ %build-inputs)))))
+
+ (mlet %store-monad
+ ((guile (package->derivation (or guile
+ (default-guile)) system
+ #:graft? #f)))
+ (gexp->derivation name
+ build
+ #:system system
+ #:target #f
+ #:guile-for-build guile)))
+
+(define vim-build-system
+ (build-system (name 'vim)
+ (description "The standard Vim build system")
+ (lower lower)))
+
+;;; vim.scm ends here
diff --git a/guix/build/vim-build-system.scm b/guix/build/vim-build-system.scm
new file mode 100644
index 0000000000..38d82c416b
--- /dev/null
+++ b/guix/build/vim-build-system.scm
@@ -0,0 +1,137 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2022 Jonathan Scoresby <me@jonscoresby.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix build vim-build-system)
+ #:use-module ((guix build copy-build-system)
+ #:prefix copy:)
+ #:use-module (guix build utils)
+ #:use-module (ice-9 match)
+ #:use-module (ice-9 ftw)
+ #:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-26)
+ #:export (%standard-phases vim-build))
+
+;; Commentary:
+;;
+;; System for installing vim and neovim plugins. It downloads
+;; the source and copies the appropriate files to vim and nvim
+;; packpaths. It then generates helptags.
+;;
+;; Code:
+
+(define copy:install
+ (assoc-ref copy:%standard-phases
+ 'install))
+
+(define vim-path
+ "/share/vim/vimfiles/pack/guix/")
+(define nvim-path
+ "/share/nvim/site/pack/guix/")
+
+(define* (install #:key name
+ install-plan
+ neovim?
+ vim?
+ mode
+ outputs
+ #:allow-other-keys)
+
+ (let* ((include-regexp '(".*\\/.*\\/.*"))
+ (exclude-regexp '("scripts/.*" "tests?/.*" ".*\\/\\..*"))
+ (vim-install (if vim?
+ `(("." ,(string-append vim-path mode "/" name "/")
+ #:include-regexp ,include-regexp
+ #:exclude-regexp ,exclude-regexp))
+ '()))
+ (neovim-outputs (if vim?
+ `(("." ,(string-append nvim-path mode "/" name
+ "/")
+ #:include-regexp ,include-regexp
+ #:exclude-regexp ,exclude-regexp
+ #:output "neovim"))
+ `(("." ,(string-append nvim-path mode "/" name
+ "/")
+ #:include-regexp ,include-regexp
+ #:exclude-regexp ,exclude-regexp))))
+ (neovim-install (if neovim? neovim-outputs
+ '())))
+ (copy:install #:outputs outputs
+ #:install-plan (append vim-install neovim-install
+ install-plan))))
+
+(define* (generate-helptags #:key name
+ neovim?
+ vim?
+ mode
+ outputs
+ #:allow-other-keys)
+
+ (define (vim-generate output)
+ (invoke "vim" "--clean" "-en" "--cmd"
+ (string-append "helptags "
+ output
+ vim-path
+ mode
+ "/"
+ name
+ "/doc | q")))
+
+ (define (neovim-generate output)
+ (invoke "nvim"
+ "--clean"
+ "--headless"
+ "-en"
+ "--cmd"
+ (string-append "helptags "
+ output
+ nvim-path
+ mode
+ "/"
+ name
+ "/doc | q")))
+
+ (when (scandir "./doc")
+ (let ((out (assoc-ref outputs "out"))
+ (neovim (assoc-ref outputs "neovim")))
+ (if vim?
+ (begin
+ (vim-generate out)
+ (if neovim?
+ (neovim-generate neovim)))
+ (neovim-generate out)))))
+
+(define %standard-phases
+ ;; Everything is as with the Copy Build System except for
+ ;; the addition of the generate-helptags phase and a few
+ ;; custom actions are added to the install phase
+ (modify-phases copy:%standard-phases
+ (replace 'install
+ install)
+ (add-after 'install 'generate-helptags
+ generate-helptags)))
+
+(define* (vim-build #:key inputs
+ (phases %standard-phases)
+ #:allow-other-keys #:rest args)
+ "Build the given package, applying all of PHASES in order."
+ (apply copy:copy-build
+ #:inputs inputs
+ #:phases phases
+ args))
+
+;;; vim-build-system.scm ends here
--
2.38.1
J
J
Jonathan Scoresby wrote on 13 Dec 2022 09:34
[PATCH 4/4] gnu: have vim packages use vim-build-system
(address . 60029@debbugs.gnu.org)(name . Jonathan Scoresby)(address . me@jonscoresby.com)
3af433465802ab9f1bd6000269e8e2d087a71f17.1670891520.git.me@jonscoresby.com
---
gnu/packages/vim.scm | 234 +++++++------------------------------------
1 file changed, 36 insertions(+), 198 deletions(-)

Toggle diff (465 lines)
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index a6250f71de..738883d20b 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -38,6 +38,7 @@ (define-module (gnu packages vim)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system copy)
+ #:use-module (guix build-system vim)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (gnu packages)
@@ -288,12 +289,7 @@ (define-public vim-neocomplete
(sha256
(base32
"1h6sci5mhdfg6sjsjpi8l5li02hg858zcayiwl60y9j2gqnd18lv"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(synopsis "Next generation completion framework for Vim")
(description
"@code{neocomplete}, an abbreviation of 'neo-completion with cache',
@@ -321,10 +317,7 @@ (define-public vim-neosnippet-snippets
(sha256
(base32
"151wpvbj6jb9jdkbhj3b77f5sq7y328spvwfbqyj1y32rg4ifmc6"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("neosnippets" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(synopsis "Snippets for neosnippet")
(description
"@code{neosnippet-snippets} provides standard snippets for the Vim plugin
@@ -350,17 +343,7 @@ (define-public vim-neosnippet
(sha256
(base32
"0k80syscmpnj38ks1fq02ds59g0r4jlg9ll7z4qc048mgi35alw5"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("ftdetect" "share/vim/vimfiles/")
- ("ftplugin" "share/vim/vimfiles/")
- ("indent" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/")
- ("rplugin" "share/vim/vimfiles/")
- ("syntax" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(synopsis "Snippet support for Vim")
(description
"@code{neosnippet}, is a plugin for Vim which adds snippet support to Vim.
@@ -389,12 +372,7 @@ (define-public vim-scheme
(sha256
(base32
"04h946vr4f8wxap3wzqs69y2v8n50g2zbk22jsg2kxr4c01z5cbw"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("ftplugin" "share/vim/vimfiles/")
- ("indent" "share/vim/vimfiles/")
- ("syntax" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(synopsis "Scheme syntax for Vim")
(description
"@code{vim-scheme} provides Scheme support for Vim (R7RS and CHICKEN).")
@@ -417,10 +395,7 @@ (define-public vim-luna
(sha256
(base32
"0ka3qbhsh8lix1vyj4678j7dnchkd8khhirrnn3aylxxf8fpqyg8"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("colors" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(synopsis "Dark color theme for Vim")
(description
"@code{vim-luna} is a dark color theme for Vim.")
@@ -444,11 +419,7 @@ (define-public vim-context-filetype
(sha256
(base32
"0alvrfhmd91zkd9h83s8wvgyq4iakcf6rybsyjd369qbgpcqky89"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("doc" "share/vim/vimfiles/")
- ("autoload" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(synopsis "Context filetype library for Vim")
(description
"@code{vim-context-filetype} is context filetype library for Vim script.")
@@ -468,15 +439,7 @@ (define-public vim-fugitive
(file-name (git-file-name name version))
(sha256
(base32 "138290g2aph1jjhaza6biky5qi4ka6435s01bwxivllgb53g3irc"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("ftdetect" "share/vim/vimfiles/")
- ("ftplugin" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/")
- ("syntax" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://github.com/tpope/vim-fugitive")
(synopsis "Vim plugin to work with Git")
(description "Vim-fugitive is a wrapper for Vim that complements the
@@ -498,12 +461,7 @@ (define-public vim-airline
(sha256
(base32
"1aksmr73648pvyc75pfdz28k2d4ky52rn7xiwcv7lz87q3vqld7k"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(synopsis "Statusline for Vim")
(description
"@code{vim-airline} is an extensible statusline for Vim.
@@ -529,12 +487,7 @@ (define-public vim-airline-themes
(sha256
(base32
"1sb7nb7j7bz0pv1c9bgdy0smhr0jk2b1vbdv9yzghg5lrknpsbr6"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(synopsis "Collection of themes for Vim-airline")
(description
"@code{vim-airline-themes} is a collection of themes for @code{vim-airline}.")
@@ -554,13 +507,8 @@ (define-public vim-syntastic
(file-name (git-file-name name version))
(sha256
(base32 "0j91f72jaz1s6aw1hpjiz30vk2ds2aqd9gisk91grsldy6nz6hhz"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/")
- ("syntax_checkers" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
+ (outputs (list "out" "neovim"))
(synopsis "Syntax checking plugin for Vim")
(description
"Vim-syntastic is a syntax checking plugin for Vim. It runs files through
@@ -587,9 +535,8 @@ (define-public vim-solarized
(base32 "0001mz5v3a8zvi3gzmxhi3yrsb6hs7qf6i497arsngnvj2cwn61d"))))
(build-system copy-build-system)
(arguments
- '(#:install-plan
- '(("vim-colors-solarized/colors" "share/vim/vimfiles/")
- ("vim-colors-solarized/doc" "share/vim/vimfiles/"))))
+ '(#:install-plan '(("vim-colors-solarized"
+ "share/vim/vimfiles/pack/guix/start/"))))
(home-page "https://github.com/altercation/vim-colors-solarized")
(synopsis "Solarized color scheme for Vim")
(description
@@ -621,12 +568,8 @@ (define-public editorconfig-vim
(sha256
(base32
"0mp80bi2m56bb93szw87vy6q5s85yk9g91sl4pr51316rgdv5kkv"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
+ (arguments (list #:vim? #t))
(home-page "https://editorconfig.org/")
(synopsis "EditorConfig plugin for Vim")
(description "EditorConfig makes it easy to maintain the correct coding
@@ -651,11 +594,7 @@ (define-public neovim-packer
(sha256
(base32
"1xn08z3a21mgfvp5i1nv57jnldwxwnl5nkryiff3zc99b1mizigp"))))
- (build-system copy-build-system)
- (arguments
- (list #:install-plan
- #~'(("lua" "share/nvim/site/pack/guix/start/packer.nvim/")
- ("doc" "share/nvim/site/pack/guix/start/packer.nvim/"))))
+ (build-system vim-build-system)
(home-page "https://github.com/wbthomason/packer.nvim")
(synopsis "Plugin manager for Neovim")
(description
@@ -664,23 +603,6 @@ (define-public neovim-packer
is based on Vim's builtin plugin support.")
(license license:expat))))
-(define-public neovim-syntastic
- (package
- (inherit vim-syntastic)
- (name "neovim-syntastic")
- (arguments
- '(#:install-plan
- '(("autoload" "share/nvim/site/")
- ("doc" "share/nvim/site/")
- ("plugin" "share/nvim/site/")
- ("syntax_checkers" "share/nvim/site/"))))
- (synopsis "Syntax checking plugin for Neovim")
- (description
- "Vim-syntastic is a syntax checking plugin for Neovim. It runs files through
-external syntax checkers and displays any resulting errors to the user. This
-can be done on demand, or automatically as files are saved. If syntax errors
-are detected, the user is notified.")))
-
(define-public neovim
(package
(name "neovim")
@@ -854,7 +776,8 @@ (define-public vifm
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(vifm (string-append out "/share/vifm"))
- (vimfiles (string-append out "/share/vim/vimfiles")))
+ (vimfiles (string-append out
+ "/share/vim/vimfiles/pack/guix/start/vifm")))
(copy-recursively (string-append vifm "/colors")
(string-append vimfiles "/colors"))
(copy-recursively (string-append vifm "/vim")
@@ -932,17 +855,7 @@ (define-public vim-guix-vim
(sha256
(base32
"080ni4z23qdr8rkrswjqfqfrrcnpn7qdgrg14glwji46wzvwxqyx"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("compiler" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("indent" "share/vim/vimfiles/")
- ("ftdetect" "share/vim/vimfiles/")
- ("ftplugin" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/")
- ("syntax" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://gitlab.com/Efraim/guix.vim")
(synopsis "Guix integration in Vim")
(description "This package provides support for GNU Guix in Vim.")
@@ -961,11 +874,7 @@ (define-public vim-asyncrun
(sha256
(base32
"11zcw0sll6qg6ha0rr6n1cw5v73azvf7ycwn9lgiwa5cj7rrqjf4"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("plugin" "share/vim/vimfiles/")
- ("doc/" "share/vim/vimfiles/doc" #:include ("asyncrun.txt")))))
+ (build-system vim-build-system)
(home-page "https://github.com/skywind3000/asyncrun.vim")
(synopsis "Run Async Shell Commands in Vim")
(description "This plugin takes the advantage of new APIs in Vim 8 (and
@@ -987,12 +896,7 @@ (define-public vim-dispatch
(sha256
(base32
"1m8b5mn2zqlphzs6xfwykwmghf6p0wabrhpjmh7vav35jgcxc4wl"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://github.com/tpope/vim-dispatch")
(synopsis "Asynchronous build and test dispatcher")
(description "Leverage the power of Vim's compiler plugins without being
@@ -1017,11 +921,7 @@ (define-public vim-gemini-vim
(file-name (git-file-name name version))
(sha256
(base32 "05ffhhfahjqwxyrqmsinsahrs15wknzl2qbj8mznyv319mn2civ2"))))
- (build-system copy-build-system)
- (arguments
- `(#:install-plan
- '(("ftdetect" "share/vim/vimfiles/")
- ("syntax" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://git.sr.ht/~torresjrjr/gemini.vim")
(synopsis "Vim syntax highlighting plugin for Gemini")
(description "This Vim plugin provides a Vim syntax highlighting plugin
@@ -1045,11 +945,7 @@ (define-public vim-eunuch
(sha256
(base32
"1xadb22kd40swmww0qxmmkcpcq6viy8l167pjck5q32hfngll5d3"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://github.com/tpope/vim-eunuch")
(synopsis "Vim sugar for the UNIX shell commands")
(description "Vim sugar for the UNIX shell commands that need it the most.
@@ -1073,13 +969,7 @@ (define-public vim-slime
(file-name (git-file-name name version))
(sha256
(base32 "0k4b629jn6xlxyjxdl3cgm06v9dmx967rqnslv5m82c9kscwpyh4"))))
- (build-system copy-build-system)
- (arguments
- `(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("ftplugin" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://technotales.wordpress.com/2007/10/03/like-slime-for-vim/")
(synopsis "Vim plugin to give you some slime")
(description "SLIME is an Emacs plugin to turn Emacs into a Lisp IDE. You
@@ -1105,11 +995,7 @@ (define-public vim-paredit
(file-name (git-file-name name version))
(sha256
(base32 "07d5s20r0ssd7rir45vy0fqlci44gha1a81rcilgar227f3nw328"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://github.com/kovisoft/paredit")
(synopsis "Vim plugin for structured editing of Lisp S-expressions")
(description
@@ -1131,11 +1017,7 @@ (define-public vim-surround
(file-name (git-file-name name version))
(sha256
(base32 "1b0bd5m5lv1p4d299mrwjfs2gk0zqwyaqdaid9hs9yqlxnr8s5nf"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://github.com/tpope/vim-surround")
(synopsis "Vim plugin for easy quoting and parenthesizing")
(description
@@ -1156,12 +1038,7 @@ (define-public vim-gnupg
"/vim-gnupg-v" version ".tar.gz"))
(sha256
(base32 "02w8lgyyh7wgxysvmmcf9ja5c06vrbyh3alzvv97x8cfhrp0skn7"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://www.vim.org/scripts/script.php?script_id=3645")
(synopsis "Vim plugin for transparent editing of gpg encrypted files")
(description
@@ -1187,12 +1064,7 @@ (define-public vim-ctrlp
(file-name (git-file-name name version))
(sha256
(base32 "0n68hg59h4rjn0ziqbsh5pr03l3kr98zk54659ny6vq107af1w96"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://ctrlpvim.github.io/ctrlp.vim/")
(synopsis "Fuzzy file, buffer, mru, tag, etc. finder for Vim")
(description
@@ -1224,12 +1096,7 @@ (define-public vim-mucomplete
(file-name (git-file-name name version))
(sha256
(base32 "054g80n09mmxxlh8xaic29bn8bgn3clvv732rymljdyvbj1mlhwd"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://github.com/lifepillar/vim-mucomplete")
(synopsis "MUcomplete is a minimalist autocompletion plugin for Vim")
(description
@@ -1253,12 +1120,7 @@ (define-public vim-gitgutter
(file-name (git-file-name name version))
(sha256
(base32 "0zpa7cs59a8sq0k3frlf9flpf30jcn239yrpmv40r7nqvxzglbpl"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(synopsis "Vim plugin which shows a git diff in the sign column")
(description
"A Vim plugin which shows a git diff in the sign column. It shows which
@@ -1282,12 +1144,7 @@ (define-public vim-characterize
(file-name (git-file-name name version))
(sha256
(base32 "0ppsbsd696ih40d9f76mdl9sd9y7p2pvm65qmvq4b2zhkv4xbpxz"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://github.com/tpope/vim-characterize")
(synopsis "Vim plugin for showing Unicode character metadata")
(description
@@ -1316,14 +1173,9 @@ (define-public vim-tagbar
(file-name (git-file-name name version))
(sha256
(base32 "1fqfs8msmr6d4kpvxqp14sdjvp5fj52q5w5kz71myzcd4kqzmirp"))))
- (build-system copy-build-system)
+ (build-system vim-build-system)
(arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/")
- ("syntax" "share/vim/vimfiles/"))
- #:phases
+ '(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'link-universal-ctags
(lambda* (#:key inputs #:allow-other-keys)
@@ -1357,15 +1209,7 @@ (define-public vim-nerdtree
(file-name (git-file-name name version))
(sha256
(base32 "1si8qla86ng8cffbmfrk9gss0i3912yw0f1ph4bsiq0kk837lccp"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("lib" "share/vim/vimfiles/")
- ("nerdtree_plugin" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/")
- ("syntax" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://github.com/preservim/nerdtree")
(synopsis "Tree explorer plugin for Vim")
(description
@@ -1387,13 +1231,7 @@ (define-public vim-nerdcommenter
(file-name (git-file-name name version))
(sha256
(base32 "1ka2rqn7rby55aps3iblh1dcqxm7m7qx72mpkz6y2aaj8mkj0zyd"))))
- (build-system copy-build-system)
- (arguments
- (list
- #:install-plan
- #~`(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://github.com/preservim/nerdcommenter")
(synopsis "Vim plugin for easy commenting of code")
(description
--
2.38.1
(
Re: [bug#60029] [PATCH 1/4] guix: copy-build-system: allow install plan directives to specify output
CP0XAJZEYZA8.3DE809TS202MM@guix-framework
Heya,

Wow, this is really nice work! :D

The first patch LGTM.

-- (
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEE6Vh10NblKE5doNlW7ImHg/nqI20FAmOYzPsACgkQ7ImHg/nq
I202lAv+IlqbF8XItGLJ/HcY2FvLJhbtqVFDxZv/BBJt5ODisLu3itQe3bkmRF1C
QcuLycIDBe79Z58Gn/zwMh4QFs3RCHG/YotIVRJ47uPR0sIbdRPTPkFBDyFSpV6w
HWu4EucKaExOb5t3szrfRQ5xUaYfIaA27r2zadI6TiPxlHhOQg22aeIEcuEvQr+Y
IBkEJj58EvDcqZuqadsRbDbTJ2dt1mx1Bv4Az6arJg3dhfx5i6muBju/aYzmkE5m
j2FCbjDYaM92xnVuPAiJimdl7Zx6ePlzt2iHSzOrSixvTLDQ8qJflRei56QUI14Q
5MplPykByKK6pMd8hUYzcgFOarI192qvWIugMkquGXMuWVJJSxMDtZy4hhvMOHrG
QpU8/c9b7eEZtgjBkuU5aU3y1KbaRooXQwbTQIbFzbBJvDJOZDiGkC5jjkRklwcd
jAwXfWOmkmZEeXCap94fzxgZgPUQBtEkdBykrgZ7qkR0/0MuJmlDAyBRw7MDCfD2
TghhNnOa
=lvyT
-----END PGP SIGNATURE-----


(
Re: [bug#60029] [PATCH 2/4] gnu: vim: add relevant locations to 'package-path' instead of 'runtime-path'
CP0XBL2HAQBV.1AC3PSYE5FZR1@guix-framework
Could you please add a note to the second commit explaining why exactly
it's needed?

-- (
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEE6Vh10NblKE5doNlW7ImHg/nqI20FAmOYzUwACgkQ7ImHg/nq
I21v+gwAtOD5CI8tZVNMRPrZDM9+kgMzydYWpumeMOYtvlwmjyxtao1yBFMhMyeX
nfugIi7s5yELdEqSj3UunLM6SS+Xw+QGJVlX3a+2MleDTZ21n560oDl0u6K8MukL
jQ/seTzkPgeelKK3nhGlaJGfSgDf6tRiwnZJwlKCnWGS65SFppsAe2VS8y8Ydmup
iirvXj+e38477wWZ9iF2zswyV+NAyifItXE60vLXTzkkeK37Bc/b3HBViqy2ZMbz
gXei4mQEnErM0ZHRLXhmcEzcyEw8k6Id/BKs74v3rTsiZ8rpjZ2tlzPE10esGPEd
jRhhzE24BWBt1Te/NO+Hs+GtmpvULg7dEhFaZGq5wU1HCsY4S2gdcaAhHSPFToX1
lSS9ij5WORgOL66hbkhPDnSQM3lg2mF7fUctlyApTats1rsCDrVkjr0qcSZqwxLV
WTmQmzkchS5o+p2HnMnmj3FpcQDKRK4q6D0Zq8zc7B4VeS/eWBBUwc76Vv2kVBFt
gdXKWAfv
=7ysg
-----END PGP SIGNATURE-----


J
J
Jonathan Scoresby wrote on 13 Dec 2022 23:10
1132100161.39616.1670969401671@office.mailbox.org
Toggle quote (4 lines)
> On 12/13/2022 12:06 MST ( <paren@disroot.org> wrote:
>
> > Wow, this is really nice work! :D

Thanks!

Toggle quote (3 lines)
> Could you please add a note to the second commit explaining why exactly
> it's needed?

Sorry, do you mean to the commit message or to the file itself?

Thank you for the review.
(
CP1CF8FDW6LZ.KHQDBP78ZQK8@guix-framework
On Tue Dec 13, 2022 at 10:10 PM GMT, Jonathan Scoresby wrote:
Toggle quote (2 lines)
> Sorry, do you mean to the commit message or to the file itself?

To the commit message, please.

-- (
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEE6Vh10NblKE5doNlW7ImHg/nqI20FAmOZc7YACgkQ7ImHg/nq
I23YdQwAwLTu6JrymGmbC/O+Qu95MCC+0KFG0tivkLrgJUy4Hqt5v/yloFkHiv/n
VtuUFa3snqK62ORd2INlio2OCBU14SvW0MiHIOmXLQsEw4DeIF364kEFhSGDMDWp
KYlRs9sYv15Hc7WO9FZRRujtpe6knr0TWjdQg+ZYAf3g7NwUfl7MURTIXU22dOpw
Op4zcZyh3mqgCjbmMJbQNIMrsPb4TThbl7htFgMrC7u6emcpNxMM1e4w6u9zw+xn
XzUmW4EazNA4pEwsSwuaiKIAevO7PlyQmdMCfhXZ9r53Bvsh5b8JDEMNAdOVr7CN
7OBOQWHJCveKFfziS8CQQQuGOR7g8Efg+6xfSibViSdCXdu4czoddir/GDxBb/KR
JADzKpzL5mmeXXQj4zGxJQK5AscXbECihDyxlqpKu7gdPUM0Lm/zUadXxTOtPiGX
BfRd/LRvIKUnaB7DiugOo4WZ6FoicfFuEsLns3RlBXRbxBAFOryOayUmtqBD/WI0
PdX4cN1N
=hhbB
-----END PGP SIGNATURE-----


J
J
Jonathan Scoresby wrote on 14 Dec 2022 22:01
[PATCH v2 1/4] guix: copy-build-system: allow install plan directives to specify output
(address . 60029@debbugs.gnu.org)(name . Jonathan Scoresby)(address . me@jonscoresby.com)
57f2e77fc975bf00d1222729b0e41aef5c8a00a0.1671051720.git.me@jonscoresby.com
---
guix/build/copy-build-system.scm | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

Toggle diff (27 lines)
diff --git a/guix/build/copy-build-system.scm b/guix/build/copy-build-system.scm
index fb2d1db056..5d2a137268 100644
--- a/guix/build/copy-build-system.scm
+++ b/guix/build/copy-build-system.scm
@@ -133,8 +133,16 @@ (define* (install #:key install-plan outputs #:allow-other-keys)
(string-append target "/")))
file-list))))
- (define* (install source target #:key include exclude include-regexp exclude-regexp)
- (let ((final-target (string-append (assoc-ref outputs "out") "/" target))
+ (define* (install source
+ target
+ #:key include
+ exclude
+ include-regexp
+ exclude-regexp
+ output)
+ (let ((final-target (string-append (assoc-ref outputs
+ (or output "out")) "/"
+ target))
(filters? (or include exclude include-regexp exclude-regexp)))
(when (and (not (file-is-directory? source))
filters?)

base-commit: 6454208222d6e7760daa964b590f35ea75ffe0e5
--
2.38.1
J
J
Jonathan Scoresby wrote on 14 Dec 2022 22:02
[PATCH v2 2/4] gnu: vim: add relevant locations to 'package-path' instead of 'runtime-path'
(address . 60029@debbugs.gnu.org)(name . Jonathan Scoresby)(address . me@jonscoresby.com)
a1d2173624ead857582eb569723a54650f9ab84b.1671051720.git.me@jonscoresby.com
This is neccesary because vim's built-in plugin manager looks for directories
under 'package-path' instead of 'runtime-path.' Once we have told vim the
package-path, it adds all the packages to the runtime-path automatically for us.
---
gnu/packages/aux-files/guix.vim | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/aux-files/guix.vim b/gnu/packages/aux-files/guix.vim
index 9397c53701..7e7f8d653a 100644
--- a/gnu/packages/aux-files/guix.vim
+++ b/gnu/packages/aux-files/guix.vim
@@ -1,13 +1,7 @@
-" This appends all of the vim plugins to the end of Vim's runtimepath.
+" This apends all applicable vim paths to the end of packagepath
for directory in ["/run/current-system/profile", $HOME . "/.guix-profile", $HOME ."/.guix-home/profile", $GUIX_PROFILE, $GUIX_ENVIRONMENT]
let vimplugins = directory . "/share/vim/vimfiles"
if isdirectory(vimplugins)
- let &rtp = join([&rtp,vimplugins], ',')
+ let &pp = join([&pp,vimplugins], ',')
endif
endfor
-" Unconditionally add */after directories last, as intended by upstream
-" TODO: Remove duplicate */after directories
-for directory in [$VIM . "/vimfiles", $HOME ."/.vim"]
- let vimplugins = directory . "/after"
- let &rtp = join([&rtp,vimplugins], ',')
-endfor
--
2.38.1
J
J
Jonathan Scoresby wrote on 14 Dec 2022 22:02
[PATCH v2 3/4] guix: add vim-build-system
(address . 60029@debbugs.gnu.org)(name . Jonathan Scoresby)(address . me@jonscoresby.com)
651da6730a8b03b7f5dae5fd37f61ffd65ad498a.1671051720.git.me@jonscoresby.com
---
guix/build-system/vim.scm | 160 ++++++++++++++++++++++++++++++++
guix/build/vim-build-system.scm | 137 +++++++++++++++++++++++++++
2 files changed, 297 insertions(+)
create mode 100644 guix/build-system/vim.scm
create mode 100644 guix/build/vim-build-system.scm

Toggle diff (311 lines)
diff --git a/guix/build-system/vim.scm b/guix/build-system/vim.scm
new file mode 100644
index 0000000000..4b74c24e10
--- /dev/null
+++ b/guix/build-system/vim.scm
@@ -0,0 +1,160 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2022 Jonathan Scoresby <me@jonscoresby.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix build-system vim)
+ #:use-module (guix store)
+ #:use-module (guix utils)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
+ #:use-module (guix packages)
+ #:use-module (guix search-paths)
+ #:use-module (guix build-system)
+ #:use-module (guix build-system copy)
+ #:use-module (guix build-system gnu)
+ #:export (%vim-build-system-modules vim-build vim-build-system))
+
+;; Commentary:
+;;
+;; Standard package installer for vim and neovim plugins.
+;; This is implemented as an extension of `copy-build-system'
+;; and takes advantage of vim and neovim's built-in package manager.
+;; It extends the installation procedure from the copy-build-system
+;; to put files in the correct place and then generates help tags.
+;;
+;; Code:
+
+(define %vim-build-system-modules
+ ;; Build-side modules imported by default.
+ `((guix build vim-build-system)
+ ,@%copy-build-system-modules))
+
+(define (default-vim)
+ "Return the default Vim package."
+ ;; Lazily resolve the binding to avoid a circular dependency.
+ (let ((vim (resolve-interface '(gnu packages vim))))
+ (module-ref vim
+ 'vim)))
+
+(define (default-neovim)
+ "Return the default Neovim package."
+ (let ((vim (resolve-interface '(gnu packages vim))))
+ (module-ref vim
+ 'neovim)))
+
+(define* (lower name
+ #:key source
+ inputs
+ native-inputs
+ outputs
+ system
+ target
+ (vim? #f)
+ (neovim? #f)
+ (vim (default-vim))
+ (neovim (default-neovim))
+ #:allow-other-keys #:rest arguments)
+ "Return a bag for NAME."
+ (let* ((private-keywords '(#:target #:vim #:neovim #:inputs #:native-inputs))
+ (vim? (or (= 0
+ (string-contains name "vim")) vim?))
+ (neovim? (or (not (not (or (string-contains name "neovim")
+ (member "neovim" outputs)))) neovim?))
+ (vim-inputs (append (if vim?
+ `(("vim" ,vim))
+ '())
+ (if neovim?
+ `(("neovim" ,neovim))
+ '())))
+ (vim-arguments (append arguments
+ `(#:vim? ,vim?
+ #:neovim? ,neovim?))))
+ (bag (name name)
+ (system system)
+ (host-inputs `(,@(if source
+ `(("source" ,source))
+ '()) ,@inputs
+
+ ;; Keep the standard inputs of 'gnu-build-system'.
+ ,@(standard-packages)))
+ (build-inputs `(,@vim-inputs ,@native-inputs))
+ (outputs outputs)
+ (build vim-build)
+ (arguments (strip-keyword-arguments private-keywords vim-arguments)))))
+
+(define* (vim-build name
+ inputs
+ #:key guile
+ source
+ (vim? #f)
+ (neovim? #f)
+ (mode "start")
+ (install-plan ''())
+ (phases '(@ (guix build vim-build-system) %standard-phases))
+ (outputs '("out"))
+ (search-paths '())
+ (system (%current-system))
+ (imported-modules %vim-build-system-modules)
+ (modules '((guix build vim-build-system)
+ (guix build utils))))
+
+ (define build
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@modules)
+ #$(with-build-variables inputs outputs
+ #~(vim-build #:name #$name
+ #:vim? #$vim?
+ #:neovim? #$neovim?
+ #:mode #$mode
+ #:install-plan #$(if
+ (pair?
+ install-plan)
+ (sexp->gexp
+ install-plan)
+ install-plan)
+ #:source #+source
+ #:system #$system
+ #:phases #$(if (pair?
+ phases)
+ (sexp->gexp
+ phases)
+ phases)
+ #:outputs %outputs
+ #:search-paths '#$(sexp->gexp
+ (map
+ search-path-specification->sexp
+ search-paths))
+ #:inputs
+ %build-inputs)))))
+
+ (mlet %store-monad
+ ((guile (package->derivation (or guile
+ (default-guile)) system
+ #:graft? #f)))
+ (gexp->derivation name
+ build
+ #:system system
+ #:target #f
+ #:guile-for-build guile)))
+
+(define vim-build-system
+ (build-system (name 'vim)
+ (description "The standard Vim build system")
+ (lower lower)))
+
+;;; vim.scm ends here
diff --git a/guix/build/vim-build-system.scm b/guix/build/vim-build-system.scm
new file mode 100644
index 0000000000..38d82c416b
--- /dev/null
+++ b/guix/build/vim-build-system.scm
@@ -0,0 +1,137 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2022 Jonathan Scoresby <me@jonscoresby.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix build vim-build-system)
+ #:use-module ((guix build copy-build-system)
+ #:prefix copy:)
+ #:use-module (guix build utils)
+ #:use-module (ice-9 match)
+ #:use-module (ice-9 ftw)
+ #:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-26)
+ #:export (%standard-phases vim-build))
+
+;; Commentary:
+;;
+;; System for installing vim and neovim plugins. It downloads
+;; the source and copies the appropriate files to vim and nvim
+;; packpaths. It then generates helptags.
+;;
+;; Code:
+
+(define copy:install
+ (assoc-ref copy:%standard-phases
+ 'install))
+
+(define vim-path
+ "/share/vim/vimfiles/pack/guix/")
+(define nvim-path
+ "/share/nvim/site/pack/guix/")
+
+(define* (install #:key name
+ install-plan
+ neovim?
+ vim?
+ mode
+ outputs
+ #:allow-other-keys)
+
+ (let* ((include-regexp '(".*\\/.*\\/.*"))
+ (exclude-regexp '("scripts/.*" "tests?/.*" ".*\\/\\..*"))
+ (vim-install (if vim?
+ `(("." ,(string-append vim-path mode "/" name "/")
+ #:include-regexp ,include-regexp
+ #:exclude-regexp ,exclude-regexp))
+ '()))
+ (neovim-outputs (if vim?
+ `(("." ,(string-append nvim-path mode "/" name
+ "/")
+ #:include-regexp ,include-regexp
+ #:exclude-regexp ,exclude-regexp
+ #:output "neovim"))
+ `(("." ,(string-append nvim-path mode "/" name
+ "/")
+ #:include-regexp ,include-regexp
+ #:exclude-regexp ,exclude-regexp))))
+ (neovim-install (if neovim? neovim-outputs
+ '())))
+ (copy:install #:outputs outputs
+ #:install-plan (append vim-install neovim-install
+ install-plan))))
+
+(define* (generate-helptags #:key name
+ neovim?
+ vim?
+ mode
+ outputs
+ #:allow-other-keys)
+
+ (define (vim-generate output)
+ (invoke "vim" "--clean" "-en" "--cmd"
+ (string-append "helptags "
+ output
+ vim-path
+ mode
+ "/"
+ name
+ "/doc | q")))
+
+ (define (neovim-generate output)
+ (invoke "nvim"
+ "--clean"
+ "--headless"
+ "-en"
+ "--cmd"
+ (string-append "helptags "
+ output
+ nvim-path
+ mode
+ "/"
+ name
+ "/doc | q")))
+
+ (when (scandir "./doc")
+ (let ((out (assoc-ref outputs "out"))
+ (neovim (assoc-ref outputs "neovim")))
+ (if vim?
+ (begin
+ (vim-generate out)
+ (if neovim?
+ (neovim-generate neovim)))
+ (neovim-generate out)))))
+
+(define %standard-phases
+ ;; Everything is as with the Copy Build System except for
+ ;; the addition of the generate-helptags phase and a few
+ ;; custom actions are added to the install phase
+ (modify-phases copy:%standard-phases
+ (replace 'install
+ install)
+ (add-after 'install 'generate-helptags
+ generate-helptags)))
+
+(define* (vim-build #:key inputs
+ (phases %standard-phases)
+ #:allow-other-keys #:rest args)
+ "Build the given package, applying all of PHASES in order."
+ (apply copy:copy-build
+ #:inputs inputs
+ #:phases phases
+ args))
+
+;;; vim-build-system.scm ends here
--
2.38.1
J
J
Jonathan Scoresby wrote on 14 Dec 2022 22:02
[PATCH v2 4/4] gnu: have vim packages use vim-build-system
(address . 60029@debbugs.gnu.org)(name . Jonathan Scoresby)(address . me@jonscoresby.com)
4f93fdb63447957e3b3b5c9cc07d7f4dc0acecd2.1671051720.git.me@jonscoresby.com
---
gnu/packages/vim.scm | 234 +++++++------------------------------------
1 file changed, 36 insertions(+), 198 deletions(-)

Toggle diff (465 lines)
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index a6250f71de..738883d20b 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -38,6 +38,7 @@ (define-module (gnu packages vim)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system copy)
+ #:use-module (guix build-system vim)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (gnu packages)
@@ -288,12 +289,7 @@ (define-public vim-neocomplete
(sha256
(base32
"1h6sci5mhdfg6sjsjpi8l5li02hg858zcayiwl60y9j2gqnd18lv"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(synopsis "Next generation completion framework for Vim")
(description
"@code{neocomplete}, an abbreviation of 'neo-completion with cache',
@@ -321,10 +317,7 @@ (define-public vim-neosnippet-snippets
(sha256
(base32
"151wpvbj6jb9jdkbhj3b77f5sq7y328spvwfbqyj1y32rg4ifmc6"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("neosnippets" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(synopsis "Snippets for neosnippet")
(description
"@code{neosnippet-snippets} provides standard snippets for the Vim plugin
@@ -350,17 +343,7 @@ (define-public vim-neosnippet
(sha256
(base32
"0k80syscmpnj38ks1fq02ds59g0r4jlg9ll7z4qc048mgi35alw5"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("ftdetect" "share/vim/vimfiles/")
- ("ftplugin" "share/vim/vimfiles/")
- ("indent" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/")
- ("rplugin" "share/vim/vimfiles/")
- ("syntax" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(synopsis "Snippet support for Vim")
(description
"@code{neosnippet}, is a plugin for Vim which adds snippet support to Vim.
@@ -389,12 +372,7 @@ (define-public vim-scheme
(sha256
(base32
"04h946vr4f8wxap3wzqs69y2v8n50g2zbk22jsg2kxr4c01z5cbw"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("ftplugin" "share/vim/vimfiles/")
- ("indent" "share/vim/vimfiles/")
- ("syntax" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(synopsis "Scheme syntax for Vim")
(description
"@code{vim-scheme} provides Scheme support for Vim (R7RS and CHICKEN).")
@@ -417,10 +395,7 @@ (define-public vim-luna
(sha256
(base32
"0ka3qbhsh8lix1vyj4678j7dnchkd8khhirrnn3aylxxf8fpqyg8"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("colors" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(synopsis "Dark color theme for Vim")
(description
"@code{vim-luna} is a dark color theme for Vim.")
@@ -444,11 +419,7 @@ (define-public vim-context-filetype
(sha256
(base32
"0alvrfhmd91zkd9h83s8wvgyq4iakcf6rybsyjd369qbgpcqky89"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("doc" "share/vim/vimfiles/")
- ("autoload" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(synopsis "Context filetype library for Vim")
(description
"@code{vim-context-filetype} is context filetype library for Vim script.")
@@ -468,15 +439,7 @@ (define-public vim-fugitive
(file-name (git-file-name name version))
(sha256
(base32 "138290g2aph1jjhaza6biky5qi4ka6435s01bwxivllgb53g3irc"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("ftdetect" "share/vim/vimfiles/")
- ("ftplugin" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/")
- ("syntax" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://github.com/tpope/vim-fugitive")
(synopsis "Vim plugin to work with Git")
(description "Vim-fugitive is a wrapper for Vim that complements the
@@ -498,12 +461,7 @@ (define-public vim-airline
(sha256
(base32
"1aksmr73648pvyc75pfdz28k2d4ky52rn7xiwcv7lz87q3vqld7k"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(synopsis "Statusline for Vim")
(description
"@code{vim-airline} is an extensible statusline for Vim.
@@ -529,12 +487,7 @@ (define-public vim-airline-themes
(sha256
(base32
"1sb7nb7j7bz0pv1c9bgdy0smhr0jk2b1vbdv9yzghg5lrknpsbr6"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(synopsis "Collection of themes for Vim-airline")
(description
"@code{vim-airline-themes} is a collection of themes for @code{vim-airline}.")
@@ -554,13 +507,8 @@ (define-public vim-syntastic
(file-name (git-file-name name version))
(sha256
(base32 "0j91f72jaz1s6aw1hpjiz30vk2ds2aqd9gisk91grsldy6nz6hhz"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/")
- ("syntax_checkers" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
+ (outputs (list "out" "neovim"))
(synopsis "Syntax checking plugin for Vim")
(description
"Vim-syntastic is a syntax checking plugin for Vim. It runs files through
@@ -587,9 +535,8 @@ (define-public vim-solarized
(base32 "0001mz5v3a8zvi3gzmxhi3yrsb6hs7qf6i497arsngnvj2cwn61d"))))
(build-system copy-build-system)
(arguments
- '(#:install-plan
- '(("vim-colors-solarized/colors" "share/vim/vimfiles/")
- ("vim-colors-solarized/doc" "share/vim/vimfiles/"))))
+ '(#:install-plan '(("vim-colors-solarized"
+ "share/vim/vimfiles/pack/guix/start/"))))
(home-page "https://github.com/altercation/vim-colors-solarized")
(synopsis "Solarized color scheme for Vim")
(description
@@ -621,12 +568,8 @@ (define-public editorconfig-vim
(sha256
(base32
"0mp80bi2m56bb93szw87vy6q5s85yk9g91sl4pr51316rgdv5kkv"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
+ (arguments (list #:vim? #t))
(home-page "https://editorconfig.org/")
(synopsis "EditorConfig plugin for Vim")
(description "EditorConfig makes it easy to maintain the correct coding
@@ -651,11 +594,7 @@ (define-public neovim-packer
(sha256
(base32
"1xn08z3a21mgfvp5i1nv57jnldwxwnl5nkryiff3zc99b1mizigp"))))
- (build-system copy-build-system)
- (arguments
- (list #:install-plan
- #~'(("lua" "share/nvim/site/pack/guix/start/packer.nvim/")
- ("doc" "share/nvim/site/pack/guix/start/packer.nvim/"))))
+ (build-system vim-build-system)
(home-page "https://github.com/wbthomason/packer.nvim")
(synopsis "Plugin manager for Neovim")
(description
@@ -664,23 +603,6 @@ (define-public neovim-packer
is based on Vim's builtin plugin support.")
(license license:expat))))
-(define-public neovim-syntastic
- (package
- (inherit vim-syntastic)
- (name "neovim-syntastic")
- (arguments
- '(#:install-plan
- '(("autoload" "share/nvim/site/")
- ("doc" "share/nvim/site/")
- ("plugin" "share/nvim/site/")
- ("syntax_checkers" "share/nvim/site/"))))
- (synopsis "Syntax checking plugin for Neovim")
- (description
- "Vim-syntastic is a syntax checking plugin for Neovim. It runs files through
-external syntax checkers and displays any resulting errors to the user. This
-can be done on demand, or automatically as files are saved. If syntax errors
-are detected, the user is notified.")))
-
(define-public neovim
(package
(name "neovim")
@@ -854,7 +776,8 @@ (define-public vifm
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(vifm (string-append out "/share/vifm"))
- (vimfiles (string-append out "/share/vim/vimfiles")))
+ (vimfiles (string-append out
+ "/share/vim/vimfiles/pack/guix/start/vifm")))
(copy-recursively (string-append vifm "/colors")
(string-append vimfiles "/colors"))
(copy-recursively (string-append vifm "/vim")
@@ -932,17 +855,7 @@ (define-public vim-guix-vim
(sha256
(base32
"080ni4z23qdr8rkrswjqfqfrrcnpn7qdgrg14glwji46wzvwxqyx"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("compiler" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("indent" "share/vim/vimfiles/")
- ("ftdetect" "share/vim/vimfiles/")
- ("ftplugin" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/")
- ("syntax" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://gitlab.com/Efraim/guix.vim")
(synopsis "Guix integration in Vim")
(description "This package provides support for GNU Guix in Vim.")
@@ -961,11 +874,7 @@ (define-public vim-asyncrun
(sha256
(base32
"11zcw0sll6qg6ha0rr6n1cw5v73azvf7ycwn9lgiwa5cj7rrqjf4"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("plugin" "share/vim/vimfiles/")
- ("doc/" "share/vim/vimfiles/doc" #:include ("asyncrun.txt")))))
+ (build-system vim-build-system)
(home-page "https://github.com/skywind3000/asyncrun.vim")
(synopsis "Run Async Shell Commands in Vim")
(description "This plugin takes the advantage of new APIs in Vim 8 (and
@@ -987,12 +896,7 @@ (define-public vim-dispatch
(sha256
(base32
"1m8b5mn2zqlphzs6xfwykwmghf6p0wabrhpjmh7vav35jgcxc4wl"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://github.com/tpope/vim-dispatch")
(synopsis "Asynchronous build and test dispatcher")
(description "Leverage the power of Vim's compiler plugins without being
@@ -1017,11 +921,7 @@ (define-public vim-gemini-vim
(file-name (git-file-name name version))
(sha256
(base32 "05ffhhfahjqwxyrqmsinsahrs15wknzl2qbj8mznyv319mn2civ2"))))
- (build-system copy-build-system)
- (arguments
- `(#:install-plan
- '(("ftdetect" "share/vim/vimfiles/")
- ("syntax" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://git.sr.ht/~torresjrjr/gemini.vim")
(synopsis "Vim syntax highlighting plugin for Gemini")
(description "This Vim plugin provides a Vim syntax highlighting plugin
@@ -1045,11 +945,7 @@ (define-public vim-eunuch
(sha256
(base32
"1xadb22kd40swmww0qxmmkcpcq6viy8l167pjck5q32hfngll5d3"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://github.com/tpope/vim-eunuch")
(synopsis "Vim sugar for the UNIX shell commands")
(description "Vim sugar for the UNIX shell commands that need it the most.
@@ -1073,13 +969,7 @@ (define-public vim-slime
(file-name (git-file-name name version))
(sha256
(base32 "0k4b629jn6xlxyjxdl3cgm06v9dmx967rqnslv5m82c9kscwpyh4"))))
- (build-system copy-build-system)
- (arguments
- `(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("ftplugin" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://technotales.wordpress.com/2007/10/03/like-slime-for-vim/")
(synopsis "Vim plugin to give you some slime")
(description "SLIME is an Emacs plugin to turn Emacs into a Lisp IDE. You
@@ -1105,11 +995,7 @@ (define-public vim-paredit
(file-name (git-file-name name version))
(sha256
(base32 "07d5s20r0ssd7rir45vy0fqlci44gha1a81rcilgar227f3nw328"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://github.com/kovisoft/paredit")
(synopsis "Vim plugin for structured editing of Lisp S-expressions")
(description
@@ -1131,11 +1017,7 @@ (define-public vim-surround
(file-name (git-file-name name version))
(sha256
(base32 "1b0bd5m5lv1p4d299mrwjfs2gk0zqwyaqdaid9hs9yqlxnr8s5nf"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://github.com/tpope/vim-surround")
(synopsis "Vim plugin for easy quoting and parenthesizing")
(description
@@ -1156,12 +1038,7 @@ (define-public vim-gnupg
"/vim-gnupg-v" version ".tar.gz"))
(sha256
(base32 "02w8lgyyh7wgxysvmmcf9ja5c06vrbyh3alzvv97x8cfhrp0skn7"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://www.vim.org/scripts/script.php?script_id=3645")
(synopsis "Vim plugin for transparent editing of gpg encrypted files")
(description
@@ -1187,12 +1064,7 @@ (define-public vim-ctrlp
(file-name (git-file-name name version))
(sha256
(base32 "0n68hg59h4rjn0ziqbsh5pr03l3kr98zk54659ny6vq107af1w96"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://ctrlpvim.github.io/ctrlp.vim/")
(synopsis "Fuzzy file, buffer, mru, tag, etc. finder for Vim")
(description
@@ -1224,12 +1096,7 @@ (define-public vim-mucomplete
(file-name (git-file-name name version))
(sha256
(base32 "054g80n09mmxxlh8xaic29bn8bgn3clvv732rymljdyvbj1mlhwd"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://github.com/lifepillar/vim-mucomplete")
(synopsis "MUcomplete is a minimalist autocompletion plugin for Vim")
(description
@@ -1253,12 +1120,7 @@ (define-public vim-gitgutter
(file-name (git-file-name name version))
(sha256
(base32 "0zpa7cs59a8sq0k3frlf9flpf30jcn239yrpmv40r7nqvxzglbpl"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(synopsis "Vim plugin which shows a git diff in the sign column")
(description
"A Vim plugin which shows a git diff in the sign column. It shows which
@@ -1282,12 +1144,7 @@ (define-public vim-characterize
(file-name (git-file-name name version))
(sha256
(base32 "0ppsbsd696ih40d9f76mdl9sd9y7p2pvm65qmvq4b2zhkv4xbpxz"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://github.com/tpope/vim-characterize")
(synopsis "Vim plugin for showing Unicode character metadata")
(description
@@ -1316,14 +1173,9 @@ (define-public vim-tagbar
(file-name (git-file-name name version))
(sha256
(base32 "1fqfs8msmr6d4kpvxqp14sdjvp5fj52q5w5kz71myzcd4kqzmirp"))))
- (build-system copy-build-system)
+ (build-system vim-build-system)
(arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/")
- ("syntax" "share/vim/vimfiles/"))
- #:phases
+ '(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'link-universal-ctags
(lambda* (#:key inputs #:allow-other-keys)
@@ -1357,15 +1209,7 @@ (define-public vim-nerdtree
(file-name (git-file-name name version))
(sha256
(base32 "1si8qla86ng8cffbmfrk9gss0i3912yw0f1ph4bsiq0kk837lccp"))))
- (build-system copy-build-system)
- (arguments
- '(#:install-plan
- '(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("lib" "share/vim/vimfiles/")
- ("nerdtree_plugin" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/")
- ("syntax" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://github.com/preservim/nerdtree")
(synopsis "Tree explorer plugin for Vim")
(description
@@ -1387,13 +1231,7 @@ (define-public vim-nerdcommenter
(file-name (git-file-name name version))
(sha256
(base32 "1ka2rqn7rby55aps3iblh1dcqxm7m7qx72mpkz6y2aaj8mkj0zyd"))))
- (build-system copy-build-system)
- (arguments
- (list
- #:install-plan
- #~`(("autoload" "share/vim/vimfiles/")
- ("doc" "share/vim/vimfiles/")
- ("plugin" "share/vim/vimfiles/"))))
+ (build-system vim-build-system)
(home-page "https://github.com/preservim/nerdcommenter")
(synopsis "Vim plugin for easy commenting of code")
(description
--
2.38.1
(
Re: [bug#60029] [PATCH v2 2/4] gnu: vim: add relevant locations to 'package-path' instead of 'runtime-path'
CP1UNI3YE57Y.2SF0D5PFN4A15@guix-framework
LGTM now, I guess. I haven't tested it though.

-- (
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEE6Vh10NblKE5doNlW7ImHg/nqI20FAmOaPJsACgkQ7ImHg/nq
I20wyQv/Wu4BnE2rqqEcbccwd7XSygIyBkDYzo//FEUotn7ltznsWZw6qeDKHMAF
+oDKwqX97sCf41nJmRx/NUa6vdDmzI30YgcZwZa9OkSBlKQnG0HN6PW7///2GS42
TzxxnRzq/owP4kumJzm+KEHNFBgoplBGhZJjfkT1RJan/jwxK+8V+iKYW0ubTFT7
IxmgEH2EOJq3BnHdjDJG6ffkPBmdtYLDDxq0P7aA13cVxUn6rxAdUv/BFhliuGu4
xPVnbQyZ/5jk4zONCgjm4UYhZBr2CIT+kEP4ChYEtJniAO3fXjhPzyfJ7ifZk/MI
hJteq3USFEkQTWV2myVGiblfGAPcXdaJg0BkQsmZQ3FQdOjsamvB71rXE/gYKgvT
ohZgPzFEdw0yqpGoKmKsmNGQE03cnF2i6K2dpU2Kv6t/qBdyBm+vZpJ46MS/SnKC
aaSB5qeBZG0EubL12BxrfIb8bsGPVdgSMJDNui9cacgJfstSwNjnU3aklxNm/8Wp
ziw47WJp
=mh4q
-----END PGP SIGNATURE-----


?