2023-01-11 07:51:40 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, fetchpatch, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "age";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "1.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "FiloSottile";
|
|
|
|
repo = "age";
|
2020-07-18 16:06:22 +00:00
|
|
|
rev = "v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-O0NKDPvr+6ZupakPIpnGgDcdfG3nWR1pvVE+3KkYurY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
vendorHash = "sha256-5We4OYoexzzSF1AkxuGCUwuYJ3Wra+T6mCcT4XYgzhU=";
|
2023-01-11 07:51:40 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s" "-w" "-X main.Version=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
installManPage doc/*.1
|
|
|
|
'';
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
if [[ "$("$out/bin/${pname}" --version)" == "${version}" ]]; then
|
|
|
|
echo '${pname} smoke check passed'
|
|
|
|
else
|
|
|
|
echo '${pname} smoke check failed'
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# plugin test is flaky, see https://github.com/FiloSottile/age/issues/517
|
|
|
|
checkFlags = [
|
|
|
|
"-skip" "TestScript/plugin"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
changelog = "https://github.com/FiloSottile/age/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://age-encryption.org/";
|
|
|
|
description = "Modern encryption tool with small explicit keys";
|
|
|
|
license = licenses.bsd3;
|
2023-08-22 20:05:09 +00:00
|
|
|
mainProgram = "age";
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ tazjin ];
|
|
|
|
};
|
2020-07-18 16:06:22 +00:00
|
|
|
}
|