This is an automated email from the git hooks/post-receive script.
guix_mirror_bot pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new 2738209b5d gnu: neovim: Add support for guix neovim packages.
2738209b5d is described below
commit 2738209b5d3b7ca4a306a90d321e35080f25b8ad
Author: Oscar Chevalier <[email protected]>
AuthorDate: Mon Jul 21 23:35:44 2025 +1000
gnu: neovim: Add support for guix neovim packages.
Enables the use of guix as a package manager for neovim, compatible with
the outputs of `vim-build-system`.
* gnu/packages/vim.scm (neovim)[arguments]: Added another phase to
install the system init file to the correct place.
* gnu/packages/aux-files/guix-nvim.vim: New file.
* Makefile.am (AUX_FILES): Register file.
Change-Id: I375e3e0d051da27d065dff5456cb298a01bc90b1
Signed-off-by: Efraim Flashner <[email protected]>
---
Makefile.am | 1 +
gnu/packages/aux-files/guix-nvim.vim | 10 ++++++++++
gnu/packages/vim.scm | 10 +++++++++-
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 19b2971f99..77c23ddcf8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -448,6 +448,7 @@ AUX_FILES = \
gnu/packages/aux-files/emacs/guix-emacs.el \
gnu/packages/aux-files/findclass.php \
gnu/packages/aux-files/guix.vim \
+ gnu/packages/aux-files/guix-nvim.vim \
gnu/packages/aux-files/linux-libre/6.16-arm64.conf \
gnu/packages/aux-files/linux-libre/6.16-riscv.conf \
gnu/packages/aux-files/linux-libre/6.16-x86_64.conf \
diff --git a/gnu/packages/aux-files/guix-nvim.vim
b/gnu/packages/aux-files/guix-nvim.vim
new file mode 100644
index 0000000000..6ac92573fd
--- /dev/null
+++ b/gnu/packages/aux-files/guix-nvim.vim
@@ -0,0 +1,10 @@
+lua << EOF
+ -- This appends all applicable neovim paths to the runtimepath.
+ for _, directory in pairs({"/run/current-system/profile", "~/.guix-profile",
"~/.guix-home/profile", vim.env.GUIX_PROFILE, vim.env.GUIX_ENVIRONMENT}) do
+ local rtp = vim.fs.abspath(directory .. "/share/nvim/site")
+ local stat = vim.uv.fs_stat(rtp)
+ if stat and stat.type == "directory" then
+ vim.opt.rtp:append(rtp)
+ end
+ end
+EOF
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 36357598ef..02182dad48 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -862,7 +862,15 @@ is based on Vim's builtin plugin support.")
;; doubles its size. We remove the reference here.
(substitute* "cmake.config/versiondef.h.in"
(("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))
- #t)))))
+ #t))
+ (add-after 'install 'install-guix-nvim.vim
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((nvimdir (string-append (assoc-ref outputs "out")
+ "/share/nvim")))
+ (mkdir-p nvimdir)
+ (copy-file
+ #$(local-file (search-auxiliary-file "guix-nvim.vim"))
+ (string-append nvimdir "/sysinit.vim"))))))))
(inputs (list libuv-for-luv
msgpack
libtermkey