Files

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

64 lines
1.3 KiB
Nix
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
{
lib,
buildGoModule,
fetchFromGitHub,
go,
nix-update-script,
testers,
vcluster,
}:
buildGoModule rec {
pname = "vcluster";
version = "0.28.0";
src = fetchFromGitHub {
owner = "loft-sh";
repo = "vcluster";
tag = "v${version}";
hash = "sha256-ddt9UDLKlC16ki+D35Ct1uvygeFb++fNeHVps0vCsPA=";
};
vendorHash = null;
subPackages = [ "cmd/vclusterctl" ];
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
"-X main.goVersion=${lib.getVersion go}"
];
# Test is disabled because e2e tests expect k8s.
doCheck = false;
installPhase = ''
runHook preInstall
install -Dm755 $GOPATH/bin/vclusterctl $out/bin/vcluster
runHook postInstall
'';
passthru.tests.version = testers.testVersion {
package = vcluster;
command = "HOME=$(mktemp -d) vcluster --version";
};
passthru.updateScript = nix-update-script { };
meta = {
changelog = "https://github.com/loft-sh/vcluster/releases/tag/v${version}";
description = "Create fully functional virtual Kubernetes clusters";
downloadPage = "https://github.com/loft-sh/vcluster";
homepage = "https://www.vcluster.com/";
license = lib.licenses.asl20;
mainProgram = "vcluster";
maintainers = with lib.maintainers; [
peterromfeldhk
qjoly
];
};
}