evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / ch / chart-testing / package.nix
bloba19f5b474f678e1208148ed64da3a1742aa9405b
1 { buildGoModule
2 , coreutils
3 , fetchFromGitHub
4 , git
5 , installShellFiles
6 , kubectl
7 , kubernetes-helm
8 , lib
9 , makeWrapper
10 , yamale
11 , yamllint
14 buildGoModule rec {
15   pname = "chart-testing";
16   version = "3.11.0";
18   src = fetchFromGitHub {
19     owner = "helm";
20     repo = pname;
21     rev = "v${version}";
22     hash = "sha256-eiU8omDEGDJVmumHwZkNix7qMVkoR6Irg0x9dTBzadA=";
23   };
25   vendorHash = "sha256-o9oZnQPztrK6HvclPt33Y05GQFWDsnUYti5x8R7aWS8=";
27   postPatch = ''
28     substituteInPlace pkg/config/config.go \
29       --replace "\"/etc/ct\"," "\"$out/etc/ct\","
30   '';
32   ldflags = [
33     "-w"
34     "-s"
35     "-X github.com/helm/chart-testing/v3/ct/cmd.Version=${version}"
36     "-X github.com/helm/chart-testing/v3/ct/cmd.GitCommit=${src.rev}"
37     "-X github.com/helm/chart-testing/v3/ct/cmd.BuildDate=19700101-00:00:00"
38   ];
40   nativeBuildInputs = [ installShellFiles makeWrapper ];
42   postInstall = ''
43     install -Dm644 -t $out/etc/ct etc/chart_schema.yaml
44     install -Dm644 -t $out/etc/ct etc/lintconf.yaml
46     installShellCompletion --cmd ct \
47       --bash <($out/bin/ct completion bash) \
48       --zsh <($out/bin/ct completion zsh) \
49       --fish <($out/bin/ct completion fish) \
51     wrapProgram $out/bin/ct --prefix PATH : ${lib.makeBinPath [
52       coreutils
53       git
54       kubectl
55       kubernetes-helm
56       yamale
57       yamllint
58     ]}
59   '';
61   meta = with lib; {
62     description = "Tool for testing Helm charts";
63     homepage = "https://github.com/helm/chart-testing";
64     license = licenses.asl20;
65     maintainers = with maintainers; [ atkinschang ];
66     mainProgram = "ct";
67   };