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