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
|
2011-07-07 14:13:16 +02:00
|
|
|
, buildDemos ? false, buildExamples ? false, useDocs ? false
|
|
|
|
}:
|
2010-05-07 22:08:37 +02:00
|
|
|
|
2010-07-30 21:45:07 +02:00
|
|
|
let
|
2011-07-07 14:13:16 +02:00
|
|
|
v = "4.7.3";
|
2010-07-30 21:45:07 +02:00
|
|
|
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";
|
2011-07-07 14:13:16 +02:00
|
|
|
sha256 = "0zlk0lcrkhi8wdb5j2lqz3nclk07blbiial7lzs03708kpb6yayh";
|
2010-05-07 22:08:37 +02:00
|
|
|
};
|
2010-07-31 15:05:22 +02:00
|
|
|
|
2011-07-07 14:13:16 +02:00
|
|
|
preConfigure =
|
|
|
|
''
|
|
|
|
export LD_LIBRARY_PATH="`pwd`/lib:$LD_LIBRARY_PATH"
|
|
|
|
'';
|
|
|
|
|
|
|
|
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
|
|
|
|
-multimedia -audio-backend -phonon -phonon-backend
|
|
|
|
-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-05-07 22:08:37 +02:00
|
|
|
-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
|
2010-09-03 19:40:49 +02:00
|
|
|
-datadir $out/share/${name}
|
|
|
|
-translationdir $out/share/${name}/translations
|
2011-07-07 14:13:16 +02:00
|
|
|
'';
|
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 ";
|
|
|
|
|
2010-10-02 07:24:27 +02:00
|
|
|
prePatch = ''
|
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
|
2010-10-02 07:24:27 +02:00
|
|
|
sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i config.tests/*/*.test -i mkspecs/*/*.conf
|
2010-05-07 22:08:37 +02:00
|
|
|
'';
|
|
|
|
|
2010-08-10 22:18:51 +02:00
|
|
|
postInstall = ''
|
|
|
|
${if useDocs then "rm -rfv $out/share/doc/${name}/{html,src}" else ""}
|
2011-07-07 14:13:16 +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
|
|
|
};
|
|
|
|
}
|