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