diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2017-06-28 13:59:42 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-06-28 18:31:37 -0400 |
commit | f16ee76ca8b283a751f1fd4fc21de30243cc4640 (patch) | |
tree | 2a02c81d50ce75d9439c2ccaa31e8e996eaa9542 /pkgs/development/libraries/qt-4.x | |
parent | aac32fe2d1677fdf82c8ef1560c048f16ddc5e47 (diff) |
qt 4.8: Don't use stdenv.cross
Diffstat (limited to 'pkgs/development/libraries/qt-4.x')
-rw-r--r-- | pkgs/development/libraries/qt-4.x/4.8/default.nix | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix index dee83306cc6e8..d3eaeed2f1e02 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -1,4 +1,5 @@ { stdenv, fetchurl, fetchpatch, substituteAll +, hostPlatform , libXrender, libXinerama, libXcursor, libXmu, libXv, libXext , libXfixes, libXrandr, libSM, freetype, fontconfig, zlib, libjpeg, libpng , libmng, which, mesaSupported, mesa, mesa_glu, openssl, dbus, cups, pkgconfig @@ -182,9 +183,7 @@ stdenv.mkDerivation rec { rm -rf $out/tests ''; - crossAttrs = let - isMingw = stdenv.cross.libc == "msvcrt"; - in { + crossAttrs = { # I've not tried any case other than i686-pc-mingw32. # -nomake tools: it fails linking some asian language symbols # -no-svg: it fails to build on mingw64 @@ -194,14 +193,14 @@ stdenv.mkDerivation rec { -no-svg -make qmake -make libs -nomake tools -nomake demos -nomake examples -nomake docs - '' + optionalString isMingw " -xplatform win32-g++-4.6"; + '' + optionalString hostPlatform.isMinGW " -xplatform win32-g++-4.6"; patches = []; preConfigure = '' - sed -i -e 's/ g++/ ${stdenv.cross.config}-g++/' \ - -e 's/ gcc/ ${stdenv.cross.config}-gcc/' \ - -e 's/ ar/ ${stdenv.cross.config}-ar/' \ - -e 's/ strip/ ${stdenv.cross.config}-strip/' \ - -e 's/ windres/ ${stdenv.cross.config}-windres/' \ + sed -i -e 's/ g++/ ${stdenv.cc.prefix}g++/' \ + -e 's/ gcc/ ${stdenv.cc.prefix}gcc/' \ + -e 's/ ar/ ${stdenv.cc.prefix}ar/' \ + -e 's/ strip/ ${stdenv.cc.prefix}strip/' \ + -e 's/ windres/ ${stdenv.cc.prefix}windres/' \ mkspecs/win32-g++/qmake.conf ''; @@ -211,7 +210,7 @@ stdenv.mkDerivation rec { ''; configurePlatforms = []; dontStrip = true; - } // optionalAttrs isMingw { + } // optionalAttrs hostPlatform.isMinGW { propagatedBuildInputs = [ ]; }; |