2013-10-05 18:40:47 +01:00
|
|
|
{ fetchurl, stdenv, writeText, perl, openssh, rsync, logger,
|
|
|
|
configFile ? "/etc/rsnapshot.conf" }:
|
2008-03-07 09:33:51 +00:00
|
|
|
|
2013-10-05 18:40:47 +01:00
|
|
|
let patch = writeText "rsnapshot-config.patch" ''
|
|
|
|
--- rsnapshot-program.pl 2013-10-05 20:31:08.715991442 +0200
|
|
|
|
+++ rsnapshot-program.pl 2013-10-05 20:31:42.496193633 +0200
|
|
|
|
@@ -383,7 +383,7 @@
|
|
|
|
}
|
|
|
|
|
|
|
|
# set global variable
|
|
|
|
- $config_file = $default_config_file;
|
|
|
|
+ $config_file = '${configFile}';
|
|
|
|
}
|
|
|
|
|
|
|
|
# accepts no args
|
|
|
|
'';
|
|
|
|
in
|
2008-03-07 09:33:51 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2013-10-05 22:07:52 +01:00
|
|
|
name = "rsnapshot-1.3.1";
|
2008-03-07 09:33:51 +00:00
|
|
|
src = fetchurl {
|
2013-02-15 14:26:18 +00:00
|
|
|
url = "mirror://sourceforge/rsnapshot/${name}.tar.gz";
|
2013-10-05 22:07:52 +01:00
|
|
|
sha256 = "0pn7vlg3yxl7xrvfwmp4zlrg3cckmlldq6qr5bs3b2b281zcgdll";
|
2008-03-07 09:33:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [perl openssh rsync logger];
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace "Makefile.in" --replace \
|
|
|
|
"/usr/bin/pod2man" "${perl}/bin/pod2man"
|
2013-10-05 18:40:47 +01:00
|
|
|
patch -p0 <${patch}
|
2008-03-07 09:33:51 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2009-03-03 13:27:40 +00:00
|
|
|
description = "A filesystem snapshot utility for making backups of local and remote systems";
|
2008-03-07 09:33:51 +00:00
|
|
|
homepage = http://rsnapshot.org/;
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2008-03-07 09:33:51 +00:00
|
|
|
};
|
|
|
|
}
|