commit c58acebb8701b0ff39d15301482b9a4bd88a5bfa
Author: Marc Weber <marco-oweber@gmx.de>
Date:   Sat Jun 25 18:41:01 2011 +0200

    rsnapshot: don't test snapshot_root in build job patch

diff --git a/pkgs/tools/backup/rsnapshot/default.nix b/pkgs/tools/backup/rsnapshot/default.nix
index a9cba3f..35f11c9 100644
--- a/pkgs/tools/backup/rsnapshot/default.nix
+++ b/pkgs/tools/backup/rsnapshot/default.nix
@@ -12,6 +12,8 @@ stdenv.mkDerivation rec {
   patchPhase = ''
     substituteInPlace "Makefile.in" --replace \
       "/usr/bin/pod2man" "${perl}/bin/pod2man"
+
+    patch -p1 < ${./patch.patch}
   '';
 
   meta = {
diff --git a/pkgs/tools/backup/rsnapshot/patch.patch b/pkgs/tools/backup/rsnapshot/patch.patch
new file mode 100644
index 0000000..dd8293f
--- /dev/null
+++ b/pkgs/tools/backup/rsnapshot/patch.patch
@@ -0,0 +1,14 @@
+diff --git a/rsnapshot-program.pl b/rsnapshot-program.pl
+index 0469f67..d691368 100755
+--- a/rsnapshot-program.pl
++++ b/rsnapshot-program.pl
+@@ -554,7 +554,8 @@ sub parse_config_file {
+ 				}
+ 				next;
+ 			# if the snapshot root already exists:
+-			} elsif ( -e "$value" ) {
++			} elsif (( -e "$value" ) && (! exists $ENV{'out'} )) {
++                                                  # ^ nixos hack: don't check snapshot_root in builder when running configtest
+ 				# if path exists already, make sure it's a directory
+ 				if ((-e "$value") && (! -d "$value")) {
+ 					config_err($file_line_num, "$line - snapshot_root must be a directory");
