postfix: fix cross-build
This commit is contained in:
parent
2ebe19f330
commit
68d5071e3d
@ -1,5 +1,6 @@
|
|||||||
{ stdenv, lib, fetchurl, makeWrapper, gnused, db, openssl, cyrus_sasl, libnsl
|
{ stdenv, lib, fetchurl, makeWrapper, gnused, db, openssl, cyrus_sasl, libnsl
|
||||||
, coreutils, findutils, gnugrep, gawk, icu, pcre, m4
|
, coreutils, findutils, gnugrep, gawk, icu, pcre, m4
|
||||||
|
, buildPackages
|
||||||
, withLDAP ? true, openldap
|
, withLDAP ? true, openldap
|
||||||
, withPgSQL ? false, postgresql
|
, withPgSQL ? false, postgresql
|
||||||
, withMySQL ? false, mysql
|
, withMySQL ? false, mysql
|
||||||
@ -49,13 +50,17 @@ in stdenv.mkDerivation rec {
|
|||||||
./relative-symlinks.patch
|
./relative-symlinks.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
preBuild = ''
|
postPatch = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
||||||
|
sed -e 's!bin/postconf!${buildPackages.postfix}/bin/postconf!' -i postfix-install
|
||||||
|
'' + ''
|
||||||
sed -e '/^PATH=/d' -i postfix-install
|
sed -e '/^PATH=/d' -i postfix-install
|
||||||
sed -e "s|@PACKAGE@|$out|" -i conf/post-install
|
sed -e "s|@PACKAGE@|$out|" -i conf/post-install
|
||||||
|
|
||||||
# post-install need skip permissions check/set on all symlinks following to /nix/store
|
# post-install need skip permissions check/set on all symlinks following to /nix/store
|
||||||
sed -e "s|@NIX_STORE@|$NIX_STORE|" -i conf/post-install
|
sed -e "s|@NIX_STORE@|$NIX_STORE|" -i conf/post-install
|
||||||
|
'';
|
||||||
|
|
||||||
|
postConfigure = ''
|
||||||
export command_directory=$out/sbin
|
export command_directory=$out/sbin
|
||||||
export config_directory=/etc/postfix
|
export config_directory=/etc/postfix
|
||||||
export meta_directory=$out/etc/postfix
|
export meta_directory=$out/etc/postfix
|
||||||
@ -69,6 +74,8 @@ in stdenv.mkDerivation rec {
|
|||||||
export readme_directory=$out/share/postfix/doc
|
export readme_directory=$out/share/postfix/doc
|
||||||
export sendmail_path=$out/bin/sendmail
|
export sendmail_path=$out/bin/sendmail
|
||||||
|
|
||||||
|
makeFlagsArray+=(AR=$AR _AR=$AR RANLIB=$RANLIB _RANLIB=$RANLIB)
|
||||||
|
|
||||||
make makefiles CCARGS='${ccargs}' AUXLIBS='${auxlibs}'
|
make makefiles CCARGS='${ccargs}' AUXLIBS='${auxlibs}'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user