1{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
2
3buildGoModule rec {
4 pname = "ytt";
5 version = "0.49.0";
6
7 src = fetchFromGitHub {
8 owner = "vmware-tanzu";
9 repo = "carvel-ytt";
10 rev = "v${version}";
11 sha256 = "sha256-7eG9ATZTqA48KFdPW/XVYNdq+giYVx0v1GDtabiTpQI=";
12 };
13
14 vendorHash = null;
15
16 nativeBuildInputs = [ installShellFiles ];
17
18 ldflags = [
19 "-X github.com/vmware-tanzu/carvel-ytt/pkg/version.Version=${version}"
20 ];
21
22 subPackages = [ "cmd/ytt" ];
23
24 postInstall = ''
25 installShellCompletion --cmd ytt \
26 --bash <($out/bin/ytt completion bash) \
27 --fish <($out/bin/ytt completion fish) \
28 --zsh <($out/bin/ytt completion zsh)
29 '';
30
31 meta = with lib; {
32 description = "YAML templating tool that allows configuration of complex software via reusable templates with user-provided values";
33 mainProgram = "ytt";
34 homepage = "https://get-ytt.io";
35 license = licenses.asl20;
36 maintainers = with maintainers; [ brodes techknowlogick ];
37 };
38}