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