Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
54 lines
1.2 KiB
Nix
54 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
testers,
|
|
roxctl,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "roxctl";
|
|
version = "4.8.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "stackrox";
|
|
repo = "stackrox";
|
|
rev = version;
|
|
sha256 = "sha256-pF7+DW0SqL87tVfuV6GVNDokTXqaDwKsiRJyatrk4z4=";
|
|
};
|
|
|
|
vendorHash = "sha256-Mra4hfg5nW/8CSQK/h6nnsZhN2GLdMg14kBvkFW3Y0w=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
subPackages = [ "roxctl" ];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X github.com/stackrox/rox/pkg/version/internal.MainVersion=${version}"
|
|
];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd roxctl \
|
|
--bash <($out/bin/roxctl completion bash) \
|
|
--fish <($out/bin/roxctl completion fish) \
|
|
--zsh <($out/bin/roxctl completion zsh)
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = roxctl;
|
|
command = "roxctl version";
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Command-line client of the StackRox Kubernetes Security Platform";
|
|
mainProgram = "roxctl";
|
|
license = licenses.asl20;
|
|
homepage = "https://www.stackrox.io";
|
|
maintainers = with maintainers; [ stehessel ];
|
|
};
|
|
}
|