-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |