depot/third_party/nixpkgs/pkgs/development/tools/ytt/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

38 lines
1,016 B
Nix

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "ytt";
version = "0.49.1";
src = fetchFromGitHub {
owner = "vmware-tanzu";
repo = "carvel-ytt";
rev = "v${version}";
sha256 = "sha256-1W7pnljAzeIjXdjCj8nauvca4IGpsn0TmrKUNJtMg+E=";
};
vendorHash = null;
nativeBuildInputs = [ installShellFiles ];
ldflags = [
"-X github.com/vmware-tanzu/carvel-ytt/pkg/version.Version=${version}"
];
subPackages = [ "cmd/ytt" ];
postInstall = ''
installShellCompletion --cmd ytt \
--bash <($out/bin/ytt completion bash) \
--fish <($out/bin/ytt completion fish) \
--zsh <($out/bin/ytt completion zsh)
'';
meta = with lib; {
description = "YAML templating tool that allows configuration of complex software via reusable templates with user-provided values";
mainProgram = "ytt";
homepage = "https://get-ytt.io";
license = licenses.asl20;
maintainers = with maintainers; [ brodes techknowlogick ];
};
}