depot/third_party/nixpkgs/pkgs/by-name/om/omnictl/package.nix
Default email 98eb3e9ef5 Project import generated by Copybara.
GitOrigin-RevId: 00d80d13810dbfea8ab4ed1009b09100cca86ba8
2024-07-01 15:47:52 +00:00

40 lines
1,000 B
Nix

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "omnictl";
version = "0.38.2";
src = fetchFromGitHub {
owner = "siderolabs";
repo = "omni";
rev = "v${version}";
hash = "sha256-Qm5Q+yZq6m/3xAAMdz57fXC13lLDMu5GY1xs5vHAFoo=";
};
vendorHash = "sha256-BF/F/siVIYJT4abOlwQjpnQpmNFdOo566VGPIo08PO0=";
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 = "CLI for the Sidero Omni Kubernetes management platform";
mainProgram = "omnictl";
homepage = "https://omni.siderolabs.com/";
license = licenses.bsl11;
maintainers = with maintainers; [ raylas ];
};
}