2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "kind";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.20.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "kubernetes-sigs";
|
|
|
|
repo = "kind";
|
2023-07-15 17:15:38 +00:00
|
|
|
sha256 = "sha256-5yDoxrsnmz8N0Y35juItLtyclTz+pSb75B1P716XPxU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
patches = [
|
|
|
|
# fix kernel module path used by kind
|
|
|
|
./kernel-module-path.patch
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
vendorHash = "sha256-J/sJd2LLMBr53Z3sGrWgnWA8Ry+XqqfCEObqFyUD96g=";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
GOFLAGS = [ "-trimpath" ];
|
2023-11-16 04:20:00 +00:00
|
|
|
ldflags = [ "-buildid=" "-w" ];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
subPackages = [ "." ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
2020-10-27 00:29:36 +00:00
|
|
|
for shell in bash fish zsh; do
|
2020-05-15 21:57:56 +00:00
|
|
|
$out/bin/kind completion $shell > kind.$shell
|
2020-05-03 17:38:23 +00:00
|
|
|
installShellCompletion kind.$shell
|
|
|
|
done
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Kubernetes IN Docker - local clusters for testing Kubernetes";
|
|
|
|
homepage = "https://github.com/kubernetes-sigs/kind";
|
|
|
|
maintainers = with maintainers; [ offline rawkode ];
|
2023-02-02 18:25:31 +00:00
|
|
|
license = licenses.asl20;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|