mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-04 19:24:20 +00:00
b3af1ff4d4
Release: https://github.com/loft-sh/vcluster/releases/tag/v0.19.5 Changelog: https://github.com/loft-sh/vcluster/compare/v0.19.4...v0.19.5
58 lines
1.5 KiB
Nix
58 lines
1.5 KiB
Nix
{ lib, go, buildGoModule, fetchFromGitHub, installShellFiles, testers, vcluster }:
|
|
|
|
buildGoModule rec {
|
|
pname = "vcluster";
|
|
version = "0.19.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "loft-sh";
|
|
repo = "vcluster";
|
|
rev = "v${version}";
|
|
hash = "sha256-V+Y2LekBYlKZU53BsYCW6ADSMJOxkwSK9hbFGXBaa9o=";
|
|
};
|
|
|
|
vendorHash = null;
|
|
|
|
subPackages = [ "cmd/vclusterctl" ];
|
|
|
|
ldflags = [
|
|
"-s" "-w"
|
|
"-X main.version=${version}"
|
|
"-X main.goVersion=${lib.getVersion go}"
|
|
];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
# 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) \
|
|
--fish <($out/bin/vcluster completion fish) \
|
|
--zsh <($out/bin/vcluster completion zsh)
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = vcluster;
|
|
command = "vcluster --version";
|
|
};
|
|
|
|
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; [ berryp peterromfeldhk qjoly superherointj ];
|
|
};
|
|
}
|