1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 installShellFiles,
6}:
7
8buildGoModule rec {
9 pname = "kustomize";
10 version = "5.7.1";
11
12 ldflags =
13 let
14 t = "sigs.k8s.io/kustomize/api/provenance";
15 in
16 [
17 "-s"
18 "-X ${t}.version=${version}"
19 "-X ${t}.gitCommit=${src.rev}"
20 ];
21
22 src = fetchFromGitHub {
23 owner = "kubernetes-sigs";
24 repo = pname;
25 rev = "kustomize/v${version}";
26 hash = "sha256-eLj9OQlHZph/rI3om6S5/0sYxjgYloUWag2mS0hEpCE=";
27 };
28
29 # avoid finding test and development commands
30 modRoot = "kustomize";
31 proxyVendor = true;
32 vendorHash = "sha256-OodR5WXEEn4ZlVRTsH2uSmuJuP+6PYRLvTEZCenx4XU=";
33
34 nativeBuildInputs = [ installShellFiles ];
35
36 postInstall = ''
37 installShellCompletion --cmd kustomize \
38 --bash <($out/bin/kustomize completion bash) \
39 --fish <($out/bin/kustomize completion fish) \
40 --zsh <($out/bin/kustomize completion zsh)
41 '';
42
43 meta = with lib; {
44 description = "Customization of kubernetes YAML configurations";
45 mainProgram = "kustomize";
46 longDescription = ''
47 kustomize lets you customize raw, template-free YAML files for
48 multiple purposes, leaving the original YAML untouched and usable
49 as is.
50 '';
51 homepage = "https://github.com/kubernetes-sigs/kustomize";
52 license = licenses.asl20;
53 maintainers = with maintainers; [
54 carlosdagos
55 vdemeester
56 periklis
57 zaninime
58 Chili-Man
59 saschagrunert
60 ];
61 };
62}