nixUnstable: Fix cross-compilation native/cross mismatch with bzip2.

See <http://hydra.nixos.org/build/2345751> for the original symptom.

svn path=/nixpkgs/trunk/; revision=33515
This commit is contained in:
Ludovic Courtès 2012-04-01 12:08:44 +00:00
parent 3363c587a4
commit 1a38734345

View File

@ -13,7 +13,16 @@ stdenv.mkDerivation rec {
};
buildNativeInputs = [ perl pkgconfig ];
buildInputs = [ curl openssl boehmgc bzip2 sqlite ];
buildInputs = [ curl openssl boehmgc sqlite ];
# Note: bzip2 is not passed as a build input, because the unpack phase
# would end up using the wrong bzip2 when cross-compiling.
# XXX: The right thing would be to reinstate `--with-bzip2' in Nix.
postUnpack =
'' export CPATH="${bzip2}/include"
export LIBRARY_PATH="${bzip2}/lib"
'';
configureFlags =
''
@ -26,6 +35,11 @@ stdenv.mkDerivation rec {
'';
crossAttrs = {
postUnpack =
'' export CPATH="${bzip2.hostDrv}/include"
export NIX_CROSS_LDFLAGS="-L${bzip2.hostDrv}/lib -rpath-link ${bzip2.hostDrv}/lib $NIX_CROSS_LDFLAGS"
'';
configureFlags =
''
--with-store-dir=${storeDir} --localstatedir=${stateDir}