rsnapshot: Remove unnecessary argument, refactor one-line patch to flags.

This commit is contained in:
Alexei Robyn 2016-05-12 09:19:16 +10:00
parent c90d5eb298
commit 3f35d670de

View file

@ -1,20 +1,5 @@
{ fetchurl, stdenv, writeText, perl, openssh, rsync, logger,
configFile ? "/etc/rsnapshot.conf" }:
{ fetchurl, stdenv, writeText, perl, openssh, rsync, logger }:
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.4.1";
@ -25,10 +10,12 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [perl openssh rsync logger];
configureFlags = [ "--sysconfdir=/etc --prefix=/" ];
makeFlags = [ "DESTDIR=$(out)" ];
patchPhase = ''
substituteInPlace "Makefile.in" --replace \
"/usr/bin/pod2man" "${perl}/bin/pod2man"
patch -p0 <${patch}
'';
meta = with stdenv.lib; {