From bb6459dd0bb99c0db291d744cde6f466d7379d7e Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sun, 19 Jul 2015 13:38:36 -0500 Subject: [PATCH 1/4] qt5.base: use pkgconfig unconditionally --- pkgs/development/libraries/qt-5/5.4/qtbase.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/qt-5/5.4/qtbase.nix b/pkgs/development/libraries/qt-5/5.4/qtbase.nix index 7ef39a408603..ac38339c1f87 100644 --- a/pkgs/development/libraries/qt-5/5.4/qtbase.nix +++ b/pkgs/development/libraries/qt-5/5.4/qtbase.nix @@ -104,6 +104,7 @@ stdenv.mkDerivation { -strip -reduce-relocations -system-proxies + -pkg-config -gui -widgets From 3f3da5ccbde10176a4e634888384bb48c024b337 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sun, 19 Jul 2015 13:38:51 -0500 Subject: [PATCH 2/4] qt5.base: install setupHook correctly --- pkgs/development/libraries/qt-5/5.4/qtbase.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/qt-5/5.4/qtbase.nix b/pkgs/development/libraries/qt-5/5.4/qtbase.nix index ac38339c1f87..cf960c39b40b 100644 --- a/pkgs/development/libraries/qt-5/5.4/qtbase.nix +++ b/pkgs/development/libraries/qt-5/5.4/qtbase.nix @@ -172,12 +172,11 @@ stdenv.mkDerivation { # Don't retain build-time dependencies like gdb and ruby. sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $out/mkspecs/qconfig.pri - - mkdir -p "$out/nix-support" - substitute ${./setup-hook.sh} "$out/nix-support/setup-hook" \ - --subst-var out --subst-var-by lndir "${lndir}" ''; + inherit lndir; + setupHook = ./setup-hook.sh; + enableParallelBuilding = true; # often fails on Hydra, as well as qt4 meta = { From 17a65c4bf043aaa35b6224a27a3d0a9df546ca85 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Mon, 20 Jul 2015 08:41:57 -0500 Subject: [PATCH 3/4] qt5.base: override postgresql autodetection --- pkgs/development/libraries/qt-5/5.4/qtbase.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/libraries/qt-5/5.4/qtbase.nix b/pkgs/development/libraries/qt-5/5.4/qtbase.nix index cf960c39b40b..441dbdd5c660 100644 --- a/pkgs/development/libraries/qt-5/5.4/qtbase.nix +++ b/pkgs/development/libraries/qt-5/5.4/qtbase.nix @@ -143,6 +143,11 @@ stdenv.mkDerivation { -${optionalString (buildTests == false) "no"}make tests ''; + # PostgreSQL autodetection fails sporadically because Qt omits the "-lpq" flag + # if dependency paths contain the string "pq", which can occur in the hash. + # To prevent these failures, we need to override PostgreSQL detection. + PSQL_LIBS = optionalString (postgresql != null) "-L${postgresql}/lib -lpq"; + propagatedBuildInputs = [ xlibs.libXcomposite libX11 libxcb libXext libXrender libXi fontconfig freetype openssl dbus.libs glib udev libxml2 libxslt pcre From 965f330c654553400611aa51d6898a9dd14e40dd Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Mon, 20 Jul 2015 08:46:20 -0500 Subject: [PATCH 4/4] qt5.base: disable unsupported SIMD instruction sets If not explicitly disabled, Qt tries to detect support for the various instruction sets. As a result, binaries built on Hydra may use instruction sets unsupported by clients. --- pkgs/development/libraries/qt-5/5.4/qtbase.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/development/libraries/qt-5/5.4/qtbase.nix b/pkgs/development/libraries/qt-5/5.4/qtbase.nix index 441dbdd5c660..ecefa891332e 100644 --- a/pkgs/development/libraries/qt-5/5.4/qtbase.nix +++ b/pkgs/development/libraries/qt-5/5.4/qtbase.nix @@ -25,6 +25,8 @@ with stdenv.lib; +let system-x86_64 = elem stdenv.system platforms.x86_64; in + stdenv.mkDerivation { name = "qtbase-${version}"; @@ -125,6 +127,16 @@ stdenv.mkDerivation { -no-linuxfb -no-kms + ${optionalString (!system-x86_64) "-no-sse2"} + -no-sse3 + -no-ssse3 + -no-sse4.1 + -no-sse4.2 + -no-avx + -no-avx2 + -no-mips_dsp + -no-mips_dspr2 + -system-zlib -system-libpng -system-libjpeg