zrepl: fix shown version (#493463)

This commit is contained in:
Cole Helbling
2026-02-23 22:09:15 +00:00
committed by GitHub
+6 -1
View File
@@ -3,6 +3,7 @@
buildGoModule,
fetchFromGitHub,
makeWrapper,
versionCheckHook,
nixosTests,
openssh,
}:
@@ -28,7 +29,7 @@ buildGoModule (finalAttrs: {
ldflags = [
"-s"
"-w"
"-X github.com/zrepl/zrepl/version.zreplVersion=${finalAttrs.version}"
"-X github.com/zrepl/zrepl/internal/version.zreplVersion=${finalAttrs.version}"
];
postInstall = ''
@@ -40,6 +41,10 @@ buildGoModule (finalAttrs: {
--prefix PATH : ${lib.makeBinPath [ openssh ]}
'';
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "version";
passthru.tests = {
inherit (nixosTests) zrepl;
};