GNU bug report logs - #68060
[PATCH 0/5] gnu: Add neovim-coqtail.

Previous Next

Package: guix-patches;

Reported by: Jean-Pierre De Jesus DIAZ <jean <at> foundationdevices.com>

Date: Wed, 27 Dec 2023 15:29:02 UTC

Severity: normal

Tags: patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 68060 <at> debbugs.gnu.org (full text, mbox):

From: Jean-Pierre De Jesus DIAZ <jean <at> foundationdevices.com>
To: 68060 <at> debbugs.gnu.org
Cc: Jean-Pierre De Jesus DIAZ <jean <at> foundationdevices.com>
Subject: [PATCH 4/5] gnu: vim-coqtail: Allow using neovim for tests.
Date: Wed, 27 Dec 2023 16:31:49 +0100
* gnu/packages/vim.scm (vim-coqtail): Allow using neovim for tests.

Change-Id: I114b07dd9cf525a5571a37f51b2e6b2a57d5be46
---
 gnu/packages/vim.scm | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index e27feb13f7..5f211b120d 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -475,7 +475,8 @@ (define-public vim-coqtail
          #:phases
          (modify-phases %standard-phases
            (add-before 'install 'check
-             (lambda* (#:key inputs native-inputs tests? #:allow-other-keys)
+             (lambda* (#:key inputs native-inputs tests? vim? neovim?
+                       #:allow-other-keys)
                (when tests?
                  (display "Running Python unit tests.\n")
                  (setenv "PYTHONPATH" (string-append (getcwd) "/python"))
@@ -489,12 +490,19 @@ (define-public vim-coqtail
                                               "vim-vader"))
                         (vader-path (string-append
                                       vim-vader
-                                      "/share/vim/vimfiles/pack/guix/start/vader")))
+                                      (if vim?
+                                        "/share/vim/vimfiles"
+                                        "/share/nvim/site")
+                                      "/pack/guix/start/vader"))
+                        (command `(,@(if vim? '("vim" "-E") '())
+                                   ,@(if neovim? '("nvim" "--headless") '())
+                                   "-Nu" "vimrc"
+                                   "-c" "Vader! *.vader")))
                    (with-directory-excursion "tests/vim"
+                     (when neovim?
+                       (setenv "HOME" (getcwd)))
                      (setenv "VADER_PATH" vader-path)
-                     (invoke "vim"
-                             "-E" "-Nu" "vimrc"
-                             "-c" "Vader! *.vader")))
+                     (apply invoke command)))
 
                  ;; Remove __pycache__ files generated during testing so that
                  ;; they don't get installed.
-- 
2.41.0





This bug report was last modified 1 year and 138 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.