build: add git sha to version when built with nix flake (#21210)

This commit is contained in:
Will Leinweber 2022-12-30 18:24:40 +01:00 committed by GitHub
parent b49599ce7e
commit 849f544d62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -10,9 +10,12 @@
{
overlay = final: prev: {
neovim = final.neovim-unwrapped.overrideAttrs (oa: {
version = "master";
neovim = final.neovim-unwrapped.overrideAttrs (oa: rec {
version = self.shortRev or "dirty";
src = ../.;
preConfigure = ''
sed -i cmake.config/versiondef.h.in -e 's/@NVIM_VERSION_PRERELEASE@/-dev-${version}/'
'';
});
# a development binary to help debug issues