gettext: Check for existence of stdenv.ccCross.

Should only affect cross-builds, however I didn't test whether
cross-building gettext actually works. But if it's broken now, it was
broken before as well and this at least unbreaks the non-cross-built
nixpkgs tarball job :-)

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2015-01-03 18:27:41 +01:00
parent 7982c3423a
commit f4edebfa12
No known key found for this signature in database
GPG key ID: D0EBD0EC8C2DC961

View file

@ -35,7 +35,7 @@ stdenv.mkDerivation (rec {
enableParallelBuilding = true;
crossAttrs = {
buildInputs = stdenv.lib.optional (stdenv.ccCross.libc ? libiconv)
buildInputs = stdenv.lib.optional (stdenv ? ccCross && stdenv.ccCross.libc ? libiconv)
stdenv.ccCross.libc.libiconv.crossDrv;
# Gettext fails to guess the cross compiler
configureFlags = "CXX=${stdenv.cross.config}-g++";