Merge branch 'qt5-psql'

+21 -4
+21 -4
pkgs/development/libraries/qt-5/5.4/qtbase.nix
··· 25 25 26 26 with stdenv.lib; 27 27 28 + let system-x86_64 = elem stdenv.system platforms.x86_64; in 29 + 28 30 stdenv.mkDerivation { 29 31 30 32 name = "qtbase-${version}"; ··· 104 106 -strip 105 107 -reduce-relocations 106 108 -system-proxies 109 + -pkg-config 107 110 108 111 -gui 109 112 -widgets ··· 123 126 -no-directfb 124 127 -no-linuxfb 125 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 126 139 127 140 -system-zlib 128 141 -system-libpng ··· 142 155 -${optionalString (buildTests == false) "no"}make tests 143 156 ''; 144 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 + 145 163 propagatedBuildInputs = [ 146 164 xlibs.libXcomposite libX11 libxcb libXext libXrender libXi 147 165 fontconfig freetype openssl dbus.libs glib udev libxml2 libxslt pcre ··· 171 189 172 190 # Don't retain build-time dependencies like gdb and ruby. 173 191 sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $out/mkspecs/qconfig.pri 192 + ''; 174 193 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 - ''; 194 + inherit lndir; 195 + setupHook = ./setup-hook.sh; 179 196 180 197 enableParallelBuilding = true; # often fails on Hydra, as well as qt4 181 198