From 3f35d670de2285293ed14c2623e86c27868da6b8 Mon Sep 17 00:00:00 2001 From: Alexei Robyn Date: Thu, 12 May 2016 09:19:16 +1000 Subject: [PATCH] rsnapshot: Remove unnecessary argument, refactor one-line patch to flags. --- pkgs/tools/backup/rsnapshot/default.nix | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/pkgs/tools/backup/rsnapshot/default.nix b/pkgs/tools/backup/rsnapshot/default.nix index f46a2c20de42..e4ecb4becdef 100644 --- a/pkgs/tools/backup/rsnapshot/default.nix +++ b/pkgs/tools/backup/rsnapshot/default.nix @@ -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; {