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-08-02 19:18:56 +02:00
|
|
|
-make libs -make tools -make translations
|
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
|
|
|
|
'';
|
|
|
|
|
2010-08-10 22:18:51 +02:00
|
|
|
postInstall = ''
|
|
|
|
${if useDocs then "rm -rfv $out/share/doc/${name}/{html,src}" else ""}
|
2010-08-11 10:20:23 +02:00
|
|
|
ln -sv phonon $out/include/Phonon'';
|
2010-05-07 22:08:37 +02:00
|
|
|
|
Enable parallel building of gcc, glibc, gmp, mpfr, ncurses, coreutils, perl, python, git, and qt4.
If a build expressions has set "enableParallelBuilding = true", then the
generic builder may utilize more than one CPU core to build that particular
expression. This feature works out of the box for GNU Make. Expressions that
use other build drivers like Boost.Jam or SCons have to specify appropriate
flags such as "-j${NIX_BUILD_CORES}" themselves.
svn path=/nixpkgs/trunk/; revision=23042
2010-08-08 20:51:42 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
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 ];
|
2010-08-02 23:47:28 +02:00
|
|
|
platforms = platforms.linux;
|
2010-05-07 22:08:37 +02:00
|
|
|
priority = 10;
|
|
|
|
};
|
|
|
|
}
|