From 4ddb05e51a84dbe32e2088bbeb85543b02740320 Mon Sep 17 00:00:00 2001 From: Peter Romfeld Date: Fri, 21 Jan 2022 11:45:34 +0200 Subject: [PATCH] vcluster: init at 0.5.3 --- .../networking/cluster/vcluster/default.nix | 45 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/applications/networking/cluster/vcluster/default.nix diff --git a/pkgs/applications/networking/cluster/vcluster/default.nix b/pkgs/applications/networking/cluster/vcluster/default.nix new file mode 100644 index 000000000000..f8d4e5f52c88 --- /dev/null +++ b/pkgs/applications/networking/cluster/vcluster/default.nix @@ -0,0 +1,45 @@ +{ lib, buildGo117Module, fetchFromGitHub, installShellFiles }: + +buildGo117Module rec { + pname = "vcluster"; + version = "0.5.3"; + + src = fetchFromGitHub { + owner = "loft-sh"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-+rLDRVfB6wZ1wYoLE2wwRxzS6GmI6KYtOKdXZd+LnnU="; + }; + + 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; + maintainers = with maintainers; [ peterromfeldhk ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a83f529f1f57..573a2e9d592d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33660,6 +33660,8 @@ with pkgs; ib-controller = callPackage ../applications/office/ib/controller { jdk=oraclejdk8; }; + vcluster = callPackage ../applications/networking/cluster/vcluster {}; + vnote = libsForQt5.callPackage ../applications/office/vnote { }; ssh-audit = callPackage ../tools/security/ssh-audit { };