Skip to content

Instantly share code, notes, and snippets.

@shalomb
Last active December 19, 2022 16:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shalomb/c20478247be553c45ed94b90583b5c41 to your computer and use it in GitHub Desktop.
Save shalomb/c20478247be553c45ed94b90583b5c41 to your computer and use it in GitHub Desktop.
# neovim build dependencies
sudo apt-get build-dep neovim -t unstable
# Build tools
sudo apt install build-essential libtool libtool-bin devscripts
# git source
git clone https://github.com/neovim/neovim.git
cd neovim
# Checkout latest tag
git checkout $(git describe --tags --abbrev=0) # v0.8.1
make CMAKE_BUILD_TYPE=RelWithDebInfo \
CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$HOME/.local"
make install # should suffice if you don't need a .deb package
# ✂┅┅┅ Debian Packaging Acticities ┅┅┅✂
# neovim debian sources
sudo apt-get source neovim -t unstable
# debuild using debian/rules from an older package
cd ..
rsync -avP neovim-*/debian/ neovim/debian/
cd neovim
edit debian/changelog # Add section for new tag (e.g. v0.8.1-1) at top
DEB_BUILD_OPTIONS='nocheck notest' TEST_SKIP_FRAGILE=1 \
debuild -b -uc -us # This compiles neovim but tests fail
exit
# References
# - https://wiki.debian.org/BuildingTutorial
mkdir -p ~/.local/share/nvim/site/pack/packer/start
cd !:$
git clone --depth 1 https://github.com/wbthomason/packer.nvim
cd ~/.config/nvim
$ cat init.lua
require("bundle")
$ cat lua/bundle/init.lua
require("bundle.packer")
$ cat lua/bundle/packer.lua
-- This file can be loaded by calling `lua require('plugins')` from your init.vim
-- Only required if you have packer configured as `opt`
vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
end)
nvim -c ':PackerUpdate'
@shalomb
Copy link
Author

shalomb commented Dec 19, 2022

Issues Encountered

  • test failures: # 4 tests fail. Needed to use DEB_BUILD_OPTIONS='nocheck'
  • dh_install --fail-missing # fails because build artefacts are generated that would not be packaged
    • used --list-missing instead
  • update-alternatives: error: alternative path /usr/bin/nvim doesn't exist
    dpkg: error processing package neovim (--configure):
    installed neovim package post-installation script subprocess returned error exit status 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment