mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-23 13:48:21 +03:00
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 {
|
||||
name = "rsnapshot-1.3.0";
|
||||
src = fetchurl {
|
||||
@ -12,6 +27,7 @@ stdenv.mkDerivation rec {
|
||||
patchPhase = ''
|
||||
substituteInPlace "Makefile.in" --replace \
|
||||
"/usr/bin/pod2man" "${perl}/bin/pod2man"
|
||||
patch -p0 <${patch}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
Loading…
Reference in New Issue
Block a user