2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
with lib;
|
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";
|
2022-10-30 15:09:59 +00:00
|
|
|
version = "0.17.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "kubernetes-sigs";
|
|
|
|
repo = "kind";
|
2022-10-30 15:09:59 +00:00
|
|
|
sha256 = "sha256-YAa5Dr8Pc6P3RZ3SCiyi7zwmVd5tPalM88R8bxgg6JU=";
|
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
|
|
|
|
];
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
vendorSha256 = "sha256-J/sJd2LLMBr53Z3sGrWgnWA8Ry+XqqfCEObqFyUD96g=";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
GOFLAGS = [ "-trimpath" ];
|
|
|
|
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
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Kubernetes IN Docker - local clusters for testing Kubernetes";
|
|
|
|
homepage = "https://github.com/kubernetes-sigs/kind";
|
|
|
|
maintainers = with maintainers; [ offline rawkode ];
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.asl20;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|