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