Merge branch 'qt5-psql'

+21 -4
+21 -4
pkgs/development/libraries/qt-5/5.4/qtbase.nix
··· 25 26 with stdenv.lib; 27 28 stdenv.mkDerivation { 29 30 name = "qtbase-${version}"; ··· 104 -strip 105 -reduce-relocations 106 -system-proxies 107 108 -gui 109 -widgets ··· 123 -no-directfb 124 -no-linuxfb 125 -no-kms 126 127 -system-zlib 128 -system-libpng ··· 142 -${optionalString (buildTests == false) "no"}make tests 143 ''; 144 145 propagatedBuildInputs = [ 146 xlibs.libXcomposite libX11 libxcb libXext libXrender libXi 147 fontconfig freetype openssl dbus.libs glib udev libxml2 libxslt pcre ··· 171 172 # Don't retain build-time dependencies like gdb and ruby. 173 sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $out/mkspecs/qconfig.pri 174 175 - mkdir -p "$out/nix-support" 176 - substitute ${./setup-hook.sh} "$out/nix-support/setup-hook" \ 177 - --subst-var out --subst-var-by lndir "${lndir}" 178 - ''; 179 180 enableParallelBuilding = true; # often fails on Hydra, as well as qt4 181
··· 25 26 with stdenv.lib; 27 28 + let system-x86_64 = elem stdenv.system platforms.x86_64; in 29 + 30 stdenv.mkDerivation { 31 32 name = "qtbase-${version}"; ··· 106 -strip 107 -reduce-relocations 108 -system-proxies 109 + -pkg-config 110 111 -gui 112 -widgets ··· 126 -no-directfb 127 -no-linuxfb 128 -no-kms 129 + 130 + ${optionalString (!system-x86_64) "-no-sse2"} 131 + -no-sse3 132 + -no-ssse3 133 + -no-sse4.1 134 + -no-sse4.2 135 + -no-avx 136 + -no-avx2 137 + -no-mips_dsp 138 + -no-mips_dspr2 139 140 -system-zlib 141 -system-libpng ··· 155 -${optionalString (buildTests == false) "no"}make tests 156 ''; 157 158 + # PostgreSQL autodetection fails sporadically because Qt omits the "-lpq" flag 159 + # if dependency paths contain the string "pq", which can occur in the hash. 160 + # To prevent these failures, we need to override PostgreSQL detection. 161 + PSQL_LIBS = optionalString (postgresql != null) "-L${postgresql}/lib -lpq"; 162 + 163 propagatedBuildInputs = [ 164 xlibs.libXcomposite libX11 libxcb libXext libXrender libXi 165 fontconfig freetype openssl dbus.libs glib udev libxml2 libxslt pcre ··· 189 190 # Don't retain build-time dependencies like gdb and ruby. 191 sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $out/mkspecs/qconfig.pri 192 + ''; 193 194 + inherit lndir; 195 + setupHook = ./setup-hook.sh; 196 197 enableParallelBuilding = true; # often fails on Hydra, as well as qt4 198