Merge pull request #197177 from aaronjheng/ctlptl
ctlptl: install shell completions
This commit is contained in:
commit
9249e32cd2
@ -1,4 +1,4 @@
|
||||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "ctlptl";
|
||||
@ -13,12 +13,21 @@ buildGoModule rec {
|
||||
|
||||
vendorSha256 = "sha256-M9B/rfMBjYJb9szmYPVZqURlcv62qHOLJ3ka0v++z0s=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X main.version=${version}"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd ctlptl \
|
||||
--bash <($out/bin/ctlptl completion bash) \
|
||||
--fish <($out/bin/ctlptl completion fish) \
|
||||
--zsh <($out/bin/ctlptl completion zsh)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "CLI for declaratively setting up local Kubernetes clusters";
|
||||
homepage = "https://github.com/tilt-dev/ctlptl";
|
||||
|
Loading…
Reference in New Issue
Block a user