2010-06-21 17:06:08 +00:00
|
|
|
{ stdenv, fetchurl
|
2011-07-18 09:18:38 +00:00
|
|
|
, alsaLib, pulseaudio
|
2010-05-07 20:08:37 +00:00
|
|
|
, libXft, libXrender, randrproto, xextproto, libXinerama, xineramaproto, libXcursor, libXmu
|
|
|
|
, libXv, libXext, libXfixes, inputproto, fixesproto, libXrandr, freetype, fontconfig
|
2010-07-30 19:45:07 +00:00
|
|
|
, zlib, libjpeg, libpng, libmng, which, mesa, openssl, dbus, cups, pkgconfig, libtiff, glib
|
2010-05-07 20:08:37 +00:00
|
|
|
, mysql, postgresql, sqlite
|
|
|
|
, perl, coreutils, libXi
|
2011-07-07 12:13:16 +00:00
|
|
|
, buildDemos ? false, buildExamples ? false, useDocs ? false
|
|
|
|
}:
|
2010-05-07 20:08:37 +00:00
|
|
|
|
2010-07-30 19:45:07 +00:00
|
|
|
let
|
2011-10-02 07:28:11 +00:00
|
|
|
v = "4.7.4";
|
2010-07-30 19:45:07 +00:00
|
|
|
in
|
|
|
|
|
2010-05-07 20:08:37 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2010-07-30 19:45:07 +00:00
|
|
|
name = "qt-${v}";
|
2010-07-31 13:05:22 +00:00
|
|
|
|
2010-05-07 20:08:37 +00:00
|
|
|
src = fetchurl {
|
2010-07-30 19:45:07 +00:00
|
|
|
url = "ftp://ftp.qt.nokia.com/qt/source/qt-everywhere-opensource-src-${v}.tar.gz";
|
2011-10-02 07:28:11 +00:00
|
|
|
sha256 = "07i283si8rckdsg3h9a4sp213l16hgjrl7cpzclrjvx4x2y5w6cp";
|
2010-05-07 20:08:37 +00:00
|
|
|
};
|
2010-07-31 13:05:22 +00:00
|
|
|
|
2011-07-07 12:13:16 +00:00
|
|
|
preConfigure =
|
|
|
|
''
|
|
|
|
export LD_LIBRARY_PATH="`pwd`/lib:$LD_LIBRARY_PATH"
|
2011-07-07 19:56:01 +00:00
|
|
|
configureFlags+="
|
|
|
|
-docdir $out/share/doc/${name}
|
|
|
|
-plugindir $out/lib/qt4/plugins
|
|
|
|
-importdir $out/lib/qt4/imports
|
|
|
|
-examplesdir $out/share/doc/${name}/examples
|
|
|
|
-demosdir $out/share/doc/${name}/demos
|
|
|
|
-datadir $out/share/${name}
|
|
|
|
-translationdir $out/share/${name}/translations
|
|
|
|
"
|
2011-07-07 12:13:16 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags =
|
|
|
|
''
|
|
|
|
-v -no-separate-debug-info -release -fast -confirm-license -opensource
|
|
|
|
-system-zlib -system-libpng -system-libjpeg -qt-gif -system-libmng
|
|
|
|
-opengl -xrender -xrandr -xinerama -xcursor
|
|
|
|
-plugin-sql-mysql -system-sqlite
|
|
|
|
-qdbus -cups -glib -xfixes -dbus-linked -openssl-linked
|
|
|
|
-fontconfig -I${freetype}/include/freetype2
|
|
|
|
-exceptions -xmlpatterns
|
2011-07-18 09:18:38 +00:00
|
|
|
-multimedia -audio-backend -no-phonon
|
2011-07-07 12:13:16 +00:00
|
|
|
-webkit -javascript-jit
|
|
|
|
-make libs -make tools -make translations
|
|
|
|
${if buildDemos == true then "-make demos" else "-nomake demos"}
|
|
|
|
${if buildExamples == true then "-make examples" else "-nomake examples"}
|
|
|
|
${if useDocs then "-make docs" else "-nomake docs"}
|
|
|
|
'';
|
2010-07-31 13:05:22 +00:00
|
|
|
|
2010-05-07 20:08:37 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
alsaLib
|
|
|
|
sqlite
|
2010-07-31 13:05:22 +00:00
|
|
|
libXft
|
|
|
|
libXrender
|
|
|
|
libXrandr
|
2010-05-07 20:08:37 +00:00
|
|
|
libXi
|
2010-07-31 13:05:22 +00:00
|
|
|
randrproto
|
2010-05-07 20:08:37 +00:00
|
|
|
xextproto
|
2010-07-31 13:05:22 +00:00
|
|
|
libXinerama
|
|
|
|
xineramaproto
|
|
|
|
libXcursor
|
|
|
|
zlib
|
|
|
|
libjpeg
|
2010-07-30 19:45:07 +00:00
|
|
|
libmng
|
2010-07-31 13:05:22 +00:00
|
|
|
mysql
|
2010-05-07 20:08:37 +00:00
|
|
|
postgresql
|
2010-07-31 13:05:22 +00:00
|
|
|
libpng
|
|
|
|
which
|
2010-05-07 20:08:37 +00:00
|
|
|
mesa
|
2010-07-31 13:05:22 +00:00
|
|
|
libXmu
|
2010-05-07 20:08:37 +00:00
|
|
|
libXv
|
2010-07-31 13:05:22 +00:00
|
|
|
openssl
|
|
|
|
dbus.libs
|
|
|
|
cups
|
|
|
|
pkgconfig
|
|
|
|
libXext
|
|
|
|
freetype
|
|
|
|
fontconfig
|
2010-05-07 20:08:37 +00:00
|
|
|
inputproto
|
2010-07-31 13:05:22 +00:00
|
|
|
fixesproto
|
|
|
|
libXfixes
|
|
|
|
glib
|
2010-05-07 20:08:37 +00:00
|
|
|
libtiff
|
|
|
|
pulseaudio
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ perl ];
|
|
|
|
|
|
|
|
prefixKey = "-prefix ";
|
|
|
|
|
2010-10-02 05:24:27 +00:00
|
|
|
prePatch = ''
|
2010-05-07 20:08:37 +00:00
|
|
|
substituteInPlace configure --replace /bin/pwd pwd
|
|
|
|
substituteInPlace src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls
|
2010-10-02 05:24:27 +00:00
|
|
|
sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i config.tests/*/*.test -i mkspecs/*/*.conf
|
2010-05-07 20:08:37 +00:00
|
|
|
'';
|
|
|
|
|
2010-08-10 20:18:51 +00:00
|
|
|
postInstall = ''
|
|
|
|
${if useDocs then "rm -rfv $out/share/doc/${name}/{html,src}" else ""}
|
2011-07-07 12:13:16 +00:00
|
|
|
'';
|
2010-05-07 20:08:37 +00: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 18:51:42 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2010-07-31 13:05:46 +00:00
|
|
|
meta = with stdenv.lib; {
|
2010-05-07 20:08:37 +00:00
|
|
|
homepage = http://qt.nokia.com/products;
|
|
|
|
description = "A cross-platform application framework for C++";
|
|
|
|
license = "GPL/LGPL";
|
2010-07-31 13:05:46 +00:00
|
|
|
maintainers = with maintainers; [ urkud sander ];
|
2010-08-02 21:47:28 +00:00
|
|
|
platforms = platforms.linux;
|
2010-05-07 20:08:37 +00:00
|
|
|
};
|
|
|
|
}
|