summary refs log tree commit diff
path: root/pkgs/tools/security/sget/default.nix
blob: ef59b5db33418f199e10fdbde42396f15b5b5d31 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ stdenv, lib, buildGoModule, fetchFromGitHub, installShellFiles }:

buildGoModule rec {
  pname = "sget";
  version = "unstable-2022-10-04";

  src = fetchFromGitHub {
    owner = "sigstore";
    repo = pname;
    rev = "d7d1e53b21ca906000e74474729854cb5ac48dbc";
    sha256 = "sha256-BgxTlLmtKqtDq3HgLoH+j0vBrpRujmL9Wr8F4d+jPi0=";
  };

  nativeBuildInputs = [ installShellFiles ];

  vendorSha256 = "sha256-KPQHS7Hfco1ljOJgStIXMaol7j4dglcr0w+6Boj7GK8=";

  ldflags = [ "-s" "-w" ];

  postInstall = ''
    installShellCompletion --cmd sget \
      --bash <($out/bin/sget completion bash) \
      --fish <($out/bin/sget completion fish) \
      --zsh <($out/bin/sget completion zsh)
  '';

  meta = with lib; {
    homepage = "https://github.com/sigstore/sget";
    description = "Command for safer, automatic verification of signatures and integration with Sigstore's binary transparency log, Rekor";
    license = licenses.asl20;
    maintainers = with maintainers; [ lesuisse ];
  };
}