Commit | Line | Data |
---|---|---|
eb490858 CR |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com> | |
504b9ba7 | 3 | ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il> |
3c986a7d | 4 | ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is> |
9b11eee9 | 5 | ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> |
38190ea5 | 6 | ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> |
442277d0 | 7 | ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
c3ebaec5 | 8 | ;;; Copyright © 2019 HiPhish <hiphish@posteo.de> |
24d32e67 | 9 | ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu> |
d0f31aee | 10 | ;;; Copyright © 2019, 2020 Jakub Kądziołka <kuba@kadziolka.net> |
cae3b377 | 11 | ;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us> |
eb490858 CR |
12 | ;;; |
13 | ;;; This file is part of GNU Guix. | |
14 | ;;; | |
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. | |
19 | ;;; | |
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. | |
24 | ;;; | |
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/>. | |
27 | ||
28 | (define-module (gnu packages vim) | |
b5b73a82 | 29 | #:use-module ((guix licenses) #:prefix license:) |
eb490858 | 30 | #:use-module (guix packages) |
38190ea5 | 31 | #:use-module (guix utils) |
eb490858 | 32 | #:use-module (guix download) |
843b19ca | 33 | #:use-module (guix git-download) |
9b11eee9 | 34 | #:use-module (guix build-system cmake) |
72194753 | 35 | #:use-module (guix build-system copy) |
eb490858 | 36 | #:use-module (guix build-system gnu) |
24d32e67 | 37 | #:use-module (guix build-system python) |
eb490858 | 38 | #:use-module (gnu packages) |
ad6198a5 | 39 | #:use-module (gnu packages acl) |
40 | #:use-module (gnu packages admin) ; For GNU hostname | |
41 | #:use-module (gnu packages attr) | |
9123c420 | 42 | #:use-module (gnu packages autotools) |
9b11eee9 | 43 | #:use-module (gnu packages base) |
ad6198a5 | 44 | #:use-module (gnu packages fontutils) |
eb490858 | 45 | #:use-module (gnu packages gawk) |
ad6198a5 | 46 | #:use-module (gnu packages gettext) |
47 | #:use-module (gnu packages glib) | |
9b11eee9 | 48 | #:use-module (gnu packages gperf) |
65dccb3a | 49 | #:use-module (gnu packages groff) |
ad6198a5 | 50 | #:use-module (gnu packages gtk) |
51 | #:use-module (gnu packages image) | |
9b11eee9 RW |
52 | #:use-module (gnu packages jemalloc) |
53 | #:use-module (gnu packages libevent) | |
ad6198a5 | 54 | #:use-module (gnu packages linux) |
55 | #:use-module (gnu packages lua) | |
eb490858 CR |
56 | #:use-module (gnu packages ncurses) |
57 | #:use-module (gnu packages perl) | |
ad6198a5 | 58 | #:use-module (gnu packages pkg-config) |
59 | #:use-module (gnu packages python) | |
24d32e67 | 60 | #:use-module (gnu packages python-xyz) |
ad6198a5 | 61 | #:use-module (gnu packages ruby) |
9b11eee9 | 62 | #:use-module (gnu packages serialization) |
ad6198a5 | 63 | #:use-module (gnu packages shells) |
64 | #:use-module (gnu packages tcl) | |
de3ed0b4 | 65 | #:use-module (gnu packages text-editors) |
9b11eee9 | 66 | #:use-module (gnu packages terminals) |
ad6198a5 | 67 | #:use-module (gnu packages xdisorg) |
68 | #:use-module (gnu packages xorg)) | |
eb490858 CR |
69 | |
70 | (define-public vim | |
71 | (package | |
72 | (name "vim") | |
f08b6726 | 73 | (version "8.2.0411") |
eb490858 | 74 | (source (origin |
b1303549 EF |
75 | (method git-fetch) |
76 | (uri (git-reference | |
77 | (url "https://github.com/vim/vim") | |
78 | (commit (string-append "v" version)))) | |
79 | (file-name (git-file-name name version)) | |
eb490858 CR |
80 | (sha256 |
81 | (base32 | |
f08b6726 | 82 | "0idjbf15yqk5jz2dqbh2lzj7glxcwn1jl5pp9kk908ps02vzqyai")))) |
eb490858 CR |
83 | (build-system gnu-build-system) |
84 | (arguments | |
85 | `(#:test-target "test" | |
86 | #:parallel-tests? #f | |
87 | #:phases | |
7a93feb8 EF |
88 | (modify-phases %standard-phases |
89 | (add-after 'configure 'patch-config-files | |
90 | (lambda _ | |
91 | (substitute* "runtime/tools/mve.awk" | |
92 | (("/usr/bin/nawk") (which "gawk"))) | |
db3cc007 | 93 | (substitute* '("src/testdir/Makefile" |
aa75dada EF |
94 | "src/testdir/test_normal.vim" |
95 | "src/testdir/test_terminal.vim") | |
db3cc007 | 96 | (("/bin/sh") (which "sh"))) |
af60a200 | 97 | #t)) |
9efcc494 JK |
98 | (add-before 'check 'set-TZDIR |
99 | (lambda* (#:key inputs #:allow-other-keys) | |
100 | ;; One of the tests tests timezone-dependent functions. | |
101 | (setenv "TZDIR" | |
102 | (string-append (assoc-ref inputs "tzdata") | |
103 | "/share/zoneinfo")) | |
104 | #t)) | |
105 | (add-before 'check 'skip-failing-tests | |
af60a200 | 106 | (lambda _ |
9efcc494 JK |
107 | ;; This test assumes that PID 1 is run as root and that the user |
108 | ;; running the test suite does not have permission to kill(1, 0) | |
109 | ;; it. This is not true in the build container, where both PID 1 | |
110 | ;; and the test suite are run as the same user. Skip the test. | |
111 | ;; An alternative fix would be to patch the PID used to a random | |
112 | ;; 32-bit value and hope it never shows up in the test environment. | |
113 | (substitute* "src/testdir/test_swap.vim" | |
114 | (("if !IsRoot\\(\\)") "if 0")) | |
7af6e5da | 115 | |
9efcc494 JK |
116 | ;; This test checks how the terminal looks after executing some |
117 | ;; actions. The path of the bash binary is shown, which results in | |
118 | ;; a difference being detected. Patching the expected result is | |
119 | ;; non-trivial due to the special format used, so skip the test. | |
120 | (substitute* "src/testdir/test_terminal.vim" | |
121 | ((".*Test_terminal_postponed_scrollback.*" line) | |
122 | (string-append line "return\n"))) | |
db3cc007 | 123 | #t))))) |
eb490858 | 124 | (inputs |
b3546174 | 125 | `(("gawk" ,gawk) |
b3546174 MW |
126 | ("ncurses" ,ncurses) |
127 | ("perl" ,perl) | |
9efcc494 | 128 | ("tcsh" ,tcsh))) ; For runtime/tools/vim32 |
9123c420 | 129 | (native-inputs |
9efcc494 JK |
130 | `(("libtool" ,libtool) |
131 | ||
132 | ;; For tests. | |
133 | ("tzdata" ,tzdata-for-tests))) | |
3d6bc5af | 134 | (home-page "https://www.vim.org/") |
d4bf49b1 | 135 | (synopsis "Text editor based on vi") |
cae3b377 JH |
136 | ;; The description shares language with the vim-full package. When making |
137 | ;; changes, check if the other description also needs to be updated. | |
eb490858 CR |
138 | (description |
139 | "Vim is a highly configurable text editor built to enable efficient text | |
35b9e423 | 140 | editing. It is an improved version of the vi editor distributed with most UNIX |
eb490858 CR |
141 | systems. |
142 | ||
143 | Vim is often called a \"programmer's editor,\" and so useful for programming | |
35b9e423 EB |
144 | that many consider it an entire IDE. It's not just for programmers, though. |
145 | Vim is perfect for all kinds of text editing, from composing email to editing | |
d4bf49b1 | 146 | configuration files.") |
eb490858 | 147 | (license license:vim))) |
ad6198a5 | 148 | |
b0a1d7ef RW |
149 | (define-public xxd |
150 | (package (inherit vim) | |
151 | (name "xxd") | |
152 | (arguments | |
153 | `(#:make-flags '("CC=gcc") | |
154 | #:tests? #f ; there are none | |
155 | #:phases | |
156 | (modify-phases %standard-phases | |
157 | (delete 'configure) | |
158 | (add-after 'unpack 'chdir | |
159 | (lambda _ | |
2d4fdb70 EF |
160 | (chdir "src/xxd") |
161 | #t)) | |
b0a1d7ef RW |
162 | (replace 'install |
163 | (lambda* (#:key outputs #:allow-other-keys) | |
164 | (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) | |
165 | (install-file "xxd" bin) | |
166 | #t)))))) | |
0ec430f7 | 167 | (inputs `()) |
9123c420 | 168 | (native-inputs `()) |
b0a1d7ef RW |
169 | (synopsis "Hexdump utility from vim") |
170 | (description "This package provides the Hexdump utility xxd that comes | |
171 | with the editor vim."))) | |
172 | ||
ad6198a5 | 173 | (define-public vim-full |
174 | (package | |
3c143783 LF |
175 | ;; This package should share its source with Vim, but it doesn't |
176 | ;; build reliably, and we want to keep Vim up to date due to the | |
177 | ;; frequency of important bug fixes. | |
ad6198a5 | 178 | (inherit vim) |
179 | (name "vim-full") | |
180 | (arguments | |
181 | `(#:configure-flags | |
182 | (list (string-append "--with-lua-prefix=" | |
183 | (assoc-ref %build-inputs "lua")) | |
184 | "--with-features=huge" | |
185 | "--enable-python3interp=yes" | |
186 | "--enable-perlinterp=yes" | |
187 | "--enable-rubyinterp=yes" | |
188 | "--enable-tclinterp=yes" | |
189 | "--enable-luainterp=yes" | |
190 | "--enable-cscope" | |
191 | "--enable-sniff" | |
192 | "--enable-multibyte" | |
193 | "--enable-xim" | |
194 | "--disable-selinux" | |
195 | "--enable-gui") | |
d0f31aee JK |
196 | ;; This flag fixes the following error: |
197 | ;; .../libpython3.7m.a(pyexpat.o): undefined reference to symbol 'XML_FreeContentModel' | |
198 | ;; .../libexpat.so.1: error adding symbols: DSO missing from command line | |
199 | #:make-flags '("LDFLAGS=-lexpat") | |
38190ea5 MB |
200 | ,@(substitute-keyword-arguments (package-arguments vim) |
201 | ((#:phases phases) | |
202 | `(modify-phases ,phases | |
d0f31aee JK |
203 | (add-before 'check 'skip-previewpopup |
204 | ;; This test fails when the path to the source is long. See: | |
205 | ;; https://github.com/vim/vim/issues/5615 | |
206 | (lambda _ | |
207 | (substitute* "src/testdir/test_popupwin.vim" | |
208 | ((".*Test_previewpopup.*" line) | |
209 | (string-append line "return\n"))))) | |
597f35e6 EF |
210 | (add-before 'check 'skip-test87 |
211 | ;; This test fails for unknown reasons after switching | |
212 | ;; to a git checkout. | |
213 | (lambda _ | |
214 | (delete-file "src/testdir/test87.ok") | |
215 | (delete-file "src/testdir/test87.in") | |
216 | (substitute* '("src/Makefile" | |
217 | "src/testdir/Make_vms.mms") | |
218 | (("test87") "")) | |
219 | (substitute* "src/testdir/Make_all.mak" | |
220 | (("test86.out \\\\") "test86") | |
221 | (("test87.out") "")) | |
222 | #t)) | |
38190ea5 MB |
223 | (add-before 'check 'start-xserver |
224 | (lambda* (#:key inputs #:allow-other-keys) | |
225 | ;; Some tests require an X server, but does not start one. | |
226 | (let ((xorg-server (assoc-ref inputs "xorg-server")) | |
227 | (display ":1")) | |
228 | (setenv "DISPLAY" display) | |
229 | (zero? (system (string-append xorg-server "/bin/Xvfb " | |
230 | display " &"))))))))))) | |
ad6198a5 | 231 | (native-inputs |
38190ea5 | 232 | `(("pkg-config" ,pkg-config) |
ff337525 | 233 | ("xorg-server" ,xorg-server-for-tests) |
9123c420 | 234 | ,@(package-native-inputs vim))) |
ad6198a5 | 235 | (inputs |
236 | `(("acl" ,acl) | |
237 | ("atk" ,atk) | |
238 | ("attr" ,attr) | |
239 | ("cairo" ,cairo) | |
240 | ("fontconfig" ,fontconfig) | |
241 | ("freetype" ,freetype) | |
242 | ("gdk-pixbuf" ,gdk-pixbuf) | |
7c90d0f4 | 243 | ("gettext" ,gettext-minimal) |
ad6198a5 | 244 | ("glib" ,glib) |
245 | ("gpm" ,gpm) | |
246 | ("gtk" ,gtk+-2) | |
247 | ("harfbuzz" ,harfbuzz) | |
248 | ("libice" ,libice) | |
249 | ("libpng" ,libpng) | |
250 | ("libsm" ,libsm) | |
251 | ("libx11" ,libx11) | |
252 | ("libxdmcp" ,libxdmcp) | |
253 | ("libxt" ,libxt) | |
254 | ("libxpm" ,libxpm) | |
255 | ("lua" ,lua) | |
256 | ("pango" ,pango) | |
257 | ("pixman" ,pixman) | |
258 | ("python-3" ,python) | |
259 | ("ruby" ,ruby) | |
260 | ("tcl" ,tcl) | |
cae3b377 JH |
261 | ,@(package-inputs vim))) |
262 | ;; The description shares language with the vim package. When making | |
263 | ;; changes, check if the other description also needs to be updated. | |
264 | (description "Vim is a highly configurable text editor built to enable efficient text | |
265 | editing. It is an improved version of the vi editor distributed with most UNIX | |
266 | systems. | |
267 | ||
268 | Vim is often called a \"programmer's editor,\" and so useful for programming | |
269 | that many consider it an entire IDE. It's not just for programmers, though. | |
270 | Vim is perfect for all kinds of text editing, from composing email to editing | |
271 | configuration files. | |
272 | ||
273 | This package provides a version of Vim with many optional features enabled. | |
274 | It includes a graphical interface, @command{gvim}, and support for plugins | |
275 | written in the Python 3, Perl, Ruby, Tcl, and Lua programming languages."))) | |
65dccb3a | 276 | |
8bb7b4f5 | 277 | (define-public vim-neocomplete |
278 | (package | |
279 | (name "vim-neocomplete") | |
280 | (version "2.1") | |
281 | (source | |
282 | (origin | |
6a9aa795 EF |
283 | (method git-fetch) |
284 | (uri (git-reference | |
285 | (url "https://github.com/Shougo/neocomplete.vim") | |
286 | (commit (string-append "ver." version)))) | |
287 | (file-name (git-file-name name version)) | |
8bb7b4f5 | 288 | (sha256 |
289 | (base32 | |
6a9aa795 | 290 | "1h6sci5mhdfg6sjsjpi8l5li02hg858zcayiwl60y9j2gqnd18lv")))) |
72194753 | 291 | (build-system copy-build-system) |
8bb7b4f5 | 292 | (arguments |
72194753 EF |
293 | '(#:install-plan |
294 | '(("autoload" "share/vim/vimfiles/") | |
295 | ("doc" "share/vim/vimfiles/") | |
296 | ("plugin" "share/vim/vimfiles/")))) | |
8bb7b4f5 | 297 | (synopsis "Next generation completion framework for Vim") |
298 | (description | |
299 | "@code{neocomplete}, an abbreviation of 'neo-completion with cache', | |
300 | is a plugin for Vim. | |
301 | It provides keyword completion system by maintaining a cache of keywords in | |
302 | the current buffer. Neocomplete can be customized easily and has many more | |
303 | features than Vim's built-in completion.") | |
304 | (home-page "https://github.com/Shougo/neocomplete.vim/") | |
305 | (license license:expat))) | |
306 | ||
34af179a | 307 | ;; There are no release tarballs. |
308 | (define-public vim-neosnippet-snippets | |
309 | (let ((commit "8e2b1c0cab9ed9a832b3743dbb65e9966a64331a") | |
310 | (revision "1")) | |
311 | (package | |
312 | (name "vim-neosnippet-snippets") | |
313 | (version (string-append "0.0.0-" revision "." (string-take commit 7))) | |
314 | (source | |
315 | (origin | |
316 | (method git-fetch) | |
317 | (uri (git-reference | |
318 | (url "https://github.com/Shougo/neosnippet-snippets") | |
319 | (commit commit))) | |
320 | (file-name (string-append name "-" version "-checkout")) | |
321 | (sha256 | |
322 | (base32 | |
323 | "151wpvbj6jb9jdkbhj3b77f5sq7y328spvwfbqyj1y32rg4ifmc6")))) | |
90d64d9c | 324 | (build-system copy-build-system) |
34af179a | 325 | (arguments |
90d64d9c EF |
326 | '(#:install-plan |
327 | '(("neosnippets" "share/vim/vimfiles/")))) | |
34af179a | 328 | (synopsis "Snippets for neosnippet") |
329 | (description | |
330 | "@code{neosnippet-snippets} provides standard snippets for the Vim plugin | |
331 | @code{neosnippet}. Snippets are small templates for commonly used code that | |
332 | you can fill in on the fly.") | |
333 | (home-page "https://github.com/Shougo/neosnippet-snippets") | |
334 | (license license:expat)))) | |
335 | ||
5890f891 | 336 | ;; The released tarball is too old for our Vim. |
337 | (define-public vim-neosnippet | |
338 | (let ((commit "1bd7e23c79b73da16eb0c9469b25c376d3594583") | |
339 | (revision "1")) | |
340 | (package | |
341 | (name "vim-neosnippet") | |
342 | (version (string-append "4.2-" revision "." (string-take commit 7))) | |
343 | (source | |
344 | (origin | |
345 | (method git-fetch) | |
346 | (uri (git-reference | |
347 | (url "https://github.com/Shougo/neosnippet.vim/") | |
348 | (commit commit))) | |
349 | (file-name (string-append name "-" version "-checkout")) | |
350 | (sha256 | |
351 | (base32 | |
352 | "0k80syscmpnj38ks1fq02ds59g0r4jlg9ll7z4qc048mgi35alw5")))) | |
f19e539c | 353 | (build-system copy-build-system) |
5890f891 | 354 | (arguments |
f19e539c EF |
355 | '(#:install-plan |
356 | '(("autoload" "share/vim/vimfiles/") | |
357 | ("doc" "share/vim/vimfiles/") | |
358 | ("ftdetect" "share/vim/vimfiles/") | |
359 | ("ftplugin" "share/vim/vimfiles/") | |
360 | ("indent" "share/vim/vimfiles/") | |
361 | ("plugin" "share/vim/vimfiles/") | |
362 | ("rplugin" "share/vim/vimfiles/") | |
363 | ("syntax" "share/vim/vimfiles/")))) | |
5890f891 | 364 | (synopsis "Snippet support for Vim") |
365 | (description | |
366 | "@code{neosnippet}, is a plugin for Vim which adds snippet support to Vim. | |
367 | Snippets are small templates for commonly used code that you can fill in on | |
368 | the fly. To use snippets can increase your productivity in Vim a lot. | |
369 | The functionality of this plug-in is quite similar to plug-ins like | |
370 | @code{snipMate.vim} or @code{snippetsEmu.vim}. But since you can choose | |
371 | snippets with the neocomplcache / neocomplete interface, you might have less | |
372 | trouble using them, because you do not have to remember each snippet name.") | |
373 | (home-page "https://github.com/Shougo/neosnippet.vim/") | |
374 | (license license:expat)))) | |
375 | ||
843b19ca | 376 | (define-public vim-scheme |
377 | (let ((commit "93827987c10f2d5dc519166a761f219204926d5f") | |
378 | (revision "1")) | |
379 | (package | |
380 | (name "vim-scheme") | |
381 | (version (string-append "0.0.0-" revision "." (string-take commit 7))) | |
382 | (source | |
383 | (origin | |
384 | (method git-fetch) | |
385 | (uri (git-reference | |
386 | (url "http://git.foldling.org/vim-scheme.git") | |
387 | (commit commit))) | |
388 | (file-name (string-append name "-" version "-checkout")) | |
389 | (sha256 | |
390 | (base32 | |
391 | "1ynjr1109dxgj0lz261gmzz3wf5ap1m6j6hnvl3lcyv66a4y8pjv")))) | |
0db06e7d | 392 | (build-system copy-build-system) |
843b19ca | 393 | (arguments |
0db06e7d EF |
394 | '(#:install-plan |
395 | '(("after" "share/vim/vimfiles/") | |
396 | ("ftplugin" "share/vim/vimfiles/") | |
397 | ("syntax" "share/vim/vimfiles/")))) | |
843b19ca | 398 | (synopsis "Scheme syntax for Vim") |
399 | (description | |
400 | "@code{vim-scheme} provides Scheme support for Vim (R7RS and CHICKEN).") | |
bb45b9c2 | 401 | (home-page "https://foldling.org/git/vim-scheme.git/") |
843b19ca | 402 | (license license:public-domain)))) |
403 | ||
a4c95372 | 404 | (define-public vim-luna |
405 | (let ((commit "633619953dcf8577168e255230f96b05f28d6371") | |
406 | (revision "1")) | |
407 | (package | |
408 | (name "vim-luna") | |
409 | (version (string-append "0.0.0-" revision "." (string-take commit 7))) | |
410 | (source | |
411 | (origin | |
412 | (method git-fetch) | |
413 | (uri (git-reference | |
414 | (url "https://github.com/notpratheek/vim-luna") | |
415 | (commit commit))) | |
416 | (file-name (string-append name "-" version "-checkout")) | |
417 | (sha256 | |
418 | (base32 | |
419 | "0ka3qbhsh8lix1vyj4678j7dnchkd8khhirrnn3aylxxf8fpqyg8")))) | |
84ec7b70 | 420 | (build-system copy-build-system) |
a4c95372 | 421 | (arguments |
84ec7b70 EF |
422 | '(#:install-plan |
423 | '(("colors" "share/vim/vimfiles/")))) | |
a4c95372 | 424 | (synopsis "Dark color theme for Vim") |
425 | (description | |
426 | "@code{vim-luna} is a dark color theme for Vim.") | |
427 | (home-page "https://github.com/notpratheek/vim-luna") | |
428 | (license license:expat)))) | |
429 | ||
25340002 | 430 | ;; There are no tarball releases. |
431 | (define-public vim-context-filetype | |
432 | (let ((commit "5e85f8cae26806f391aefe2661791a6de53bcea2") | |
433 | (revision "1")) | |
434 | (package | |
435 | (name "vim-context-filetype") | |
436 | (version (string-append "0.0.0-" revision "." (string-take commit 7))) | |
437 | (source | |
438 | (origin | |
439 | (method git-fetch) | |
440 | (uri (git-reference | |
441 | (url "https://github.com/Shougo/context_filetype.vim") | |
442 | (commit commit))) | |
443 | (file-name (string-append name "-" version "-checkout")) | |
444 | (sha256 | |
445 | (base32 | |
446 | "0alvrfhmd91zkd9h83s8wvgyq4iakcf6rybsyjd369qbgpcqky89")))) | |
0b350f73 | 447 | (build-system copy-build-system) |
25340002 | 448 | (arguments |
0b350f73 EF |
449 | '(#:install-plan |
450 | '(("doc" "share/vim/vimfiles/") | |
451 | ("autoload" "share/vim/vimfiles/")))) | |
25340002 | 452 | (synopsis "Context filetype library for Vim") |
453 | (description | |
454 | "@code{vim-context-filetype} is context filetype library for Vim script.") | |
455 | (home-page "https://github.com/Shougo/context_filetype.vim") | |
456 | (license license:expat)))) ; ??? check again | |
457 | ||
aad2dbfb | 458 | (define-public vim-fugitive |
261348e2 EF |
459 | (package |
460 | (name "vim-fugitive") | |
504b9ba7 | 461 | (version "3.2") |
261348e2 EF |
462 | (source |
463 | (origin | |
464 | (method git-fetch) | |
465 | (uri (git-reference | |
466 | (url "https://github.com/tpope/vim-fugitive.git") | |
467 | (commit (string-append "v" version)))) | |
468 | (file-name (git-file-name name version)) | |
469 | (sha256 | |
470 | (base32 | |
504b9ba7 | 471 | "1jbn5jxadccmcz01j94d0i1bp74cixr0fpxxf1h0aqdf1ljk3d7n")))) |
b274d2a6 | 472 | (build-system copy-build-system) |
261348e2 | 473 | (arguments |
b274d2a6 EF |
474 | '(#:install-plan |
475 | '(("autoload" "share/vim/vimfiles/") | |
476 | ("doc" "share/vim/vimfiles/") | |
477 | ("ftdetect" "share/vim/vimfiles/") | |
478 | ("plugin" "share/vim/vimfiles/") | |
479 | ("syntax" "share/vim/vimfiles/")))) | |
261348e2 EF |
480 | (home-page "https://github.com/tpope/vim-fugitive") |
481 | (synopsis "Vim plugin to work with Git") | |
482 | (description "Vim-fugitive is a wrapper for Vim that complements the | |
aad2dbfb EF |
483 | command window, where you can stage and review your changes before the next |
484 | commit or run any Git arbitrary command.") | |
261348e2 | 485 | (license license:vim))) ; distributed under the same license as vim |
aad2dbfb | 486 | |
7ffcf5c5 | 487 | (define-public vim-airline |
488 | (package | |
489 | (name "vim-airline") | |
5d64c1b4 | 490 | (version "0.11") |
7ffcf5c5 | 491 | (source |
492 | (origin | |
35a7e574 EF |
493 | (method git-fetch) |
494 | (uri (git-reference | |
495 | (url "https://github.com/vim-airline/vim-airline") | |
496 | (commit (string-append "v" version)))) | |
497 | (file-name (git-file-name name version)) | |
7ffcf5c5 | 498 | (sha256 |
499 | (base32 | |
5d64c1b4 | 500 | "1aksmr73648pvyc75pfdz28k2d4ky52rn7xiwcv7lz87q3vqld7k")))) |
8423c6f3 | 501 | (build-system copy-build-system) |
7ffcf5c5 | 502 | (arguments |
8423c6f3 EF |
503 | '(#:install-plan |
504 | '(("autoload" "share/vim/vimfiles/") | |
505 | ("doc" "share/vim/vimfiles/") | |
506 | ("plugin" "share/vim/vimfiles/") | |
507 | ("t" "share/vim/vimfiles/")))) | |
7ffcf5c5 | 508 | (synopsis "Statusline for Vim") |
509 | (description | |
510 | "@code{vim-airline} is an extensible statusline for Vim. | |
511 | It can be extended and costumized with themes, works with unicode fonts | |
512 | and powerline symbols, etc.") | |
513 | (home-page "https://github.com/vim-airline/vim-airline") | |
514 | (license license:expat))) | |
515 | ||
b02a141f | 516 | ;; There are no tarball releases. |
517 | (define-public vim-airline-themes | |
deae64ce EF |
518 | (let ((commit "e6f233231b232b6027cde6aebeeb18d9138e5324") |
519 | (revision "2")) | |
b02a141f | 520 | (package |
521 | (name "vim-airline-themes") | |
deae64ce | 522 | (version (git-version "0.0.0" revision commit)) |
b02a141f | 523 | (source |
524 | (origin | |
525 | (method git-fetch) | |
526 | (uri (git-reference | |
527 | (url "https://github.com/vim-airline/vim-airline-themes") | |
528 | (commit commit))) | |
deae64ce | 529 | (file-name (git-file-name name version)) |
b02a141f | 530 | (sha256 |
531 | (base32 | |
deae64ce | 532 | "1sb7nb7j7bz0pv1c9bgdy0smhr0jk2b1vbdv9yzghg5lrknpsbr6")))) |
e114aa20 | 533 | (build-system copy-build-system) |
b02a141f | 534 | (arguments |
e114aa20 EF |
535 | '(#:install-plan |
536 | '(("autoload" "share/vim/vimfiles/") | |
537 | ("doc" "share/vim/vimfiles/") | |
538 | ("plugin" "share/vim/vimfiles/")))) | |
b02a141f | 539 | (synopsis "Collection of themes for Vim-airline") |
540 | (description | |
541 | "@code{vim-airline-themes} is a collection of themes for @code{vim-airline}.") | |
542 | (home-page "https://github.com/vim-airline/vim-airline-themes") | |
543 | (license license:expat)))) | |
544 | ||
86db4486 | 545 | (define-public vim-syntastic |
546 | (package | |
547 | (name "vim-syntastic") | |
42521ab2 | 548 | (version "3.10.0") |
86db4486 | 549 | (source |
550 | (origin | |
c71cc133 EF |
551 | (method git-fetch) |
552 | (uri (git-reference | |
553 | (url "https://github.com/vim-syntastic/syntastic") | |
554 | (commit version))) | |
555 | (file-name (git-file-name name version)) | |
86db4486 | 556 | (sha256 |
42521ab2 | 557 | (base32 "0j91f72jaz1s6aw1hpjiz30vk2ds2aqd9gisk91grsldy6nz6hhz")))) |
8e38ed1f | 558 | (build-system copy-build-system) |
86db4486 | 559 | (arguments |
8e38ed1f EF |
560 | '(#:install-plan |
561 | '(("autoload" "share/vim/vimfiles/") | |
562 | ("doc" "share/vim/vimfiles/") | |
563 | ("plugin" "share/vim/vimfiles/") | |
564 | ("syntax_checkers" "share/vim/vimfiles/")))) | |
86db4486 | 565 | (synopsis "Syntax checking plugin for Vim") |
566 | (description | |
567 | "Vim-syntastic is a syntax checking plugin for Vim. It runs files through | |
568 | external syntax checkers and displays any resulting errors to the user. This | |
569 | can be done on demand, or automatically as files are saved. If syntax errors | |
570 | are detected, the user is notified.") | |
571 | (home-page "https://github.com/vim-syntastic/syntastic") | |
572 | (license license:wtfpl2))) | |
573 | ||
de3ed0b4 EF |
574 | (define-public editorconfig-vim |
575 | (package | |
576 | (name "editorconfig-vim") | |
577 | (version "0.3.3") | |
578 | (source | |
579 | (origin | |
580 | (method git-fetch) | |
581 | (uri (git-reference | |
582 | (url "https://github.com/editorconfig/editorconfig-vim.git") | |
583 | (commit (string-append "v" version)))) | |
584 | (file-name (git-file-name name version)) | |
585 | (sha256 | |
586 | (base32 | |
587 | "0vssfl1wjq0mv0p30c3dszwrh4yy90vwxmmdgqaxf5rykik7bdfd")) | |
588 | (modules '((guix build utils))) | |
589 | (snippet | |
590 | '(begin | |
591 | (delete-file-recursively "plugin/editorconfig-core-py") #t)))) | |
94d53fbb | 592 | (build-system copy-build-system) |
de3ed0b4 | 593 | (arguments |
94d53fbb | 594 | '(#:phases |
de3ed0b4 | 595 | (modify-phases %standard-phases |
de3ed0b4 EF |
596 | (add-after 'unpack 'patch-editorconfig-path |
597 | (lambda* (#:key inputs #:allow-other-keys) | |
598 | (let ((editorconfig (assoc-ref inputs "editorconfig-core"))) | |
599 | (substitute* "plugin/editorconfig.vim" | |
600 | (("/opt") editorconfig)) | |
94d53fbb EF |
601 | #t)))) |
602 | #:install-plan | |
603 | '(("autoload" "share/vim/vimfiles/") | |
604 | ("doc" "share/vim/vimfiles/") | |
605 | ("plugin" "share/vim/vimfiles/")))) | |
de3ed0b4 EF |
606 | (inputs |
607 | `(("editorconfig-core" ,editorconfig-core-c))) | |
608 | (home-page "https://editorconfig.org/") | |
609 | (synopsis "EditorConfig plugin for Vim") | |
610 | (description "EditorConfig makes it easy to maintain the correct coding | |
611 | style when switching between different text editors and between different | |
612 | projects. The EditorConfig project maintains a file format and plugins for | |
613 | various text editors which allow this file format to be read and used by those | |
614 | editors.") | |
615 | (license license:bsd-2))) | |
616 | ||
bc84735d | 617 | (define-public neovim-syntastic |
618 | (package | |
619 | (inherit vim-syntastic) | |
620 | (name "neovim-syntastic") | |
621 | (arguments | |
8e38ed1f EF |
622 | '(#:install-plan |
623 | '(("autoload" "share/nvim/site/") | |
624 | ("doc" "share/nvim/site/") | |
625 | ("plugin" "share/nvim/site/") | |
626 | ("syntax_checkers" "share/nvim/site/")))) | |
bc84735d | 627 | (synopsis "Syntax checking plugin for Neovim") |
628 | (description | |
629 | "Vim-syntastic is a syntax checking plugin for Neovim. It runs files through | |
630 | external syntax checkers and displays any resulting errors to the user. This | |
631 | can be done on demand, or automatically as files are saved. If syntax errors | |
632 | are detected, the user is notified."))) | |
633 | ||
9b11eee9 RW |
634 | (define-public neovim |
635 | (package | |
636 | (name "neovim") | |
b6c40df6 | 637 | (version "0.4.3") |
9b11eee9 RW |
638 | (source |
639 | (origin | |
c3ebaec5 H |
640 | (method git-fetch) |
641 | (uri (git-reference | |
642 | (url "https://github.com/neovim/neovim") | |
643 | (commit (string-append "v" version)))) | |
644 | (file-name (git-file-name name version)) | |
9b11eee9 | 645 | (sha256 |
b6c40df6 | 646 | (base32 "03p7pic7hw9yxxv7fbgls1f42apx3lik2k6mpaz1a109ngyc5kaj")))) |
9b11eee9 RW |
647 | (build-system cmake-build-system) |
648 | (arguments | |
649 | `(#:modules ((srfi srfi-26) | |
650 | (guix build cmake-build-system) | |
651 | (guix build utils)) | |
4168e3fa | 652 | #:configure-flags '("-DPREFER_LUA:BOOL=YES") |
9b11eee9 RW |
653 | #:phases |
654 | (modify-phases %standard-phases | |
655 | (add-after 'unpack 'set-lua-paths | |
656 | (lambda* (#:key inputs #:allow-other-keys) | |
9abfbd79 | 657 | (let* ((lua-version "5.1") |
9b11eee9 RW |
658 | (lua-cpath-spec |
659 | (lambda (prefix) | |
660 | (let ((path (string-append prefix "/lib/lua/" lua-version))) | |
661 | (string-append path "/?.so;" path "/?/?.so")))) | |
662 | (lua-path-spec | |
663 | (lambda (prefix) | |
664 | (let ((path (string-append prefix "/share/lua/" lua-version))) | |
665 | (string-append path "/?.lua;" path "/?/?.lua")))) | |
666 | (lua-inputs (map (cute assoc-ref %build-inputs <>) | |
667 | '("lua" | |
518fd3b6 | 668 | "lua-luv" |
9b11eee9 RW |
669 | "lua-lpeg" |
670 | "lua-bitop" | |
671 | "lua-libmpack")))) | |
672 | (setenv "LUA_PATH" | |
673 | (string-join (map lua-path-spec lua-inputs) ";")) | |
674 | (setenv "LUA_CPATH" | |
675 | (string-join (map lua-cpath-spec lua-inputs) ";")) | |
9fbd0b17 JL |
676 | #t))) |
677 | (add-after 'unpack 'prevent-embedding-gcc-store-path | |
678 | (lambda _ | |
679 | ;; nvim remembers its build options, including the compiler with | |
680 | ;; its complete path. This adds gcc to the closure of nvim, which | |
681 | ;; doubles its size. We remove the refirence here. | |
682 | (substitute* "cmake/GetCompileFlags.cmake" | |
683 | (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc")) | |
684 | #t))))) | |
9b11eee9 RW |
685 | (inputs |
686 | `(("libuv" ,libuv) | |
687 | ("msgpack" ,msgpack) | |
688 | ("libtermkey" ,libtermkey) | |
689 | ("libvterm" ,libvterm) | |
690 | ("unibilium" ,unibilium) | |
691 | ("jemalloc" ,jemalloc) | |
692 | ("libiconv" ,libiconv) | |
9abfbd79 | 693 | ("lua" ,lua-5.1) |
518fd3b6 | 694 | ("lua-luv" ,lua5.1-luv) |
9abfbd79 H |
695 | ("lua-lpeg" ,lua5.1-lpeg) |
696 | ("lua-bitop" ,lua5.1-bitop) | |
697 | ("lua-libmpack" ,lua5.1-libmpack))) | |
9b11eee9 RW |
698 | (native-inputs |
699 | `(("pkg-config" ,pkg-config) | |
700 | ("gettext" ,gettext-minimal) | |
701 | ("gperf" ,gperf))) | |
52bc70e4 | 702 | (home-page "https://neovim.io") |
9b11eee9 RW |
703 | (synopsis "Fork of vim focused on extensibility and agility") |
704 | (description "Neovim is a project that seeks to aggressively | |
705 | refactor Vim in order to: | |
706 | ||
707 | @itemize | |
708 | @item Simplify maintenance and encourage contributions | |
709 | @item Split the work between multiple developers | |
710 | @item Enable advanced external UIs without modifications to the core | |
711 | @item Improve extensibility with a new plugin architecture | |
712 | @end itemize\n") | |
713 | ;; Neovim is licensed under the terms of the Apache 2.0 license, | |
714 | ;; except for parts that were contributed under the Vim license. | |
715 | (license (list license:asl2.0 license:vim)))) | |
716 | ||
65dccb3a EF |
717 | (define-public vifm |
718 | (package | |
719 | (name "vifm") | |
b4bd0d86 | 720 | (version "0.10.1") |
65dccb3a EF |
721 | (source |
722 | (origin | |
723 | (method url-fetch) | |
1dbd3432 EF |
724 | (uri (list |
725 | (string-append "https://github.com/vifm/vifm/releases/download/v" | |
726 | version "/vifm-" version ".tar.bz2") | |
727 | (string-append "https://sourceforge.net/projects/vifm/files/vifm/" | |
728 | "vifm-" version ".tar.bz2"))) | |
65dccb3a EF |
729 | (sha256 |
730 | (base32 | |
b4bd0d86 | 731 | "0fyhxh7ndjn8fyjhj14ymkr3pjcs3k1xbs43g7xvvq85vdb6y04r")))) |
65dccb3a EF |
732 | (build-system gnu-build-system) |
733 | (arguments | |
513a66c9 EF |
734 | '(#:configure-flags '("--disable-build-timestamp") |
735 | #:phases | |
736 | (modify-phases %standard-phases | |
737 | (add-after 'patch-source-shebangs 'patch-test-shebangs | |
738 | (lambda _ | |
739 | (substitute* (cons* "src/background.c" | |
740 | "src/cfg/config.c" | |
741 | (find-files "tests" "\\.c$")) | |
742 | (("/bin/sh") (which "sh")) | |
743 | (("/bin/bash") (which "bash"))) | |
744 | ;; This test segfaults | |
745 | (substitute* "tests/Makefile" | |
746 | (("misc") "")) | |
747 | #t)) | |
748 | (add-after 'install 'install-vim-plugin-files | |
749 | (lambda* (#:key outputs #:allow-other-keys) | |
750 | (let* ((out (assoc-ref outputs "out")) | |
751 | (vifm (string-append out "/share/vifm")) | |
752 | (vimfiles (string-append out "/share/vim/vimfiles"))) | |
753 | (copy-recursively (string-append vifm "/colors") | |
754 | (string-append vimfiles "/colors")) | |
755 | (copy-recursively (string-append vifm "/vim") | |
756 | vimfiles) | |
757 | (delete-file-recursively (string-append vifm "/colors")) | |
758 | (delete-file-recursively (string-append vifm "/vim"))) | |
759 | #t))))) | |
65dccb3a | 760 | (native-inputs |
4f34e0db | 761 | `(("groff" ,groff))) ; for the documentation |
65dccb3a EF |
762 | (inputs |
763 | `(("libx11" ,libx11) | |
4f34e0db EF |
764 | ("ncurses" ,ncurses) |
765 | ("perl" ,perl))) | |
766 | (home-page "https://vifm.info/") | |
65dccb3a EF |
767 | (synopsis "Flexible vi-like file manager using ncurses") |
768 | (description "Vifm is a file manager providing a @command{vi}-like usage | |
769 | experience. It has similar keybindings and modes (e.g. normal, command line, | |
770 | visual). The interface uses ncurses, thus vifm can be used in text-only | |
771 | environments. It supports a wide range of features, some of which are known | |
772 | from the @command{vi}-editor: | |
773 | @enumerate | |
774 | @item utf8 support | |
775 | @item user mappings (almost like in @code{vi}) | |
776 | @item ranges in command | |
777 | @item line commands | |
778 | @item user defined commands (with support for ranges) | |
779 | @item registers | |
780 | @item operation undoing/redoing | |
781 | @item fuse file systems support | |
782 | @item trash | |
783 | @item multiple files renaming | |
784 | @item support of filename modifiers | |
785 | @item colorschemes support | |
786 | @item file name color according to file type | |
787 | @item path specific colorscheme customization | |
788 | @item bookmarks | |
789 | @item operation backgrounding | |
790 | @item customizable file viewers | |
791 | @item handy @code{less}-like preview mode | |
792 | @item filtering out and searching for files using regular expressions | |
793 | @item one or two panes view | |
794 | @end enumerate | |
795 | With the package comes a plugin to use vifm as a vim file selector.") | |
796 | (license license:gpl2+))) | |
24d32e67 JL |
797 | |
798 | (define-public python-pynvim | |
799 | (package | |
800 | (name "python-pynvim") | |
801 | (version "0.3.2") | |
802 | (source (origin | |
803 | (method url-fetch) | |
804 | (uri (pypi-uri "pynvim" version)) | |
805 | (sha256 | |
806 | (base32 | |
807 | "01dybk4vs452pljn1q3il5z2sd313ki0lgiglc0xmjc6wp290r6g")))) | |
808 | (build-system python-build-system) | |
809 | (propagated-inputs | |
810 | `(("python-greenlet" ,python-greenlet) | |
811 | ("python-msgpack" ,python-msgpack))) | |
812 | (arguments | |
813 | `(#:tests? #f)) | |
814 | (home-page "https://github.com/neovim/pynvim") | |
815 | (synopsis "Python client and plugin host for neovim") | |
816 | (description "Pynvim implements support for python plugins in neovim. It | |
817 | also works as a library for connecting to and scripting neovim processes | |
818 | through its msgpack-rpc API.") | |
819 | (license license:asl2.0))) | |
820 | ||
821 | (define-public python2-pynvim | |
822 | (package-with-python2 python-pynvim)) | |
a947ade6 EF |
823 | |
824 | (define-public vim-guix-vim | |
825 | (package | |
826 | (name "vim-guix-vim") | |
827 | (version "0.1") | |
828 | (source (origin | |
829 | (method git-fetch) | |
830 | (uri (git-reference | |
831 | (url "https://gitlab.com/Efraim/guix.vim") | |
832 | (commit version))) | |
833 | (file-name (git-file-name name version)) | |
834 | (sha256 | |
835 | (base32 | |
836 | "1f8h8m96fqh3f9hy87spgh9kdqzyxl11n9s3rywvyq5xhn489bnk")))) | |
12fe38a1 | 837 | (build-system copy-build-system) |
a947ade6 | 838 | (arguments |
12fe38a1 EF |
839 | '(#:install-plan |
840 | '(("compiler" "share/vim/vimfiles/") | |
841 | ("doc" "share/vim/vimfiles/") | |
842 | ("indent" "share/vim/vimfiles/") | |
843 | ("ftdetect" "share/vim/vimfiles/") | |
844 | ("ftplugin" "share/vim/vimfiles/") | |
845 | ("syntax" "share/vim/vimfiles/")))) | |
a947ade6 EF |
846 | (home-page "https://gitlab.com/Efraim/guix.vim") |
847 | (synopsis "Guix integration in Vim") | |
848 | (description "This package provides support for GNU Guix in Vim.") | |
849 | (license license:vim))) | |
fb29d7d7 EF |
850 | |
851 | (define-public vim-asyncrun | |
852 | (package | |
853 | (name "vim-asyncrun") | |
0144f8de | 854 | (version "2.7.5") |
fb29d7d7 EF |
855 | (source (origin |
856 | (method git-fetch) | |
857 | (uri (git-reference | |
858 | (url "https://github.com/skywind3000/asyncrun.vim") | |
859 | (commit version))) | |
860 | (file-name (git-file-name name version)) | |
861 | (sha256 | |
862 | (base32 | |
0144f8de | 863 | "02fiqf4rcrxbcgvj02mpd78wkxsrnbi54aciwh9fv5mnz5ka249m")))) |
fb29d7d7 EF |
864 | (build-system copy-build-system) |
865 | (arguments | |
866 | '(#:install-plan | |
867 | '(("plugin" "share/vim/vimfiles/") | |
868 | ("doc/" "share/vim/vimfiles/doc" #:include ("asyncrun.txt"))))) | |
869 | (home-page "https://github.com/skywind3000/asyncrun.vim") | |
870 | (synopsis "Run Async Shell Commands in Vim") | |
871 | (description "This plugin takes the advantage of new APIs in Vim 8 (and | |
872 | NeoVim) to enable you to run shell commands in background and read output in the | |
873 | quickfix window in realtime.") | |
874 | (license license:expat))) |