1{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
2
3buildGoModule rec {
4 pname = "ctlptl";
5 version = "0.8.22";
6
7 src = fetchFromGitHub {
8 owner = "tilt-dev";
9 repo = pname;
10 rev = "v${version}";
11 hash = "sha256-/LKsaWqJZG9LdUt9zVAspLOYGr0TrhOJB4j0Vv40rkE=";
12 };
13
14 vendorHash = "sha256-nfSqu1u7NWbZYL7CEZ/i2tdxQBblRbwJwdwoEtol/Us=";
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}