anbox: drop (#370821)
[NixPkgs.git] / pkgs / applications / networking / cluster / roxctl / default.nix
blob736fd1d3ba7aee1f21b3f56faed823aadd7b4cae
1 { lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, roxctl }:
3 buildGoModule rec {
4   pname = "roxctl";
5   version = "4.6.0";
7   src = fetchFromGitHub {
8     owner = "stackrox";
9     repo = "stackrox";
10     rev = version;
11     sha256 = "sha256-G/AKJV4D7bsObU9wkKysyi/KMay+B7OhAZi59jDiVFk=";
12   };
14   vendorHash = "sha256-iB5LkGEvkxxFO+/wFSZMP2byA5Pu2sEzS6mdnVD0/wY=";
16   nativeBuildInputs = [ installShellFiles ];
18   subPackages = [ "roxctl" ];
20   ldflags = [
21     "-s"
22     "-w"
23     "-X github.com/stackrox/rox/pkg/version/internal.MainVersion=${version}"
24   ];
26   postInstall = ''
27     installShellCompletion --cmd roxctl \
28       --bash <($out/bin/roxctl completion bash) \
29       --fish <($out/bin/roxctl completion fish) \
30       --zsh <($out/bin/roxctl completion zsh)
31   '';
33   passthru.tests.version = testers.testVersion {
34     package = roxctl;
35     command = "roxctl version";
36   };
38   meta = with lib; {
39     description = "Command-line client of the StackRox Kubernetes Security Platform";
40     mainProgram = "roxctl";
41     license = licenses.asl20;
42     homepage = "https://www.stackrox.io";
43     maintainers = with maintainers; [ stehessel ];
44   };