From d4f3facaae0b894b7d133a089663e15c07352ad9 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Mon, 25 Nov 2024 23:49:50 +0100 Subject: [PATCH] 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. --- pkgs/by-name/sh/shiori/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/by-name/sh/shiori/package.nix b/pkgs/by-name/sh/shiori/package.nix index 8487cacb1393..7da2ff2a54a3 100644 --- a/pkgs/by-name/sh/shiori/package.nix +++ b/pkgs/by-name/sh/shiori/package.nix @@ -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 \