diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/cluster/velero/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/networking/cluster/velero/default.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/networking/cluster/velero/default.nix b/nixpkgs/pkgs/applications/networking/cluster/velero/default.nix new file mode 100644 index 000000000000..65826683d5f0 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/cluster/velero/default.nix @@ -0,0 +1,45 @@ +{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: + +buildGoModule rec { + pname = "velero"; + version = "1.5.4"; + + src = fetchFromGitHub { + rev = "v${version}"; + owner = "vmware-tanzu"; + repo = "velero"; + sha256 = "sha256-YHBqIM3NV2L13w9WCzldUWmdBMec7ZndzYgGHblS8Dg="; + }; + + buildFlagsArray = '' + -ldflags= + -s -w + -X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=${version} + -X github.com/vmware-tanzu/velero/pkg/buildinfo.GitSHA=456eb19668f8da603756353d9179b59b5a7bfa04 + -X github.com/vmware-tanzu/velero/pkg/buildinfo.GitTreeState=clean + ''; + + vendorSha256 = "sha256-m/zShJeclZ1k8Fr9faK2x1Mpwbwun674iMPJhMw/9Mc="; + + excludedPackages = [ "issue-template-gen" ]; + + doCheck = false; + + 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 ]; + platforms = platforms.linux ++ platforms.darwin; + }; +} |