Skip to content

Commit

Permalink
Add install_neovim
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Nov 22, 2016
1 parent 42357af commit 8289dad
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 1 deletion.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ RUN chown vimtest:vimtest /home /plugins

ADD scripts/argecho.sh /vim-build/bin/argecho
ADD scripts/install_vim.sh /sbin/install_vim
ADD scripts/install_neovim.sh /sbin/install_neovim
ADD scripts/run_vim.sh /sbin/run_vim

RUN chmod +x /vim-build/bin/argecho /sbin/install_vim /sbin/run_vim
Expand Down
3 changes: 2 additions & 1 deletion example/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ RUN install_vim -name vim-precise -tag v7.3.429 -build \
-name vim-trusty -tag v7.4.052 -build \
-name vim-vivid -tag v7.4.488 -build \
-name vim-wily -tag v7.4.712 -build \
-name vim-xenial -tag v7.4.963 -build
-name vim-xenial -tag v7.4.963 -build \
install_neovim
67 changes: 67 additions & 0 deletions scripts/install_neovim.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#!/bin/bash
#
# Install Neovim as /vim-build/bin/nvim.
#
# This is separate from install_vim.sh, because there is not much to share, but
# uses the same names and tries to keep close to its ancestor.

set -e

TAG=master
NAME=nvim-${TAG}
VIM_NAME="nvim_${TAG}"
VIM_PATH="/vim-build/$VIM_NAME"

apk add --update-cache --no-cache \
libuv \
python3
apk add --update-cache --no-cache --virtual neovim-build \
autoconf \
automake \
ca-certificates \
cmake \
curl \
g++ \
git \
libtool \
libuv-dev \
m4 \
make \
ncurses ncurses-dev ncurses-libs ncurses-terminfo \
perl \
python3-dev \
unzip \
xz

# Install Neovim.
# I could not make USE_BUNDLED_LUAJIT=OFF work: check_lua_module did not find
# lpeg. Seems to be related to the luarocks being installed not with the
# system's luajit?!
#
# NOTE: -DENABLE_JEMALLOC=OFF is required to fix "bus error":
# % make
# > Scanning dependencies of target vimball-tags
# > make[3]: Leaving directory '/neovim/build'
# > make[3]: Entering directory '/neovim/build'
# > Bus error (core dumped)
# > runtime/CMakeFiles/vimball-tags.dir/build.make:57: recipe for target 'runtime/CMakeFiles/vimball-tags' failed
git clone --depth=1 https://github.com/neovim/neovim.git && \
cd neovim && \
make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$VIM_PATH \
-DENABLE_JEMALLOC=OFF" \
DEPS_CMAKE_FLAGS="\
-DUSE_BUNDLED_JEMALLOC=OFF \
-DUSE_BUNDLED_LIBUV=OFF" && \
make install && \
cd .. && \
rm -rf neovim

python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --no-cache-dir --upgrade pip setuptools && \
pip3 install --no-cache-dir neovim || exit 1

ln -s /usr/local/bin/nvim /vim-build/bin/$NAME

apk del neovim-build
rm -rf /var/cache/apk/* /tmp/* /var/tmp/* /root/.cache

0 comments on commit 8289dad

Please sign in to comment.