1{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
2
3with lib;
4
5buildGoModule rec {
6 pname = "kind";
7 version = "0.17.0";
8
9 src = fetchFromGitHub {
10 rev = "v${version}";
11 owner = "kubernetes-sigs";
12 repo = "kind";
13 sha256 = "sha256-YAa5Dr8Pc6P3RZ3SCiyi7zwmVd5tPalM88R8bxgg6JU=";
14 };
15
16 patches = [
17 # fix kernel module path used by kind
18 ./kernel-module-path.patch
19 ];
20
21 vendorSha256 = "sha256-J/sJd2LLMBr53Z3sGrWgnWA8Ry+XqqfCEObqFyUD96g=";
22
23 CGO_ENABLED = 0;
24 GOFLAGS = [ "-trimpath" ];
25 ldFlags = [ "-buildid=" "-w" ];
26
27 doCheck = false;
28
29 subPackages = [ "." ];
30
31 nativeBuildInputs = [ installShellFiles ];
32 postInstall = ''
33 for shell in bash fish zsh; do
34 $out/bin/kind completion $shell > kind.$shell
35 installShellCompletion kind.$shell
36 done
37 '';
38
39 meta = {
40 description = "Kubernetes IN Docker - local clusters for testing Kubernetes";
41 homepage = "https://github.com/kubernetes-sigs/kind";
42 maintainers = with maintainers; [ offline rawkode ];
43 license = lib.licenses.asl20;
44 platforms = platforms.unix;
45 };
46}