shiori: embed version in executable (#359146)

This commit is contained in:
Martin Weinelt 2024-11-27 15:54:58 +01:00 committed by GitHub
commit d47f8a2b54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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 \