2022-12-28 01:29:27 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, fetchpatch, installShellFiles }:
|
2019-12-28 14:56:08 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "age";
|
2024-06-16 22:53:16 +00:00
|
|
|
version = "1.2.0";
|
2019-12-28 14:56:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "FiloSottile";
|
|
|
|
repo = "age";
|
2020-06-28 15:17:43 +00:00
|
|
|
rev = "v${version}";
|
2024-06-16 22:53:16 +00:00
|
|
|
hash = "sha256-O0NKDPvr+6ZupakPIpnGgDcdfG3nWR1pvVE+3KkYurY=";
|
2019-12-28 14:56:08 +00:00
|
|
|
};
|
|
|
|
|
2024-06-16 22:53:16 +00:00
|
|
|
vendorHash = "sha256-5We4OYoexzzSF1AkxuGCUwuYJ3Wra+T6mCcT4XYgzhU=";
|
2022-12-28 01:29:27 +00:00
|
|
|
|
2021-09-06 17:56:04 +00:00
|
|
|
ldflags = [
|
2021-09-08 04:20:00 +00:00
|
|
|
"-s" "-w" "-X main.Version=${version}"
|
2021-09-06 17:56:04 +00:00
|
|
|
];
|
|
|
|
|
2021-09-08 04:20:00 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
installManPage doc/*.1
|
|
|
|
'';
|
|
|
|
|
2021-09-06 17:56:04 +00:00
|
|
|
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-05 23:41:36 +00:00
|
|
|
# plugin test is flaky, see https://github.com/FiloSottile/age/issues/517
|
|
|
|
checkFlags = [
|
|
|
|
"-skip" "TestScript/plugin"
|
|
|
|
];
|
|
|
|
|
2020-03-27 07:33:21 +00:00
|
|
|
meta = with lib; {
|
2024-06-16 22:53:16 +00:00
|
|
|
changelog = "https://github.com/FiloSottile/age/releases/tag/v${version}";
|
2019-12-28 14:56:08 +00:00
|
|
|
homepage = "https://age-encryption.org/";
|
|
|
|
description = "Modern encryption tool with small explicit keys";
|
|
|
|
license = licenses.bsd3;
|
2023-08-12 20:24:01 +00:00
|
|
|
mainProgram = "age";
|
2019-12-28 14:56:08 +00:00
|
|
|
maintainers = with maintainers; [ tazjin ];
|
|
|
|
};
|
2020-06-28 15:17:43 +00:00
|
|
|
}
|