17 src = fetchFromGitHub {
21 hash = "sha256-PTy/YcojJGrYQhdp98e3rEMqHIWDMR5jiSC6BdzBT/M=";
25 # The TestRestoreWithPermissionFailure test fails in Nix’s build sandbox
26 ./0001-Skip-testing-restore-with-permission-failure.patch
29 vendorHash = "sha256-tU2msDHktlU0SvvxLQCU64p8DpL8B0QiliVCuHlLTHQ=";
31 subPackages = [ "cmd/restic" ];
38 nativeCheckInputs = [ python3 ];
40 passthru.tests = lib.optionalAttrs stdenv.hostPlatform.isLinux {
41 restic = nixosTests.restic;
45 rm cmd/restic/cmd_mount_integration_test.go
50 wrapProgram $out/bin/restic --prefix PATH : '${rclone}/bin'
52 + lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
53 $out/bin/restic generate \
54 --bash-completion restic.bash \
55 --fish-completion restic.fish \
56 --zsh-completion restic.zsh \
58 installShellCompletion restic.{bash,fish,zsh}
63 homepage = "https://restic.net";
64 changelog = "https://github.com/restic/restic/blob/${src.rev}/CHANGELOG.md";
65 description = "Backup program that is fast, efficient and secure";
66 platforms = platforms.linux ++ platforms.darwin;
67 license = licenses.bsd2;
72 mainProgram = "restic";