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