2022-10-30 15:09:59 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "ctlptl";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "0.8.18";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tilt-dev";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-J1mq25EcoSvZNvfkBWQjRG0eXWFroNqQ8ylEohoninI=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
vendorHash = "sha256-QGceY4xUdjPyO0XGpE0mvP5Q5nQKc/tkBp0Iseuw8Ro=";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X main.version=${version}"
|
|
|
|
];
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd ctlptl \
|
|
|
|
--bash <($out/bin/ctlptl completion bash) \
|
|
|
|
--fish <($out/bin/ctlptl completion fish) \
|
|
|
|
--zsh <($out/bin/ctlptl completion zsh)
|
|
|
|
'';
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "CLI for declaratively setting up local Kubernetes clusters";
|
|
|
|
homepage = "https://github.com/tilt-dev/ctlptl";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ svrana ];
|
|
|
|
};
|
|
|
|
}
|