nixpkgs/pkgs/applications/networking/cluster/kube3d/default.nix

46 lines
1.2 KiB
Nix
Raw Normal View History

2020-07-22 18:03:06 -07:00
{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
2019-07-01 02:02:04 -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";
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
};
buildFlagsArray = ''
-ldflags=
-w -s
-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}
'';
2020-07-22 18:03:06 -07:00
nativeBuildInputs = [ installShellFiles ];
# TODO: Move to enhanced installShellCompletion when in master: PR #83630
2020-07-22 18:03:06 -07:00
postInstall = ''
$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
'';
vendorSha256 = null;
2019-07-01 02:02:04 -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;
maintainers = with maintainers; [ kuznero jlesquembre ngerstle jk ];
2019-07-01 02:02:04 -07:00
};
}