summaryrefslogtreecommitdiff
path: root/gnu/packages/vim.scm
diff options
context:
space:
mode:
authorHerman Rimm <herman@rimm.ee>2026-03-21 10:58:38 +0100
committerLudovic Courtès <ludo@gnu.org>2026-04-01 22:06:13 +0200
commitf67676bd3bbac6831a920fbc64fd8e792a9e3914 (patch)
treed7e788966ef840de55c842d7013295b49e0696bf /gnu/packages/vim.scm
parent50a02cc74f21ad401ec7cef4fa073440f6c41399 (diff)
gnu: vim: Convert arguments value to G-expression.
* gnu/packages/vim.scm (vim)[source]: Reduce indentation. [arguments]: Convert to G-expression. Use quoted list. (xxd)[description]: Add newline. (vim-full)[arguments]: Convert to G-expression. Use this-package-input. [description]: Add newline. Change-Id: Iab3a9a6942c5b524d1008b25778a8898717ed4e4 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/vim.scm')
-rw-r--r--gnu/packages/vim.scm232
1 files changed, 118 insertions, 114 deletions
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index d975b707f30..26a268370e4 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -94,90 +94,91 @@
94 (package 94 (package
95 (name "vim") 95 (name "vim")
96 (version "9.2.0232") 96 (version "9.2.0232")
97 (source (origin 97 (source
98 (method git-fetch) 98 (origin
99 (uri (git-reference 99 (method git-fetch)
100 (url "https://github.com/vim/vim") 100 (uri (git-reference
101 (commit (string-append "v" version)))) 101 (url "https://github.com/vim/vim")
102 (file-name (git-file-name name version)) 102 (commit (string-append "v" version))))
103 (sha256 103 (file-name (git-file-name name version))
104 (base32 104 (sha256
105 "0z5b77qq5rmddf42f8sqd4sbf81y1r8d9i9f0naczb9bz762wx0r")))) 105 (base32 "0z5b77qq5rmddf42f8sqd4sbf81y1r8d9i9f0naczb9bz762wx0r"))))
106 (build-system gnu-build-system) 106 (build-system gnu-build-system)
107 (arguments 107 (arguments
108 `(#:test-target "test" 108 (list
109 #:test-target "test"
109 #:parallel-tests? #f 110 #:parallel-tests? #f
110 #:phases 111 #:phases
111 (modify-phases %standard-phases 112 #~(modify-phases %standard-phases
112 (add-after 'configure 'patch-absolute-paths 113 (add-after 'configure 'patch-absolute-paths
113 (lambda* (#:key inputs #:allow-other-keys) 114 (lambda* (#:key inputs #:allow-other-keys)
114 (substitute* '("src/testdir/Makefile" 115 (substitute* '("src/testdir/Makefile"
115 "src/testdir/test_channel.vim" 116 "src/testdir/test_channel.vim"
116 "src/testdir/test_filetype.vim" 117 "src/testdir/test_filetype.vim"
117 "src/testdir/test_normal.vim" 118 "src/testdir/test_normal.vim"
118 "src/testdir/test_plugin_matchparen.vim" 119 "src/testdir/test_plugin_matchparen.vim"
119 "src/testdir/test_popupwin.vim" 120 "src/testdir/test_popupwin.vim"
120 "src/testdir/test_prompt_buffer.vim" 121 "src/testdir/test_prompt_buffer.vim"
121 "src/testdir/test_shell.vim" 122 "src/testdir/test_shell.vim"
122 "src/testdir/test_suspend.vim" 123 "src/testdir/test_suspend.vim"
123 "src/testdir/test_terminal.vim" 124 "src/testdir/test_terminal.vim"
124 "src/testdir/test_terminal2.vim") 125 "src/testdir/test_terminal2.vim")
125 (("/bin/sh") (which "sh"))) 126 (("/bin/sh") (which "sh")))
126 (substitute* "src/testdir/test_autocmd.vim" 127 (substitute* "src/testdir/test_autocmd.vim"
127 (("/bin/kill") (which "kill"))) 128 (("/bin/kill") (which "kill")))
128 (substitute* '("runtime/syntax/sh.vim" 129 (substitute* '("runtime/syntax/sh.vim"
129 "src/if_cscope.c") 130 "src/if_cscope.c")
130 (("/bin/sh") (search-input-file inputs "/bin/sh"))))) 131 (("/bin/sh") (search-input-file inputs "/bin/sh")))))
131 (add-before 'check 'set-environment-variables 132 (add-before 'check 'set-environment-variables
132 (lambda* (#:key inputs #:allow-other-keys) 133 (lambda* (#:key inputs #:allow-other-keys)
133 ;; One of the tests tests timezone-dependent functions. 134 ;; One of the tests tests timezone-dependent functions.
134 (setenv "TZDIR" 135 (setenv "TZDIR"
135 (search-input-directory inputs "share/zoneinfo")) 136 (search-input-directory inputs "share/zoneinfo"))
136 137
137 ;; Make sure the TERM environment variable is set for the tests. 138 ;; Make sure the TERM environment variable is set for the tests.
138 (setenv "TERM" "xterm"))) 139 (setenv "TERM" "xterm")))
139 (add-before 'check 'skip-or-fix-failing-tests 140 (add-before 'check 'skip-or-fix-failing-tests
140 (lambda _ 141 (lambda _
141 ;; These tests try to download from the internet. 142 ;; These tests try to download from the internet.
142 (setenv "TEST_SKIP_PAT" 143 (setenv "TEST_SKIP_PAT"
143 "Test_glvs_default") 144 "Test_glvs_default")
144 145
145 ;; Ignore failure of some flaky tests. 146 ;; Ignore failure of some flaky tests.
146 (setenv "TEST_MAY_FAIL" 147 (setenv "TEST_MAY_FAIL"
147 (string-join 148 (string-join
148 (list "Test_write_backup_symlink" 149 '("Test_write_backup_symlink"
149 ;; These tests compare the output of commands and 150 ;; These tests compare the output of commands and
150 ;; expect to run on a FHS-compliant system. 151 ;; expect to run on a FHS-compliant system.
151 "Test_echo_verbose_system" 152 "Test_echo_verbose_system"
152 "Test_matchparen_ignore_sh_case" 153 "Test_matchparen_ignore_sh_case"
153 "Test_popup_drag_termwin" 154 "Test_popup_drag_termwin"
154 "Test_combining_double_width" 155 "Test_combining_double_width"
155 "Test_open_term_from_cmd" 156 "Test_open_term_from_cmd"
156 "Test_terminal_postponed_scrollback") 157 "Test_terminal_postponed_scrollback")
157 ",")) 158 ","))
158 159
159 ;; These depend on full bash. 160 ;; These depend on full bash.
160 (with-directory-excursion "runtime/syntax/testdir/input" 161 (with-directory-excursion "runtime/syntax/testdir/input"
161 (for-each delete-file 162 (for-each delete-file
162 (list "sh_10.sh" 163 '("sh_10.sh"
163 "sh_11.sh" 164 "sh_11.sh"
164 "sh_12.sh" 165 "sh_12.sh"
165 "sh_14.sh" 166 "sh_14.sh"
166 "sh_15.sh" 167 "sh_15.sh"
167 "sh_bash.bash" 168 "sh_bash.bash"
168 "sh_bash_alias.sh" 169 "sh_bash_alias.sh"
169 "sh_sundrous.bash"))))) 170 "sh_sundrous.bash")))))
170 (add-before 'install 'fix-installman.sh 171 (add-before 'install 'fix-installman.sh
171 (lambda _ 172 (lambda _
172 (substitute* "src/installman.sh" 173 (substitute* "src/installman.sh"
173 (("/bin/sh") 174 (("/bin/sh")
174 (which "sh"))))) 175 (which "sh")))))
175 (add-after 'install 'install-guix.vim 176 (add-after 'install 'install-guix.vim
176 (lambda* (#:key inputs outputs #:allow-other-keys) 177 (lambda* (#:key inputs outputs #:allow-other-keys)
177 (let ((vimdir (string-append (assoc-ref outputs "out") "/share/vim"))) 178 (let ((vimdir (string-append (assoc-ref outputs "out") "/share/vim")))
178 (mkdir-p vimdir) 179 (mkdir-p vimdir)
179 (copy-file (assoc-ref inputs "guix.vim") 180 (copy-file (assoc-ref inputs "guix.vim")
180 (string-append vimdir "/vimrc")))))))) 181 (string-append vimdir "/vimrc"))))))))
181 (inputs 182 (inputs
182 (list gawk ncurses perl tcsh)) ; For runtime/tools/vim32 183 (list gawk ncurses perl tcsh)) ; For runtime/tools/vim32
183 (native-inputs 184 (native-inputs
@@ -221,7 +222,8 @@ configuration files.")
221 (inputs `()) 222 (inputs `())
222 (native-inputs `()) 223 (native-inputs `())
223 (synopsis "Hexdump utility from vim") 224 (synopsis "Hexdump utility from vim")
224 (description "This package provides the Hexdump utility xxd that comes 225 (description
226 "This package provides the Hexdump utility xxd that comes
225with the editor vim."))) 227with the editor vim.")))
226 228
227(define-public vim-full 229(define-public vim-full
@@ -229,38 +231,39 @@ with the editor vim.")))
229 (inherit vim) 231 (inherit vim)
230 (name "vim-full") 232 (name "vim-full")
231 (arguments 233 (arguments
232 `(#:configure-flags 234 (cons*
233 (list (string-append "--with-lua-prefix=" 235 #:configure-flags
234 (assoc-ref %build-inputs "lua")) 236 #~(list (string-append "--with-lua-prefix="
235 "--with-features=huge" 237 #$(this-package-input "lua"))
236 "--enable-python3interp=yes" 238 "--with-features=huge"
237 "--enable-perlinterp=yes" 239 "--enable-python3interp=yes"
238 "--enable-rubyinterp=yes" 240 "--enable-perlinterp=yes"
239 "--enable-tclinterp=yes" 241 "--enable-rubyinterp=yes"
240 "--enable-luainterp=yes" 242 "--enable-tclinterp=yes"
241 "--enable-cscope" 243 "--enable-luainterp=yes"
242 "--enable-sniff" 244 "--enable-cscope"
243 "--enable-multibyte" 245 "--enable-sniff"
244 "--enable-xim" 246 "--enable-multibyte"
245 "--disable-selinux" 247 "--enable-xim"
246 "--enable-gui") 248 "--disable-selinux"
247 ,@(substitute-keyword-arguments arguments 249 "--enable-gui")
248 ((#:phases phases) 250 (substitute-keyword-arguments arguments
249 `(modify-phases ,phases 251 ((#:phases phases)
250 (add-before 'check 'skip-some-more-tests 252 #~(modify-phases #$phases
251 (lambda _ 253 (add-before 'check 'skip-some-more-tests
252 ;; Fontconfig can't figure out its cache directory 254 (lambda _
253 (substitute* "src/testdir/test_startup.vim" 255 ;; Fontconfig can't figure out its cache directory
254 ((".*Test_progname.*" line) 256 (substitute* "src/testdir/test_startup.vim"
255 (string-append line "return\n"))))) 257 ((".*Test_progname.*" line)
256 (add-before 'check 'start-xserver 258 (string-append line "return\n")))))
257 (lambda* (#:key inputs #:allow-other-keys) 259 (add-before 'check 'start-xserver
258 ;; Some tests require an X server, but does not start one. 260 (lambda* (#:key inputs #:allow-other-keys)
259 (let ((xorg-server (assoc-ref inputs "xorg-server")) 261 ;; Some tests require an X server, but does not start one.
260 (display ":1")) 262 (let ((xorg-server (assoc-ref inputs "xorg-server"))
261 (setenv "DISPLAY" display) 263 (display ":1"))
262 (zero? (system (string-append xorg-server "/bin/Xvfb " 264 (setenv "DISPLAY" display)
263 display " &"))))))))))) 265 (zero? (system (string-append xorg-server "/bin/Xvfb "
266 display " &")))))))))))
264 (native-inputs 267 (native-inputs
265 (modify-inputs native-inputs 268 (modify-inputs native-inputs
266 (prepend pkg-config xorg-server-for-tests))) 269 (prepend pkg-config xorg-server-for-tests)))
@@ -293,7 +296,8 @@ with the editor vim.")))
293 tcl))) 296 tcl)))
294 ;; The description shares language with the vim package. When making 297 ;; The description shares language with the vim package. When making
295 ;; changes, check if the other description also needs to be updated. 298 ;; changes, check if the other description also needs to be updated.
296 (description "Vim is a highly configurable text editor built to enable efficient text 299 (description
300 "Vim is a highly configurable text editor built to enable efficient text
297editing. It is an improved version of the vi editor distributed with most UNIX 301editing. It is an improved version of the vi editor distributed with most UNIX
298systems. 302systems.
299 303