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 ng0 <ng0@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 Jakub Kądziołka <kuba@kadziolka.net>
12 ;;; This file is part of GNU Guix.
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27 (define-module (gnu packages vim)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages)
30 #:use-module (guix utils)
31 #:use-module (guix download)
32 #:use-module (guix git-download)
33 #:use-module (guix build-system cmake)
34 #:use-module (guix build-system gnu)
35 #:use-module (guix build-system python)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages acl)
38 #:use-module (gnu packages admin) ; For GNU hostname
39 #:use-module (gnu packages attr)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages base)
42 #:use-module (gnu packages fontutils)
43 #:use-module (gnu packages gawk)
44 #:use-module (gnu packages gettext)
45 #:use-module (gnu packages glib)
46 #:use-module (gnu packages gperf)
47 #:use-module (gnu packages groff)
48 #:use-module (gnu packages gtk)
49 #:use-module (gnu packages image)
50 #:use-module (gnu packages jemalloc)
51 #:use-module (gnu packages libevent)
52 #:use-module (gnu packages linux)
53 #:use-module (gnu packages lua)
54 #:use-module (gnu packages ncurses)
55 #:use-module (gnu packages perl)
56 #:use-module (gnu packages pkg-config)
57 #:use-module (gnu packages python)
58 #:use-module (gnu packages python-xyz)
59 #:use-module (gnu packages ruby)
60 #:use-module (gnu packages serialization)
61 #:use-module (gnu packages shells)
62 #:use-module (gnu packages tcl)
63 #:use-module (gnu packages text-editors)
64 #:use-module (gnu packages terminals)
65 #:use-module (gnu packages xdisorg)
66 #:use-module (gnu packages xorg))
75 (url "https://github.com/vim/vim")
76 (commit (string-append "v" version))))
77 (file-name (git-file-name name version))
80 "0kxzfcpv96s1lbx97g6451p1i7yanws5bvzl05jh1ywaqv5f4y7g"))))
81 (build-system gnu-build-system)
83 `(#:test-target "test"
86 (modify-phases %standard-phases
87 (add-after 'configure 'patch-config-files
89 (substitute* "runtime/tools/mve.awk"
90 (("/usr/bin/nawk") (which "gawk")))
91 (substitute* '("src/testdir/Makefile"
92 "src/testdir/test_normal.vim"
93 "src/testdir/test_terminal.vim")
94 (("/bin/sh") (which "sh")))
96 (add-before 'check 'set-TZDIR
97 (lambda* (#:key inputs #:allow-other-keys)
98 ;; One of the tests tests timezone-dependent functions.
100 (string-append (assoc-ref inputs "tzdata")
103 (add-before 'check 'skip-failing-tests
105 ;; This test assumes that PID 1 is run as root and that the user
106 ;; running the test suite does not have permission to kill(1, 0)
107 ;; it. This is not true in the build container, where both PID 1
108 ;; and the test suite are run as the same user. Skip the test.
109 ;; An alternative fix would be to patch the PID used to a random
110 ;; 32-bit value and hope it never shows up in the test environment.
111 (substitute* "src/testdir/test_swap.vim"
112 (("if !IsRoot\\(\\)") "if 0"))
114 ;; This test checks how the terminal looks after executing some
115 ;; actions. The path of the bash binary is shown, which results in
116 ;; a difference being detected. Patching the expected result is
117 ;; non-trivial due to the special format used, so skip the test.
118 (substitute* "src/testdir/test_terminal.vim"
119 ((".*Test_terminal_postponed_scrollback.*" line)
120 (string-append line "return\n")))
126 ("tcsh" ,tcsh))) ; For runtime/tools/vim32
128 `(("libtool" ,libtool)
131 ("tzdata" ,tzdata-for-tests)))
132 (home-page "https://www.vim.org/")
133 (synopsis "Text editor based on vi")
135 "Vim is a highly configurable text editor built to enable efficient text
136 editing. It is an improved version of the vi editor distributed with most UNIX
139 Vim is often called a \"programmer's editor,\" and so useful for programming
140 that many consider it an entire IDE. It's not just for programmers, though.
141 Vim is perfect for all kinds of text editing, from composing email to editing
142 configuration files.")
143 (license license:vim)))
146 (package (inherit vim)
149 `(#:make-flags '("CC=gcc")
150 #:tests? #f ; there are none
152 (modify-phases %standard-phases
154 (add-after 'unpack 'chdir
159 (lambda* (#:key outputs #:allow-other-keys)
160 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
161 (install-file "xxd" bin)
165 (synopsis "Hexdump utility from vim")
166 (description "This package provides the Hexdump utility xxd that comes
167 with the editor vim.")))
169 (define-public vim-full
171 ;; This package should share its source with Vim, but it doesn't
172 ;; build reliably, and we want to keep Vim up to date due to the
173 ;; frequency of important bug fixes.
178 (list (string-append "--with-lua-prefix="
179 (assoc-ref %build-inputs "lua"))
180 "--with-features=huge"
181 "--enable-python3interp=yes"
182 "--enable-perlinterp=yes"
183 "--enable-rubyinterp=yes"
184 "--enable-tclinterp=yes"
185 "--enable-luainterp=yes"
192 ,@(substitute-keyword-arguments (package-arguments vim)
194 `(modify-phases ,phases
195 (add-before 'check 'skip-test87
196 ;; This test fails for unknown reasons after switching
197 ;; to a git checkout.
199 (delete-file "src/testdir/test87.ok")
200 (delete-file "src/testdir/test87.in")
201 (substitute* '("src/Makefile"
202 "src/testdir/Make_vms.mms")
204 (substitute* "src/testdir/Make_all.mak"
205 (("test86.out \\\\") "test86")
208 (add-before 'check 'start-xserver
209 (lambda* (#:key inputs #:allow-other-keys)
210 ;; Some tests require an X server, but does not start one.
211 (let ((xorg-server (assoc-ref inputs "xorg-server"))
213 (setenv "DISPLAY" display)
214 (zero? (system (string-append xorg-server "/bin/Xvfb "
215 display " &")))))))))))
217 `(("pkg-config" ,pkg-config)
218 ("xorg-server" ,xorg-server-for-tests)
219 ,@(package-native-inputs vim)))
225 ("fontconfig" ,fontconfig)
226 ("freetype" ,freetype)
227 ("gdk-pixbuf" ,gdk-pixbuf)
228 ("gettext" ,gettext-minimal)
232 ("harfbuzz" ,harfbuzz)
237 ("libxdmcp" ,libxdmcp)
246 ,@(package-inputs vim)))))
248 (define-public vim-neocomplete
250 (name "vim-neocomplete")
256 (url "https://github.com/Shougo/neocomplete.vim")
257 (commit (string-append "ver." version))))
258 (file-name (git-file-name name version))
261 "1h6sci5mhdfg6sjsjpi8l5li02hg858zcayiwl60y9j2gqnd18lv"))))
262 (build-system gnu-build-system)
266 (modify-phases %standard-phases
270 (lambda* (#:key outputs #:allow-other-keys)
271 (let* ((out (assoc-ref outputs "out"))
272 (vimfiles (string-append out "/share/vim/vimfiles"))
273 (autoload (string-append vimfiles "/autoload"))
274 (doc (string-append vimfiles "/doc"))
275 (plugin (string-append vimfiles "/plugin")))
276 (copy-recursively "autoload" autoload)
277 (copy-recursively "doc" doc)
278 (copy-recursively "plugin" plugin)
280 (synopsis "Next generation completion framework for Vim")
282 "@code{neocomplete}, an abbreviation of 'neo-completion with cache',
284 It provides keyword completion system by maintaining a cache of keywords in
285 the current buffer. Neocomplete can be customized easily and has many more
286 features than Vim's built-in completion.")
287 (home-page "https://github.com/Shougo/neocomplete.vim/")
288 (license license:expat)))
290 ;; There are no release tarballs.
291 (define-public vim-neosnippet-snippets
292 (let ((commit "8e2b1c0cab9ed9a832b3743dbb65e9966a64331a")
295 (name "vim-neosnippet-snippets")
296 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
301 (url "https://github.com/Shougo/neosnippet-snippets")
303 (file-name (string-append name "-" version "-checkout"))
306 "151wpvbj6jb9jdkbhj3b77f5sq7y328spvwfbqyj1y32rg4ifmc6"))))
307 (build-system gnu-build-system)
311 (modify-phases %standard-phases
315 (lambda* (#:key outputs #:allow-other-keys)
316 (let* ((out (assoc-ref outputs "out"))
317 (vimfiles (string-append out "/share/vim/vimfiles")))
318 (copy-recursively "neosnippets"
319 (string-append vimfiles "/neosnippets"))
321 (synopsis "Snippets for neosnippet")
323 "@code{neosnippet-snippets} provides standard snippets for the Vim plugin
324 @code{neosnippet}. Snippets are small templates for commonly used code that
325 you can fill in on the fly.")
326 (home-page "https://github.com/Shougo/neosnippet-snippets")
327 (license license:expat))))
329 ;; The released tarball is too old for our Vim.
330 (define-public vim-neosnippet
331 (let ((commit "1bd7e23c79b73da16eb0c9469b25c376d3594583")
334 (name "vim-neosnippet")
335 (version (string-append "4.2-" revision "." (string-take commit 7)))
340 (url "https://github.com/Shougo/neosnippet.vim/")
342 (file-name (string-append name "-" version "-checkout"))
345 "0k80syscmpnj38ks1fq02ds59g0r4jlg9ll7z4qc048mgi35alw5"))))
346 (build-system gnu-build-system)
350 (modify-phases %standard-phases
354 (lambda* (#:key outputs #:allow-other-keys)
355 (let* ((out (assoc-ref outputs "out"))
356 (vimfiles (string-append out "/share/vim/vimfiles"))
357 (autoload (string-append vimfiles "/autoload"))
358 (doc (string-append vimfiles "/doc"))
359 (ftdetect (string-append vimfiles "/ftdetect"))
360 (ftplugin (string-append vimfiles "/ftplugin"))
361 (indent (string-append vimfiles "/indent"))
362 (plugin (string-append vimfiles "/plugin"))
363 (rplugin (string-append vimfiles "/rplugin"))
364 (syntax (string-append vimfiles "/syntax")))
365 (copy-recursively "autoload" autoload)
366 (copy-recursively "doc" doc)
367 (copy-recursively "ftdetect" ftdetect)
368 (copy-recursively "ftplugin" ftplugin)
369 (copy-recursively "indent" indent)
370 (copy-recursively "plugin" plugin)
371 (copy-recursively "rplugin" rplugin)
372 (copy-recursively "syntax" syntax)
374 (synopsis "Snippet support for Vim")
376 "@code{neosnippet}, is a plugin for Vim which adds snippet support to Vim.
377 Snippets are small templates for commonly used code that you can fill in on
378 the fly. To use snippets can increase your productivity in Vim a lot.
379 The functionality of this plug-in is quite similar to plug-ins like
380 @code{snipMate.vim} or @code{snippetsEmu.vim}. But since you can choose
381 snippets with the neocomplcache / neocomplete interface, you might have less
382 trouble using them, because you do not have to remember each snippet name.")
383 (home-page "https://github.com/Shougo/neosnippet.vim/")
384 (license license:expat))))
386 (define-public vim-scheme
387 (let ((commit "93827987c10f2d5dc519166a761f219204926d5f")
391 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
396 (url "http://git.foldling.org/vim-scheme.git")
398 (file-name (string-append name "-" version "-checkout"))
401 "1ynjr1109dxgj0lz261gmzz3wf5ap1m6j6hnvl3lcyv66a4y8pjv"))))
402 (build-system gnu-build-system)
406 (modify-phases %standard-phases
410 (lambda* (#:key outputs #:allow-other-keys)
411 (let* ((out (assoc-ref outputs "out"))
412 (vimfiles (string-append out "/share/vim/vimfiles"))
413 (after (string-append vimfiles "/after"))
414 (syntax (string-append vimfiles "/syntax"))
415 (ftplugin (string-append vimfiles "/ftplugin")))
416 (copy-recursively "after" after)
417 (copy-recursively "ftplugin" ftplugin)
418 (copy-recursively "syntax" syntax)
420 (synopsis "Scheme syntax for Vim")
422 "@code{vim-scheme} provides Scheme support for Vim (R7RS and CHICKEN).")
423 (home-page "http://foldling.org/git/vim-scheme.git/")
424 (license license:public-domain))))
426 (define-public vim-luna
427 (let ((commit "633619953dcf8577168e255230f96b05f28d6371")
431 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
436 (url "https://github.com/notpratheek/vim-luna")
438 (file-name (string-append name "-" version "-checkout"))
441 "0ka3qbhsh8lix1vyj4678j7dnchkd8khhirrnn3aylxxf8fpqyg8"))))
442 (build-system gnu-build-system)
446 (modify-phases %standard-phases
450 (lambda* (#:key outputs #:allow-other-keys)
451 (let* ((out (assoc-ref outputs "out"))
452 (vimfiles (string-append out "/share/vim/vimfiles"))
453 (colors (string-append vimfiles "/colors")))
454 (copy-recursively "colors" colors)
456 (synopsis "Dark color theme for Vim")
458 "@code{vim-luna} is a dark color theme for Vim.")
459 (home-page "https://github.com/notpratheek/vim-luna")
460 (license license:expat))))
462 ;; There are no tarball releases.
463 (define-public vim-context-filetype
464 (let ((commit "5e85f8cae26806f391aefe2661791a6de53bcea2")
467 (name "vim-context-filetype")
468 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
473 (url "https://github.com/Shougo/context_filetype.vim")
475 (file-name (string-append name "-" version "-checkout"))
478 "0alvrfhmd91zkd9h83s8wvgyq4iakcf6rybsyjd369qbgpcqky89"))))
479 (build-system gnu-build-system)
483 (modify-phases %standard-phases
487 (lambda* (#:key outputs #:allow-other-keys)
488 (let* ((out (assoc-ref outputs "out"))
489 (vimfiles (string-append out "/share/vim/vimfiles"))
490 (doc (string-append vimfiles "/doc"))
491 (autoload (string-append vimfiles "/autoload")))
492 (copy-recursively "doc" doc)
493 (copy-recursively "autoload" autoload)
495 (synopsis "Context filetype library for Vim")
497 "@code{vim-context-filetype} is context filetype library for Vim script.")
498 (home-page "https://github.com/Shougo/context_filetype.vim")
499 (license license:expat)))) ; ??? check again
501 (define-public vim-fugitive
503 (name "vim-fugitive")
509 (url "https://github.com/tpope/vim-fugitive.git")
510 (commit (string-append "v" version))))
511 (file-name (git-file-name name version))
514 "1jbn5jxadccmcz01j94d0i1bp74cixr0fpxxf1h0aqdf1ljk3d7n"))))
515 (build-system gnu-build-system)
519 (modify-phases %standard-phases
523 (lambda* (#:key outputs #:allow-other-keys)
524 (let* ((out (assoc-ref outputs "out"))
525 (vimfiles (string-append out "/share/vim/vimfiles"))
526 (autoload (string-append vimfiles "/autoload"))
527 (doc (string-append vimfiles "/doc"))
528 (ftdetect (string-append vimfiles "/ftdetect"))
529 (plugin (string-append vimfiles "/plugin"))
530 (syntax (string-append vimfiles "/syntax")))
531 (copy-recursively "autoload" autoload)
532 (copy-recursively "doc" doc)
533 (copy-recursively "ftdetect" ftdetect)
534 (copy-recursively "plugin" plugin)
535 (copy-recursively "syntax" syntax)
537 (home-page "https://github.com/tpope/vim-fugitive")
538 (synopsis "Vim plugin to work with Git")
539 (description "Vim-fugitive is a wrapper for Vim that complements the
540 command window, where you can stage and review your changes before the next
541 commit or run any Git arbitrary command.")
542 (license license:vim))) ; distributed under the same license as vim
544 (define-public vim-airline
552 (url "https://github.com/vim-airline/vim-airline")
553 (commit (string-append "v" version))))
554 (file-name (git-file-name name version))
557 "1aksmr73648pvyc75pfdz28k2d4ky52rn7xiwcv7lz87q3vqld7k"))))
558 (build-system gnu-build-system)
562 (modify-phases %standard-phases
566 (lambda* (#:key outputs #:allow-other-keys)
567 (let* ((out (assoc-ref outputs "out"))
568 (vimfiles (string-append out "/share/vim/vimfiles"))
569 (autoload (string-append vimfiles "/autoload"))
570 (doc (string-append vimfiles "/doc"))
571 (t (string-append vimfiles "/t"))
572 (plugin (string-append vimfiles "/plugin")))
573 (copy-recursively "autoload" autoload)
574 (copy-recursively "doc" doc)
575 (copy-recursively "plugin" plugin)
576 (copy-recursively "t" t)
578 (synopsis "Statusline for Vim")
580 "@code{vim-airline} is an extensible statusline for Vim.
581 It can be extended and costumized with themes, works with unicode fonts
582 and powerline symbols, etc.")
583 (home-page "https://github.com/vim-airline/vim-airline")
584 (license license:expat)))
586 ;; There are no tarball releases.
587 (define-public vim-airline-themes
588 (let ((commit "e6f233231b232b6027cde6aebeeb18d9138e5324")
591 (name "vim-airline-themes")
592 (version (git-version "0.0.0" revision commit))
597 (url "https://github.com/vim-airline/vim-airline-themes")
599 (file-name (git-file-name name version))
602 "1sb7nb7j7bz0pv1c9bgdy0smhr0jk2b1vbdv9yzghg5lrknpsbr6"))))
603 (build-system gnu-build-system)
607 (modify-phases %standard-phases
611 (lambda* (#:key outputs #:allow-other-keys)
612 (let* ((out (assoc-ref outputs "out"))
613 (vimfiles (string-append out "/share/vim/vimfiles"))
614 (doc (string-append vimfiles "/doc"))
615 (plugin (string-append vimfiles "/plugin"))
616 (autoload (string-append vimfiles "/autoload")))
617 (copy-recursively "doc" doc)
618 (copy-recursively "autoload" autoload)
619 (copy-recursively "plugin" plugin)
621 (synopsis "Collection of themes for Vim-airline")
623 "@code{vim-airline-themes} is a collection of themes for @code{vim-airline}.")
624 (home-page "https://github.com/vim-airline/vim-airline-themes")
625 (license license:expat))))
627 (define-public vim-syntastic
629 (name "vim-syntastic")
635 (url "https://github.com/vim-syntastic/syntastic")
637 (file-name (git-file-name name version))
639 (base32 "0j91f72jaz1s6aw1hpjiz30vk2ds2aqd9gisk91grsldy6nz6hhz"))))
640 (build-system gnu-build-system)
644 (modify-phases %standard-phases
648 (lambda* (#:key outputs #:allow-other-keys)
649 (let* ((out (assoc-ref outputs "out"))
650 (vimfiles (string-append out "/share/vim/vimfiles"))
651 (doc (string-append vimfiles "/doc"))
652 (plugin (string-append vimfiles "/plugin"))
653 (autoload (string-append vimfiles "/autoload"))
654 (syntax-checkers (string-append vimfiles "/syntax_checkers")))
655 (copy-recursively "doc" doc)
656 (copy-recursively "autoload" autoload)
657 (copy-recursively "plugin" plugin)
658 (copy-recursively "syntax_checkers" syntax-checkers)
660 (synopsis "Syntax checking plugin for Vim")
662 "Vim-syntastic is a syntax checking plugin for Vim. It runs files through
663 external syntax checkers and displays any resulting errors to the user. This
664 can be done on demand, or automatically as files are saved. If syntax errors
665 are detected, the user is notified.")
666 (home-page "https://github.com/vim-syntastic/syntastic")
667 (license license:wtfpl2)))
669 (define-public editorconfig-vim
671 (name "editorconfig-vim")
677 (url "https://github.com/editorconfig/editorconfig-vim.git")
678 (commit (string-append "v" version))))
679 (file-name (git-file-name name version))
682 "0vssfl1wjq0mv0p30c3dszwrh4yy90vwxmmdgqaxf5rykik7bdfd"))
683 (modules '((guix build utils)))
686 (delete-file-recursively "plugin/editorconfig-core-py") #t))))
687 (build-system gnu-build-system)
689 '(#:tests? #f ; tests require ruby and plugin-test repository
691 (modify-phases %standard-phases
694 (add-after 'unpack 'patch-editorconfig-path
695 (lambda* (#:key inputs #:allow-other-keys)
696 (let ((editorconfig (assoc-ref inputs "editorconfig-core")))
697 (substitute* "plugin/editorconfig.vim"
698 (("/opt") editorconfig))
701 (lambda* (#:key outputs #:allow-other-keys)
702 (let* ((out (assoc-ref outputs "out"))
703 (vimfiles (string-append out "/share/vim/vimfiles"))
704 (doc (string-append vimfiles "/doc"))
705 (plugin (string-append vimfiles "/plugin"))
706 (autoload (string-append vimfiles "/autoload")))
707 (copy-recursively "doc" doc)
708 (copy-recursively "autoload" autoload)
709 (copy-recursively "plugin" plugin)
712 `(("editorconfig-core" ,editorconfig-core-c)))
713 (home-page "https://editorconfig.org/")
714 (synopsis "EditorConfig plugin for Vim")
715 (description "EditorConfig makes it easy to maintain the correct coding
716 style when switching between different text editors and between different
717 projects. The EditorConfig project maintains a file format and plugins for
718 various text editors which allow this file format to be read and used by those
720 (license license:bsd-2)))
722 (define-public neovim-syntastic
724 (inherit vim-syntastic)
725 (name "neovim-syntastic")
729 (modify-phases %standard-phases
733 (lambda* (#:key outputs #:allow-other-keys)
734 (let* ((out (assoc-ref outputs "out"))
735 (vimfiles (string-append out "/share/nvim/site"))
736 (doc (string-append vimfiles "/doc"))
737 (plugin (string-append vimfiles "/plugin"))
738 (autoload (string-append vimfiles "/autoload"))
739 (syntax-checkers (string-append vimfiles "/syntax_checkers")))
740 (copy-recursively "doc" doc)
741 (copy-recursively "autoload" autoload)
742 (copy-recursively "plugin" plugin)
743 (copy-recursively "syntax_checkers" syntax-checkers)
745 (synopsis "Syntax checking plugin for Neovim")
747 "Vim-syntastic is a syntax checking plugin for Neovim. It runs files through
748 external syntax checkers and displays any resulting errors to the user. This
749 can be done on demand, or automatically as files are saved. If syntax errors
750 are detected, the user is notified.")))
752 (define-public neovim
760 (url "https://github.com/neovim/neovim")
761 (commit (string-append "v" version))))
762 (file-name (git-file-name name version))
764 (base32 "03p7pic7hw9yxxv7fbgls1f42apx3lik2k6mpaz1a109ngyc5kaj"))))
765 (build-system cmake-build-system)
767 `(#:modules ((srfi srfi-26)
768 (guix build cmake-build-system)
770 #:configure-flags '("-DPREFER_LUA:BOOL=YES")
772 (modify-phases %standard-phases
773 (add-after 'unpack 'set-lua-paths
774 (lambda* (#:key inputs #:allow-other-keys)
775 (let* ((lua-version "5.1")
778 (let ((path (string-append prefix "/lib/lua/" lua-version)))
779 (string-append path "/?.so;" path "/?/?.so"))))
782 (let ((path (string-append prefix "/share/lua/" lua-version)))
783 (string-append path "/?.lua;" path "/?/?.lua"))))
784 (lua-inputs (map (cute assoc-ref %build-inputs <>)
791 (string-join (map lua-path-spec lua-inputs) ";"))
793 (string-join (map lua-cpath-spec lua-inputs) ";"))
795 (add-after 'unpack 'prevent-embedding-gcc-store-path
797 ;; nvim remembers its build options, including the compiler with
798 ;; its complete path. This adds gcc to the closure of nvim, which
799 ;; doubles its size. We remove the refirence here.
800 (substitute* "cmake/GetCompileFlags.cmake"
801 (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))
806 ("libtermkey" ,libtermkey)
807 ("libvterm" ,libvterm)
808 ("unibilium" ,unibilium)
809 ("jemalloc" ,jemalloc)
810 ("libiconv" ,libiconv)
812 ("lua-luv" ,lua5.1-luv)
813 ("lua-lpeg" ,lua5.1-lpeg)
814 ("lua-bitop" ,lua5.1-bitop)
815 ("lua-libmpack" ,lua5.1-libmpack)))
817 `(("pkg-config" ,pkg-config)
818 ("gettext" ,gettext-minimal)
820 (home-page "https://neovim.io")
821 (synopsis "Fork of vim focused on extensibility and agility")
822 (description "Neovim is a project that seeks to aggressively
823 refactor Vim in order to:
826 @item Simplify maintenance and encourage contributions
827 @item Split the work between multiple developers
828 @item Enable advanced external UIs without modifications to the core
829 @item Improve extensibility with a new plugin architecture
831 ;; Neovim is licensed under the terms of the Apache 2.0 license,
832 ;; except for parts that were contributed under the Vim license.
833 (license (list license:asl2.0 license:vim))))
843 (string-append "https://github.com/vifm/vifm/releases/download/v"
844 version "/vifm-" version ".tar.bz2")
845 (string-append "https://sourceforge.net/projects/vifm/files/vifm/"
846 "vifm-" version ".tar.bz2")))
849 "0fyhxh7ndjn8fyjhj14ymkr3pjcs3k1xbs43g7xvvq85vdb6y04r"))))
850 (build-system gnu-build-system)
852 '(#:configure-flags '("--disable-build-timestamp")
854 (modify-phases %standard-phases
855 (add-after 'patch-source-shebangs 'patch-test-shebangs
857 (substitute* (cons* "src/background.c"
859 (find-files "tests" "\\.c$"))
860 (("/bin/sh") (which "sh"))
861 (("/bin/bash") (which "bash")))
862 ;; This test segfaults
863 (substitute* "tests/Makefile"
866 (add-after 'install 'install-vim-plugin-files
867 (lambda* (#:key outputs #:allow-other-keys)
868 (let* ((out (assoc-ref outputs "out"))
869 (vifm (string-append out "/share/vifm"))
870 (vimfiles (string-append out "/share/vim/vimfiles")))
871 (copy-recursively (string-append vifm "/colors")
872 (string-append vimfiles "/colors"))
873 (copy-recursively (string-append vifm "/vim")
875 (delete-file-recursively (string-append vifm "/colors"))
876 (delete-file-recursively (string-append vifm "/vim")))
879 `(("groff" ,groff))) ; for the documentation
884 (home-page "https://vifm.info/")
885 (synopsis "Flexible vi-like file manager using ncurses")
886 (description "Vifm is a file manager providing a @command{vi}-like usage
887 experience. It has similar keybindings and modes (e.g. normal, command line,
888 visual). The interface uses ncurses, thus vifm can be used in text-only
889 environments. It supports a wide range of features, some of which are known
890 from the @command{vi}-editor:
893 @item user mappings (almost like in @code{vi})
894 @item ranges in command
896 @item user defined commands (with support for ranges)
898 @item operation undoing/redoing
899 @item fuse file systems support
901 @item multiple files renaming
902 @item support of filename modifiers
903 @item colorschemes support
904 @item file name color according to file type
905 @item path specific colorscheme customization
907 @item operation backgrounding
908 @item customizable file viewers
909 @item handy @code{less}-like preview mode
910 @item filtering out and searching for files using regular expressions
911 @item one or two panes view
913 With the package comes a plugin to use vifm as a vim file selector.")
914 (license license:gpl2+)))
916 (define-public python-pynvim
918 (name "python-pynvim")
922 (uri (pypi-uri "pynvim" version))
925 "01dybk4vs452pljn1q3il5z2sd313ki0lgiglc0xmjc6wp290r6g"))))
926 (build-system python-build-system)
928 `(("python-greenlet" ,python-greenlet)
929 ("python-msgpack" ,python-msgpack)))
932 (home-page "https://github.com/neovim/pynvim")
933 (synopsis "Python client and plugin host for neovim")
934 (description "Pynvim implements support for python plugins in neovim. It
935 also works as a library for connecting to and scripting neovim processes
936 through its msgpack-rpc API.")
937 (license license:asl2.0)))
939 (define-public python2-pynvim
940 (package-with-python2 python-pynvim))
942 (define-public vim-guix-vim
944 (name "vim-guix-vim")
949 (url "https://gitlab.com/Efraim/guix.vim")
951 (file-name (git-file-name name version))
954 "1f8h8m96fqh3f9hy87spgh9kdqzyxl11n9s3rywvyq5xhn489bnk"))))
955 (build-system gnu-build-system)
959 (modify-phases %standard-phases
963 (lambda* (#:key outputs #:allow-other-keys)
964 (let* ((out (assoc-ref outputs "out"))
965 (vimfiles (string-append out "/share/vim/vimfiles")))
968 (copy-recursively dir (string-append vimfiles "/" dir)))
969 '("compiler" "doc" "indent" "ftdetect" "ftplugin" "syntax"))
971 (home-page "https://gitlab.com/Efraim/guix.vim")
972 (synopsis "Guix integration in Vim")
973 (description "This package provides support for GNU Guix in Vim.")
974 (license license:vim)))