shiori: embed version in executable

Replace useless "dev" version information by the version number and the
git tag that has been used to fetch the source.
This commit is contained in:
Samuel Tardieu 2024-11-25 23:49:50 +01:00
parent 0f9abba69d
commit d4f3facaae

View File

@ -15,6 +15,11 @@ buildGoModule rec {
sha256 = "sha256-gMIpDiA5ncZ50WZ2Y57mScTEXzeObgZxP+nkWe+a8Eo=";
};
ldflags = [
"-X main.version=${version}"
"-X main.commit=nixpkgs-${src.rev}"
];
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
installShellCompletion --cmd shiori \