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