2010-06-21 19:06:08 +02:00
|
|
|
{ stdenv, fetchurl
|
2009-12-24 10:49:35 +01:00
|
|
|
, libXft, libXrender, randrproto, xextproto, libXinerama, xineramaproto, libXcursor, libXmu
|
|
|
|
, libXext, libXfixes, inputproto, fixesproto, libXrandr, freetype, fontconfig
|
2010-05-05 20:17:25 +02:00
|
|
|
, zlib, libjpeg, libpng, which, mesa, openssl, dbus, cups, pkgconfig, libtiff, glib
|
|
|
|
, mysql, postgresql
|
|
|
|
, perl, coreutils, libXi, sqlite, alsaLib
|
|
|
|
, buildDemos ? false, buildExamples ? false, useDocs ? true}:
|
2009-12-24 10:49:35 +01:00
|
|
|
|
2010-05-05 20:17:25 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2010-06-08 15:01:44 +02:00
|
|
|
name = "qt-4.6.3";
|
2009-12-24 10:49:35 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2010-06-08 15:01:44 +02:00
|
|
|
url = ftp://ftp.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.6.3.tar.gz;
|
|
|
|
sha256 = "f4e0ada8d4d516bbb8600a3ee7d9046c9c79e38cd781df9ffc46d8f16acd1768";
|
2009-12-24 10:49:35 +01:00
|
|
|
};
|
|
|
|
|
2010-01-12 10:24:18 +01:00
|
|
|
preConfigure = ''
|
|
|
|
export LD_LIBRARY_PATH="`pwd`/lib:$LD_LIBRARY_PATH"
|
2010-05-05 20:17:25 +02:00
|
|
|
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
|
|
|
|
"
|
2010-01-12 10:24:18 +01:00
|
|
|
'';
|
2009-12-24 10:49:35 +01:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2010-05-05 20:17:25 +02:00
|
|
|
alsaLib
|
|
|
|
sqlite
|
2009-12-24 10:49:35 +01:00
|
|
|
libXft
|
|
|
|
libXrender
|
|
|
|
libXrandr
|
2010-05-05 20:17:25 +02:00
|
|
|
libXi
|
2009-12-24 10:49:35 +01:00
|
|
|
randrproto
|
|
|
|
xextproto
|
|
|
|
libXinerama
|
|
|
|
xineramaproto
|
|
|
|
libXcursor
|
|
|
|
zlib
|
|
|
|
libjpeg
|
|
|
|
mysql
|
2010-05-05 20:17:25 +02:00
|
|
|
postgresql
|
2009-12-24 10:49:35 +01:00
|
|
|
libpng
|
|
|
|
which
|
|
|
|
mesa
|
|
|
|
libXmu
|
|
|
|
openssl
|
|
|
|
dbus.libs
|
|
|
|
cups
|
|
|
|
pkgconfig
|
|
|
|
libXext
|
|
|
|
freetype
|
|
|
|
fontconfig
|
|
|
|
inputproto
|
|
|
|
fixesproto
|
|
|
|
libXfixes
|
|
|
|
glib
|
|
|
|
libtiff
|
|
|
|
];
|
2010-03-24 13:04:27 +01:00
|
|
|
|
2010-05-05 20:17:25 +02:00
|
|
|
buildInputs = [ perl ];
|
|
|
|
|
2010-03-24 13:04:27 +01:00
|
|
|
# libQtNetwork will call libQtCore for it to dlopen openssl.
|
|
|
|
NIX_LDFLAGS = "-rpath ${openssl}/lib";
|
|
|
|
# Don't shrink the rpath, to keep ${openssl} in it.
|
|
|
|
dontPatchELF = 1;
|
2009-12-24 10:49:35 +01:00
|
|
|
|
|
|
|
prefixKey = "-prefix ";
|
|
|
|
|
|
|
|
configureFlags = ''
|
|
|
|
-v -no-separate-debug-info -release
|
|
|
|
-system-zlib -system-libpng -system-libjpeg -fast
|
|
|
|
-qt-gif -confirm-license -opensource
|
2010-05-05 20:17:25 +02:00
|
|
|
-opengl -xrender -xrandr -xinerama -xcursor -qt-sql-mysql -system-sqlite
|
2009-12-24 10:49:35 +01:00
|
|
|
-qdbus -cups -glib -xfixes -dbus-linked
|
|
|
|
-fontconfig -I${freetype}/include/freetype2
|
2010-05-05 20:17:25 +02:00
|
|
|
-exceptions -xmlpatterns
|
2009-12-24 10:49:35 +01:00
|
|
|
${if buildDemos == true then "" else "-nomake demos"}
|
|
|
|
${if buildExamples == true then "" else "-nomake examples"}
|
2010-05-05 20:17:25 +02:00
|
|
|
${if useDocs then "" else "-nomake docs"}
|
2009-12-24 10:49:35 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace configure --replace /bin/pwd pwd
|
2010-05-05 20:17:25 +02:00
|
|
|
substituteInPlace src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls
|
2009-12-24 10:49:35 +01:00
|
|
|
sed -e 's@/usr@/FOO@' -i config.tests/*/*.test -i mkspecs/*/*.conf
|
|
|
|
'';
|
|
|
|
|
2010-05-05 20:17:25 +02:00
|
|
|
postInstall = if useDocs then "rm -rf $out/share/doc/${name}/{html,src}" else "";
|
2009-12-24 10:49:35 +01:00
|
|
|
|
2010-06-23 16:35:18 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2009-12-24 10:49:35 +01:00
|
|
|
meta = {
|
2010-05-05 20:17:25 +02:00
|
|
|
homepage = http://qt.nokia.com/products;
|
2009-12-24 10:49:35 +01:00
|
|
|
description = "A cross-platform application framework for C++";
|
|
|
|
license = "GPL/LGPL";
|
2010-06-21 19:06:08 +02:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ sander urkud ];
|
|
|
|
platforms = stdenv.lib.platforms.mesaPlatforms;
|
2009-12-24 10:49:35 +01:00
|
|
|
};
|
|
|
|
}
|