fa5436e0a7
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
40 lines
1,002 B
Nix
40 lines
1,002 B
Nix
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "omnictl";
|
|
version = "0.36.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "siderolabs";
|
|
repo = "omni";
|
|
rev = "v${version}";
|
|
hash = "sha256-bGJWo12rIinqyQyfTZEoT6S7OzO4BO/GRdjnC+hWdFM=";
|
|
};
|
|
|
|
vendorHash = "sha256-FxoSHsIRvRIQuu87l4587Pgb0YjHJISjB621XAHkJNM=";
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
GOWORK = "off";
|
|
|
|
subPackages = [ "cmd/omnictl" ];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd omnictl \
|
|
--bash <($out/bin/omnictl completion bash) \
|
|
--fish <($out/bin/omnictl completion fish) \
|
|
--zsh <($out/bin/omnictl completion zsh)
|
|
'';
|
|
|
|
doCheck = false; # no tests
|
|
|
|
meta = with lib; {
|
|
description = "A CLI for the Sidero Omni Kubernetes management platform";
|
|
mainProgram = "omnictl";
|
|
homepage = "https://omni.siderolabs.com/";
|
|
license = licenses.bsl11;
|
|
maintainers = with maintainers; [ raylas ];
|
|
};
|
|
}
|