push sheeet
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

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
From 72f7d8abee34107b815e49540f2fad7f1ab0b2cc Mon Sep 17 00:00:00 2001
From: Simon Bruder <simon@sbruder.de>
Date: Thu, 25 Feb 2021 09:20:51 +0100
Subject: [PATCH] Skip testing restore with permission failure
The test fails in sandboxed builds.
---
cmd/restic/cmd_restore_integration_test.go | 1 +
1 file changed, 1 insertion(+)
diff --git a/cmd/restic/cmd_restore_integration_test.go b/cmd/restic/cmd_restore_integration_test.go
index 2c7cbe1fb..f25f13754 100644
--- a/cmd/restic/cmd_restore_integration_test.go
+++ b/cmd/restic/cmd_restore_integration_test.go
@@ -200,6 +200,7 @@ func TestRestoreLatest(t *testing.T) {
}
func TestRestoreWithPermissionFailure(t *testing.T) {
+ t.Skip("Skipping testing restore with permission failure")
env, cleanup := withTestEnvironment(t)
defer cleanup()
--
2.41.0

View File

@@ -0,0 +1,86 @@
{
stdenv,
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
makeBinaryWrapper,
versionCheckHook,
nixosTests,
openssh,
rclone,
python3,
}:
buildGoModule rec {
pname = "restic";
version = "0.18.1";
src = fetchFromGitHub {
owner = "restic";
repo = "restic";
rev = "v${version}";
hash = "sha256-lLinqZUOsZCPPybvVDB1f8o9Hl5qKYi0eHwJAaydsD8=";
};
patches = [
# The TestRestoreWithPermissionFailure test fails in Nixs build sandbox
./0001-Skip-testing-restore-with-permission-failure.patch
];
vendorHash = "sha256-4GVhG1sjFiuKyDUAgmSmFww5bDKIoCjejkkoSqkvU4E=";
subPackages = [ "cmd/restic" ];
nativeBuildInputs = [
installShellFiles
makeBinaryWrapper
];
nativeCheckInputs = [ python3 ];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "version";
passthru.tests = lib.optionalAttrs stdenv.hostPlatform.isLinux {
restic = nixosTests.restic;
};
postPatch = ''
rm cmd/restic/cmd_mount_integration_test.go
'';
postInstall = ''
wrapProgram $out/bin/restic \
--prefix PATH : "${
lib.makeBinPath [
openssh
rclone
]
}"
''
+ lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
$out/bin/restic generate \
--bash-completion restic.bash \
--fish-completion restic.fish \
--zsh-completion restic.zsh \
--man .
installShellCompletion restic.{bash,fish,zsh}
installManPage *.1
'';
meta = {
homepage = "https://restic.net";
changelog = "https://github.com/restic/restic/blob/${src.rev}/CHANGELOG.md";
description = "Backup program that is fast, efficient and secure";
platforms = with lib.platforms; linux ++ darwin;
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [
mbrgm
dotlambda
ryan4yin
];
mainProgram = "restic";
};
}