summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/velero
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/cluster/velero')
-rw-r--r--pkgs/applications/networking/cluster/velero/default.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/applications/networking/cluster/velero/default.nix b/pkgs/applications/networking/cluster/velero/default.nix
new file mode 100644
index 00000000000..b38787e2968
--- /dev/null
+++ b/pkgs/applications/networking/cluster/velero/default.nix
@@ -0,0 +1,48 @@
+{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
+
+buildGoModule rec {
+  pname = "velero";
+  # When updating, change the commit underneath
+  version = "1.6.0";
+  commit = "5bd70fd8eef316d220317245e46dc6016c348dce";
+
+
+  src = fetchFromGitHub {
+    rev = "v${version}";
+    owner = "vmware-tanzu";
+    repo = "velero";
+    sha256 = "sha256-2d4xsffh5DpxGahmzXpgUBRFAt5CsDnHCm8xU1ksqyQ=";
+  };
+
+  buildFlagsArray = ''
+    -ldflags=
+      -s -w
+      -X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=${version}
+      -X github.com/vmware-tanzu/velero/pkg/buildinfo.GitSHA=${commit}
+      -X github.com/vmware-tanzu/velero/pkg/buildinfo.GitTreeState=clean
+  '';
+
+  vendorSha256 = "sha256-aQjtebIyV69nRwc/zvK/9v0mX3pAPKfOunSL/FpFZJU=";
+
+  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;
+  };
+}