ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / po / popeye / package.nix
blob7f6f7dae86387e3de270dd1a0821537135f476b8
1 { lib, buildGoModule, fetchFromGitHub, installShellFiles }:
3 buildGoModule rec {
4   pname = "popeye";
5   version = "0.21.5";
7   src = fetchFromGitHub {
8     rev = "v${version}";
9     owner = "derailed";
10     repo = "popeye";
11     sha256 = "sha256-2Ooh8yk6sD0VuHHxgkyIwqbJ9ynEUFDW3ti9ZzBOPX0=";
12   };
14   ldflags = [
15     "-s" "-w"
16     "-X github.com/derailed/popeye/cmd.version=${version}"
17     "-X github.com/derailed/popeye/cmd.commit=${version}"
18   ];
20   vendorHash = "sha256-uTuDI9cQFE5Fdf5wcCAwjO1p/niSNHnXmWF6QhLkDUk=";
22   nativeBuildInputs = [ installShellFiles ];
24   postInstall = ''
25     installShellCompletion --cmd popeye \
26       --bash <($out/bin/popeye completion bash) \
27       --fish <($out/bin/popeye completion fish) \
28       --zsh <($out/bin/popeye completion zsh)
29   '';
31   doInstallCheck = true;
32   installCheckPhase = ''
33     $out/bin/popeye version | grep ${version} > /dev/null
34   '';
36   meta = with lib; {
37     description = "Kubernetes cluster resource sanitizer";
38     mainProgram = "popeye";
39     homepage = "https://github.com/derailed/popeye";
40     changelog = "https://github.com/derailed/popeye/releases/tag/v${version}";
41     license = licenses.asl20;
42     maintainers = [ maintainers.bryanasdev000 ];
43   };