Last active
September 3, 2024 15:46
-
-
Save jrmolin/9b664a7a493740c257f474c5b4a22fb7 to your computer and use it in GitHub Desktop.
Build neovim for Linux/aarch64 with Docker and git (mostly automated)
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
#!/usr/bin/env bash | |
CONTAINER=${CONTAINER:-nvim-builder} | |
INSTALL_DIR=${INSTALL_DIR:-/opt/nvim} | |
# make the docker container | |
docker build -t ${CONTAINER} . | |
if [ ! -d neovim ] ; then | |
git clone github.com:neovim/neovim | |
cd neovim && git checkout stable && cd - | |
fi | |
if [ -d "${INSTALL_DIR}" ] ; then | |
sudo rm -rf "${INSTALL_DIR}" | |
fi | |
sudo mkdir -pv "${INSTALL_DIR}" | |
sudo chown $(id -nu):$(id -ng) "${INSTALL_DIR}" | |
docker run \ | |
-eUSER=$(whoami) \ | |
-eINSTALL_DIR="${INSTALL_DIR}" \ | |
-u"$(id -u):$(id -g)" \ | |
-w"$(pwd)" \ | |
-v"$(pwd):$(pwd)" \ | |
-v"${INSTALL_DIR}:${INSTALL_DIR}" \ | |
-v"/tmp:/tmp" \ | |
${CONTAINER} | |
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
FROM ubuntu:24.04 | |
RUN apt-get update && \ | |
apt-get install -y \ | |
ninja-build \ | |
gettext \ | |
cmake \ | |
unzip \ | |
curl \ | |
build-essential | |
ADD start.sh / | |
RUN chmod +x /start.sh | |
CMD [ "/start.sh" ] |
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
#!/usr/bin/env bash | |
cd neovim \ | |
&& make clean \ | |
&& make CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ | |
&& make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment