age: set and check version
This commit is contained in:
parent
fabddcd7b6
commit
a9fe9e8a32
@ -12,6 +12,20 @@ buildGoModule rec {
|
||||
sha256 = "sha256-MfyW8Yv8swKqA7Hl45l5Zn4wZrQmE661eHsKIywy36U=";
|
||||
};
|
||||
|
||||
ldflags = [
|
||||
"-X main.Version=${version}"
|
||||
];
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
if [[ "$("$out/bin/${pname}" --version)" == "${version}" ]]; then
|
||||
echo '${pname} smoke check passed'
|
||||
else
|
||||
echo '${pname} smoke check failed'
|
||||
return 1
|
||||
fi
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://age-encryption.org/";
|
||||
description = "Modern encryption tool with small explicit keys";
|
||||
|
Loading…
Reference in New Issue
Block a user