From b8186141e3b15a34e491de66d18ead7f6cd4bec0 Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Wed, 5 May 2010 18:17:25 +0000 Subject: [PATCH] Qt 4.6: add more SQL backends and libXi Also install qch docs by default svn path=/nixpkgs/trunk/; revision=21605 --- pkgs/development/libraries/qt-4.6/default.nix | 39 ++++++++++++------- pkgs/top-level/all-packages.nix | 7 ++-- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/pkgs/development/libraries/qt-4.6/default.nix b/pkgs/development/libraries/qt-4.6/default.nix index 0a83cc9e4a5..50ab8e66aea 100644 --- a/pkgs/development/libraries/qt-4.6/default.nix +++ b/pkgs/development/libraries/qt-4.6/default.nix @@ -1,10 +1,12 @@ { stdenv, fetchurl, lib , libXft, libXrender, randrproto, xextproto, libXinerama, xineramaproto, libXcursor, libXmu , libXext, libXfixes, inputproto, fixesproto, libXrandr, freetype, fontconfig -, zlib, libjpeg, mysql, libpng, which, mesa, openssl, dbus, cups, pkgconfig, libtiff, glib -, buildDemos ? false, buildExamples ? false, keepDocumentation ? false}: +, zlib, libjpeg, libpng, which, mesa, openssl, dbus, cups, pkgconfig, libtiff, glib +, mysql, postgresql +, perl, coreutils, libXi, sqlite, alsaLib +, buildDemos ? false, buildExamples ? false, useDocs ? true}: -stdenv.mkDerivation { +stdenv.mkDerivation rec { name = "qt-4.6.2"; src = fetchurl { @@ -12,16 +14,24 @@ stdenv.mkDerivation { sha256 = "1bpz59y907zz2p67mnf5ckvxh7n2glr6pz1f9fmngkkdn3fm2vqp"; }; - setupHook = ./setup-hook.sh; - preConfigure = '' export LD_LIBRARY_PATH="`pwd`/lib:$LD_LIBRARY_PATH" + configureFlags+=" + -docdir $out/share/doc/${name} + -plugindir $out/lib/qt4/plugins + -examplesdir $out/share/doc/${name}/examples + -demosdir $out/share/doc/${name}/demos + -datadir $out/share/qt4 + " ''; propagatedBuildInputs = [ + alsaLib + sqlite libXft libXrender libXrandr + libXi randrproto xextproto libXinerama @@ -30,6 +40,7 @@ stdenv.mkDerivation { zlib libjpeg mysql + postgresql libpng which mesa @@ -48,6 +59,8 @@ stdenv.mkDerivation { libtiff ]; + buildInputs = [ perl ]; + # libQtNetwork will call libQtCore for it to dlopen openssl. NIX_LDFLAGS = "-rpath ${openssl}/lib"; # Don't shrink the rpath, to keep ${openssl} in it. @@ -59,29 +72,27 @@ stdenv.mkDerivation { -v -no-separate-debug-info -release -system-zlib -system-libpng -system-libjpeg -fast -qt-gif -confirm-license -opensource - -opengl -xrender -xrandr -xinerama -xcursor -qt-sql-mysql + -opengl -xrender -xrandr -xinerama -xcursor -qt-sql-mysql -system-sqlite -qdbus -cups -glib -xfixes -dbus-linked -fontconfig -I${freetype}/include/freetype2 + -exceptions -xmlpatterns ${if buildDemos == true then "" else "-nomake demos"} ${if buildExamples == true then "" else "-nomake examples"} + ${if useDocs then "" else "-nomake docs"} ''; patchPhase = '' substituteInPlace configure --replace /bin/pwd pwd + substituteInPlace src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls sed -e 's@/usr@/FOO@' -i config.tests/*/*.test -i mkspecs/*/*.conf ''; - # Remove the documentation: it takes up >= 130 MB, which is more - # than half of the installed size. Ideally we should put this in a - # separate package (as well as the Qt Designer). - postInstall = '' - ${if keepDocumentation == false then "rm -rf $out/doc" else ""} - ''; + postInstall = if useDocs then "rm -rf $out/share/doc/${name}/{html,src}" else ""; meta = { - homepage = http://www.qtsoftware.com/downloads/opensource/appdev/linux-x11-cpp; + homepage = http://qt.nokia.com/products; description = "A cross-platform application framework for C++"; license = "GPL/LGPL"; - maintainers = [ lib.maintainers.sander ]; + maintainers = with lib.maintainers; [ sander urkud ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7c6835965fc..79a5fec837e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5012,11 +5012,12 @@ let inherit (gnome) glib; }; - qt46 = import ../development/libraries/qt-4.6 { + qt46 = makeOverridable (import ../development/libraries/qt-4.6) { inherit fetchurl stdenv lib zlib libjpeg libpng which mysql mesa openssl cups dbus - fontconfig freetype pkgconfig libtiff; + fontconfig freetype pkgconfig libtiff perl coreutils sqlite alsaLib + postgresql; inherit (xlibs) xextproto libXft libXrender libXrandr randrproto - libXmu libXinerama xineramaproto libXcursor libXext + libXmu libXinerama xineramaproto libXcursor libXext libXi inputproto fixesproto libXfixes; inherit (gnome) glib; };