mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
age: set and check version
This commit is contained in:
parent
fabddcd7b6
commit
a9fe9e8a32
1 changed files with 14 additions and 0 deletions
|
@ -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 a new issue