2010-06-21 19:06:08 +02:00
|
|
|
{ stdenv, fetchurl
|
2010-05-07 22:08:37 +02:00
|
|
|
, alsaLib, gstreamer, gstPluginsBase, pulseaudio
|
|
|
|
, libXft, libXrender, randrproto, xextproto, libXinerama, xineramaproto, libXcursor, libXmu
|
|
|
|
, libXv, libXext, libXfixes, inputproto, fixesproto, libXrandr, freetype, fontconfig
|
2010-07-30 21:45:07 +02:00
|
|
|
, zlib, libjpeg, libpng, libmng, which, mesa, openssl, dbus, cups, pkgconfig, libtiff, glib
|
2010-05-07 22:08:37 +02:00
|
|
|
, mysql, postgresql, sqlite
|
|
|
|
, perl, coreutils, libXi
|
|
|
|
, buildDemos ? false, buildExamples ? false, useDocs ? true}:
|
|
|
|
|
2010-07-30 21:45:07 +02:00
|
|
|
let
|
|
|
|
v = "4.7.0-beta2";
|
|
|
|
in
|
|
|
|
|
2010-05-07 22:08:37 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2010-07-30 21:45:07 +02:00
|
|
|
name = "qt-${v}";
|
2010-07-31 15:05:22 +02:00
|
|
|
|
2010-05-07 22:08:37 +02:00
|
|
|
src = fetchurl {
|
2010-07-30 21:45:07 +02:00
|
|
|
url = "ftp://ftp.qt.nokia.com/qt/source/qt-everywhere-opensource-src-${v}.tar.gz";
|
|
|
|
sha256 = "1gxckb5pxybnj5413dxk7dm8hm945ymm4ppqwg14wfk83zhnw6g0";
|
2010-05-07 22:08:37 +02:00
|
|
|
};
|
2010-07-31 15:05:22 +02:00
|
|
|
|
|
|
|
preConfigure = ''
|
2010-05-07 22:08:37 +02:00
|
|
|
export LD_LIBRARY_PATH="`pwd`/lib:$LD_LIBRARY_PATH"
|
|
|
|
configureFlags+="
|
|
|
|
-docdir $out/share/doc/${name}
|
|
|
|
-plugindir $out/lib/qt4/plugins
|
2010-07-30 21:45:07 +02:00
|
|
|
-importdir $out/lib/qt4/imports
|
2010-05-07 22:08:37 +02:00
|
|
|
-examplesdir $out/share/doc/${name}/examples
|
|
|
|
-demosdir $out/share/doc/${name}/demos
|
|
|
|
-datadir $out/share/qt4
|
|
|
|
"
|
|
|
|
'';
|
2010-07-31 15:05:22 +02:00
|
|
|
|
2010-05-07 22:08:37 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
alsaLib
|
|
|
|
sqlite
|
2010-07-31 15:05:22 +02:00
|
|
|
libXft
|
|
|
|
libXrender
|
|
|
|
libXrandr
|
2010-05-07 22:08:37 +02:00
|
|
|
libXi
|
2010-07-31 15:05:22 +02:00
|
|
|
randrproto
|
2010-05-07 22:08:37 +02:00
|
|
|
xextproto
|
2010-07-31 15:05:22 +02:00
|
|
|
libXinerama
|
|
|
|
xineramaproto
|
|
|
|
libXcursor
|
|
|
|
zlib
|
|
|
|
libjpeg
|
2010-07-30 21:45:07 +02:00
|
|
|
libmng
|
2010-07-31 15:05:22 +02:00
|
|
|
mysql
|
2010-05-07 22:08:37 +02:00
|
|
|
postgresql
|
2010-07-31 15:05:22 +02:00
|
|
|
libpng
|
|
|
|
which
|
2010-05-07 22:08:37 +02:00
|
|
|
mesa
|
2010-07-31 15:05:22 +02:00
|
|
|
libXmu
|
2010-05-07 22:08:37 +02:00
|
|
|
libXv
|
2010-07-31 15:05:22 +02:00
|
|
|
openssl
|
|
|
|
dbus.libs
|
|
|
|
cups
|
|
|
|
pkgconfig
|
|
|
|
libXext
|
|
|
|
freetype
|
|
|
|
fontconfig
|
2010-05-07 22:08:37 +02:00
|
|
|
inputproto
|
2010-07-31 15:05:22 +02:00
|
|
|
fixesproto
|
|
|
|
libXfixes
|
|
|
|
glib
|
2010-05-07 22:08:37 +02:00
|
|
|
libtiff
|
|
|
|
gstreamer
|
|
|
|
gstPluginsBase
|
|
|
|
pulseaudio
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ perl ];
|
|
|
|
|
|
|
|
prefixKey = "-prefix ";
|
|
|
|
|
|
|
|
configureFlags = ''
|
|
|
|
-v -no-separate-debug-info -release -fast -confirm-license -opensource
|
2010-07-30 21:45:07 +02:00
|
|
|
-system-zlib -system-libpng -system-libjpeg -qt-gif -system-libmng
|
2010-05-07 22:08:37 +02:00
|
|
|
-opengl -xrender -xrandr -xinerama -xcursor
|
|
|
|
-plugin-sql-mysql -system-sqlite
|
2010-07-31 15:05:46 +02:00
|
|
|
-qdbus -cups -glib -xfixes -dbus-linked -openssl-linked
|
2010-05-07 22:08:37 +02:00
|
|
|
-fontconfig -I${freetype}/include/freetype2
|
|
|
|
-exceptions -xmlpatterns
|
2010-07-31 15:05:46 +02:00
|
|
|
-multimedia -audio-backend -phonon -phonon-backend
|
|
|
|
-webkit -javascript-jit
|
2010-05-07 22:08:37 +02:00
|
|
|
${if buildDemos == true then "-make demos" else "-nomake demos"}
|
|
|
|
${if buildExamples == true then "-make examples" else "-nomake examples"}
|
2010-07-30 21:45:07 +02:00
|
|
|
${if useDocs then "-make docs" else "-nomake docs"}'';
|
2010-07-31 15:05:46 +02:00
|
|
|
|
|
|
|
patches = [ ./phonon-4.4.0.patch ];
|
|
|
|
|
|
|
|
postPatch = ''
|
2010-05-07 22:08:37 +02:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = if useDocs then "rm -rf $out/share/doc/${name}/{html,src}" else "";
|
|
|
|
|
2010-07-31 15:05:46 +02:00
|
|
|
meta = with stdenv.lib; {
|
2010-05-07 22:08:37 +02:00
|
|
|
homepage = http://qt.nokia.com/products;
|
|
|
|
description = "A cross-platform application framework for C++";
|
|
|
|
license = "GPL/LGPL";
|
2010-07-31 15:05:46 +02:00
|
|
|
maintainers = with maintainers; [ urkud sander ];
|
|
|
|
platforms = platforms.mesaPlatforms;
|
2010-05-07 22:08:37 +02:00
|
|
|
priority = 10;
|
|
|
|
};
|
|
|
|
}
|