1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
3 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages vim)
22 #:use-module ((guix licenses) #:prefix license:)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system gnu)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages acl)
28 #:use-module (gnu packages admin) ; For GNU hostname
29 #:use-module (gnu packages attr)
30 #:use-module (gnu packages fontutils)
31 #:use-module (gnu packages gawk)
32 #:use-module (gnu packages gettext)
33 #:use-module (gnu packages glib)
34 #:use-module (gnu packages groff)
35 #:use-module (gnu packages gtk)
36 #:use-module (gnu packages image)
37 #:use-module (gnu packages linux)
38 #:use-module (gnu packages lua)
39 #:use-module (gnu packages ncurses)
40 #:use-module (gnu packages perl)
41 #:use-module (gnu packages pkg-config)
42 #:use-module (gnu packages python)
43 #:use-module (gnu packages ruby)
44 #:use-module (gnu packages shells)
45 #:use-module (gnu packages tcl)
46 #:use-module (gnu packages xdisorg)
47 #:use-module (gnu packages xorg))
55 (uri (string-append "https://github.com/vim/vim/archive/v"
57 (file-name (string-append name "-" version ".tar.gz"))
60 "1xxg0m296jqcg7wxxw1zcr0i10j1a85aw6ainpql2h4jrqbwqvy9"))))
61 (build-system gnu-build-system)
63 `(#:test-target "test"
66 (modify-phases %standard-phases
67 (add-after 'unpack 'make-bit-reproducable
69 (substitute* "src/version.c"
70 ((" VIM_VERSION_LONG_DATE") " VIM_VERSION_LONG")
74 (add-after 'configure 'patch-config-files
76 (substitute* "runtime/tools/mve.awk"
77 (("/usr/bin/nawk") (which "gawk")))
78 (substitute* '("src/testdir/Makefile"
79 "src/testdir/test_normal.vim")
80 (("/bin/sh") (which "sh")))
84 ("inetutils" ,inetutils)
87 ("tcsh" ,tcsh))) ; For runtime/tools/vim32
88 (home-page "http://www.vim.org/")
89 (synopsis "Text editor based on vi")
91 "Vim is a highly configurable text editor built to enable efficient text
92 editing. It is an improved version of the vi editor distributed with most UNIX
95 Vim is often called a \"programmer's editor,\" and so useful for programming
96 that many consider it an entire IDE. It's not just for programmers, though.
97 Vim is perfect for all kinds of text editing, from composing email to editing
98 configuration files.")
99 (license license:vim)))
101 (define-public vim-full
107 (list (string-append "--with-lua-prefix="
108 (assoc-ref %build-inputs "lua"))
109 "--with-features=huge"
110 "--enable-python3interp=yes"
111 "--enable-perlinterp=yes"
112 "--enable-rubyinterp=yes"
113 "--enable-tclinterp=yes"
114 "--enable-luainterp=yes"
121 ,@(package-arguments vim)))
123 `(("pkg-config" ,pkg-config)))
129 ("fontconfig" ,fontconfig)
130 ("freetype" ,freetype)
131 ("gdk-pixbuf" ,gdk-pixbuf)
132 ("gettext" ,gnu-gettext)
136 ("harfbuzz" ,harfbuzz)
141 ("libxdmcp" ,libxdmcp)
150 ,@(package-inputs vim)))))
159 (uri (string-append "mirror://sourceforge/vifm/vifm/vifm-"
163 "07r15kq7kjl3a41sd11ncpsii866xxps4f90zh3lv8jqcrv6silb"))))
164 (build-system gnu-build-system)
167 (modify-phases %standard-phases
168 (add-after 'patch-source-shebangs 'patch-test-shebangs
170 (substitute* (find-files "tests" "\\.c$")
171 (("/bin/sh") (which "sh")))
174 `(("groff" ,groff) ; for the documentation
178 ("ncurses" ,ncurses)))
179 (home-page "http://vifm.info/")
180 (synopsis "Flexible vi-like file manager using ncurses")
181 (description "Vifm is a file manager providing a @command{vi}-like usage
182 experience. It has similar keybindings and modes (e.g. normal, command line,
183 visual). The interface uses ncurses, thus vifm can be used in text-only
184 environments. It supports a wide range of features, some of which are known
185 from the @command{vi}-editor:
188 @item user mappings (almost like in @code{vi})
189 @item ranges in command
191 @item user defined commands (with support for ranges)
193 @item operation undoing/redoing
194 @item fuse file systems support
196 @item multiple files renaming
197 @item support of filename modifiers
198 @item colorschemes support
199 @item file name color according to file type
200 @item path specific colorscheme customization
202 @item operation backgrounding
203 @item customizable file viewers
204 @item handy @code{less}-like preview mode
205 @item filtering out and searching for files using regular expressions
206 @item one or two panes view
208 With the package comes a plugin to use vifm as a vim file selector.")
209 (license license:gpl2+)))