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