nixpkgs/pkgs/applications/networking/cluster/velero/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.7 KiB
Nix
Raw Normal View History

{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "velero";
2022-08-17 22:50:05 +00:00
version = "1.9.1";
2021-04-15 11:19:42 +00:00
src = fetchFromGitHub {
owner = "vmware-tanzu";
repo = "velero";
rev = "v${version}";
2022-08-17 22:50:05 +00:00
sha256 = "sha256-zGk5Bo1n2VV33wzozgYWbrwd/D3lcSWsqb+s3U3kmus=";
};
ldflags = [
2021-08-26 06:45:51 +00:00
"-s" "-w"
"-X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=v${version}"
2022-06-23 16:43:33 +00:00
"-X github.com/vmware-tanzu/velero/pkg/buildinfo.ImageRegistry=velero"
2021-08-26 06:45:51 +00:00
"-X github.com/vmware-tanzu/velero/pkg/buildinfo.GitTreeState=clean"
2022-06-23 16:43:33 +00:00
"-X github.com/vmware-tanzu/velero/pkg/buildinfo.GitSHA=none"
];
2022-08-17 22:50:05 +00:00
vendorSha256 = "sha256-l8srlzoCcBZFOwVs7veQ1RvqWRIqQAaZLM/2CbNHN50=";
2022-02-26 22:44:37 +00:00
excludedPackages = [ "issue-template-gen" "release-tools" "v1" "velero-restic-restore-helper" ];
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
'';
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 ];
};
}