logrotate: make mailutils overridable (#44504)
This commit is contained in:
parent
8dc20dce0a
commit
97ca78687a
@ -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 = ''
|
||||
|
Loading…
Reference in New Issue
Block a user