python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / security / age / default.nix
blob2e9d988500f19d2d2137e90af6fa7bc4d4862913
1 { lib, buildGoModule, fetchFromGitHub, installShellFiles }:
3 buildGoModule rec {
4   pname = "age";
5   version = "1.0.0";
6   vendorSha256 = "sha256-Hdsd+epcLFLkeHzJ2CUu4ss1qOd0+lTjhfs9MhI5Weg=";
8   src = fetchFromGitHub {
9     owner = "FiloSottile";
10     repo = "age";
11     rev = "v${version}";
12     sha256 = "sha256-MfyW8Yv8swKqA7Hl45l5Zn4wZrQmE661eHsKIywy36U=";
13   };
15   ldflags = [
16     "-s" "-w" "-X main.Version=${version}"
17   ];
19   nativeBuildInputs = [ installShellFiles ];
21   preInstall = ''
22     installManPage doc/*.1
23   '';
25   doInstallCheck = true;
26   installCheckPhase = ''
27     if [[ "$("$out/bin/${pname}" --version)" == "${version}" ]]; then
28       echo '${pname} smoke check passed'
29     else
30       echo '${pname} smoke check failed'
31       return 1
32     fi
33   '';
35   meta = with lib; {
36     homepage = "https://age-encryption.org/";
37     description = "Modern encryption tool with small explicit keys";
38     license = licenses.bsd3;
39     maintainers = with maintainers; [ tazjin ];
40   };