1{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
2
3buildGoModule rec {
4 pname = "ctlptl";
5 version = "0.8.12";
6
7 src = fetchFromGitHub {
8 owner = "tilt-dev";
9 repo = pname;
10 rev = "v${version}";
11 sha256 = "sha256-h0JR641+VBiTJY8INXhxwvsyZGLH4YRdkddwo2IUDQk=";
12 };
13
14 vendorSha256 = "sha256-M9B/rfMBjYJb9szmYPVZqURlcv62qHOLJ3ka0v++z0s=";
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}