nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 48 lines 1.0 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 installShellFiles, 6}: 7 8buildGoModule rec { 9 pname = "omnictl"; 10 version = "0.52.0"; 11 12 src = fetchFromGitHub { 13 owner = "siderolabs"; 14 repo = "omni"; 15 rev = "v${version}"; 16 hash = "sha256-4QL3Km987i6D5AZNVd62r6YPu2+tKALugawtSMw7z30="; 17 }; 18 19 vendorHash = "sha256-/ibquRHzzoZTf9oQUz1LOjm2WqeEBt9mkD9dDsoefUA="; 20 21 ldflags = [ 22 "-s" 23 "-w" 24 ]; 25 26 env.GOWORK = "off"; 27 28 subPackages = [ "cmd/omnictl" ]; 29 30 nativeBuildInputs = [ installShellFiles ]; 31 32 postInstall = '' 33 installShellCompletion --cmd omnictl \ 34 --bash <($out/bin/omnictl completion bash) \ 35 --fish <($out/bin/omnictl completion fish) \ 36 --zsh <($out/bin/omnictl completion zsh) 37 ''; 38 39 doCheck = false; # no tests 40 41 meta = with lib; { 42 description = "CLI for the Sidero Omni Kubernetes management platform"; 43 mainProgram = "omnictl"; 44 homepage = "https://omni.siderolabs.com/"; 45 license = licenses.bsl11; 46 maintainers = with maintainers; [ raylas ]; 47 }; 48}