From 97ca78687a2d8bd96ee121610f3044b19e88f8a7 Mon Sep 17 00:00:00 2001 From: Richard Marko Date: Sun, 5 Aug 2018 22:19:35 +0200 Subject: [PATCH] logrotate: make mailutils overridable (#44504) --- pkgs/tools/system/logrotate/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/system/logrotate/default.nix b/pkgs/tools/system/logrotate/default.nix index 75e25bcc6730..75f609684406 100644 --- a/pkgs/tools/system/logrotate/default.nix +++ b/pkgs/tools/system/logrotate/default.nix @@ -1,4 +1,6 @@ -{ stdenv, fetchFromGitHub, mailutils, gzip, popt, autoreconfHook }: +{ stdenv, fetchFromGitHub, gzip, popt, autoreconfHook +, mailutils ? null +}: stdenv.mkDerivation rec { name = "logrotate-${version}"; @@ -14,8 +16,11 @@ stdenv.mkDerivation rec { # Logrotate wants to access the 'mail' program; to be done. patchPhase = '' sed -i -e 's,[a-z/]\+gzip,${gzip}/bin/gzip,' \ - -e 's,[a-z/]\+gunzip,${gzip}/bin/gunzip,' \ - -e 's,[a-z/]\+mail,${mailutils}/bin/mail,' configure.ac + -e 's,[a-z/]\+gunzip,${gzip}/bin/gunzip,' configure.ac + + ${stdenv.lib.optionalString (mailutils != null) '' + sed -i -e 's,[a-z/]\+mail,${mailutils}/bin/mail,' configure.ac + ''} ''; autoreconfPhase = ''