Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 buildGoModule, 3 coreutils, 4 fetchFromGitHub, 5 git, 6 installShellFiles, 7 kubectl, 8 kubernetes-helm, 9 lib, 10 makeWrapper, 11 yamale, 12 yamllint, 13}: 14 15buildGoModule rec { 16 pname = "chart-testing"; 17 version = "3.13.0"; 18 19 src = fetchFromGitHub { 20 owner = "helm"; 21 repo = "chart-testing"; 22 rev = "v${version}"; 23 hash = "sha256-59a86yR/TDAWGCsj3pbDjXJGMvyHYnjsnxzjWr61PuU="; 24 }; 25 26 vendorHash = "sha256-aVXISRthJxxvtrfC0DpewLHCiJPh4tO+SKl3Q9uP14k="; 27 28 postPatch = '' 29 substituteInPlace pkg/config/config.go \ 30 --replace "\"/etc/ct\"," "\"$out/etc/ct\"," 31 ''; 32 33 ldflags = [ 34 "-w" 35 "-s" 36 "-X github.com/helm/chart-testing/v3/ct/cmd.Version=${version}" 37 "-X github.com/helm/chart-testing/v3/ct/cmd.GitCommit=${src.rev}" 38 "-X github.com/helm/chart-testing/v3/ct/cmd.BuildDate=19700101-00:00:00" 39 ]; 40 41 nativeBuildInputs = [ 42 installShellFiles 43 makeWrapper 44 ]; 45 46 postInstall = '' 47 install -Dm644 -t $out/etc/ct etc/chart_schema.yaml 48 install -Dm644 -t $out/etc/ct etc/lintconf.yaml 49 50 installShellCompletion --cmd ct \ 51 --bash <($out/bin/ct completion bash) \ 52 --zsh <($out/bin/ct completion zsh) \ 53 --fish <($out/bin/ct completion fish) \ 54 55 wrapProgram $out/bin/ct --prefix PATH : ${ 56 lib.makeBinPath [ 57 coreutils 58 git 59 kubectl 60 kubernetes-helm 61 yamale 62 yamllint 63 ] 64 } 65 ''; 66 67 meta = with lib; { 68 description = "Tool for testing Helm charts"; 69 homepage = "https://github.com/helm/chart-testing"; 70 license = licenses.asl20; 71 maintainers = with maintainers; [ atkinschang ]; 72 mainProgram = "ct"; 73 }; 74}