2006-09-14 13:24:06 +00:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, xftSupport ? true, libXft ? null
|
|
|
|
, xrenderSupport ? true, libXrender ? null
|
|
|
|
, xrandrSupport ? true, libXrandr ? null, randrproto ? null
|
|
|
|
, xineramaSupport ? true, libXinerama ? null, xineramaproto ? null
|
2005-01-20 14:23:34 +00:00
|
|
|
, threadSupport ? true
|
2006-09-14 13:24:06 +00:00
|
|
|
, mysqlSupport ? true, mysql ? null
|
|
|
|
, openglSupport ? false, mesa ? null, libXmu ? null
|
|
|
|
, x11, zlib, libjpeg, libpng, which
|
2005-01-19 22:51:27 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert xftSupport -> libXft != null;
|
2006-09-14 13:24:06 +00:00
|
|
|
assert xrenderSupport -> xftSupport && libXrender != null;
|
|
|
|
assert xrandrSupport -> libXrandr != null && randrproto != null;
|
2005-01-22 00:19:27 +00:00
|
|
|
assert mysqlSupport -> mysql != null;
|
2006-09-14 13:24:06 +00:00
|
|
|
assert openglSupport -> mesa != null && libXmu != null;
|
2005-01-19 22:51:27 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2006-09-14 13:24:06 +00:00
|
|
|
name = "qt-3.3.6";
|
2005-01-19 22:51:27 +00:00
|
|
|
|
|
|
|
builder = ./builder.sh;
|
2005-02-15 17:44:45 +00:00
|
|
|
hook = ./setup-hook.sh;
|
2005-01-19 22:51:27 +00:00
|
|
|
src = fetchurl {
|
2006-10-12 13:50:54 +00:00
|
|
|
url = http://nix.cs.uu.nl/dist/tarballs/qt-x11-free-3.3.6.tar.bz2;
|
2006-09-14 13:24:06 +00:00
|
|
|
md5 = "dc1384c03ac08af21f6fefab32d982cf";
|
2005-01-19 22:51:27 +00:00
|
|
|
};
|
|
|
|
|
2005-01-20 09:00:08 +00:00
|
|
|
buildInputs = [x11 libXft libXrender zlib libjpeg libpng which];
|
2005-01-19 22:51:27 +00:00
|
|
|
|
2006-09-14 13:24:06 +00:00
|
|
|
configureFlags = "
|
|
|
|
-v
|
|
|
|
-system-zlib -system-libpng -system-libjpeg
|
|
|
|
${if openglSupport then "-dlopen-opengl
|
|
|
|
-L${mesa}/lib -I${mesa}/include
|
|
|
|
-L${libXmu}/lib -I${libXmu}/include" else ""}
|
|
|
|
${if threadSupport then "-thread" else "-no-thread"}
|
|
|
|
${if xrenderSupport then "-xrender -L${libXrender}/lib -I${libXrender}/include" else "-no-xrender"}
|
|
|
|
${if xrandrSupport then "-xrandr
|
|
|
|
-L${libXrandr}/lib -I${libXrandr}/include
|
|
|
|
-I${randrproto}/include" else "-no-xrandr"}
|
|
|
|
${if xineramaSupport then "-xinerama -L${libXinerama}/lib -I${xineramaproto}/include" else "-no-xinerama"}
|
|
|
|
${if mysqlSupport then "-qt-sql-mysql -L${mysql}/lib/mysql -I${mysql}/include/mysql" else ""}
|
|
|
|
${if xftSupport then "-xft
|
|
|
|
-L${libXft}/lib -I${libXft}/include
|
|
|
|
-L${libXft.freetype}/lib -I${libXft.freetype}/include
|
|
|
|
-L${libXft.fontconfig}/lib -I${libXft.fontconfig}/include" else "-no-xft"}
|
|
|
|
";
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Don't strip everything so we can get useful backtraces.
|
|
|
|
./strip.patch
|
|
|
|
|
|
|
|
# Build on NixOS.
|
|
|
|
./qt-pwd.patch
|
|
|
|
|
|
|
|
# randr.h and Xrandr.h need not be in the same prefix.
|
|
|
|
./xrandr.patch
|
|
|
|
];
|
2006-09-14 13:30:47 +00:00
|
|
|
|
|
|
|
passthru = {inherit mysqlSupport;};
|
2005-01-19 22:51:27 +00:00
|
|
|
}
|