2022-08-21 13:32:41 +00:00
|
|
|
{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "velero";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "1.14.1";
|
2021-04-17 00:35:05 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vmware-tanzu";
|
|
|
|
repo = "velero";
|
2021-10-04 12:37:57 +00:00
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-rXWBTPM3dCGON1DvpCOsA4C4mAuVDqV9YbrvP5yDCa0=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s" "-w"
|
2022-07-14 12:49:19 +00:00
|
|
|
"-X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=v${version}"
|
2022-06-26 10:26:21 +00:00
|
|
|
"-X github.com/vmware-tanzu/velero/pkg/buildinfo.ImageRegistry=velero"
|
2021-08-27 14:25:00 +00:00
|
|
|
"-X github.com/vmware-tanzu/velero/pkg/buildinfo.GitTreeState=clean"
|
2022-06-26 10:26:21 +00:00
|
|
|
"-X github.com/vmware-tanzu/velero/pkg/buildinfo.GitSHA=none"
|
2021-08-27 14:25:00 +00:00
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
vendorHash = "sha256-HpPJXYBrk5qfV01VOqXGpn4waEONJa61mqLbEsuwrEs=";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
excludedPackages = [ "issue-template-gen" "release-tools" "v1" "velero-restic-restore-helper" ];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-08-05 21:33:18 +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-25 04:45:31 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2022-08-21 13:32:41 +00:00
|
|
|
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
2020-11-24 20:58:05 +00:00
|
|
|
$out/bin/velero completion bash > velero.bash
|
|
|
|
$out/bin/velero completion zsh > velero.zsh
|
|
|
|
installShellCompletion velero.{bash,zsh}
|
2020-09-25 04:45:31 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-09-25 04:45:31 +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 ];
|
|
|
|
};
|
|
|
|
}
|