2010-06-21 19:06:08 +02:00
|
|
|
{ stdenv, fetchurl
|
2009-08-15 16:02:49 +02:00
|
|
|
, 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}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2009-10-02 16:59:17 +02:00
|
|
|
name = "qt-4.5.3";
|
2009-08-15 16:02:49 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2009-10-02 17:37:12 +02:00
|
|
|
url = ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.5.3.tar.gz;
|
2009-10-02 16:59:17 +02:00
|
|
|
sha256 = "19ls11m5skcjfgrfcidwqdm72kl7qrbj4hdl1nbmcdaxh91gr1qc";
|
2009-08-15 16:02:49 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
libXft
|
|
|
|
libXrender
|
|
|
|
libXrandr
|
|
|
|
randrproto
|
|
|
|
xextproto
|
|
|
|
libXinerama
|
|
|
|
xineramaproto
|
|
|
|
libXcursor
|
|
|
|
zlib
|
|
|
|
libjpeg
|
|
|
|
mysql
|
|
|
|
libpng
|
|
|
|
which
|
|
|
|
mesa
|
|
|
|
libXmu
|
|
|
|
openssl
|
|
|
|
dbus.libs
|
|
|
|
cups
|
|
|
|
pkgconfig
|
|
|
|
libXext
|
|
|
|
freetype
|
|
|
|
fontconfig
|
|
|
|
inputproto
|
|
|
|
fixesproto
|
|
|
|
libXfixes
|
|
|
|
glib
|
|
|
|
libtiff
|
|
|
|
];
|
|
|
|
|
2010-01-17 15:01:47 +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-08-15 16:02:49 +02:00
|
|
|
prefixKey = "-prefix ";
|
2009-09-08 11:50:06 +02:00
|
|
|
|
2009-08-15 16:02:49 +02:00
|
|
|
configureFlags = ''
|
|
|
|
-v -no-separate-debug-info -release
|
|
|
|
-system-zlib -system-libpng -system-libjpeg -fast
|
2009-09-08 11:50:06 +02:00
|
|
|
-qt-gif -confirm-license -opensource
|
2009-08-15 16:02:49 +02:00
|
|
|
-opengl -xrender -xrandr -xinerama -xcursor -qt-sql-mysql
|
|
|
|
-qdbus -cups -glib -xfixes -dbus-linked
|
|
|
|
-fontconfig -I${freetype}/include/freetype2
|
|
|
|
${if buildDemos == true then "" else "-nomake demos"}
|
|
|
|
${if buildExamples == true then "" else "-nomake examples"}
|
|
|
|
'';
|
2009-08-15 16:17:16 +02:00
|
|
|
|
2009-08-15 16:02:49 +02:00
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace configure --replace /bin/pwd pwd
|
|
|
|
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 ""}
|
|
|
|
'';
|
|
|
|
|
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;
|
|
|
|
|
2009-08-15 16:02:49 +02:00
|
|
|
meta = {
|
|
|
|
homepage = http://www.qtsoftware.com/downloads/opensource/appdev/linux-x11-cpp;
|
|
|
|
description = "A cross-platform application framework for C++";
|
2009-12-23 22:29:27 +01:00
|
|
|
license = "GPL/LGPL";
|
2010-06-21 19:06:08 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.sander ];
|
|
|
|
platforms = stdenv.lib.platforms.mesaPlatforms;
|
2009-08-15 16:02:49 +02:00
|
|
|
};
|
|
|
|
}
|