1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
3 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
5 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
7 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2019 HiPhish <hiphish@posteo.de>
9 ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
10 ;;; Copyright © 2019, 2020 Jakub Kądziołka <kuba@kadziolka.net>
11 ;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages vim)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix utils)
32 #:use-module (guix download)
33 #:use-module (guix git-download)
34 #:use-module (guix build-system cmake)
35 #:use-module (guix build-system copy)
36 #:use-module (guix build-system gnu)
37 #:use-module (guix build-system python)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages acl)
40 #:use-module (gnu packages admin) ; For GNU hostname
41 #:use-module (gnu packages attr)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages fontutils)
45 #:use-module (gnu packages gawk)
46 #:use-module (gnu packages gettext)
47 #:use-module (gnu packages glib)
48 #:use-module (gnu packages gperf)
49 #:use-module (gnu packages groff)
50 #:use-module (gnu packages gtk)
51 #:use-module (gnu packages image)
52 #:use-module (gnu packages jemalloc)
53 #:use-module (gnu packages libevent)
54 #:use-module (gnu packages linux)
55 #:use-module (gnu packages lua)
56 #:use-module (gnu packages ncurses)
57 #:use-module (gnu packages perl)
58 #:use-module (gnu packages pkg-config)
59 #:use-module (gnu packages python)
60 #:use-module (gnu packages python-xyz)
61 #:use-module (gnu packages ruby)
62 #:use-module (gnu packages serialization)
63 #:use-module (gnu packages shells)
64 #:use-module (gnu packages tcl)
65 #:use-module (gnu packages text-editors)
66 #:use-module (gnu packages terminals)
67 #:use-module (gnu packages xdisorg)
68 #:use-module (gnu packages xorg))
77 (url "https://github.com/vim/vim")
78 (commit (string-append "v" version))))
79 (file-name (git-file-name name version))
82 "170k855vscixnk6rz01i3k22crjiz8b2h83fnm2b2ccha0jyn9mf"))))
83 (build-system gnu-build-system)
85 `(#:test-target "test"
88 (modify-phases %standard-phases
89 (add-after 'configure 'patch-config-files
91 (substitute* "runtime/tools/mve.awk"
92 (("/usr/bin/nawk") (which "gawk")))
93 (substitute* '("src/testdir/Makefile"
94 "src/testdir/test_normal.vim"
95 "src/testdir/test_system.vim"
96 "src/testdir/test_terminal.vim")
97 (("/bin/sh") (which "sh")))
98 (substitute* "src/testdir/test_autocmd.vim"
99 (("/bin/kill") (which "kill")))
101 (add-before 'check 'set-environment-variables
102 (lambda* (#:key inputs #:allow-other-keys)
103 ;; One of the tests tests timezone-dependent functions.
105 (string-append (assoc-ref inputs "tzdata")
108 ;; Make sure the TERM environment variable is set for the tests
109 (setenv "TERM" "xterm")
111 (add-before 'check 'skip-failing-tests
113 ;; This test assumes that PID 1 is run as root and that the user
114 ;; running the test suite does not have permission to kill(1, 0)
115 ;; it. This is not true in the build container, where both PID 1
116 ;; and the test suite are run as the same user. Skip the test.
117 ;; An alternative fix would be to patch the PID used to a random
118 ;; 32-bit value and hope it never shows up in the test environment.
119 (substitute* "src/testdir/test_swap.vim"
120 (("if !IsRoot\\(\\)") "if 0"))
122 ;; These tests fail on upstream's CI on FreeBSD because they are
123 ;; run as root. They fail for us because PID 1 and the test suite
124 ;; are run by the same user.
125 (substitute* '("src/testdir/test_backup.vim"
126 "src/testdir/test_writefile.vim")
127 (("CheckNotBSD") "throw 'Skipped: this test fails on Guix'")
128 (("'bsd'") "'unix'"))
130 ;; This test checks how the terminal looks after executing some
131 ;; actions. The path of the bash binary is shown, which results in
132 ;; a difference being detected. Patching the expected result is
133 ;; non-trivial due to the special format used, so skip the test.
134 (substitute* "src/testdir/test_terminal.vim"
135 ((".*Test_terminal_postponed_scrollback.*" line)
136 (string-append line "return\n")))
142 ("tcsh" ,tcsh))) ; For runtime/tools/vim32
144 `(("libtool" ,libtool)
147 ("tzdata" ,tzdata-for-tests)))
148 (home-page "https://www.vim.org/")
149 (synopsis "Text editor based on vi")
150 ;; The description shares language with the vim-full package. When making
151 ;; changes, check if the other description also needs to be updated.
153 "Vim is a highly configurable text editor built to enable efficient text
154 editing. It is an improved version of the vi editor distributed with most UNIX
157 Vim is often called a \"programmer's editor,\" and so useful for programming
158 that many consider it an entire IDE. It's not just for programmers, though.
159 Vim is perfect for all kinds of text editing, from composing email to editing
160 configuration files.")
161 (license license:vim)))
164 (package (inherit vim)
167 `(#:make-flags '("CC=gcc")
168 #:tests? #f ; there are none
170 (modify-phases %standard-phases
172 (add-after 'unpack 'chdir
177 (lambda* (#:key outputs #:allow-other-keys)
178 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
179 (install-file "xxd" bin)
183 (synopsis "Hexdump utility from vim")
184 (description "This package provides the Hexdump utility xxd that comes
185 with the editor vim.")))
187 (define-public vim-full
189 ;; This package should share its source with Vim, but it doesn't
190 ;; build reliably, and we want to keep Vim up to date due to the
191 ;; frequency of important bug fixes.
196 (list (string-append "--with-lua-prefix="
197 (assoc-ref %build-inputs "lua"))
198 "--with-features=huge"
199 "--enable-python3interp=yes"
200 "--enable-perlinterp=yes"
201 "--enable-rubyinterp=yes"
202 "--enable-tclinterp=yes"
203 "--enable-luainterp=yes"
210 ;; This flag fixes the following error:
211 ;; .../libpython3.7m.a(pyexpat.o): undefined reference to symbol 'XML_FreeContentModel'
212 ;; .../libexpat.so.1: error adding symbols: DSO missing from command line
213 #:make-flags '("LDFLAGS=-lexpat")
214 ,@(substitute-keyword-arguments (package-arguments vim)
216 `(modify-phases ,phases
217 (add-before 'check 'skip-test87
218 ;; This test fails for unknown reasons after switching
219 ;; to a git checkout.
221 (delete-file "src/testdir/test87.ok")
222 (delete-file "src/testdir/test87.in")
223 (substitute* '("src/Makefile"
224 "src/testdir/Make_vms.mms")
226 (substitute* "src/testdir/Make_all.mak"
227 (("test86.out \\\\") "test86")
230 (add-before 'check 'start-xserver
231 (lambda* (#:key inputs #:allow-other-keys)
232 ;; Some tests require an X server, but does not start one.
233 (let ((xorg-server (assoc-ref inputs "xorg-server"))
235 (setenv "DISPLAY" display)
236 (zero? (system (string-append xorg-server "/bin/Xvfb "
237 display " &")))))))))))
239 `(("pkg-config" ,pkg-config)
240 ("xorg-server" ,xorg-server-for-tests)
241 ,@(package-native-inputs vim)))
247 ("fontconfig" ,fontconfig)
248 ("freetype" ,freetype)
249 ("gdk-pixbuf" ,gdk-pixbuf)
250 ("gettext" ,gettext-minimal)
254 ("harfbuzz" ,harfbuzz)
259 ("libxdmcp" ,libxdmcp)
268 ,@(package-inputs vim)))
269 ;; The description shares language with the vim package. When making
270 ;; changes, check if the other description also needs to be updated.
271 (description "Vim is a highly configurable text editor built to enable efficient text
272 editing. It is an improved version of the vi editor distributed with most UNIX
275 Vim is often called a \"programmer's editor,\" and so useful for programming
276 that many consider it an entire IDE. It's not just for programmers, though.
277 Vim is perfect for all kinds of text editing, from composing email to editing
280 This package provides a version of Vim with many optional features enabled.
281 It includes a graphical interface, @command{gvim}, and support for plugins
282 written in the Python 3, Perl, Ruby, Tcl, and Lua programming languages.")))
284 (define-public vim-neocomplete
286 (name "vim-neocomplete")
292 (url "https://github.com/Shougo/neocomplete.vim")
293 (commit (string-append "ver." version))))
294 (file-name (git-file-name name version))
297 "1h6sci5mhdfg6sjsjpi8l5li02hg858zcayiwl60y9j2gqnd18lv"))))
298 (build-system copy-build-system)
301 '(("autoload" "share/vim/vimfiles/")
302 ("doc" "share/vim/vimfiles/")
303 ("plugin" "share/vim/vimfiles/"))))
304 (synopsis "Next generation completion framework for Vim")
306 "@code{neocomplete}, an abbreviation of 'neo-completion with cache',
308 It provides keyword completion system by maintaining a cache of keywords in
309 the current buffer. Neocomplete can be customized easily and has many more
310 features than Vim's built-in completion.")
311 (home-page "https://github.com/Shougo/neocomplete.vim/")
312 (license license:expat)))
314 ;; There are no release tarballs.
315 (define-public vim-neosnippet-snippets
316 (let ((commit "8e2b1c0cab9ed9a832b3743dbb65e9966a64331a")
319 (name "vim-neosnippet-snippets")
320 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
325 (url "https://github.com/Shougo/neosnippet-snippets")
327 (file-name (string-append name "-" version "-checkout"))
330 "151wpvbj6jb9jdkbhj3b77f5sq7y328spvwfbqyj1y32rg4ifmc6"))))
331 (build-system copy-build-system)
334 '(("neosnippets" "share/vim/vimfiles/"))))
335 (synopsis "Snippets for neosnippet")
337 "@code{neosnippet-snippets} provides standard snippets for the Vim plugin
338 @code{neosnippet}. Snippets are small templates for commonly used code that
339 you can fill in on the fly.")
340 (home-page "https://github.com/Shougo/neosnippet-snippets")
341 (license license:expat))))
343 ;; The released tarball is too old for our Vim.
344 (define-public vim-neosnippet
345 (let ((commit "1bd7e23c79b73da16eb0c9469b25c376d3594583")
348 (name "vim-neosnippet")
349 (version (string-append "4.2-" revision "." (string-take commit 7)))
354 (url "https://github.com/Shougo/neosnippet.vim/")
356 (file-name (string-append name "-" version "-checkout"))
359 "0k80syscmpnj38ks1fq02ds59g0r4jlg9ll7z4qc048mgi35alw5"))))
360 (build-system copy-build-system)
363 '(("autoload" "share/vim/vimfiles/")
364 ("doc" "share/vim/vimfiles/")
365 ("ftdetect" "share/vim/vimfiles/")
366 ("ftplugin" "share/vim/vimfiles/")
367 ("indent" "share/vim/vimfiles/")
368 ("plugin" "share/vim/vimfiles/")
369 ("rplugin" "share/vim/vimfiles/")
370 ("syntax" "share/vim/vimfiles/"))))
371 (synopsis "Snippet support for Vim")
373 "@code{neosnippet}, is a plugin for Vim which adds snippet support to Vim.
374 Snippets are small templates for commonly used code that you can fill in on
375 the fly. To use snippets can increase your productivity in Vim a lot.
376 The functionality of this plug-in is quite similar to plug-ins like
377 @code{snipMate.vim} or @code{snippetsEmu.vim}. But since you can choose
378 snippets with the neocomplcache / neocomplete interface, you might have less
379 trouble using them, because you do not have to remember each snippet name.")
380 (home-page "https://github.com/Shougo/neosnippet.vim/")
381 (license license:expat))))
383 (define-public vim-scheme
384 (let ((commit "93827987c10f2d5dc519166a761f219204926d5f")
388 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
393 (url "http://git.foldling.org/vim-scheme.git")
395 (file-name (string-append name "-" version "-checkout"))
398 "1ynjr1109dxgj0lz261gmzz3wf5ap1m6j6hnvl3lcyv66a4y8pjv"))))
399 (build-system copy-build-system)
402 '(("after" "share/vim/vimfiles/")
403 ("ftplugin" "share/vim/vimfiles/")
404 ("syntax" "share/vim/vimfiles/"))))
405 (synopsis "Scheme syntax for Vim")
407 "@code{vim-scheme} provides Scheme support for Vim (R7RS and CHICKEN).")
408 (home-page "https://foldling.org/git/vim-scheme.git/")
409 (license license:public-domain))))
411 (define-public vim-luna
412 (let ((commit "633619953dcf8577168e255230f96b05f28d6371")
416 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
421 (url "https://github.com/notpratheek/vim-luna")
423 (file-name (string-append name "-" version "-checkout"))
426 "0ka3qbhsh8lix1vyj4678j7dnchkd8khhirrnn3aylxxf8fpqyg8"))))
427 (build-system copy-build-system)
430 '(("colors" "share/vim/vimfiles/"))))
431 (synopsis "Dark color theme for Vim")
433 "@code{vim-luna} is a dark color theme for Vim.")
434 (home-page "https://github.com/notpratheek/vim-luna")
435 (license license:expat))))
437 ;; There are no tarball releases.
438 (define-public vim-context-filetype
439 (let ((commit "5e85f8cae26806f391aefe2661791a6de53bcea2")
442 (name "vim-context-filetype")
443 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
448 (url "https://github.com/Shougo/context_filetype.vim")
450 (file-name (string-append name "-" version "-checkout"))
453 "0alvrfhmd91zkd9h83s8wvgyq4iakcf6rybsyjd369qbgpcqky89"))))
454 (build-system copy-build-system)
457 '(("doc" "share/vim/vimfiles/")
458 ("autoload" "share/vim/vimfiles/"))))
459 (synopsis "Context filetype library for Vim")
461 "@code{vim-context-filetype} is context filetype library for Vim script.")
462 (home-page "https://github.com/Shougo/context_filetype.vim")
463 (license license:expat)))) ; ??? check again
465 (define-public vim-fugitive
467 (name "vim-fugitive")
473 (url "https://github.com/tpope/vim-fugitive.git")
474 (commit (string-append "v" version))))
475 (file-name (git-file-name name version))
478 "1jbn5jxadccmcz01j94d0i1bp74cixr0fpxxf1h0aqdf1ljk3d7n"))))
479 (build-system copy-build-system)
482 '(("autoload" "share/vim/vimfiles/")
483 ("doc" "share/vim/vimfiles/")
484 ("ftdetect" "share/vim/vimfiles/")
485 ("plugin" "share/vim/vimfiles/")
486 ("syntax" "share/vim/vimfiles/"))))
487 (home-page "https://github.com/tpope/vim-fugitive")
488 (synopsis "Vim plugin to work with Git")
489 (description "Vim-fugitive is a wrapper for Vim that complements the
490 command window, where you can stage and review your changes before the next
491 commit or run any Git arbitrary command.")
492 (license license:vim))) ; distributed under the same license as vim
494 (define-public vim-airline
502 (url "https://github.com/vim-airline/vim-airline")
503 (commit (string-append "v" version))))
504 (file-name (git-file-name name version))
507 "1aksmr73648pvyc75pfdz28k2d4ky52rn7xiwcv7lz87q3vqld7k"))))
508 (build-system copy-build-system)
511 '(("autoload" "share/vim/vimfiles/")
512 ("doc" "share/vim/vimfiles/")
513 ("plugin" "share/vim/vimfiles/")
514 ("t" "share/vim/vimfiles/"))))
515 (synopsis "Statusline for Vim")
517 "@code{vim-airline} is an extensible statusline for Vim.
518 It can be extended and costumized with themes, works with unicode fonts
519 and powerline symbols, etc.")
520 (home-page "https://github.com/vim-airline/vim-airline")
521 (license license:expat)))
523 ;; There are no tarball releases.
524 (define-public vim-airline-themes
525 (let ((commit "e6f233231b232b6027cde6aebeeb18d9138e5324")
528 (name "vim-airline-themes")
529 (version (git-version "0.0.0" revision commit))
534 (url "https://github.com/vim-airline/vim-airline-themes")
536 (file-name (git-file-name name version))
539 "1sb7nb7j7bz0pv1c9bgdy0smhr0jk2b1vbdv9yzghg5lrknpsbr6"))))
540 (build-system copy-build-system)
543 '(("autoload" "share/vim/vimfiles/")
544 ("doc" "share/vim/vimfiles/")
545 ("plugin" "share/vim/vimfiles/"))))
546 (synopsis "Collection of themes for Vim-airline")
548 "@code{vim-airline-themes} is a collection of themes for @code{vim-airline}.")
549 (home-page "https://github.com/vim-airline/vim-airline-themes")
550 (license license:expat))))
552 (define-public vim-syntastic
554 (name "vim-syntastic")
560 (url "https://github.com/vim-syntastic/syntastic")
562 (file-name (git-file-name name version))
564 (base32 "0j91f72jaz1s6aw1hpjiz30vk2ds2aqd9gisk91grsldy6nz6hhz"))))
565 (build-system copy-build-system)
568 '(("autoload" "share/vim/vimfiles/")
569 ("doc" "share/vim/vimfiles/")
570 ("plugin" "share/vim/vimfiles/")
571 ("syntax_checkers" "share/vim/vimfiles/"))))
572 (synopsis "Syntax checking plugin for Vim")
574 "Vim-syntastic is a syntax checking plugin for Vim. It runs files through
575 external syntax checkers and displays any resulting errors to the user. This
576 can be done on demand, or automatically as files are saved. If syntax errors
577 are detected, the user is notified.")
578 (home-page "https://github.com/vim-syntastic/syntastic")
579 (license license:wtfpl2)))
581 (define-public editorconfig-vim
583 (name "editorconfig-vim")
589 (url "https://github.com/editorconfig/editorconfig-vim.git")
590 (commit (string-append "v" version))))
591 (file-name (git-file-name name version))
594 "0vssfl1wjq0mv0p30c3dszwrh4yy90vwxmmdgqaxf5rykik7bdfd"))
595 (modules '((guix build utils)))
598 (delete-file-recursively "plugin/editorconfig-core-py") #t))))
599 (build-system copy-build-system)
602 (modify-phases %standard-phases
603 (add-after 'unpack 'patch-editorconfig-path
604 (lambda* (#:key inputs #:allow-other-keys)
605 (let ((editorconfig (assoc-ref inputs "editorconfig-core")))
606 (substitute* "plugin/editorconfig.vim"
607 (("/opt") editorconfig))
610 '(("autoload" "share/vim/vimfiles/")
611 ("doc" "share/vim/vimfiles/")
612 ("plugin" "share/vim/vimfiles/"))))
614 `(("editorconfig-core" ,editorconfig-core-c)))
615 (home-page "https://editorconfig.org/")
616 (synopsis "EditorConfig plugin for Vim")
617 (description "EditorConfig makes it easy to maintain the correct coding
618 style when switching between different text editors and between different
619 projects. The EditorConfig project maintains a file format and plugins for
620 various text editors which allow this file format to be read and used by those
622 (license license:bsd-2)))
624 (define-public neovim-syntastic
626 (inherit vim-syntastic)
627 (name "neovim-syntastic")
630 '(("autoload" "share/nvim/site/")
631 ("doc" "share/nvim/site/")
632 ("plugin" "share/nvim/site/")
633 ("syntax_checkers" "share/nvim/site/"))))
634 (synopsis "Syntax checking plugin for Neovim")
636 "Vim-syntastic is a syntax checking plugin for Neovim. It runs files through
637 external syntax checkers and displays any resulting errors to the user. This
638 can be done on demand, or automatically as files are saved. If syntax errors
639 are detected, the user is notified.")))
641 (define-public neovim
649 (url "https://github.com/neovim/neovim")
650 (commit (string-append "v" version))))
651 (file-name (git-file-name name version))
653 (base32 "03p7pic7hw9yxxv7fbgls1f42apx3lik2k6mpaz1a109ngyc5kaj"))))
654 (build-system cmake-build-system)
656 `(#:modules ((srfi srfi-26)
657 (guix build cmake-build-system)
659 #:configure-flags '("-DPREFER_LUA:BOOL=YES")
661 (modify-phases %standard-phases
662 (add-after 'unpack 'set-lua-paths
663 (lambda* (#:key inputs #:allow-other-keys)
664 (let* ((lua-version "5.1")
667 (let ((path (string-append prefix "/lib/lua/" lua-version)))
668 (string-append path "/?.so;" path "/?/?.so"))))
671 (let ((path (string-append prefix "/share/lua/" lua-version)))
672 (string-append path "/?.lua;" path "/?/?.lua"))))
673 (lua-inputs (map (cute assoc-ref %build-inputs <>)
680 (string-join (map lua-path-spec lua-inputs) ";"))
682 (string-join (map lua-cpath-spec lua-inputs) ";"))
684 (add-after 'unpack 'prevent-embedding-gcc-store-path
686 ;; nvim remembers its build options, including the compiler with
687 ;; its complete path. This adds gcc to the closure of nvim, which
688 ;; doubles its size. We remove the refirence here.
689 (substitute* "cmake/GetCompileFlags.cmake"
690 (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))
695 ("libtermkey" ,libtermkey)
696 ("libvterm" ,libvterm)
697 ("unibilium" ,unibilium)
698 ("jemalloc" ,jemalloc)
699 ("libiconv" ,libiconv)
701 ("lua-luv" ,lua5.1-luv)
702 ("lua-lpeg" ,lua5.1-lpeg)
703 ("lua-bitop" ,lua5.1-bitop)
704 ("lua-libmpack" ,lua5.1-libmpack)))
706 `(("pkg-config" ,pkg-config)
707 ("gettext" ,gettext-minimal)
709 (home-page "https://neovim.io")
710 (synopsis "Fork of vim focused on extensibility and agility")
711 (description "Neovim is a project that seeks to aggressively
712 refactor Vim in order to:
715 @item Simplify maintenance and encourage contributions
716 @item Split the work between multiple developers
717 @item Enable advanced external UIs without modifications to the core
718 @item Improve extensibility with a new plugin architecture
720 ;; Neovim is licensed under the terms of the Apache 2.0 license,
721 ;; except for parts that were contributed under the Vim license.
722 (license (list license:asl2.0 license:vim))))
732 (string-append "https://github.com/vifm/vifm/releases/download/v"
733 version "/vifm-" version ".tar.bz2")
734 (string-append "https://sourceforge.net/projects/vifm/files/vifm/"
735 "vifm-" version ".tar.bz2")))
738 "0fyhxh7ndjn8fyjhj14ymkr3pjcs3k1xbs43g7xvvq85vdb6y04r"))))
739 (build-system gnu-build-system)
741 '(#:configure-flags '("--disable-build-timestamp")
743 (modify-phases %standard-phases
744 (add-after 'patch-source-shebangs 'patch-test-shebangs
746 (substitute* (cons* "src/background.c"
748 (find-files "tests" "\\.c$"))
749 (("/bin/sh") (which "sh"))
750 (("/bin/bash") (which "bash")))
751 ;; This test segfaults
752 (substitute* "tests/Makefile"
755 (add-after 'install 'install-vim-plugin-files
756 (lambda* (#:key outputs #:allow-other-keys)
757 (let* ((out (assoc-ref outputs "out"))
758 (vifm (string-append out "/share/vifm"))
759 (vimfiles (string-append out "/share/vim/vimfiles")))
760 (copy-recursively (string-append vifm "/colors")
761 (string-append vimfiles "/colors"))
762 (copy-recursively (string-append vifm "/vim")
764 (delete-file-recursively (string-append vifm "/colors"))
765 (delete-file-recursively (string-append vifm "/vim")))
768 `(("groff" ,groff))) ; for the documentation
773 (home-page "https://vifm.info/")
774 (synopsis "Flexible vi-like file manager using ncurses")
775 (description "Vifm is a file manager providing a @command{vi}-like usage
776 experience. It has similar keybindings and modes (e.g. normal, command line,
777 visual). The interface uses ncurses, thus vifm can be used in text-only
778 environments. It supports a wide range of features, some of which are known
779 from the @command{vi}-editor:
782 @item user mappings (almost like in @code{vi})
783 @item ranges in command
785 @item user defined commands (with support for ranges)
787 @item operation undoing/redoing
788 @item fuse file systems support
790 @item multiple files renaming
791 @item support of filename modifiers
792 @item colorschemes support
793 @item file name color according to file type
794 @item path specific colorscheme customization
796 @item operation backgrounding
797 @item customizable file viewers
798 @item handy @code{less}-like preview mode
799 @item filtering out and searching for files using regular expressions
800 @item one or two panes view
802 With the package comes a plugin to use vifm as a vim file selector.")
803 (license license:gpl2+)))
805 (define-public python-pynvim
807 (name "python-pynvim")
811 (uri (pypi-uri "pynvim" version))
814 "01dybk4vs452pljn1q3il5z2sd313ki0lgiglc0xmjc6wp290r6g"))))
815 (build-system python-build-system)
817 `(("python-greenlet" ,python-greenlet)
818 ("python-msgpack" ,python-msgpack)))
821 (home-page "https://github.com/neovim/pynvim")
822 (synopsis "Python client and plugin host for neovim")
823 (description "Pynvim implements support for python plugins in neovim. It
824 also works as a library for connecting to and scripting neovim processes
825 through its msgpack-rpc API.")
826 (license license:asl2.0)))
828 (define-public python2-pynvim
829 (package-with-python2 python-pynvim))
831 (define-public vim-guix-vim
833 (name "vim-guix-vim")
838 (url "https://gitlab.com/Efraim/guix.vim")
840 (file-name (git-file-name name version))
843 "1f8h8m96fqh3f9hy87spgh9kdqzyxl11n9s3rywvyq5xhn489bnk"))))
844 (build-system copy-build-system)
847 '(("compiler" "share/vim/vimfiles/")
848 ("doc" "share/vim/vimfiles/")
849 ("indent" "share/vim/vimfiles/")
850 ("ftdetect" "share/vim/vimfiles/")
851 ("ftplugin" "share/vim/vimfiles/")
852 ("syntax" "share/vim/vimfiles/"))))
853 (home-page "https://gitlab.com/Efraim/guix.vim")
854 (synopsis "Guix integration in Vim")
855 (description "This package provides support for GNU Guix in Vim.")
856 (license license:vim)))
858 (define-public vim-asyncrun
860 (name "vim-asyncrun")
865 (url "https://github.com/skywind3000/asyncrun.vim")
867 (file-name (git-file-name name version))
870 "02fiqf4rcrxbcgvj02mpd78wkxsrnbi54aciwh9fv5mnz5ka249m"))))
871 (build-system copy-build-system)
874 '(("plugin" "share/vim/vimfiles/")
875 ("doc/" "share/vim/vimfiles/doc" #:include ("asyncrun.txt")))))
876 (home-page "https://github.com/skywind3000/asyncrun.vim")
877 (synopsis "Run Async Shell Commands in Vim")
878 (description "This plugin takes the advantage of new APIs in Vim 8 (and
879 NeoVim) to enable you to run shell commands in background and read output in the
880 quickfix window in realtime.")
881 (license license:expat)))
883 (define-public vim-dispatch
885 (name "vim-dispatch")
891 (url "https://github.com/tpope/vim-dispatch")
892 (commit (string-append "v" version))))
893 (file-name (git-file-name name version))
896 "1m8b5mn2zqlphzs6xfwykwmghf6p0wabrhpjmh7vav35jgcxc4wl"))))
897 (build-system copy-build-system)
900 '(("autoload" "share/vim/vimfiles/")
901 ("doc" "share/vim/vimfiles/")
902 ("plugin" "share/vim/vimfiles/"))))
903 (home-page "https://github.com/tpope/vim-dispatch")
904 (synopsis "Asynchronous build and test dispatcher")
905 (description "Leverage the power of Vim's compiler plugins without being
906 bound by synchronicity. Kick off builds and test suites using one of several
907 asynchronous adapters (including tmux, screen, and a headless mode), and when
908 the job completes, errors will be loaded and parsed automatically.")
909 (license license:vim)))
911 (define-public vim-eunuch
912 (let ((commit "33e875b31c8b811a0a47908884a5e2339106bbe8")
916 (version (git-version "1.2" revision commit))
921 (url "https://github.com/tpope/vim-eunuch")
923 (file-name (git-file-name name version))
926 "1xadb22kd40swmww0qxmmkcpcq6viy8l167pjck5q32hfngll5d3"))))
927 (build-system copy-build-system)
930 '(("doc" "share/vim/vimfiles/")
931 ("plugin" "share/vim/vimfiles/"))))
932 (home-page "https://github.com/tpope/vim-eunuch")
933 (synopsis "Vim sugar for the UNIX shell commands")
934 (description "Vim sugar for the UNIX shell commands that need it the most.
935 This package includes commands such as @code{SudoWrite} and @code{SudoEdit} and
936 help working on Vim buffers and the files they reference with one command.")
937 (license license:vim))))