nixpkgs/pkgs/development/tools/ytt/default.nix
2024-04-16 11:26:39 +00:00

39 lines
1016 B
Nix

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "ytt";
version = "0.49.0";
src = fetchFromGitHub {
owner = "vmware-tanzu";
repo = "carvel-ytt";
rev = "v${version}";
sha256 = "sha256-7eG9ATZTqA48KFdPW/XVYNdq+giYVx0v1GDtabiTpQI=";
};
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 ];
};
}