Files
nixpkgs/pkgs/by-name/ve/velero/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

62 lines
1.8 KiB
Nix

{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule (finalAttrs: {
pname = "velero";
version = "1.17.0";
src = fetchFromGitHub {
owner = "vmware-tanzu";
repo = "velero";
tag = "v${finalAttrs.version}";
hash = "sha256-2hffuTcz6mBwrEjCMhZqrDvNbC5m6lK3vM9umgV4l+0=";
};
ldflags = [
"-s"
"-w"
"-X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=v${finalAttrs.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-khG/6mSYOCKBjTY+JyakFD65bLWLXpcQKPlhPT31uxc=";
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 ${finalAttrs.version} > /dev/null
'';
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
$out/bin/velero completion bash > velero.bash
$out/bin/velero completion zsh > velero.zsh
installShellCompletion velero.{bash,zsh}
'';
meta = {
description = "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${finalAttrs.version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
mbode
bryanasdev000
];
};
})