summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@gmail.com>2015-07-20 08:49:30 -0500
committerThomas Tuegel <ttuegel@gmail.com>2015-07-20 08:49:30 -0500
commit5eae46fc93cb296763b265b7006f87a7b1cdcc2e (patch)
treea9c6fdb1a0755931e01e6b6bc7d40077082a6ee2 /pkgs/development/libraries
parent745690717e24179d48e556ae487af77260eee49a (diff)
parent965f330c654553400611aa51d6898a9dd14e40dd (diff)
downloadnixlib-5eae46fc93cb296763b265b7006f87a7b1cdcc2e.tar
nixlib-5eae46fc93cb296763b265b7006f87a7b1cdcc2e.tar.gz
nixlib-5eae46fc93cb296763b265b7006f87a7b1cdcc2e.tar.bz2
nixlib-5eae46fc93cb296763b265b7006f87a7b1cdcc2e.tar.lz
nixlib-5eae46fc93cb296763b265b7006f87a7b1cdcc2e.tar.xz
nixlib-5eae46fc93cb296763b265b7006f87a7b1cdcc2e.tar.zst
nixlib-5eae46fc93cb296763b265b7006f87a7b1cdcc2e.zip
Merge branch 'qt5-psql'
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/qt-5/5.4/qtbase.nix25
1 files changed, 21 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 7ef39a408603..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}";
@@ -104,6 +106,7 @@ stdenv.mkDerivation {
     -strip
     -reduce-relocations
     -system-proxies
+    -pkg-config
 
     -gui
     -widgets
@@ -124,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
@@ -142,6 +155,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
@@ -171,12 +189,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 = {