3
0
Fork 0
forked from mirrors/nixpkgs

logrotate: make mailutils overridable (#44504)

This commit is contained in:
Richard Marko 2018-08-05 22:19:35 +02:00 committed by xeji
parent 8dc20dce0a
commit 97ca78687a

View file

@ -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 = ''