2021-01-25 09:26:54 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2020-09-21 07:12:06 +02:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "velero";
|
2021-04-15 13:19:42 +02:00
|
|
|
# When updating, change the commit underneath
|
|
|
|
version = "1.6.0";
|
|
|
|
commit = "5bd70fd8eef316d220317245e46dc6016c348dce";
|
|
|
|
|
2020-09-21 07:12:06 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "vmware-tanzu";
|
|
|
|
repo = "velero";
|
2021-04-15 13:19:42 +02:00
|
|
|
sha256 = "sha256-2d4xsffh5DpxGahmzXpgUBRFAt5CsDnHCm8xU1ksqyQ=";
|
2020-09-21 07:12:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
|
|
|
-s -w
|
|
|
|
-X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=${version}
|
2021-04-15 13:19:42 +02:00
|
|
|
-X github.com/vmware-tanzu/velero/pkg/buildinfo.GitSHA=${commit}
|
2020-09-21 07:12:06 +02:00
|
|
|
-X github.com/vmware-tanzu/velero/pkg/buildinfo.GitTreeState=clean
|
|
|
|
'';
|
|
|
|
|
2021-04-15 13:19:42 +02:00
|
|
|
vendorSha256 = "sha256-aQjtebIyV69nRwc/zvK/9v0mX3pAPKfOunSL/FpFZJU=";
|
2020-09-21 07:12:06 +02:00
|
|
|
|
|
|
|
excludedPackages = [ "issue-template-gen" ];
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
2020-11-15 22:13:06 +01:00
|
|
|
$out/bin/velero completion bash > velero.bash
|
|
|
|
$out/bin/velero completion zsh > velero.zsh
|
|
|
|
installShellCompletion velero.{bash,zsh}
|
2020-09-21 07:12:06 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-09-21 07:12:06 +02: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 ];
|
2021-03-22 23:50:40 +01:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2020-09-21 07:12:06 +02:00
|
|
|
};
|
|
|
|
}
|