diff --git a/pkgs/development/tools/ytt/default.nix b/pkgs/development/tools/ytt/default.nix index 4a3e61fb9059..a2de21fd7a2b 100644 --- a/pkgs/development/tools/ytt/default.nix +++ b/pkgs/development/tools/ytt/default.nix @@ -1,12 +1,18 @@ -{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: - +{ + lib, + buildGoModule, + fetchFromGitHub, + installShellFiles, + testers, + ytt, +}: buildGoModule rec { pname = "ytt"; version = "0.50.0"; src = fetchFromGitHub { - owner = "vmware-tanzu"; - repo = "carvel-ytt"; + owner = "carvel-dev"; + repo = "ytt"; rev = "v${version}"; sha256 = "sha256-57SCBlA2IoBy0iygqunFPBS/nyLtl7e7GlA3vB+ED/4="; }; @@ -16,11 +22,11 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles ]; ldflags = [ - "-X github.com/vmware-tanzu/carvel-ytt/pkg/version.Version=${version}" + "-s" + "-w" + "-X carvel.dev/ytt/pkg/version.Version=${version}" ]; - subPackages = [ "cmd/ytt" ]; - postInstall = '' installShellCompletion --cmd ytt \ --bash <($out/bin/ytt completion bash) \ @@ -28,11 +34,27 @@ buildGoModule rec { --zsh <($out/bin/ytt completion zsh) ''; + # Once `__structuredArgs` is introduced, integrate checks and + # set some regexes `checkFlags = [ "-skip=TestDataValues.*" ]` + # etc. So far we dont test because passing '*' chars through the Go builder + # is flawed. + doCheck = false; + + passthru.tests.version = testers.testVersion { + package = ytt; + command = "ytt --version"; + inherit version; + }; + 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 ]; + maintainers = with maintainers; [ + brodes + techknowlogick + gabyx + ]; }; }