Files
nixpkgs/pkgs/by-name/vc/vcluster/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

64 lines
1.3 KiB
Nix

{
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
];
};
}