rsnapshot: configurable configuration file path
default value: /etc/rsnapshot.conf
This commit is contained in:
parent
38a20082cd
commit
80924c8f3c
@ -1,5 +1,20 @@
|
|||||||
{fetchurl, stdenv, perl, openssh, rsync, logger}:
|
{ fetchurl, stdenv, writeText, perl, openssh, rsync, logger,
|
||||||
|
configFile ? "/etc/rsnapshot.conf" }:
|
||||||
|
|
||||||
|
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
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "rsnapshot-1.3.0";
|
name = "rsnapshot-1.3.0";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
@ -12,6 +27,7 @@ stdenv.mkDerivation rec {
|
|||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
substituteInPlace "Makefile.in" --replace \
|
substituteInPlace "Makefile.in" --replace \
|
||||||
"/usr/bin/pod2man" "${perl}/bin/pod2man"
|
"/usr/bin/pod2man" "${perl}/bin/pod2man"
|
||||||
|
patch -p0 <${patch}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user