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