gnu: hidapi: Fix 'license'.
[jackhill/guix/guix.git] / gnu / packages / vim.scm
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>
5 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
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.
12 ;;;
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.
17 ;;;
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/>.
20
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))
48
49 (define-public vim
50 (package
51 (name "vim")
52 (version "8.0.0069")
53 (source (origin
54 (method url-fetch)
55 (uri (string-append "https://github.com/vim/vim/archive/v"
56 version ".tar.gz"))
57 (file-name (string-append name "-" version ".tar.gz"))
58 (sha256
59 (base32
60 "1xxg0m296jqcg7wxxw1zcr0i10j1a85aw6ainpql2h4jrqbwqvy9"))))
61 (build-system gnu-build-system)
62 (arguments
63 `(#:test-target "test"
64 #:parallel-tests? #f
65 #:phases
66 (modify-phases %standard-phases
67 (add-after 'unpack 'make-bit-reproducable
68 (lambda _
69 (substitute* "src/version.c"
70 ((" VIM_VERSION_LONG_DATE") " VIM_VERSION_LONG")
71 ((" __DATE__") "")
72 ((" __TIME__") ""))
73 #t))
74 (add-after 'configure 'patch-config-files
75 (lambda _
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")))
81 #t)))))
82 (inputs
83 `(("gawk" ,gawk)
84 ("inetutils" ,inetutils)
85 ("ncurses" ,ncurses)
86 ("perl" ,perl)
87 ("tcsh" ,tcsh))) ; For runtime/tools/vim32
88 (home-page "http://www.vim.org/")
89 (synopsis "Text editor based on vi")
90 (description
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
93 systems.
94
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)))
100
101 (define-public vim-full
102 (package
103 (inherit vim)
104 (name "vim-full")
105 (arguments
106 `(#:configure-flags
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"
115 "--enable-cscope"
116 "--enable-sniff"
117 "--enable-multibyte"
118 "--enable-xim"
119 "--disable-selinux"
120 "--enable-gui")
121 ,@(package-arguments vim)))
122 (native-inputs
123 `(("pkg-config" ,pkg-config)))
124 (inputs
125 `(("acl" ,acl)
126 ("atk" ,atk)
127 ("attr" ,attr)
128 ("cairo" ,cairo)
129 ("fontconfig" ,fontconfig)
130 ("freetype" ,freetype)
131 ("gdk-pixbuf" ,gdk-pixbuf)
132 ("gettext" ,gnu-gettext)
133 ("glib" ,glib)
134 ("gpm" ,gpm)
135 ("gtk" ,gtk+-2)
136 ("harfbuzz" ,harfbuzz)
137 ("libice" ,libice)
138 ("libpng" ,libpng)
139 ("libsm" ,libsm)
140 ("libx11" ,libx11)
141 ("libxdmcp" ,libxdmcp)
142 ("libxt" ,libxt)
143 ("libxpm" ,libxpm)
144 ("lua" ,lua)
145 ("pango" ,pango)
146 ("pixman" ,pixman)
147 ("python-3" ,python)
148 ("ruby" ,ruby)
149 ("tcl" ,tcl)
150 ,@(package-inputs vim)))))
151
152 (define-public vifm
153 (package
154 (name "vifm")
155 (version "0.8.2")
156 (source
157 (origin
158 (method url-fetch)
159 (uri (string-append "mirror://sourceforge/vifm/vifm/vifm-"
160 version ".tar.bz2"))
161 (sha256
162 (base32
163 "07r15kq7kjl3a41sd11ncpsii866xxps4f90zh3lv8jqcrv6silb"))))
164 (build-system gnu-build-system)
165 (arguments
166 '(#:phases
167 (modify-phases %standard-phases
168 (add-after 'patch-source-shebangs 'patch-test-shebangs
169 (lambda _
170 (substitute* (find-files "tests" "\\.c$")
171 (("/bin/sh") (which "sh")))
172 #t)))))
173 (native-inputs
174 `(("groff" ,groff) ; for the documentation
175 ("perl" ,perl)))
176 (inputs
177 `(("libx11" ,libx11)
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:
186 @enumerate
187 @item utf8 support
188 @item user mappings (almost like in @code{vi})
189 @item ranges in command
190 @item line commands
191 @item user defined commands (with support for ranges)
192 @item registers
193 @item operation undoing/redoing
194 @item fuse file systems support
195 @item trash
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
201 @item bookmarks
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
207 @end enumerate
208 With the package comes a plugin to use vifm as a vim file selector.")
209 (license license:gpl2+)))