Merge branch 'qt5-psql'

This commit is contained in:
Thomas Tuegel 2015-07-20 08:49:30 -05:00
commit 5eae46fc93

View File

@ -25,6 +25,8 @@
with stdenv.lib; with stdenv.lib;
let system-x86_64 = elem stdenv.system platforms.x86_64; in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "qtbase-${version}"; name = "qtbase-${version}";
@ -104,6 +106,7 @@ stdenv.mkDerivation {
-strip -strip
-reduce-relocations -reduce-relocations
-system-proxies -system-proxies
-pkg-config
-gui -gui
-widgets -widgets
@ -124,6 +127,16 @@ stdenv.mkDerivation {
-no-linuxfb -no-linuxfb
-no-kms -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-zlib
-system-libpng -system-libpng
-system-libjpeg -system-libjpeg
@ -142,6 +155,11 @@ stdenv.mkDerivation {
-${optionalString (buildTests == false) "no"}make tests -${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 = [ propagatedBuildInputs = [
xlibs.libXcomposite libX11 libxcb libXext libXrender libXi xlibs.libXcomposite libX11 libxcb libXext libXrender libXi
fontconfig freetype openssl dbus.libs glib udev libxml2 libxslt pcre 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. # Don't retain build-time dependencies like gdb and ruby.
sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $out/mkspecs/qconfig.pri 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 enableParallelBuilding = true; # often fails on Hydra, as well as qt4
meta = { meta = {