From: SeerLite via Guix-patches via <guix-patches@gnu.org>
To: 54221@debbugs.gnu.org
Cc: SeerLite <seerlite@nixnet.email>
Subject: [bug#54221] [PATCH v6 1/2] gnu: vim: Use native-search-paths to search for plugins.
Date: Mon, 23 May 2022 20:41:54 -0400 [thread overview]
Message-ID: <81321483b3ea03870a94a5fce3931ba176269f73.1653352914.git.seerlite@nixnet.email> (raw)
In-Reply-To: <e2e60850-c335-48b6-bdc2-f6bfc7dbefb3@nixnet.email>
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@marvid.fr>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701@gmail.com>
+;;; Copyright © 2022 SeerLite <seerlite@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
next prev parent reply other threads:[~2022-05-24 0:43 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-02 13:11 [bug#54221] [PATCH 0/4] vim: Detect plugins via search paths SeerLite via Guix-patches via
2022-03-02 13:17 ` [bug#54221] [PATCH 1/4] gnu: vim: Use native-search-paths to search for plugins SeerLite via Guix-patches via
2022-03-02 13:17 ` [bug#54221] [PATCH 2/4] gnu: neovim: Search and use installed plugins, like vim SeerLite via Guix-patches via
2022-03-02 18:30 ` Maxime Devos
2022-03-02 13:17 ` [bug#54221] [PATCH 3/4] gnu: vim: Update package style SeerLite via Guix-patches via
2022-03-02 18:25 ` Maxime Devos
2022-03-02 18:29 ` Maxime Devos
2022-03-03 16:49 ` SeerLite via Guix-patches via
2022-03-03 17:46 ` Maxime Devos
2022-03-02 18:35 ` Maxime Devos
2022-03-03 17:40 ` SeerLite via Guix-patches via
2022-03-16 14:16 ` [bug#54221] [PATCH 0/4] vim: Detect plugins via search paths Ludovic Courtès
2022-05-13 2:34 ` seerlite--- via Guix-patches via
2022-05-19 1:11 ` [bug#54221] [PATCH v4 2/2] gnu: neovim: Search and use installed plugins, like vim SeerLite via Guix-patches via
2022-03-02 13:17 ` [bug#54221] [PATCH 4/4] gnu: neovim: Update package style SeerLite via Guix-patches via
2022-03-02 18:40 ` Maxime Devos
2022-03-03 17:36 ` SeerLite via Guix-patches via
2022-03-02 18:33 ` [bug#54221] [PATCH 1/4] gnu: vim: Use native-search-paths to search for plugins Maxime Devos
2022-05-13 2:17 ` [bug#54221] [PATCH v2 1/2] " SeerLite via Guix-patches via
2022-05-13 2:17 ` [bug#54221] [PATCH v2 2/2] gnu: neovim: Search and use installed plugins, like vim SeerLite via Guix-patches via
2022-05-19 0:50 ` [bug#54221] [PATCH v3 1/2] gnu: vim: Use native-search-paths to search for plugins SeerLite via Guix-patches via
2022-05-19 0:50 ` [bug#54221] [PATCH v3 2/2] gnu: neovim: Search and use installed plugins, like vim SeerLite via Guix-patches via
2022-05-19 1:08 ` [bug#54221] [PATCH v4 1/2] gnu: vim: Use native-search-paths to search for plugins SeerLite via Guix-patches via
2022-05-19 1:08 ` [bug#54221] [PATCH v4 2/2] gnu: neovim: Search and use installed plugins, like vim SeerLite via Guix-patches via
2022-05-19 1:14 ` [bug#54221] [PATCH v5 1/2] gnu: vim: Use native-search-paths to search for plugins SeerLite via Guix-patches via
2022-05-19 1:14 ` [bug#54221] [PATCH v5 2/2] gnu: neovim: Search and use installed plugins, like vim SeerLite via Guix-patches via
2022-05-19 1:15 ` SeerLite via Guix-patches via
2022-05-24 0:41 ` SeerLite via Guix-patches via [this message]
2022-05-24 0:41 ` [bug#54221] [PATCH v6 " SeerLite via Guix-patches via
2022-05-24 1:52 ` [bug#54221] [PATCH v6 1/2] gnu: vim: Use native-search-paths to search for plugins SeerLite via Guix-patches via
2023-02-22 20:07 ` [bug#54221] [PATCH " SeerLite via Guix-patches via
2023-02-22 20:07 ` [bug#54221] [PATCH 2/2] gnu: neovim: Search and use installed plugins, like vim SeerLite via Guix-patches via
2023-08-05 12:34 ` Liliana Marie Prikler
2023-08-05 12:28 ` [bug#54221] [PATCH 1/2] gnu: vim: Use native-search-paths to search for plugins Liliana Marie Prikler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=81321483b3ea03870a94a5fce3931ba176269f73.1653352914.git.seerlite@nixnet.email \
--to=guix-patches@gnu.org \
--cc=54221@debbugs.gnu.org \
--cc=seerlite@nixnet.email \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.