sif: stamp version and install man page

Requested in review of #530117: set the version via ldflags (upstream
uses lowercase main.version) and install the sif.1 man page.
This commit is contained in:
vmfunc
2026-06-11 15:53:21 -07:00
parent 465833524f
commit 6f8e3f422e
+11 -2
View File
@@ -2,10 +2,11 @@
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
nix-update-script,
}:
buildGoModule {
buildGoModule (finalAttrs: {
pname = "sif";
version = "0-unstable-2026-06-11";
@@ -20,16 +21,24 @@ buildGoModule {
subPackages = [ "cmd/sif" ];
nativeBuildInputs = [ installShellFiles ];
env.CGO_ENABLED = 0;
ldflags = [
"-s"
"-w"
# upstream stamps the lowercase main.version, see cmd/sif/main.go
"-X main.version=${finalAttrs.version}"
];
# network-dependent tests
doCheck = false;
postInstall = ''
installManPage man/sif.1
'';
passthru.updateScript = nix-update-script {
extraArgs = [
"--version=branch"
@@ -44,4 +53,4 @@ buildGoModule {
maintainers = with lib.maintainers; [ vmfunc ];
mainProgram = "sif";
};
}
})