summary refs log tree commit diff
path: root/gnu/packages/vim.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/vim.scm')
-rw-r--r--gnu/packages/vim.scm57
1 files changed, 22 insertions, 35 deletions
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index cda1e144ec..3e120fac17 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -70,7 +70,7 @@
 (define-public vim
   (package
     (name "vim")
-    (version "8.2.2017")
+    (version "8.2.2067")
     (source (origin
              (method git-fetch)
              (uri (git-reference
@@ -79,7 +79,7 @@
              (file-name (git-file-name name version))
              (sha256
               (base32
-               "0ad0c4wv8zf28wns06k82c19rs63ilsphnglajhgw5j2a1aqplyn"))))
+               "02cd953h69k9klrcwi756namwg39ka7if9ccc399ihb1l5f3kr66"))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
@@ -121,37 +121,26 @@
              (substitute* "src/testdir/test_swap.vim"
                (("if !IsRoot\\(\\)") "if 0"))
 
-             ;; These tests compares output against a golden ‘…/|b|i|n|/|s|h…’
-             ;; literal.  We need to match that and substitute a similarly
-             ;; ‘spliced’ path to ‘sh’ in the store, truncated to the last
-             ;; 44 (spliced: 88) or so characters.
-             ;; Two of the tests we simply skip instead of patching the screen dump.
+             ;; 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")))
              (substitute* "src/testdir/test_popupwin.vim"
-               ((".*Test_popupwin_term_0[1|2].*") ""))
-             ;; We replace the external program call (!) with a scroll-back (<)
-             ;; symbol and blindly fix some other differences based on error output.
-             (let ((splice (lambda (s separator)
-                               (string-join (map string (string->list s))
-                                            separator))))
-               (substitute* "src/testdir/dumps/Test_terminal_from_cmd.dump"
-                 (((splice "/bin/sh" "\\|"))
-                  (splice (string-take-right (which "sh") 44) "|"))
-                 (("^\\|!") "|<")
-                 (("@37") ""))
-               (substitute* '("src/testdir/dumps/Test_terminal_scrollback_1.dump"
-                              "src/testdir/dumps/Test_terminal_scrollback_2.dump")
-                 (((splice "/bin/sh" "\\|"))
-                  (splice (string-take-right (which "sh") 61) "|"))
-                 (("^\\|!") "|<")
-                 ((" @55") " @1"))
-               (substitute* '("src/testdir/dumps/Test_terminal_scrollback_3.dump"
-                              "src/testdir/dumps/Test_popupwin_term_03.dump"
-                              "src/testdir/dumps/Test_popupwin_term_04.dump")
-                 (((splice "/bin/sh" "\\|"))
-                  (splice (string-take-right (which "sh") 62) "|"))
-                 (("^\\|!") "|<")
-                 (("\\]\\| @56") "]| @1")))
-             #t)))))
+               ((".*Test_popup_drag_termwin.*" line)
+                (string-append line "return\n")))
+             #t))
+         (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"))
+               #t))))))
     (inputs
      `(("gawk" ,gawk)
        ("ncurses" ,ncurses)
@@ -159,6 +148,7 @@
        ("tcsh" ,tcsh)))                 ; For runtime/tools/vim32
     (native-inputs
      `(("libtool" ,libtool)
+       ("guix.vim" ,(search-auxiliary-file "guix.vim"))
 
        ;; For tests.
        ("tzdata" ,tzdata-for-tests)))
@@ -814,9 +804,6 @@ also works as a library for connecting to and scripting neovim processes
 through its msgpack-rpc API.")
     (license license:asl2.0)))
 
-(define-public python2-pynvim
-  (package-with-python2 python-pynvim))
-
 (define-public vim-guix-vim
   (package
     (name "vim-guix-vim")