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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
2022-01-21 09:45:34 +00:00
buildGoModule rec {
2022-01-21 09:45:34 +00:00
pname = "vcluster";
2023-06-08 14:02:22 +00:00
version = "0.15.1";
2022-01-21 09:45:34 +00:00
src = fetchFromGitHub {
owner = "loft-sh";
repo = pname;
rev = "v${version}";
2023-06-08 14:02:22 +00:00
sha256 = "sha256-RsaEeWK8jEDolHH0FNFKGrvRDPreAu2/rkXqqYIxH1s=";
2022-01-21 09:45:34 +00:00
};
vendorSha256 = null;
subPackages = [ "cmd/vclusterctl" ];
nativeBuildInputs = [ installShellFiles ];
ldflags = [ "-s" "-w" ];
# Test is disabled because e2e tests expect k8s.
doCheck = false;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
install -Dm755 "$GOPATH/bin/vclusterctl" -T $out/bin/vcluster
runHook postInstall
'';
postInstall = ''
installShellCompletion --cmd vcluster \
--bash <($out/bin/vcluster completion bash) \
--zsh <($out/bin/vcluster completion zsh)
'';
meta = with lib; {
description = "Create fully functional virtual Kubernetes clusters";
downloadPage = "https://github.com/loft-sh/vcluster";
homepage = "https://www.vcluster.com/";
license = licenses.asl20;
2023-06-08 14:02:22 +00:00
maintainers = with maintainers; [ peterromfeldhk berryp qjoly ];
2022-01-21 09:45:34 +00:00
};
}