GNU bug report logs -
#54221
[PATCH 0/4] vim: Detect plugins via search paths.
Previous Next
To reply to this bug, email your comments to 54221 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Wed, 02 Mar 2022 13:15:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
SeerLite <seerlite <at> nixnet.email>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Wed, 02 Mar 2022 13:15:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi!
These patches make Vim use native-search-paths to search for plugins,
instead of manually searching for them in a set of hardcoded paths,
which is how it was done up till now.
I've added the same search paths to Neovim, which unlike Vim, wasn't
auto-detecting Vim plugins at all before.
Neovim also searches XDG_DATA_DIRS for Neovim-specific plugins, so I'd
appreciate if <https://issues.guix.gnu.org/48112> was merged too.
Finally, I've updated the package definitions to use the new style with
gexps and label-less inputs.
SeerLite
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Wed, 02 Mar 2022 13:20:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 54221 <at> debbugs.gnu.org (full text, mbox):
Previously a hardcoded list of directories was used, which albeit quite
accurate during normal use, didn't fully respect the active Guix environment
and didn't make use of Guix's search-paths feature.
* gnu/packages/aux-files/guix.vim: Use 'GUIX_VIMRUNTIME' to set the runtimepath.
* gnu/packages/vim.scm (vim)[native-search-paths]: Add search path
specification for 'GUIX_VIMRUNTIME'.
---
gnu/packages/aux-files/guix.vim | 11 ++++-------
gnu/packages/vim.scm | 6 ++++++
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/aux-files/guix.vim b/gnu/packages/aux-files/guix.vim
index 9397c53701..3c13a16b7d 100644
--- a/gnu/packages/aux-files/guix.vim
+++ b/gnu/packages/aux-files/guix.vim
@@ -1,10 +1,7 @@
-" This appends all of the vim plugins to the end of Vim's runtimepath.
-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], ',')
- endif
-endfor
+if !empty($GUIX_VIMRUNTIME)
+ set rtp+=$GUIX_VIMRUNTIME
+endif
+
" Unconditionally add */after directories last, as intended by upstream
" TODO: Remove duplicate */after directories
for directory in [$VIM . "/vimfiles", $HOME ."/.vim"]
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 28944dd640..7407ae71d7 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -12,6 +12,7 @@
;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
;;; Copyright © 2021 Tissevert <tissevert+guix <at> marvid.fr>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
+;;; Copyright © 2022 SeerLite <seerlite <at> nixnet.email>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -150,6 +151,11 @@ (define-public vim
(mkdir-p vimdir)
(copy-file (assoc-ref inputs "guix.vim")
(string-append vimdir "/vimrc"))))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "GUIX_VIMRUNTIME")
+ (separator ",")
+ (files (list "share/vim/vimfiles")))))
(inputs
(list gawk ncurses perl tcsh)) ; For runtime/tools/vim32
(native-inputs
--
2.34.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Wed, 02 Mar 2022 13:20:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 54221 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/vim.scm (neovim)[phases]{install-guix.vim}: New phase.
[native-search-paths]: Add search path specification for 'GUIX_VIMRUNTIME'.
---
gnu/packages/vim.scm | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 7407ae71d7..3997797201 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -714,7 +714,18 @@ (define-public neovim
;; doubles its size. We remove the refirence here.
(substitute* "cmake/GetCompileFlags.cmake"
(("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))
- #t)))))
+ #t))
+ (add-after 'install 'install-guix.vim
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((nvimdir (string-append (assoc-ref outputs "out") "/share/nvim")))
+ (mkdir-p nvimdir)
+ (copy-file (assoc-ref inputs "guix.vim")
+ (string-append nvimdir "/sysinit.vim"))))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "GUIX_VIMRUNTIME")
+ (separator ",")
+ (files (list "share/vim/vimfiles")))))
(inputs
`(("libuv" ,libuv)
("msgpack" ,msgpack)
@@ -730,7 +741,8 @@ (define-public neovim
(native-inputs
`(("pkg-config" ,pkg-config)
("gettext" ,gettext-minimal)
- ("gperf" ,gperf)))
+ ("gperf" ,gperf)
+ ("guix.vim" ,(search-auxiliary-file "guix.vim"))))
(home-page "https://neovim.io")
(synopsis "Fork of vim focused on extensibility and agility")
(description "Neovim is a project that seeks to aggressively
--
2.34.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Wed, 02 Mar 2022 13:20:03 GMT)
Full text and
rfc822 format available.
Message #14 received at 54221 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/vim.scm (vim)[native-inputs]: Remove "guix.vim" gexp and remove
labels.
[arguments]: Convert to list of gexps and inline the "guix.vim" gexp.
---
gnu/packages/vim.scm | 127 +++++++++++++++++++++----------------------
1 file changed, 62 insertions(+), 65 deletions(-)
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 3997797201..d5d8b412f7 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -89,68 +89,69 @@ (define-public vim
"1jppzgmngcdd7jfb5rnkkvf5d47svnjbn7qj4mvjacd9az3c7s9r"))))
(build-system gnu-build-system)
(arguments
- `(#:test-target "test"
- #:parallel-tests? #f
- #:phases
- (modify-phases %standard-phases
- (add-after 'configure 'patch-absolute-paths
- (lambda _
- (substitute* "runtime/tools/mve.awk"
- (("/usr/bin/nawk") (which "gawk")))
- (substitute* '("src/testdir/Makefile"
- "src/testdir/test_normal.vim"
- "src/testdir/test_popupwin.vim"
- "src/testdir/test_shell.vim"
- "src/testdir/test_system.vim"
- "src/testdir/test_terminal.vim"
- "src/testdir/test_terminal2.vim")
- (("/bin/sh") (which "sh")))
- (substitute* "src/testdir/test_autocmd.vim"
- (("/bin/kill") (which "kill")))))
- (add-before 'check 'set-environment-variables
- (lambda* (#:key inputs #:allow-other-keys)
- ;; One of the tests tests timezone-dependent functions.
- (setenv "TZDIR"
- (search-input-directory inputs "share/zoneinfo"))
+ (list
+ #:test-target "test"
+ #:parallel-tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'configure 'patch-absolute-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "runtime/tools/mve.awk"
+ (("/usr/bin/nawk") (search-input-file inputs "bin/gawk")))
+ (substitute* '("src/testdir/Makefile"
+ "src/testdir/test_normal.vim"
+ "src/testdir/test_popupwin.vim"
+ "src/testdir/test_shell.vim"
+ "src/testdir/test_system.vim"
+ "src/testdir/test_terminal.vim"
+ "src/testdir/test_terminal2.vim")
+ (("/bin/sh") (search-input-file inputs "bin/sh")))
+ (substitute* "src/testdir/test_autocmd.vim"
+ (("/bin/kill") (search-input-file inputs "bin/kill")))))
+ (add-before 'check 'set-environment-variables
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; One of the tests tests timezone-dependent functions.
+ (setenv "TZDIR"
+ (search-input-directory inputs "share/zoneinfo"))
- ;; Make sure the TERM environment variable is set for the tests
- (setenv "TERM" "xterm")))
- (add-before 'check 'skip-or-fix-failing-tests
- (lambda _
- ;; This test assumes that PID 1 is run as root and that the user
- ;; running the test suite does not have permission to kill(1, 0)
- ;; it. This is not true in the build container, where both PID 1
- ;; and the test suite are run as the same user. Skip the test.
- ;; An alternative fix would be to patch the PID used to a random
- ;; 32-bit value and hope it never shows up in the test environment.
- (substitute* "src/testdir/test_swap.vim"
- (("if !IsRoot\\(\\)") "if 0"))
+ ;; Make sure the TERM environment variable is set for the tests
+ (setenv "TERM" "xterm")))
+ (add-before 'check 'skip-or-fix-failing-tests
+ (lambda _
+ ;; This test assumes that PID 1 is run as root and that the user
+ ;; running the test suite does not have permission to kill(1, 0)
+ ;; it. This is not true in the build container, where both PID 1
+ ;; and the test suite are run as the same user. Skip the test.
+ ;; An alternative fix would be to patch the PID used to a random
+ ;; 32-bit value and hope it never shows up in the test environment.
+ (substitute* "src/testdir/test_swap.vim"
+ (("if !IsRoot\\(\\)") "if 0"))
- ;; These tests check how the terminal looks after executing some
- ;; actions. The path of the bash binary is shown, which results in
- ;; a difference being detected. Patching the expected result is
- ;; non-trivial due to the special format used, so skip the test.
- (substitute* "src/testdir/test_terminal.vim"
- ((".*Test_open_term_from_cmd.*" line)
- (string-append line "return\n"))
- ((".*Test_terminal_postponed_scrollback.*" line)
- (string-append line "return\n"))
- ((".*Test_combining_double_width.*" line)
- (string-append line "return\n")))
- (substitute* "src/testdir/test_popupwin.vim"
- ((".*Test_popup_drag_termwin.*" line)
- (string-append line "return\n")))))
- (add-before 'install 'fix-installman.sh
- (lambda _
- (substitute* "src/installman.sh"
- (("/bin/sh")
- (which "sh")))))
- (add-after 'install 'install-guix.vim
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((vimdir (string-append (assoc-ref outputs "out") "/share/vim")))
- (mkdir-p vimdir)
- (copy-file (assoc-ref inputs "guix.vim")
- (string-append vimdir "/vimrc"))))))))
+ ;; These tests check how the terminal looks after executing some
+ ;; actions. The path of the bash binary is shown, which results in
+ ;; a difference being detected. Patching the expected result is
+ ;; non-trivial due to the special format used, so skip the test.
+ (substitute* "src/testdir/test_terminal.vim"
+ ((".*Test_open_term_from_cmd.*" line)
+ (string-append line "return\n"))
+ ((".*Test_terminal_postponed_scrollback.*" line)
+ (string-append line "return\n"))
+ ((".*Test_combining_double_width.*" line)
+ (string-append line "return\n")))
+ (substitute* "src/testdir/test_popupwin.vim"
+ ((".*Test_popup_drag_termwin.*" line)
+ (string-append line "return\n")))))
+ (add-before 'install 'fix-installman.sh
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/installman.sh"
+ (("/bin/sh")
+ (search-input-file inputs "bin/sh")))))
+ (add-after 'install 'install-guix.vim
+ (lambda _
+ (let ((vimdir (string-append #$output "/share/vim"))
+ (vimrc #$(local-file (search-auxiliary-file "guix.vim"))))
+ (mkdir-p vimdir)
+ (copy-file vimrc (string-append vimdir "/vimrc"))))))))
(native-search-paths
(list (search-path-specification
(variable "GUIX_VIMRUNTIME")
@@ -159,11 +160,7 @@ (define-public vim
(inputs
(list gawk ncurses perl tcsh)) ; For runtime/tools/vim32
(native-inputs
- `(("libtool" ,libtool)
- ("guix.vim" ,(search-auxiliary-file "guix.vim"))
-
- ;; For tests.
- ("tzdata" ,tzdata-for-tests)))
+ (list libtool tzdata-for-tests))
(home-page "https://www.vim.org/")
(synopsis "Text editor based on vi")
;; The description shares language with the vim-full package. When making
--
2.34.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Wed, 02 Mar 2022 13:20:04 GMT)
Full text and
rfc822 format available.
Message #17 received at 54221 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/vim.scm (neovim)[inputs]: Remove labels.
[native-inputs]: Remove "guix.vim" gexp and remove labels.
[arguments]: Convert to list of gexps, inline the "guix.vim" gexp, adjust lua
input names and remove trailing #t's.
---
gnu/packages/vim.scm | 114 +++++++++++++++++++++----------------------
1 file changed, 55 insertions(+), 59 deletions(-)
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index d5d8b412f7..5e6439ed00 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -676,70 +676,66 @@ (define-public neovim
(base32 "11zyj6jvkwas3n6w1ckj3pk6jf81z1g7ngg4smmwm7c27y2a6f2m"))))
(build-system cmake-build-system)
(arguments
- `(#:modules ((srfi srfi-26)
+ (list
+ #:modules `((srfi srfi-26)
(guix build cmake-build-system)
(guix build utils))
- #:configure-flags '("-DPREFER_LUA:BOOL=YES")
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'set-lua-paths
- (lambda* (#:key inputs #:allow-other-keys)
- (let* ((lua-version "5.1")
- (lua-cpath-spec
- (lambda (prefix)
- (let ((path (string-append prefix "/lib/lua/" lua-version)))
- (string-append path "/?.so;" path "/?/?.so"))))
- (lua-path-spec
- (lambda (prefix)
- (let ((path (string-append prefix "/share/lua/" lua-version)))
- (string-append path "/?.lua;" path "/?/?.lua"))))
- (lua-inputs (map (cute assoc-ref inputs <>)
- '("lua"
- "lua-luv"
- "lua-lpeg"
- "lua-bitop"
- "lua-libmpack"))))
- (setenv "LUA_PATH"
- (string-join (map lua-path-spec lua-inputs) ";"))
- (setenv "LUA_CPATH"
- (string-join (map lua-cpath-spec lua-inputs) ";"))
- #t)))
- (add-after 'unpack 'prevent-embedding-gcc-store-path
- (lambda _
- ;; nvim remembers its build options, including the compiler with
- ;; its complete path. This adds gcc to the closure of nvim, which
- ;; doubles its size. We remove the refirence here.
- (substitute* "cmake/GetCompileFlags.cmake"
- (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))
- #t))
- (add-after 'install 'install-guix.vim
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((nvimdir (string-append (assoc-ref outputs "out") "/share/nvim")))
- (mkdir-p nvimdir)
- (copy-file (assoc-ref inputs "guix.vim")
- (string-append nvimdir "/sysinit.vim"))))))))
+ #:configure-flags #~(list "-DPREFER_LUA:BOOL=YES")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-lua-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((lua-version "5.1")
+ (lua-cpath-spec
+ (lambda (prefix)
+ (let ((path (string-append prefix "/lib/lua/" lua-version)))
+ (string-append path "/?.so;" path "/?/?.so"))))
+ (lua-path-spec
+ (lambda (prefix)
+ (let ((path (string-append prefix "/share/lua/" lua-version)))
+ (string-append path "/?.lua;" path "/?/?.lua"))))
+ (lua-inputs (map (cute assoc-ref inputs <>)
+ '("lua"
+ "lua5.1-luv"
+ "lua5.1-lpeg"
+ "lua5.1-bitop"
+ "lua5.1-libmpack"))))
+ (setenv "LUA_PATH"
+ (string-join (map lua-path-spec lua-inputs) ";"))
+ (setenv "LUA_CPATH"
+ (string-join (map lua-cpath-spec lua-inputs) ";")))))
+ (add-after 'unpack 'prevent-embedding-gcc-store-path
+ (lambda _
+ ;; nvim remembers its build options, including the compiler with
+ ;; its complete path. This adds gcc to the closure of nvim, which
+ ;; doubles its size. We remove the refirence here.
+ (substitute* "cmake/GetCompileFlags.cmake"
+ (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))))
+ (add-after 'install 'install-guix.vim
+ (lambda _
+ (let ((vimdir (string-append #$output "/share/nvim"))
+ (vimrc #$(local-file (search-auxiliary-file "guix.vim"))))
+ (mkdir-p vimdir)
+ (copy-file vimrc (string-append vimdir "/sysinit.vim"))))))))
(native-search-paths
- (list (search-path-specification
- (variable "GUIX_VIMRUNTIME")
- (separator ",")
- (files (list "share/vim/vimfiles")))))
+ (list (search-path-specification
+ (variable "GUIX_VIMRUNTIME")
+ (separator ",")
+ (files (list "share/vim/vimfiles")))))
(inputs
- `(("libuv" ,libuv)
- ("msgpack" ,msgpack)
- ("libtermkey" ,libtermkey)
- ("libvterm" ,libvterm)
- ("unibilium" ,unibilium)
- ("jemalloc" ,jemalloc)
- ("lua" ,lua-5.1)
- ("lua-luv" ,lua5.1-luv)
- ("lua-lpeg" ,lua5.1-lpeg)
- ("lua-bitop" ,lua5.1-bitop)
- ("lua-libmpack" ,lua5.1-libmpack)))
+ (list libuv
+ msgpack
+ libtermkey
+ libvterm
+ unibilium
+ jemalloc
+ lua-5.1
+ lua5.1-luv
+ lua5.1-lpeg
+ lua5.1-bitop
+ lua5.1-libmpack))
(native-inputs
- `(("pkg-config" ,pkg-config)
- ("gettext" ,gettext-minimal)
- ("gperf" ,gperf)
- ("guix.vim" ,(search-auxiliary-file "guix.vim"))))
+ (list pkg-config gettext-minimal gperf))
(home-page "https://neovim.io")
(synopsis "Fork of vim focused on extensibility and agility")
(description "Neovim is a project that seeks to aggressively
--
2.34.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Wed, 02 Mar 2022 18:26:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 54221 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
SeerLite via Guix-patches via schreef op wo 02-03-2022 om 10:17 [-
0300]:
> + (add-before 'check 'set-environment-variables
> + (lambda* (#:key inputs #:allow-other-keys)
> + ;; One of the tests tests timezone-dependent functions.
> + (setenv "TZDIR"
> + (search-input-directory inputs "share/zoneinfo"))
>
> - ;; Make sure the TERM environment variable is set for the tests
> - (setenv "TERM" "xterm")))
The tzdata in in 'native-inputs', not 'inputs', so this code needs to
look in '(or native-inputs inputs)', not 'inputs', otherwise this code
will fail with a '&search-path' exception from 'search-input-directory'
when cross-compiling (untested).
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Wed, 02 Mar 2022 18:30:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 54221 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
SeerLite via Guix-patches via schreef op wo 02-03-2022 om 10:17 [-
0300]:
> + (lambda* (#:key inputs #:allow-other-keys)
> + [this [bracketed line] seems irrelevant for my comment]
> + (substitute* '("src/testdir/Makefile"
> + "src/testdir/test_normal.vim"
> + "src/testdir/test_popupwin.vim"
> + "src/testdir/test_shell.vim"
> + "src/testdir/test_system.vim"
> + "src/testdir/test_terminal.vim"
> + "src/testdir/test_terminal2.vim")
> + (("/bin/sh") (search-input-file inputs "bin/sh")))
> + (substitute* "src/testdir/test_autocmd.vim"
> + (("/bin/kill") (search-input-file inputs "bin/kill")))))
This is test stuff, and these binaries do not seem to be present in
'inputs', they would be in the implicit 'native-inputs', so these would
need to search in '(or native-inputs inputs)' instead of 'inputs' to
avoid &search-path exceptions when cross-compiling:
(substitute* '("src/testdir/...")
(("/bin/sh") (search-input-file (or native-inputs inputs) "bin/sh")))
Or simpler, there's a procedure for looking for 'bin/TOOL' in native-
inputs: 'which'!
;; the original code!
(substitute* '("src/testdir/...")
(("/bin/sh") (which "sh")))
Why the change from 'which' to 'search-input-file'?
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Wed, 02 Mar 2022 18:31:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 54221 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
SeerLite via Guix-patches via schreef op wo 02-03-2022 om 10:17 [-
0300]:
> + (native-search-paths
> + (list (search-path-specification
> + (variable "GUIX_VIMRUNTIME")
> + (separator ",")
> + (files (list "share/vim/vimfiles")))))
this can be simplified:
(native-search-paths (package-native-search-paths vim))
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Wed, 02 Mar 2022 18:34:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 54221 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
SeerLite via Guix-patches via schreef op wo 02-03-2022 om 10:17 [-
0300]:
> -" This appends all of the vim plugins to the end of Vim's runtimepath.
> -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], ',')
> - endif
> -endfor
> +if !empty($GUIX_VIMRUNTIME)
> + set rtp+=$GUIX_VIMRUNTIME
> +endif
Nice! That would make the "--pure" option in
"guix shell --pure vim perhaps-some-vim-plugins ... -- vim" actually
work! (untested, I'm just _looking_ at the patches, not actually
testing them)
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Wed, 02 Mar 2022 18:36:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 54221 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
SeerLite via Guix-patches via schreef op wo 02-03-2022 om 10:17 [-
0300]:
> + (add-before 'install 'fix-installman.sh
> + (lambda* (#:key inputs #:allow-other-keys)
> + (substitute* "src/installman.sh"
> + (("/bin/sh")
> + (search-input-file inputs "bin/sh")))))
Is "installman.sh" used during the build, or when vim is run?
In the former case, this should look into (or native-inputs
inputs) instead for cross-compilation reasons, and could be simplified
to:
(("/bin/sh") (which "sh"))
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Wed, 02 Mar 2022 18:41:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 54221 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
SeerLite via Guix-patches via schreef op wo 02-03-2022 om 10:17 [-
0300]:
> + (vimrc #$(local-file (search-auxiliary-file "guix.vim"))))
This stops package transformations from being able to change the
guix.vim used. WDYT of using a variant of 'search-input-file', that
strips the /gnu/store/HASH- part of the store item names and tests
if the remainder equals the string "guix.vim"? Such a procedure does
not currently exist to my knowledge, but it could be written and would
be useful outside the neovim definition.
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Thu, 03 Mar 2022 16:53:01 GMT)
Full text and
rfc822 format available.
Message #38 received at 54221 <at> debbugs.gnu.org (full text, mbox):
Hi, thanks for the review!
On 3/2/22 14:29, Maxime Devos wrote:
> This is test stuff, and these binaries do not seem to be present in
> 'inputs', they would be in the implicit 'native-inputs', so these would
> need to search in '(or native-inputs inputs)' instead of 'inputs' to
> avoid &search-path exceptions when cross-compiling:
>
> (substitute* '("src/testdir/...")
> (("/bin/sh") (search-input-file (or native-inputs inputs) "bin/sh")))
>
> Or simpler, there's a procedure for looking for 'bin/TOOL' in native-
> inputs: 'which'!
>
> ;; the original code!
> (substitute* '("src/testdir/...")
> (("/bin/sh") (which "sh")))
Whoops, I forgot I made this change.
> Why the change from 'which' to 'search-input-file'?
The blog post that introduces label-less inputs also introduces
'search-input-file', which made me think they were both part of the
"package definition modernization process".
I asked on IRC if that was the case, and although I didn't get a clear
answer for that, someone told me they preferred using
'search-input-file' because it raises an exception when no file is found.
What do you think about that? Should I stick with 'search-input-file' or
is 'which' alright?
It makes sense that I'd have to use native-inputs though. My bad!
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Thu, 03 Mar 2022 17:37:02 GMT)
Full text and
rfc822 format available.
Message #41 received at 54221 <at> debbugs.gnu.org (full text, mbox):
On 3/2/22 14:40, Maxime Devos wrote:
> SeerLite via Guix-patches via schreef op wo 02-03-2022 om 10:17 [-
> 0300]:
>> + (vimrc #$(local-file (search-auxiliary-file "guix.vim"))))
>
> This stops package transformations from being able to change the
> guix.vim used. WDYT of using a variant of 'search-input-file', that
> strips the /gnu/store/HASH- part of the store item names and tests
> if the remainder equals the string "guix.vim"? Such a procedure does
> not currently exist to my knowledge, but it could be written and would
> be useful outside the neovim definition.
Ah, is this also why package inputs are specified explicitly instead of
using gexps?
Is there any benefit to being able to change such a file via a
transformation? Editing the vimrc feels like editing the default
configuration of the package, rather than swapping a dependency. And
that looks odd to me, maybe because I'm more used to package
dependencies as inputs.
The procedure sounds like a good idea, but wouldn't it be easier to just
make `local-file` not prepend the hash to the filename by storing it
inside a parent directory with said hash instead? Is something like that
possible?
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Thu, 03 Mar 2022 17:41:02 GMT)
Full text and
rfc822 format available.
Message #44 received at 54221 <at> debbugs.gnu.org (full text, mbox):
Thank you again for the corrections. Should I send the entire patch
series again or only the patches I want to correct? I'm new to the whole
debbugs/email patch workflow.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Thu, 03 Mar 2022 17:47:01 GMT)
Full text and
rfc822 format available.
Message #47 received at 54221 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
SeerLite schreef op do 03-03-2022 om 13:49 [-0300]:
> The blog post that introduces label-less inputs also introduces
> 'search-input-file', which made me think they were both part of the
> "package definition modernization process".
The problem with 'which' was that it looks in 'native-inputs' (+ inputs
when compiling natively), even when we need 'inputs'. To fix this,
adding an 'inputs/native-inputs' argument was proposed
(https://issues.guix.gnu.org/47869). That interface was considered
a bit weird, so then (string-append (assoc-ref ...) "bin/...") was
proposed. That's rather verbose though, so 'search-input-file' was
introduced.
In short, 'search-input-file' was introduced to help with locating
binaries from 'inputs' (at least from my POV, shortly after ludo began
using 'search-input-file' for delabelification).
For looking in native-inputs (compilation tools etc.), I would prefer
'which' above the 'search-input-file' because it's a lot more concise,
though I suppose there is an argument to be made for using 'search-
input-file' for consistency.
There's the downside of not raising an exception in case the file is
not found though. However, there appears to be very few code that
actually relies on the 'return #f' behaviour (search for
'(or (which' and '(if (which'), so I think the behaviour can
be changed without much trouble (on 'core-updates').
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Wed, 16 Mar 2022 14:18:01 GMT)
Full text and
rfc822 format available.
Message #50 received at 54221 <at> debbugs.gnu.org (full text, mbox):
Hi Seerlite,
SeerLite <seerlite <at> nixnet.email> skribis:
> Thank you again for the corrections. Should I send the entire patch
> series again or only the patches I want to correct? I'm new to the
> whole debbugs/email patch workflow.
To avoid confusion, it’s more convenient if you resend the entire patch
series; make sure to use ‘git format-patch --subject-prefix="PATCH v2"’.
Thank you!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Fri, 13 May 2022 02:18:01 GMT)
Full text and
rfc822 format available.
Message #53 received at 54221 <at> debbugs.gnu.org (full text, mbox):
Previously a hardcoded list of directories was used, which albeit quite
accurate during normal use, didn't fully respect the active Guix environment
and didn't make use of Guix's search-paths feature.
* gnu/packages/aux-files/guix.vim: Use 'GUIX_VIMRUNTIME' to set the runtimepath.
* gnu/packages/vim.scm (vim)[native-search-paths]: Add search path
specification for 'GUIX_VIMRUNTIME'.
---
gnu/packages/aux-files/guix.vim | 11 ++++-------
gnu/packages/vim.scm | 6 ++++++
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/aux-files/guix.vim b/gnu/packages/aux-files/guix.vim
index 9397c53701..3c13a16b7d 100644
--- a/gnu/packages/aux-files/guix.vim
+++ b/gnu/packages/aux-files/guix.vim
@@ -1,10 +1,7 @@
-" This appends all of the vim plugins to the end of Vim's runtimepath.
-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], ',')
- endif
-endfor
+if !empty($GUIX_VIMRUNTIME)
+ set rtp+=$GUIX_VIMRUNTIME
+endif
+
" Unconditionally add */after directories last, as intended by upstream
" TODO: Remove duplicate */after directories
for directory in [$VIM . "/vimfiles", $HOME ."/.vim"]
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index bb459933b0..0c8e689b5a 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -13,6 +13,7 @@
;;; Copyright © 2021 Tissevert <tissevert+guix <at> marvid.fr>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
+;;; Copyright © 2022 SeerLite <seerlite <at> nixnet.email>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -147,6 +148,11 @@ (define-public vim
(mkdir-p vimdir)
(copy-file (assoc-ref inputs "guix.vim")
(string-append vimdir "/vimrc"))))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "GUIX_VIMRUNTIME")
+ (separator ",")
+ (files (list "share/vim/vimfiles")))))
(inputs
(list gawk ncurses perl tcsh)) ; For runtime/tools/vim32
(native-inputs
--
2.36.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Fri, 13 May 2022 02:18:02 GMT)
Full text and
rfc822 format available.
Message #56 received at 54221 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/vim.scm (neovim)[phases]{install-guix.vim}: New phase.
[native-search-paths]: Add search path specification for 'GUIX_VIMRUNTIME'.
---
gnu/packages/vim.scm | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 0c8e689b5a..530303a318 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -717,7 +717,18 @@ (define-public neovim
;; doubles its size. We remove the refirence here.
(substitute* "cmake/GetCompileFlags.cmake"
(("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))
- #t)))))
+ #t))
+ (add-after 'install 'install-guix.vim
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((nvimdir (string-append (assoc-ref outputs "out") "/share/nvim")))
+ (mkdir-p nvimdir)
+ (copy-file (assoc-ref inputs "guix.vim")
+ (string-append nvimdir "/sysinit.vim"))))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "GUIX_VIMRUNTIME")
+ (separator ",")
+ (files (list "share/vim/vimfiles")))))
(inputs
`(("libuv" ,libuv)
("msgpack" ,msgpack)
@@ -739,7 +750,8 @@ (define-public neovim
(native-inputs
`(("pkg-config" ,pkg-config)
("gettext" ,gettext-minimal)
- ("gperf" ,gperf)))
+ ("gperf" ,gperf)
+ ("guix.vim" ,(search-auxiliary-file "guix.vim"))))
(home-page "https://neovim.io")
(synopsis "Fork of vim focused on extensibility and agility")
(description "Neovim is a project that seeks to aggressively
--
2.36.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Fri, 13 May 2022 02:35:01 GMT)
Full text and
rfc822 format available.
Message #59 received at 54221 <at> debbugs.gnu.org (full text, mbox):
Hi! Sorry for the delay, I've been very busy.
I sent the rebased patches but only the bits that added search paths. There were some updates to both Vim and Neovim since I sent the first patch and I didn't want to deal with fixing the conflicts and re-understanding the style changes I had even forgotten I made. So I'm sending just the functional parts of the patch and hopefully someone else can update the package styles if necessary :)
Oh and I'd like to remind you of this patch: <https://issues.guix.gnu.org/48112> which along with my patch would make it so Neovim can finally use both Vim and Neovim-exclusive plugins. I'd appreciate if it got merged too.
SeerLite
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Thu, 19 May 2022 00:52:01 GMT)
Full text and
rfc822 format available.
Message #62 received at 54221 <at> debbugs.gnu.org (full text, mbox):
Previously a hardcoded list of directories was used, which albeit quite
accurate during normal use, didn't fully respect the active Guix environment
and didn't make use of Guix's search-paths feature.
* gnu/packages/aux-files/guix.vim: Use 'GUIX_VIMRUNTIME' to set the runtimepath.
* gnu/packages/vim.scm (vim)[native-search-paths]: Add search path
specification for 'GUIX_VIMRUNTIME'.
---
gnu/packages/aux-files/guix.vim | 11 ++++-------
gnu/packages/vim.scm | 6 ++++++
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/aux-files/guix.vim b/gnu/packages/aux-files/guix.vim
index 9397c53701..3c13a16b7d 100644
--- a/gnu/packages/aux-files/guix.vim
+++ b/gnu/packages/aux-files/guix.vim
@@ -1,10 +1,7 @@
-" This appends all of the vim plugins to the end of Vim's runtimepath.
-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], ',')
- endif
-endfor
+if !empty($GUIX_VIMRUNTIME)
+ set rtp+=$GUIX_VIMRUNTIME
+endif
+
" Unconditionally add */after directories last, as intended by upstream
" TODO: Remove duplicate */after directories
for directory in [$VIM . "/vimfiles", $HOME ."/.vim"]
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index caf9ea85b3..222827e539 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -13,6 +13,7 @@
;;; Copyright © 2021 Tissevert <tissevert+guix <at> marvid.fr>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
+;;; Copyright © 2022 SeerLite <seerlite <at> nixnet.email>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -147,6 +148,11 @@ (define-public vim
(mkdir-p vimdir)
(copy-file (assoc-ref inputs "guix.vim")
(string-append vimdir "/vimrc"))))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "GUIX_VIMRUNTIME")
+ (separator ",")
+ (files (list "share/vim/vimfiles")))))
(inputs
(list gawk ncurses perl tcsh)) ; For runtime/tools/vim32
(native-inputs
--
2.36.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Thu, 19 May 2022 00:52:02 GMT)
Full text and
rfc822 format available.
Message #65 received at 54221 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/vim.scm (neovim)[phases]: Add 'install-guix.vim phase
and remove trailing #t's.
[native-search-paths]: Add search path specification for 'GUIX_VIMRUNTIME'.
---
gnu/packages/vim.scm | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 222827e539..18f19c0eba 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -716,16 +716,25 @@ (define-public neovim
(setenv "LUA_PATH"
(string-join (map lua-path-spec lua-inputs) ";"))
(setenv "LUA_CPATH"
- (string-join (map lua-cpath-spec lua-inputs) ";"))
- #t)))
+ (string-join (map lua-cpath-spec lua-inputs) ";")))))
(add-after 'unpack 'prevent-embedding-gcc-store-path
(lambda _
;; nvim remembers its build options, including the compiler with
;; its complete path. This adds gcc to the closure of nvim, which
;; doubles its size. We remove the refirence here.
(substitute* "cmake/GetCompileFlags.cmake"
- (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))
- #t)))))
+ (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))))
+ (add-after 'install 'install-guix.vim
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((vimdir (string-append (assoc-ref outputs "out") "/share/nvim"))
+ (vimrc #$(local-file (search-auxiliary-file "guix.vim"))))
+ (mkdir-p vimdir)
+ (copy-file vimrc (string-append nvimdir "/sysinit.vim")))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "GUIX_VIMRUNTIME")
+ (separator ",")
+ (files (list "share/vim/vimfiles")))))
(inputs (list libuv-for-luv
msgpack
libtermkey
--
2.36.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Thu, 19 May 2022 01:09:02 GMT)
Full text and
rfc822 format available.
Message #68 received at 54221 <at> debbugs.gnu.org (full text, mbox):
Previously a hardcoded list of directories was used, which albeit quite
accurate during normal use, didn't fully respect the active Guix environment
and didn't make use of Guix's search-paths feature.
* gnu/packages/aux-files/guix.vim: Use 'GUIX_VIMRUNTIME' to set the runtimepath.
* gnu/packages/vim.scm (vim)[native-search-paths]: Add search path
specification for 'GUIX_VIMRUNTIME'.
[phases]: Search for tzdata files in the correct input fields.
---
gnu/packages/aux-files/guix.vim | 11 ++++-------
gnu/packages/vim.scm | 8 +++++++-
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/aux-files/guix.vim b/gnu/packages/aux-files/guix.vim
index 9397c53701..3c13a16b7d 100644
--- a/gnu/packages/aux-files/guix.vim
+++ b/gnu/packages/aux-files/guix.vim
@@ -1,10 +1,7 @@
-" This appends all of the vim plugins to the end of Vim's runtimepath.
-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], ',')
- endif
-endfor
+if !empty($GUIX_VIMRUNTIME)
+ set rtp+=$GUIX_VIMRUNTIME
+endif
+
" Unconditionally add */after directories last, as intended by upstream
" TODO: Remove duplicate */after directories
for directory in [$VIM . "/vimfiles", $HOME ."/.vim"]
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index caf9ea85b3..011521babd 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -13,6 +13,7 @@
;;; Copyright © 2021 Tissevert <tissevert+guix <at> marvid.fr>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
+;;; Copyright © 2022 SeerLite <seerlite <at> nixnet.email>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -111,7 +112,7 @@ (define-public vim
(lambda* (#:key inputs #:allow-other-keys)
;; One of the tests tests timezone-dependent functions.
(setenv "TZDIR"
- (search-input-directory inputs "share/zoneinfo"))
+ (search-input-directory (or native-inputs inputs) "share/zoneinfo"))
;; Make sure the TERM environment variable is set for the tests
(setenv "TERM" "xterm")))
@@ -147,6 +148,11 @@ (define-public vim
(mkdir-p vimdir)
(copy-file (assoc-ref inputs "guix.vim")
(string-append vimdir "/vimrc"))))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "GUIX_VIMRUNTIME")
+ (separator ",")
+ (files (list "share/vim/vimfiles")))))
(inputs
(list gawk ncurses perl tcsh)) ; For runtime/tools/vim32
(native-inputs
--
2.36.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Thu, 19 May 2022 01:09:02 GMT)
Full text and
rfc822 format available.
Message #71 received at 54221 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/vim.scm (neovim)[phases]: Add 'install-guix.vim phase
and remove trailing #t's.
[native-search-paths]: Add search path specification for 'GUIX_VIMRUNTIME'.
---
gnu/packages/vim.scm | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 011521babd..7697a03ef6 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -716,16 +716,25 @@ (define-public neovim
(setenv "LUA_PATH"
(string-join (map lua-path-spec lua-inputs) ";"))
(setenv "LUA_CPATH"
- (string-join (map lua-cpath-spec lua-inputs) ";"))
- #t)))
+ (string-join (map lua-cpath-spec lua-inputs) ";")))))
(add-after 'unpack 'prevent-embedding-gcc-store-path
(lambda _
;; nvim remembers its build options, including the compiler with
;; its complete path. This adds gcc to the closure of nvim, which
;; doubles its size. We remove the refirence here.
(substitute* "cmake/GetCompileFlags.cmake"
- (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))
- #t)))))
+ (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))))
+ (add-after 'install 'install-guix.vim
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((vimdir (string-append (assoc-ref outputs "out") "/share/nvim"))
+ (vimrc #$(local-file (search-auxiliary-file "guix.vim"))))
+ (mkdir-p vimdir)
+ (copy-file vimrc (string-append nvimdir "/sysinit.vim")))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "GUIX_VIMRUNTIME")
+ (separator ",")
+ (files (list "share/vim/vimfiles")))))
(inputs (list libuv-for-luv
msgpack
libtermkey
--
2.36.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Thu, 19 May 2022 01:12:01 GMT)
Full text and
rfc822 format available.
Message #74 received at 54221 <at> debbugs.gnu.org (full text, mbox):
Rebased on top of 182b25fb (<https://issues.guix.gnu.org/55045>) and
fixed the wrong lookup for tzdata files in inputs instead of
native-inputs again, as Maxime had pointed out (something I thought was
caused by my previous style/gexp patch when it was not). I wasn't able
to figure out how to test it though.
SeerLite
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Thu, 19 May 2022 01:15:02 GMT)
Full text and
rfc822 format available.
Message #77 received at 54221 <at> debbugs.gnu.org (full text, mbox):
Previously a hardcoded list of directories was used, which albeit quite
accurate during normal use, didn't fully respect the active Guix environment
and didn't make use of Guix's search-paths feature.
* gnu/packages/aux-files/guix.vim: Use 'GUIX_VIMRUNTIME' to set the runtimepath.
* gnu/packages/vim.scm (vim)[native-search-paths]: Add search path
specification for 'GUIX_VIMRUNTIME'.
[phases]: Search for tzdata files in the correct input fields.
---
gnu/packages/aux-files/guix.vim | 11 ++++-------
gnu/packages/vim.scm | 8 +++++++-
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/aux-files/guix.vim b/gnu/packages/aux-files/guix.vim
index 9397c53701..3c13a16b7d 100644
--- a/gnu/packages/aux-files/guix.vim
+++ b/gnu/packages/aux-files/guix.vim
@@ -1,10 +1,7 @@
-" This appends all of the vim plugins to the end of Vim's runtimepath.
-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], ',')
- endif
-endfor
+if !empty($GUIX_VIMRUNTIME)
+ set rtp+=$GUIX_VIMRUNTIME
+endif
+
" Unconditionally add */after directories last, as intended by upstream
" TODO: Remove duplicate */after directories
for directory in [$VIM . "/vimfiles", $HOME ."/.vim"]
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index caf9ea85b3..011521babd 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -13,6 +13,7 @@
;;; Copyright © 2021 Tissevert <tissevert+guix <at> marvid.fr>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
+;;; Copyright © 2022 SeerLite <seerlite <at> nixnet.email>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -111,7 +112,7 @@ (define-public vim
(lambda* (#:key inputs #:allow-other-keys)
;; One of the tests tests timezone-dependent functions.
(setenv "TZDIR"
- (search-input-directory inputs "share/zoneinfo"))
+ (search-input-directory (or native-inputs inputs) "share/zoneinfo"))
;; Make sure the TERM environment variable is set for the tests
(setenv "TERM" "xterm")))
@@ -147,6 +148,11 @@ (define-public vim
(mkdir-p vimdir)
(copy-file (assoc-ref inputs "guix.vim")
(string-append vimdir "/vimrc"))))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "GUIX_VIMRUNTIME")
+ (separator ",")
+ (files (list "share/vim/vimfiles")))))
(inputs
(list gawk ncurses perl tcsh)) ; For runtime/tools/vim32
(native-inputs
--
2.36.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Thu, 19 May 2022 01:15:02 GMT)
Full text and
rfc822 format available.
Message #80 received at 54221 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/vim.scm (neovim)[phases]: Add 'install-guix.vim phase
and remove trailing #t's.
[native-search-paths]: Add search path specification for 'GUIX_VIMRUNTIME'.
---
gnu/packages/vim.scm | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 011521babd..14e6f86544 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -716,16 +716,25 @@ (define-public neovim
(setenv "LUA_PATH"
(string-join (map lua-path-spec lua-inputs) ";"))
(setenv "LUA_CPATH"
- (string-join (map lua-cpath-spec lua-inputs) ";"))
- #t)))
+ (string-join (map lua-cpath-spec lua-inputs) ";")))))
(add-after 'unpack 'prevent-embedding-gcc-store-path
(lambda _
;; nvim remembers its build options, including the compiler with
;; its complete path. This adds gcc to the closure of nvim, which
;; doubles its size. We remove the refirence here.
(substitute* "cmake/GetCompileFlags.cmake"
- (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))
- #t)))))
+ (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))))
+ (add-after 'install 'install-guix.vim
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((vimdir (string-append (assoc-ref outputs "out") "/share/nvim"))
+ (vimrc #$(local-file (search-auxiliary-file "guix.vim"))))
+ (mkdir-p vimdir)
+ (copy-file vimrc (string-append nvimdir "/sysinit.vim"))))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "GUIX_VIMRUNTIME")
+ (separator ",")
+ (files (list "share/vim/vimfiles")))))
(inputs (list libuv-for-luv
msgpack
libtermkey
--
2.36.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Thu, 19 May 2022 01:16:02 GMT)
Full text and
rfc822 format available.
Message #83 received at 54221 <at> debbugs.gnu.org (full text, mbox):
Fixed missing ')'. Whoops.
SeerLite
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Tue, 24 May 2022 00:43:01 GMT)
Full text and
rfc822 format available.
Message #86 received at 54221 <at> debbugs.gnu.org (full text, mbox):
Previously a hardcoded list of directories was used, which albeit quite
accurate during normal use, didn't fully respect the active Guix environment
and didn't make use of Guix's search-paths feature.
* gnu/packages/aux-files/guix.vim: Use 'GUIX_VIMRUNTIME' to set the runtimepath.
* gnu/packages/vim.scm (vim)[native-search-paths]: Add search path
specification for 'GUIX_VIMRUNTIME'.
[phases]: Search for tzdata files in the correct input fields.
---
gnu/packages/aux-files/guix.vim | 11 ++++-------
gnu/packages/vim.scm | 10 ++++++++--
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/gnu/packages/aux-files/guix.vim b/gnu/packages/aux-files/guix.vim
index 9397c53701..3c13a16b7d 100644
--- a/gnu/packages/aux-files/guix.vim
+++ b/gnu/packages/aux-files/guix.vim
@@ -1,10 +1,7 @@
-" This appends all of the vim plugins to the end of Vim's runtimepath.
-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], ',')
- endif
-endfor
+if !empty($GUIX_VIMRUNTIME)
+ set rtp+=$GUIX_VIMRUNTIME
+endif
+
" Unconditionally add */after directories last, as intended by upstream
" TODO: Remove duplicate */after directories
for directory in [$VIM . "/vimfiles", $HOME ."/.vim"]
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index caf9ea85b3..791aecbb83 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -13,6 +13,7 @@
;;; Copyright © 2021 Tissevert <tissevert+guix <at> marvid.fr>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
+;;; Copyright © 2022 SeerLite <seerlite <at> nixnet.email>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -108,10 +109,10 @@ (define-public vim
(substitute* "src/testdir/test_autocmd.vim"
(("/bin/kill") (which "kill")))))
(add-before 'check 'set-environment-variables
- (lambda* (#:key inputs #:allow-other-keys)
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
;; One of the tests tests timezone-dependent functions.
(setenv "TZDIR"
- (search-input-directory inputs "share/zoneinfo"))
+ (search-input-directory (or native-inputs inputs) "share/zoneinfo"))
;; Make sure the TERM environment variable is set for the tests
(setenv "TERM" "xterm")))
@@ -147,6 +148,11 @@ (define-public vim
(mkdir-p vimdir)
(copy-file (assoc-ref inputs "guix.vim")
(string-append vimdir "/vimrc"))))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "GUIX_VIMRUNTIME")
+ (separator ",")
+ (files (list "share/vim/vimfiles")))))
(inputs
(list gawk ncurses perl tcsh)) ; For runtime/tools/vim32
(native-inputs
--
2.36.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Tue, 24 May 2022 00:43:01 GMT)
Full text and
rfc822 format available.
Message #89 received at 54221 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/vim.scm (neovim)[phases]: Add 'install-guix.vim phase
and remove trailing #t's.
[native-search-paths]: Add search path specification for 'GUIX_VIMRUNTIME'.
---
gnu/packages/vim.scm | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 791aecbb83..5e3cb4484d 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -716,16 +716,25 @@ (define-public neovim
(setenv "LUA_PATH"
(string-join (map lua-path-spec lua-inputs) ";"))
(setenv "LUA_CPATH"
- (string-join (map lua-cpath-spec lua-inputs) ";"))
- #t)))
+ (string-join (map lua-cpath-spec lua-inputs) ";")))))
(add-after 'unpack 'prevent-embedding-gcc-store-path
(lambda _
;; nvim remembers its build options, including the compiler with
;; its complete path. This adds gcc to the closure of nvim, which
;; doubles its size. We remove the refirence here.
(substitute* "cmake/GetCompileFlags.cmake"
- (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))
- #t)))))
+ (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))))
+ (add-after 'install 'install-guix.vim
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((vimdir (string-append (assoc-ref outputs "out") "/share/nvim"))
+ (vimrc #$(local-file (search-auxiliary-file "guix.vim"))))
+ (mkdir-p vimdir)
+ (copy-file vimrc (string-append vimdir "/sysinit.vim"))))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "GUIX_VIMRUNTIME")
+ (separator ",")
+ (files (list "share/vim/vimfiles")))))
(inputs (list libuv-for-luv
msgpack
libtermkey
--
2.36.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Tue, 24 May 2022 01:53:02 GMT)
Full text and
rfc822 format available.
Message #92 received at 54221 <at> debbugs.gnu.org (full text, mbox):
The last patches were broken. I did not realize I had done a "make
clean" inside my Guix repo and that made ./pre-inst-env guix use my
profile channel instead of the repo. Sorry about that:)
Now both build fine and work correctly. I also tested cross-compilation
(guix build --target=x86_64-linux-gnu and also
--target=aarch64-linux-gnu) but both fail. Note however that that was
also the case before my patches, and I've got no idea how to get it
working myself.
SeerLite
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Wed, 22 Feb 2023 20:08:01 GMT)
Full text and
rfc822 format available.
Message #95 received at 54221 <at> debbugs.gnu.org (full text, mbox):
Previously a hardcoded list of directories was used, which albeit quite
accurate during normal use, didn't fully respect the active Guix environment
and didn't make use of Guix's search-paths feature.
* gnu/packages/aux-files/guix.vim: Use 'GUIX_VIMRUNTIME' to set the runtimepath.
* gnu/packages/vim.scm (vim)[native-search-paths]: Add search path
specification for 'GUIX_VIMRUNTIME'.
[phases]: Search for tzdata files in the correct input fields.
---
gnu/packages/aux-files/guix.vim | 11 ++++-------
gnu/packages/vim.scm | 10 ++++++++--
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/gnu/packages/aux-files/guix.vim b/gnu/packages/aux-files/guix.vim
index 9397c53701..3c13a16b7d 100644
--- a/gnu/packages/aux-files/guix.vim
+++ b/gnu/packages/aux-files/guix.vim
@@ -1,10 +1,7 @@
-" This appends all of the vim plugins to the end of Vim's runtimepath.
-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], ',')
- endif
-endfor
+if !empty($GUIX_VIMRUNTIME)
+ set rtp+=$GUIX_VIMRUNTIME
+endif
+
" Unconditionally add */after directories last, as intended by upstream
" TODO: Remove duplicate */after directories
for directory in [$VIM . "/vimfiles", $HOME ."/.vim"]
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 6baf10915a..d4e4f88756 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -13,6 +13,7 @@
;;; Copyright © 2021 Tissevert <tissevert+guix <at> marvid.fr>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
;;; Copyright © 2022, 2023 Luis Henrique Gomes Higino <luishenriquegh2701 <at> gmail.com>
+;;; Copyright © 2023 SeerLite <seerlite <at> nixnet.email>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -112,10 +113,10 @@ (define-public vim
(substitute* "src/if_cscope.c"
(("/bin/sh") (search-input-file inputs "/bin/sh")))))
(add-before 'check 'set-environment-variables
- (lambda* (#:key inputs #:allow-other-keys)
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
;; One of the tests tests timezone-dependent functions.
(setenv "TZDIR"
- (search-input-directory inputs "share/zoneinfo"))
+ (search-input-directory (or native-inputs inputs) "share/zoneinfo"))
;; Make sure the TERM environment variable is set for the tests
(setenv "TERM" "xterm")))
@@ -154,6 +155,11 @@ (define-public vim
(mkdir-p vimdir)
(copy-file (assoc-ref inputs "guix.vim")
(string-append vimdir "/vimrc"))))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "GUIX_VIMRUNTIME")
+ (separator ",")
+ (files (list "share/vim/vimfiles")))))
(inputs
(list gawk ncurses perl tcsh)) ; For runtime/tools/vim32
(native-inputs
--
2.39.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Wed, 22 Feb 2023 20:09:01 GMT)
Full text and
rfc822 format available.
Message #98 received at 54221 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/vim.scm (neovim)[phases]: Add 'install-guix.vim phase
and remove trailing #t's.
[native-search-paths]: Add search path specification for 'GUIX_VIMRUNTIME'.
---
gnu/packages/vim.scm | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index d4e4f88756..c6bcd096a0 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -751,16 +751,25 @@ (define-public neovim
(setenv "LUA_PATH"
(string-join (map lua-path-spec lua-inputs) ";"))
(setenv "LUA_CPATH"
- (string-join (map lua-cpath-spec lua-inputs) ";"))
- #t)))
+ (string-join (map lua-cpath-spec lua-inputs) ";")))))
(add-after 'unpack 'prevent-embedding-gcc-store-path
(lambda _
;; nvim remembers its build options, including the compiler with
;; its complete path. This adds gcc to the closure of nvim, which
;; doubles its size. We remove the refirence here.
(substitute* "cmake/GetCompileFlags.cmake"
- (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))
- #t)))))
+ (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))))
+ (add-after 'install 'install-guix.vim
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((vimdir (string-append (assoc-ref outputs "out") "/share/nvim"))
+ (vimrc #$(local-file (search-auxiliary-file "guix.vim"))))
+ (mkdir-p vimdir)
+ (copy-file vimrc (string-append vimdir "/sysinit.vim"))))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "GUIX_VIMRUNTIME")
+ (separator ",")
+ (files (list "share/vim/vimfiles")))))
(inputs (list libuv-for-luv
msgpack
libtermkey
--
2.39.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Sat, 05 Aug 2023 12:29:02 GMT)
Full text and
rfc822 format available.
Message #101 received at 54221 <at> debbugs.gnu.org (full text, mbox):
Am Mittwoch, dem 22.02.2023 um 17:07 -0300 schrieb SeerLite:
> Previously a hardcoded list of directories was used, which albeit
> quite accurate during normal use, didn't fully respect the active
> Guix environment and didn't make use of Guix's search-paths feature.
>
> * gnu/packages/aux-files/guix.vim: Use 'GUIX_VIMRUNTIME' to set the
> runtimepath.
> * gnu/packages/vim.scm (vim)[native-search-paths]: Add search path
> specification for 'GUIX_VIMRUNTIME'.
> [phases]: Search for tzdata files in the correct input fields.
Should be [#:phases]<set-environment-variables>. For clarity's sake, I
think this phase should be renamed to <prepare-test-environment>, so
that it doesn't look as though these variables affect the build output.
Otherwise LGTM, but I'm not a vim person.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#54221
; Package
guix-patches
.
(Sat, 05 Aug 2023 12:35:01 GMT)
Full text and
rfc822 format available.
Message #104 received at 54221 <at> debbugs.gnu.org (full text, mbox):
Am Mittwoch, dem 22.02.2023 um 17:07 -0300 schrieb SeerLite:
> * gnu/packages/vim.scm (neovim)[phases]: Add 'install-guix.vim phase
> and remove trailing #t's.
Again, should be [#:phases].
When you need to join sentences with "and" it's typically a sign that
these are unrelated changes. At the very least, you should write out
those sentences. I'm also a proponent of doing stylistic changes in a
separate patch, but since you're already waiting for this a long time,
I'm willing to take this series without that.
> [native-search-paths]: Add search path specification for
> 'GUIX_VIMRUNTIME'.
Can we inherit this from vim via (package-native-search-paths vim)?
Sadly, this patch currently doesn't apply on master; or at least what I
have for master, which lacks any changes in vim.scm, though. Could you
send one with these points adjusted and --reroll-count=8?
Cheers
This bug report was last modified 1 year and 106 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.