2023-06-13 00:19:00 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
|
2020-11-26 22:57:18 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "ytt";
|
2023-09-22 09:08:47 +00:00
|
|
|
version = "0.46.0";
|
2020-11-26 22:57:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vmware-tanzu";
|
|
|
|
repo = "carvel-ytt";
|
|
|
|
rev = "v${version}";
|
2023-09-22 09:08:47 +00:00
|
|
|
sha256 = "sha256-ZCWdOvwWXSeFzRQiiObuJqvz0ngAJ8n/0LeoGCv2vu4=";
|
2020-11-26 22:57:18 +00:00
|
|
|
};
|
|
|
|
|
2023-05-09 08:57:56 +00:00
|
|
|
vendorHash = null;
|
2020-11-26 22:57:18 +00:00
|
|
|
|
2023-06-13 00:19:00 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2022-07-31 12:56:17 +00:00
|
|
|
ldflags = [
|
|
|
|
"-X github.com/vmware-tanzu/carvel-ytt/pkg/version.Version=${version}"
|
|
|
|
];
|
|
|
|
|
2020-11-26 22:57:18 +00:00
|
|
|
subPackages = [ "cmd/ytt" ];
|
|
|
|
|
2023-06-13 00:19:00 +00:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd ytt \
|
|
|
|
--bash <($out/bin/ytt completion bash) \
|
|
|
|
--fish <($out/bin/ytt completion fish) \
|
|
|
|
--zsh <($out/bin/ytt completion zsh)
|
|
|
|
'';
|
|
|
|
|
2020-11-26 22:57:18 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "YAML templating tool that allows configuration of complex software via reusable templates with user-provided values";
|
|
|
|
homepage = "https://get-ytt.io";
|
|
|
|
license = licenses.asl20;
|
2022-05-26 18:16:52 +00:00
|
|
|
maintainers = with maintainers; [ brodes techknowlogick ];
|
2020-11-26 22:57:18 +00:00
|
|
|
};
|
|
|
|
}
|