forked from mirrors/nixpkgs
d258ef3ae3
also removes GitSHA from velero version output
48 lines
1.5 KiB
Nix
48 lines
1.5 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "velero";
|
|
version = "1.7.1";
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "vmware-tanzu";
|
|
repo = "velero";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-Jz3Tp5FqpmPuBscRB0KleQxtCvB43qmeLZNtGPnjuL0=";
|
|
};
|
|
|
|
ldflags = [
|
|
"-s" "-w"
|
|
"-X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=${version}"
|
|
"-X github.com/vmware-tanzu/velero/pkg/buildinfo.GitTreeState=clean"
|
|
];
|
|
|
|
vendorSha256 = "sha256-fX9FeoIkxxSi3dl5W2MZLz5vN1VHkPNpTBGRxGP5Qx8=";
|
|
|
|
excludedPackages = [ "issue-template-gen" "crd-gen" "release-tools" "velero-restic-restore-helper" "v1" "v1beta1" ];
|
|
|
|
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 = ''
|
|
$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 ];
|
|
};
|
|
}
|