diff --git a/pkgs/tools/security/age/default.nix b/pkgs/tools/security/age/default.nix index cff4630dd5db..fd59f9534fe7 100644 --- a/pkgs/tools/security/age/default.nix +++ b/pkgs/tools/security/age/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: buildGoModule rec { pname = "age"; @@ -13,9 +13,15 @@ buildGoModule rec { }; ldflags = [ - "-X main.Version=${version}" + "-s" "-w" "-X main.Version=${version}" ]; + nativeBuildInputs = [ installShellFiles ]; + + preInstall = '' + installManPage doc/*.1 + ''; + doInstallCheck = true; installCheckPhase = '' if [[ "$("$out/bin/${pname}" --version)" == "${version}" ]]; then