blob: 8a39c31f11d9e3290c88683ca1c471d747f6a8ff (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "velero";
version = "1.13.2";
src = fetchFromGitHub {
owner = "vmware-tanzu";
repo = "velero";
rev = "v${version}";
sha256 = "sha256-Dqz8UFoGb5uG5f8mrIUIRWJUYH/ZuFavhRy2wie75/Q=";
};
ldflags = [
"-s" "-w"
"-X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=v${version}"
"-X github.com/vmware-tanzu/velero/pkg/buildinfo.ImageRegistry=velero"
"-X github.com/vmware-tanzu/velero/pkg/buildinfo.GitTreeState=clean"
"-X github.com/vmware-tanzu/velero/pkg/buildinfo.GitSHA=none"
];
vendorHash = "sha256-L1QTqw0L/aE4bFlLWg4/mmdHL7Sb5EsT3eL0jZIpBsA=";
excludedPackages = [ "issue-template-gen" "release-tools" "v1" "velero-restic-restore-helper" ];
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
'';
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
$out/bin/velero completion bash > velero.bash
$out/bin/velero completion zsh > velero.zsh
installShellCompletion velero.{bash,zsh}
'';
meta = with lib; {
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 ];
};
}
|