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