mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
41 lines
1002 B
Nix
41 lines
1002 B
Nix
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "omnictl";
|
|
version = "0.33.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "siderolabs";
|
|
repo = "omni";
|
|
rev = "v${version}";
|
|
hash = "sha256-sszIUHEXtnla1fxlUbHXjQzaJoafse1YOSVikd7LMHk=";
|
|
};
|
|
|
|
vendorHash = "sha256-fU2bmVL42tEoWvrCAg2iSV7bErZhwor6tnjGRrtwMA4=";
|
|
|
|
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 ];
|
|
};
|
|
}
|