gnu: Add python-pyshp.
[jackhill/guix/guix.git] / gnu / packages / vim.scm
index 87539e3..7a37162 100644 (file)
@@ -1,14 +1,16 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
-;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 HiPhish <hiphish@posteo.de>
 ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2019, 2020 Jakub Kądziołka <kuba@kadziolka.net>
-;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us>
+;;; Copyright © 2020, 2021 Jack Hill <jackhill@jackhill.us>
+;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2021 Tissevert <tissevert+guix@marvid.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -41,6 +43,7 @@
   #:use-module (gnu packages attr)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages enlightenment)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gawk)
   #:use-module (gnu packages gettext)
@@ -70,7 +73,7 @@
 (define-public vim
   (package
     (name "vim")
-    (version "8.2.1964")
+    (version "8.2.2689")
     (source (origin
              (method git-fetch)
              (uri (git-reference
              (file-name (git-file-name name version))
              (sha256
               (base32
-               "0rhx93xq5gk7lgxnm0h0lnwl6zgifcnl0c9k0f4fqb6cx81ihp4q"))))
+               "0l0hkr8cw7fdsfc5zzcxx3q1wmv9k3hrgalvffq0l69lviqdgh0p"))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
        #:parallel-tests? #f
+       ;; Fix test_signals.vim. https://github.com/vim/vim/issues/7402
+       #:make-flags (list "CFLAGS=-D_REENTRANT")
        #:phases
        (modify-phases %standard-phases
          (add-after 'configure 'patch-absolute-paths
              ;; Make sure the TERM environment variable is set for the tests
              (setenv "TERM" "xterm")
              #t))
-         (add-before 'check 'skip-failing-tests
+         (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)
              ;; 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")))
-             #t)))))
+             #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)
        ("tcsh" ,tcsh)))                 ; For runtime/tools/vim32
     (native-inputs
      `(("libtool" ,libtool)
+       ("guix.vim" ,(search-auxiliary-file "guix.vim"))
 
        ;; For tests.
        ("tzdata" ,tzdata-for-tests)))
@@ -204,11 +221,14 @@ with the editor vim.")))
              "--enable-xim"
              "--disable-selinux"
              "--enable-gui")
-       ;; This flag fixes the following error:
-       ;; .../libpython3.7m.a(pyexpat.o): undefined reference to symbol 'XML_FreeContentModel'
-       ;; .../libexpat.so.1: error adding symbols: DSO missing from command line
-       #:make-flags '("LDFLAGS=-lexpat")
        ,@(substitute-keyword-arguments (package-arguments vim)
+           ;; This flag fixes the following error:
+           ;; .../libpython3.7m.a(pyexpat.o): undefined reference to symbol 'XML_FreeContentModel'
+           ;; .../libexpat.so.1: error adding symbols: DSO missing from command line
+           ((#:make-flags flags)
+            `(append
+              (list "LDFLAGS=-lexpat")
+              (delete "CFLAGS=-D_REENTRANT" ,flags)))
            ((#:phases phases)
             `(modify-phases ,phases
                (add-before 'check 'start-xserver
@@ -449,7 +469,7 @@ trouble using them, because you do not have to remember each snippet name.")
 (define-public vim-fugitive
   (package
     (name "vim-fugitive")
-    (version "3.2")
+    (version "3.3")
     (source
       (origin
         (method git-fetch)
@@ -459,7 +479,7 @@ trouble using them, because you do not have to remember each snippet name.")
         (file-name (git-file-name name version))
         (sha256
          (base32
-          "1jbn5jxadccmcz01j94d0i1bp74cixr0fpxxf1h0aqdf1ljk3d7n"))))
+          "1ybmy2dk9zsmd3kyyj40qn20gzgd16n5p77sjxp8bspx3zb7km5y"))))
     (build-system copy-build-system)
     (arguments
      '(#:install-plan
@@ -561,6 +581,43 @@ are detected, the user is notified.")
     (home-page "https://github.com/vim-syntastic/syntastic")
     (license license:wtfpl2)))
 
+(define-public vim-solarized
+  (let ((commit "62f656a02f93c5190a8753159e34b385588d5ff3")
+        (revision "1"))
+    (package
+      (name "vim-solarized")
+      (version (git-version "1.0.0beta1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/altercation/solarized")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0001mz5v3a8zvi3gzmxhi3yrsb6hs7qf6i497arsngnvj2cwn61d"))))
+      (build-system copy-build-system)
+      (arguments
+       '(#:install-plan
+         '(("vim-colors-solarized/colors" "share/vim/vimfiles/")
+           ("vim-colors-solarized/doc" "share/vim/vimfiles/"))))
+      (home-page "https://github.com/altercation/vim-colors-solarized")
+      (synopsis "Solarized color scheme for Vim")
+      (description
+       "This package provides the Solarized theme as a Vim color scheme.
+
+Solarized is a 16-color palette comprising 8 monotones and 8 accent
+colors.  It was designed for use with both terminal and GUI applications, and
+has a dark and a light mode.
+
+Based on CIELAB lightness relationships between colors, this theme reduces
+brightness contrast but retains contrasting hues based on colorwheel relations
+for syntax highlighting readability.
+
+It keeps the same selective contrast relationships and overall feel when
+switching between the light and dark background modes.")
+      (license license:expat))))
+
 (define-public editorconfig-vim
   (package
     (name "editorconfig-vim")
@@ -639,7 +696,7 @@ are detected, the user is notified.")))
                      (lambda (prefix)
                        (let ((path (string-append prefix "/share/lua/" lua-version)))
                          (string-append path "/?.lua;" path "/?/?.lua"))))
-                    (lua-inputs (map (cute assoc-ref %build-inputs <>)
+                    (lua-inputs (map (cute assoc-ref inputs <>)
                                      '("lua"
                                        "lua-luv"
                                        "lua-lpeg"
@@ -690,6 +747,48 @@ refactor Vim in order to:
     ;; except for parts that were contributed under the Vim license.
     (license (list license:asl2.0 license:vim))))
 
+(define-public eovim
+  (package
+    (name "eovim")
+    (version "0.2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/jeanguyomarch/eovim/")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "06b7crmz3wvvq15ncl0jk20s8j1pmna2jin0k5y5n5qxpafbgp3k"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:tests? #false ;no tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'configure 'reference-nvim
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((nvim (string-append (assoc-ref inputs "neovim")
+                                        "/bin/nvim")))
+               ;; This substitution should change one line, and replaces the default
+               ;; value in the struct of options with an absolute store reference.
+               (substitute* "../source/src/main.c"
+                 (("(^[[:blank:]]+\\.nvim = \")nvim" _ start)
+                  (string-append start nvim))))))
+         (add-before 'build 'set-home
+           (lambda _ (setenv "HOME" "/tmp"))))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("efl" ,efl)
+       ("msgpack" ,msgpack)
+       ("neovim" ,neovim)))
+    (home-page "https://github.com/jeanguyomarch/eovim/")
+    (synopsis "EFL GUI for Neovim")
+    (description "Graphical Neovim interface based on the @acronym{EFL, Enlightenment
+Foundation Libraries} toolkit.  Its features include customizable appearance
+and support for fonts with ligatures.")
+    (license license:expat)))
+
 (define-public vifm
   (package
     (name "vifm")
@@ -794,13 +893,10 @@ 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")
-    (version "0.1")
+    (version "0.1.1")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -809,7 +905,7 @@ through its msgpack-rpc API.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1f8h8m96fqh3f9hy87spgh9kdqzyxl11n9s3rywvyq5xhn489bnk"))))
+                "10bfy0dgwizxr56b4272b7sqajpr6lnz332pzx055dis2zzjap8z"))))
     (build-system copy-build-system)
     (arguments
      '(#:install-plan
@@ -827,7 +923,7 @@ through its msgpack-rpc API.")
 (define-public vim-asyncrun
   (package
     (name "vim-asyncrun")
-    (version "2.7.5")
+    (version "2.8.6")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -836,7 +932,7 @@ through its msgpack-rpc API.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "02fiqf4rcrxbcgvj02mpd78wkxsrnbi54aciwh9fv5mnz5ka249m"))))
+                "11zcw0sll6qg6ha0rr6n1cw5v73azvf7ycwn9lgiwa5cj7rrqjf4"))))
     (build-system copy-build-system)
     (arguments
      '(#:install-plan