1{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
2
3buildGoModule rec {
4 pname = "ctlptl";
5 version = "0.8.19";
6
7 src = fetchFromGitHub {
8 owner = "tilt-dev";
9 repo = pname;
10 rev = "v${version}";
11 hash = "sha256-/v0/fLS9hWw8PpTTwo2/LwtwI2ST4ApIRNJl5qpHY2w=";
12 };
13
14 vendorHash = "sha256-6NHaOF+fXs49JXEog/t2Fmr8llLmMBj7/OISssyzRK4=";
15
16 nativeBuildInputs = [ installShellFiles ];
17
18 ldflags = [
19 "-s"
20 "-w"
21 "-X main.version=${version}"
22 ];
23
24 postInstall = ''
25 installShellCompletion --cmd ctlptl \
26 --bash <($out/bin/ctlptl completion bash) \
27 --fish <($out/bin/ctlptl completion fish) \
28 --zsh <($out/bin/ctlptl completion zsh)
29 '';
30
31 meta = with lib; {
32 description = "CLI for declaratively setting up local Kubernetes clusters";
33 homepage = "https://github.com/tilt-dev/ctlptl";
34 license = licenses.asl20;
35 maintainers = with maintainers; [ svrana ];
36 };
37}