2006-09-14 13:24:06 +00:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, xftSupport ? true, libXft ? null
|
|
|
|
, xrenderSupport ? true, libXrender ? null
|
|
|
|
, xrandrSupport ? true, libXrandr ? null, randrproto ? null
|
2009-11-03 21:55:53 +00:00
|
|
|
, xineramaSupport ? true, libXinerama ? null
|
2007-03-26 18:15:32 +00:00
|
|
|
, cursorSupport ? true, libXcursor ? null
|
2005-01-20 14:23:34 +00:00
|
|
|
, threadSupport ? true
|
2012-01-07 17:06:49 +00:00
|
|
|
, mysqlSupport ? false, mysql ? null
|
2018-02-24 13:12:44 +00:00
|
|
|
, openglSupport ? false, libGLU_combined ? null, libXmu ? null
|
2015-09-15 09:13:22 +00:00
|
|
|
, xlibsWrapper, xextproto, 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;
|
2007-03-26 18:15:32 +00:00
|
|
|
assert cursorSupport -> libXcursor != null;
|
2005-01-22 00:19:27 +00:00
|
|
|
assert mysqlSupport -> mysql != null;
|
2018-02-24 13:12:44 +00:00
|
|
|
assert openglSupport -> libGLU_combined != null && libXmu != null;
|
2005-01-19 22:51:27 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2007-03-26 13:39:50 +00:00
|
|
|
name = "qt-3.3.8";
|
2005-01-19 22:51:27 +00:00
|
|
|
|
|
|
|
builder = ./builder.sh;
|
2009-04-23 13:31:10 +00:00
|
|
|
|
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
|
2005-01-19 22:51:27 +00:00
|
|
|
src = fetchurl {
|
2016-07-16 15:39:03 +00:00
|
|
|
url = http://download.qt.io/archive/qt/3/qt-x11-free-3.3.8.tar.bz2;
|
2007-03-26 13:39:50 +00:00
|
|
|
sha256 = "0jd4g3bwkgk2s4flbmgisyihm7cam964gzb3pawjlkhas01zghz8";
|
2005-01-19 22:51:27 +00:00
|
|
|
};
|
|
|
|
|
2012-12-28 18:20:09 +00:00
|
|
|
nativeBuildInputs = [ which ];
|
2018-07-24 20:25:18 +00:00
|
|
|
buildInputs = [
|
|
|
|
xextproto
|
|
|
|
] ++ stdenv.lib.optionals openglSupport [
|
|
|
|
libGLU_combined libXmu
|
|
|
|
] ++ stdenv.lib.optionals xftSupport [
|
|
|
|
libXft libXft.freetype libXft.fontconfig
|
|
|
|
] ++ stdenv.lib.optional xrenderSupport libXrender
|
|
|
|
++ stdenv.lib.optional xineramaSupport libXinerama
|
|
|
|
++ stdenv.lib.optional xrandrSupport libXrandr
|
|
|
|
++ stdenv.lib.optional xineramaSupport libXinerama;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ libpng xlibsWrapper libXft libXrender zlib libjpeg ];
|
2005-01-19 22:51:27 +00:00
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-02-12 15:10:52 +00:00
|
|
|
|
2018-07-24 20:25:18 +00:00
|
|
|
configurePlatforms = [];
|
|
|
|
configureFlags = let
|
|
|
|
mk = cond: name: "-${stdenv.lib.optionalString cond "no-"}${name}";
|
|
|
|
in [
|
|
|
|
"-v"
|
|
|
|
"-system-zlib" "-system-libpng" "-system-libjpeg"
|
|
|
|
"-qt-gif"
|
|
|
|
(mk xftSupport "xft")
|
|
|
|
(mk xrenderSupport "xrender")
|
|
|
|
(mk xrandrSupport "xrandr")
|
|
|
|
(mk xineramaSupport "xinerama")
|
|
|
|
(mk threadSupport "thread")
|
|
|
|
] ++ stdenv.lib.optionals mysqlSupport [
|
|
|
|
"-qt-sql-mysql"
|
|
|
|
"-L${mysql.connector-c}/lib/mysql"
|
|
|
|
"-I${mysql.connector-c}/include/mysql"
|
|
|
|
] ++ stdenv.lib.optional openglSupport "-dlopen-opengl";
|
2006-09-14 13:24:06 +00:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Don't strip everything so we can get useful backtraces.
|
|
|
|
./strip.patch
|
2013-06-25 07:17:34 +00:00
|
|
|
|
2006-09-14 13:24:06 +00:00
|
|
|
# Build on NixOS.
|
|
|
|
./qt-pwd.patch
|
2013-06-25 07:17:34 +00:00
|
|
|
|
2006-09-14 13:24:06 +00:00
|
|
|
# randr.h and Xrandr.h need not be in the same prefix.
|
|
|
|
./xrandr.patch
|
2012-02-26 21:27:15 +00:00
|
|
|
|
|
|
|
# Make it build with gcc 4.6.0
|
|
|
|
./qt3-gcc4.6.0.patch
|
2006-09-14 13:24:06 +00:00
|
|
|
];
|
2006-09-14 13:30:47 +00:00
|
|
|
|
|
|
|
passthru = {inherit mysqlSupport;};
|
2016-08-02 16:06:29 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
2005-01-19 22:51:27 +00:00
|
|
|
}
|