tkey-ssh-agent: Add versionCheckHook (#461060)
This commit is contained in:
@@ -3,18 +3,17 @@
|
||||
fetchFromGitHub,
|
||||
buildGoModule,
|
||||
gitUpdater,
|
||||
testers,
|
||||
tkey-ssh-agent,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "tkey-ssh-agent";
|
||||
version = "1.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tillitis";
|
||||
repo = "tkey-ssh-agent";
|
||||
rev = "v${version}";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-Uf3VJJfZn4UYX1q79JdaOfrore+L/Mic3whzpP32JV0=";
|
||||
};
|
||||
|
||||
@@ -24,21 +23,27 @@ buildGoModule rec {
|
||||
"cmd/tkey-ssh-agent"
|
||||
];
|
||||
|
||||
ldflags = [
|
||||
"-w"
|
||||
"-X main.version=${finalAttrs.version}"
|
||||
];
|
||||
|
||||
passthru = {
|
||||
updateScript = gitUpdater { rev-prefix = "v"; };
|
||||
tests = {
|
||||
tkey-ssh-agent-version = testers.testVersion {
|
||||
package = tkey-ssh-agent;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nativeInstallCheckInputs = [
|
||||
versionCheckHook
|
||||
];
|
||||
doInstallCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "SSH Agent for TKey, the flexible open hardware/software USB security key";
|
||||
homepage = "https://tillitis.se/app/tkey-ssh-agent/";
|
||||
changelog = "https://github.com/tillitis/tkey-ssh-agent/releases/tag/v${finalAttrs.version}";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ bbigras ];
|
||||
mainProgram = "tkey-ssh-agent";
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user