@@ -1,17 +1,17 @@
1−{ lib, buildGoModule, fetchFromGitHub }:
1+{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
22
33buildGoModule rec {
44 pname = "chart-testing";
5− version = "3.4.0";
5+ version = "3.5.0";
66
77 src = fetchFromGitHub {
88 owner = "helm";
99 repo = pname;
1010 rev = "v${version}";
11− sha256 = "sha256-c7Rjk2YZaQXyFwrDVwYgOCnq/F2ooIUVETXVn5FVlZE=";
11+ sha256 = "sha256-lXi778MTeVUBtepGjIkKAX1kDEaaVzQI1gTKfcpANC0=";
1212 };
1313
14− vendorSha256 = "sha256-1Py66ljDjJC38biJ25D8KnWEi3nXAVt9QSgyH1KkwHM=";
14+ vendorSha256 = "sha256-pNevyTibnhUK8LSM1lVnmumFazXK86q4AZ2WKFt5jok=";
1515
1616 postPatch = ''
1717 substituteInPlace pkg/config/config.go \
@@ -26,9 +26,16 @@ buildGoModule rec {
2626 "-X github.com/helm/chart-testing/v3/ct/cmd.BuildDate=19700101-00:00:00"
2727 ];
2828
29+ nativeBuildInputs = [ installShellFiles ];
30+
2931 postInstall = ''
3032 install -Dm644 -t $out/etc/ct etc/chart_schema.yaml
3133 install -Dm644 -t $out/etc/ct etc/lintconf.yaml
34+
35+ installShellCompletion --cmd ct \
36+ --bash <($out/bin/ct completion bash) \
37+ --zsh <($out/bin/ct completion zsh) \
38+ --fish <($out/bin/ct completion fish) \
3239 '';
3340
3441 meta = with lib; {
@@ -36,5 +43,6 @@ buildGoModule rec {
3643 homepage = "https://github.com/helm/chart-testing";
3744 license = licenses.asl20;
3845 maintainers = with maintainers; [ atkinschang ];
46+ mainProgram = "ct";
3947 };
4048}