2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2020-09-21 05:12:06 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "velero";
|
2021-12-03 16:10:10 +00:00
|
|
|
version = "1.7.1";
|
2021-04-15 11:19:42 +00:00
|
|
|
|
2020-09-21 05:12:06 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vmware-tanzu";
|
|
|
|
repo = "velero";
|
2021-10-04 12:37:57 +00:00
|
|
|
rev = "v${version}";
|
2021-12-03 16:10:10 +00:00
|
|
|
sha256 = "sha256-Jz3Tp5FqpmPuBscRB0KleQxtCvB43qmeLZNtGPnjuL0=";
|
2020-09-21 05:12:06 +00:00
|
|
|
};
|
|
|
|
|
2021-08-23 04:55:51 +00:00
|
|
|
ldflags = [
|
2021-08-26 06:45:51 +00:00
|
|
|
"-s" "-w"
|
|
|
|
"-X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=${version}"
|
|
|
|
"-X github.com/vmware-tanzu/velero/pkg/buildinfo.GitTreeState=clean"
|
2021-08-23 04:55:51 +00:00
|
|
|
];
|
2020-09-21 05:12:06 +00:00
|
|
|
|
2021-12-03 16:10:10 +00:00
|
|
|
vendorSha256 = "sha256-fX9FeoIkxxSi3dl5W2MZLz5vN1VHkPNpTBGRxGP5Qx8=";
|
2020-09-21 05:12:06 +00:00
|
|
|
|
2021-10-04 12:37:57 +00:00
|
|
|
excludedPackages = [ "issue-template-gen" "crd-gen" "release-tools" "velero-restic-restore-helper" "v1" "v1beta1" ];
|
2020-09-21 05:12:06 +00:00
|
|
|
|
2021-08-02 02:07:26 +00:00
|
|
|
doCheck = false; # Tests expect a running cluster see https://github.com/vmware-tanzu/velero/tree/main/test/e2e
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/velero version --client-only | grep ${version} > /dev/null
|
|
|
|
'';
|
2020-09-21 05:12:06 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
2020-11-15 21:13:06 +00:00
|
|
|
$out/bin/velero completion bash > velero.bash
|
|
|
|
$out/bin/velero completion zsh > velero.zsh
|
|
|
|
installShellCompletion velero.{bash,zsh}
|
2020-09-21 05:12:06 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-09-21 05:12:06 +00:00
|
|
|
description =
|
|
|
|
"A utility for managing disaster recovery, specifically for your Kubernetes cluster resources and persistent volumes";
|
|
|
|
homepage = "https://velero.io/";
|
|
|
|
changelog =
|
|
|
|
"https://github.com/vmware-tanzu/velero/releases/tag/v${version}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.mbode maintainers.bryanasdev000 ];
|
|
|
|
};
|
|
|
|
}
|