2020-07-22 18:03:06 -07:00
|
|
|
{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2019-07-01 02:02:04 -07:00
|
|
|
|
2019-09-30 14:37:37 -07:00
|
|
|
buildGoModule rec {
|
2019-07-01 02:02:04 -07:00
|
|
|
pname = "kube3d";
|
2020-11-10 05:38:09 -08:00
|
|
|
version = "3.2.0";
|
2020-10-06 06:23:02 -07:00
|
|
|
k3sVersion = "1.18.9-k3s1";
|
2019-07-01 02:02:04 -07:00
|
|
|
|
2020-07-22 15:22:39 -07:00
|
|
|
excludedPackages = ''tools'';
|
2019-07-01 02:02:04 -07:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rancher";
|
|
|
|
repo = "k3d";
|
|
|
|
rev = "v${version}";
|
2020-11-10 05:38:09 -08:00
|
|
|
sha256 = "0jy0l8rvmwi0qznnvv97v50lfkpc2bwjmbnq4pxnmf9ih970wjwh";
|
2019-07-01 02:02:04 -07:00
|
|
|
};
|
|
|
|
|
2019-09-30 14:37:37 -07:00
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
|
|
|
-w -s
|
2020-07-22 18:15:05 -07:00
|
|
|
-X github.com/rancher/k3d/v3/version.Version=v${version}
|
2020-07-22 15:22:39 -07:00
|
|
|
-X github.com/rancher/k3d/v3/version.K3sVersion=v${k3sVersion}
|
2019-09-30 14:37:37 -07:00
|
|
|
'';
|
|
|
|
|
2020-07-22 18:03:06 -07:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2020-10-26 02:20:30 -07:00
|
|
|
|
|
|
|
# TODO: Move to enhanced installShellCompletion when in master: PR #83630
|
2020-07-22 18:03:06 -07:00
|
|
|
postInstall = ''
|
2020-10-26 02:20:30 -07:00
|
|
|
$out/bin/k3d completion bash > k3d.bash
|
|
|
|
$out/bin/k3d completion fish > k3d.fish
|
|
|
|
$out/bin/k3d completion zsh > _k3d
|
|
|
|
installShellCompletion k3d.{bash,fish} --zsh _k3d
|
2020-07-22 18:03:06 -07:00
|
|
|
'';
|
|
|
|
|
2020-04-30 18:59:00 -07:00
|
|
|
vendorSha256 = null;
|
2019-07-01 02:02:04 -07:00
|
|
|
|
2020-08-03 17:26:27 -07:00
|
|
|
doCheck = false;
|
|
|
|
|
2019-07-01 02:02:04 -07:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://github.com/rancher/k3d";
|
|
|
|
description = "A helper to run k3s (Lightweight Kubernetes. 5 less than k8s) in a docker container";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
2020-10-22 04:44:18 -07:00
|
|
|
maintainers = with maintainers; [ kuznero jlesquembre ngerstle jk ];
|
2019-07-01 02:02:04 -07:00
|
|
|
};
|
2020-07-30 20:58:04 -07:00
|
|
|
}
|