;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
-;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
+;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017 ng0 <ng0@infotropique.org>
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
(define-module (gnu packages vim)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix utils)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
(define-public vim
(package
(name "vim")
- (version "8.0.0300")
+ (version "8.0.1428")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/vim/vim/archive/v"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
- (patches (search-patches "vim-CVE-2017-5953.patch"))
(sha256
(base32
- "04samk2bakyixbxyc3p0g6ypls45105sikibg0wc6lmak9bqjs85"))))
+ "08hzx843cxr5b2llc3332wxpgh3gjrs7jgd6s3sdrxnvg0s0y7s8"))))
(build-system gnu-build-system)
(arguments
`(#:test-target "test"
#:parallel-tests? #f
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'make-bit-reproducable
- (lambda _
- (substitute* "src/version.c"
- ((" VIM_VERSION_LONG_DATE") " VIM_VERSION_LONG")
- ((" __DATE__") "")
- ((" __TIME__") ""))
- #t))
(add-after 'configure 'patch-config-files
(lambda _
(substitute* "runtime/tools/mve.awk"
(substitute* '("src/testdir/Makefile"
"src/testdir/test_normal.vim")
(("/bin/sh") (which "sh")))
+ #t))
+ (add-before 'check 'patch-failing-test
+ (lambda _
+ ;; XXX A single test fails with “Can't create file /dev/stdout” (at
+ ;; Test_writefile_sync_dev_stdout line 5) while /dev/stdout exists.
+ (substitute* "src/testdir/test_writefile.vim"
+ (("/dev/stdout") "a-regular-file"))
#t)))))
(inputs
`(("gawk" ,gawk)
configuration files.")
(license license:vim)))
+(define-public xxd
+ (package (inherit vim)
+ (name "xxd")
+ (arguments
+ `(#:make-flags '("CC=gcc")
+ #:tests? #f ; there are none
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "src/xxd")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+ (install-file "xxd" bin)
+ #t))))))
+ (synopsis "Hexdump utility from vim")
+ (description "This package provides the Hexdump utility xxd that comes
+with the editor vim.")))
+
(define-public vim-full
(package
+ ;; This package should share its source with Vim, but it doesn't
+ ;; build reliably, and we want to keep Vim up to date due to the
+ ;; frequency of important bug fixes.
(inherit vim)
(name "vim-full")
(arguments
"--enable-xim"
"--disable-selinux"
"--enable-gui")
- ,@(package-arguments vim)))
+ ,@(substitute-keyword-arguments (package-arguments vim)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'check 'start-xserver
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Some tests require an X server, but does not start one.
+ (let ((xorg-server (assoc-ref inputs "xorg-server"))
+ (display ":1"))
+ (setenv "DISPLAY" display)
+ (zero? (system (string-append xorg-server "/bin/Xvfb "
+ display " &")))))))))))
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ `(("pkg-config" ,pkg-config)
+ ("xorg-server" ,xorg-server)))
(inputs
`(("acl" ,acl)
("atk" ,atk)
(home-page "https://github.com/notpratheek/vim-luna")
(license license:expat))))
+;; There are no tarball releases.
+(define-public vim-context-filetype
+ (let ((commit "5e85f8cae26806f391aefe2661791a6de53bcea2")
+ (revision "1"))
+ (package
+ (name "vim-context-filetype")
+ (version (string-append "0.0.0-" revision "." (string-take commit 7)))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Shougo/context_filetype.vim")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "0alvrfhmd91zkd9h83s8wvgyq4iakcf6rybsyjd369qbgpcqky89"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (vimfiles (string-append out "/share/vim/vimfiles"))
+ (doc (string-append vimfiles "/doc"))
+ (autoload (string-append vimfiles "/autoload")))
+ (copy-recursively "doc" doc)
+ (copy-recursively "autoload" autoload)
+ #t))))))
+ (synopsis "Context filetype library for Vim")
+ (description
+ "@code{vim-context-filetype} is context filetype library for Vim script.")
+ (home-page "https://github.com/Shougo/context_filetype.vim")
+ (license license:expat)))) ; ??? check again
+
+;; The 2.2 release was in 2015, no new releases planned.
+(define-public vim-fugitive
+ (let ((commit "de6c05720cdf74c0218218d7207f700232a5b6dc")
+ (revision "1"))
+ (package
+ (name "vim-fugitive")
+ (version (string-append "2.2-" revision "." (string-take commit 7)))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tpope/vim-fugitive.git")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "0zg9vv7hirnx45vc2mwgg0xijmwwz55bssyd6cpdz71wbhrcpxxb"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (vimfiles (string-append out "/share/vim/vimfiles"))
+ (doc (string-append vimfiles "/doc"))
+ (plugin (string-append vimfiles "/plugin")))
+ (copy-recursively "doc" doc)
+ (copy-recursively "plugin" plugin)
+ #t))))))
+ (home-page "https://github.com/tpope/vim-fugitive")
+ (synopsis "Vim plugin to work with Git")
+ (description "Vim-fugitive is a wrapper for Vim that complements the
+command window, where you can stage and review your changes before the next
+commit or run any Git arbitrary command.")
+ (license license:vim)))) ; distributed under the same license as vim
+
+(define-public vim-airline
+ (package
+ (name "vim-airline")
+ (version "0.8")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/vim-airline/vim-airline/"
+ "archive/v" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "053sfq3jmgdc5y7zbg6jrk7r2hp0raj3y3mxa2h1c1bnkb6wvcaz"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (vimfiles (string-append out "/share/vim/vimfiles"))
+ (autoload (string-append vimfiles "/autoload"))
+ (doc (string-append vimfiles "/doc"))
+ (t (string-append vimfiles "/t"))
+ (plugin (string-append vimfiles "/plugin")))
+ (copy-recursively "autoload" autoload)
+ (copy-recursively "doc" doc)
+ (copy-recursively "plugin" plugin)
+ (copy-recursively "t" t)
+ #t))))))
+ (synopsis "Statusline for Vim")
+ (description
+ "@code{vim-airline} is an extensible statusline for Vim.
+It can be extended and costumized with themes, works with unicode fonts
+and powerline symbols, etc.")
+ (home-page "https://github.com/vim-airline/vim-airline")
+ (license license:expat)))
+
+;; There are no tarball releases.
+(define-public vim-airline-themes
+ (let ((commit "6026eb78bf362cb3aa875aff8487f65728d0f7d8")
+ (revision "1"))
+ (package
+ (name "vim-airline-themes")
+ (version (string-append "0.0.0-" revision "." (string-take commit 7)))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/vim-airline/vim-airline-themes")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "13ijkavh1r0935cn2rjsfbdd1q3ka8bi26kw0bdkrqlrqxwvpss8"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (vimfiles (string-append out "/share/vim/vimfiles"))
+ (doc (string-append vimfiles "/doc"))
+ (plugin (string-append vimfiles "/plugin"))
+ (autoload (string-append vimfiles "/autoload")))
+ (copy-recursively "doc" doc)
+ (copy-recursively "autoload" autoload)
+ (copy-recursively "plugin" plugin)
+ #t))))))
+ (synopsis "Collection of themes for Vim-airline")
+ (description
+ "@code{vim-airline-themes} is a collection of themes for @code{vim-airline}.")
+ (home-page "https://github.com/vim-airline/vim-airline-themes")
+ (license license:expat))))
+
+(define-public vim-syntastic
+ (package
+ (name "vim-syntastic")
+ (version "3.8.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/vim-syntastic/syntastic/archive/"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0wsnd9bsp5x6yiw96h1bnd1vyxdkh130hb82kyyxydgsplx92ima"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (vimfiles (string-append out "/share/vim/vimfiles"))
+ (doc (string-append vimfiles "/doc"))
+ (plugin (string-append vimfiles "/plugin"))
+ (autoload (string-append vimfiles "/autoload"))
+ (syntax-checkers (string-append vimfiles "/syntax_checkers")))
+ (copy-recursively "doc" doc)
+ (copy-recursively "autoload" autoload)
+ (copy-recursively "plugin" plugin)
+ (copy-recursively "syntax_checkers" syntax-checkers)
+ #t))))))
+ (synopsis "Syntax checking plugin for Vim")
+ (description
+ "Vim-syntastic is a syntax checking plugin for Vim. It runs files through
+external syntax checkers and displays any resulting errors to the user. This
+can be done on demand, or automatically as files are saved. If syntax errors
+are detected, the user is notified.")
+ (home-page "https://github.com/vim-syntastic/syntastic")
+ (license license:wtfpl2)))
+
+(define-public neovim-syntastic
+ (package
+ (inherit vim-syntastic)
+ (name "neovim-syntastic")
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (vimfiles (string-append out "/share/nvim/site"))
+ (doc (string-append vimfiles "/doc"))
+ (plugin (string-append vimfiles "/plugin"))
+ (autoload (string-append vimfiles "/autoload"))
+ (syntax-checkers (string-append vimfiles "/syntax_checkers")))
+ (copy-recursively "doc" doc)
+ (copy-recursively "autoload" autoload)
+ (copy-recursively "plugin" plugin)
+ (copy-recursively "syntax_checkers" syntax-checkers)
+ #t))))))
+ (synopsis "Syntax checking plugin for Neovim")
+ (description
+ "Vim-syntastic is a syntax checking plugin for Neovim. It runs files through
+external syntax checkers and displays any resulting errors to the user. This
+can be done on demand, or automatically as files are saved. If syntax errors
+are detected, the user is notified.")))
+
(define-public neovim
(package
(name "neovim")
- (version "0.1.7")
+ (version "0.2.0")
(source
(origin
(method url-fetch)
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
- "0zjbpc4rhv5bcr353xqnbrc36zjvn7qvh8xf6s7n1bdi3788by6q"))))
+ "1db27zm6cldm1aw0570vii1bxc16a34x8lissl1h9rizsbwn7qkj"))))
(build-system cmake-build-system)
(arguments
`(#:modules ((srfi srfi-26)
(define-public vifm
(package
(name "vifm")
- (version "0.8.2")
+ (version "0.9")
(source
(origin
(method url-fetch)
- (uri (string-append "mirror://sourceforge/vifm/vifm/vifm-"
- version ".tar.bz2"))
+ (uri (list
+ (string-append "https://github.com/vifm/vifm/releases/download/v"
+ version "/vifm-" version ".tar.bz2")
+ (string-append "https://sourceforge.net/projects/vifm/files/vifm/"
+ "vifm-" version ".tar.bz2")))
(sha256
(base32
- "07r15kq7kjl3a41sd11ncpsii866xxps4f90zh3lv8jqcrv6silb"))))
+ "1zd72vcgir3g9rhs2iyca13qf5fc0b1f22y20f5gy92c3sfwj45b"))))
(build-system gnu-build-system)
(arguments
- '(#:phases
+ '(#:configure-flags '("--disable-build-timestamp")
+ #:phases
(modify-phases %standard-phases
(add-after 'patch-source-shebangs 'patch-test-shebangs
(lambda _
- (substitute* (find-files "tests" "\\.c$")
- (("/bin/sh") (which "sh")))
- #t)))))
+ (substitute* (cons* "src/background.c"
+ "src/cfg/config.c"
+ (find-files "tests" "\\.c$"))
+ (("/bin/sh") (which "sh"))
+ (("/bin/bash") (which "bash")))
+ ;; This test segfaults
+ (substitute* "tests/Makefile"
+ (("misc") ""))
+ #t))
+ (add-after 'install 'install-vim-plugin-files
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (vifm (string-append out "/share/vifm"))
+ (vimfiles (string-append out "/share/vim/vimfiles")))
+ (copy-recursively (string-append vifm "/colors")
+ (string-append vimfiles "/colors"))
+ (copy-recursively (string-append vifm "/vim")
+ vimfiles)
+ (delete-file-recursively (string-append vifm "/colors"))
+ (delete-file-recursively (string-append vifm "/vim")))
+ #t)))))
(native-inputs
- `(("groff" ,groff) ; for the documentation
- ("perl" ,perl)))
+ `(("groff" ,groff))) ; for the documentation
(inputs
`(("libx11" ,libx11)
- ("ncurses" ,ncurses)))
- (home-page "http://vifm.info/")
+ ("ncurses" ,ncurses)
+ ("perl" ,perl)))
+ (home-page "https://vifm.info/")
(synopsis "Flexible vi-like file manager using ncurses")
(description "Vifm is a file manager providing a @command{vi}-like usage
experience. It has similar keybindings and modes (e.g. normal, command line,