2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl
|
2006-09-14 14:24:06 +01:00
|
|
|
, xftSupport ? true, libXft ? null
|
|
|
|
, xrenderSupport ? true, libXrender ? null
|
2018-12-31 03:40:47 +00:00
|
|
|
, xrandrSupport ? true, libXrandr ? null
|
2009-11-03 21:55:53 +00:00
|
|
|
, xineramaSupport ? true, libXinerama ? null
|
2007-03-26 19:15:32 +01:00
|
|
|
, cursorSupport ? true, libXcursor ? null
|
2005-01-20 14:23:34 +00:00
|
|
|
, threadSupport ? true
|
2019-08-17 19:24:29 +01:00
|
|
|
, mysqlSupport ? false, libmysqlclient ? null
|
2021-01-23 17:15:07 +00:00
|
|
|
, libGLSupported ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
|
|
|
|
, openglSupport ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
|
2019-11-10 16:44:34 +00:00
|
|
|
, libGL ? null, libGLU ? null, libXmu ? null
|
2018-12-31 03:40:47 +00:00
|
|
|
, xlibsWrapper, xorgproto, zlib, libjpeg, libpng, which
|
2005-01-19 22:51:27 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert xftSupport -> libXft != null;
|
2006-09-14 14:24:06 +01:00
|
|
|
assert xrenderSupport -> xftSupport && libXrender != null;
|
2018-12-31 03:40:47 +00:00
|
|
|
assert xrandrSupport -> libXrandr != null;
|
2007-03-26 19:15:32 +01:00
|
|
|
assert cursorSupport -> libXcursor != null;
|
2019-08-17 19:24:29 +01:00
|
|
|
assert mysqlSupport -> libmysqlclient != null;
|
2019-11-10 16:44:34 +00:00
|
|
|
assert openglSupport -> libGL != null && libGLU != null && libXmu != null;
|
2005-01-19 22:51:27 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2007-03-26 14:39:50 +01:00
|
|
|
name = "qt-3.3.8";
|
2005-01-19 22:51:27 +00:00
|
|
|
|
|
|
|
builder = ./builder.sh;
|
2009-04-23 14:31:10 +01:00
|
|
|
|
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
|
2005-01-19 22:51:27 +00:00
|
|
|
src = fetchurl {
|
2020-04-01 02:11:51 +01:00
|
|
|
url = "http://download.qt.io/archive/qt/3/qt-x11-free-3.3.8.tar.bz2";
|
2007-03-26 14:39:50 +01:00
|
|
|
sha256 = "0jd4g3bwkgk2s4flbmgisyihm7cam964gzb3pawjlkhas01zghz8";
|
2005-01-19 22:51:27 +00:00
|
|
|
};
|
|
|
|
|
2012-12-28 18:20:09 +00:00
|
|
|
nativeBuildInputs = [ which ];
|
2015-09-15 10:13:22 +01:00
|
|
|
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-08-31 22:24:28 +01:00
|
|
|
configureFlags = let
|
2021-01-21 17:00:13 +00:00
|
|
|
mk = cond: name: "-${lib.optionalString (!cond) "no-"}${name}";
|
2018-08-31 22:24:28 +01:00
|
|
|
in [
|
|
|
|
"-v"
|
|
|
|
"-system-zlib" "-system-libpng" "-system-libjpeg"
|
|
|
|
"-qt-gif"
|
2018-12-31 03:40:47 +00:00
|
|
|
"-I${xorgproto}/include"
|
2018-08-31 22:24:28 +01:00
|
|
|
(mk threadSupport "thread")
|
|
|
|
(mk xrenderSupport "xrender")
|
|
|
|
(mk xrandrSupport "xrandr")
|
|
|
|
(mk xineramaSupport "xinerama")
|
|
|
|
(mk xrandrSupport "xrandr")
|
|
|
|
(mk xftSupport "xft")
|
2021-01-21 17:00:13 +00:00
|
|
|
] ++ lib.optionals openglSupport [
|
2018-08-31 22:24:28 +01:00
|
|
|
"-dlopen-opengl"
|
2019-11-10 16:44:34 +00:00
|
|
|
"-L${libGL}/lib" "-I${libGLU}/include"
|
2018-08-31 22:24:28 +01:00
|
|
|
"-L${libXmu.out}/lib" "-I${libXmu.dev}/include"
|
2021-01-21 17:00:13 +00:00
|
|
|
] ++ lib.optionals xrenderSupport [
|
2018-08-31 22:24:28 +01:00
|
|
|
"-L${libXrender.out}/lib" "-I${libXrender.dev}/include"
|
2021-01-21 17:00:13 +00:00
|
|
|
] ++ lib.optionals xrandrSupport [
|
2018-08-31 22:24:28 +01:00
|
|
|
"-L${libXrandr.out}/lib" "-I${libXrandr.dev}/include"
|
2021-01-21 17:00:13 +00:00
|
|
|
] ++ lib.optionals xineramaSupport [
|
2018-08-31 22:24:28 +01:00
|
|
|
"-L${libXinerama.out}/lib" "-I${libXinerama.dev}/include"
|
2021-01-21 17:00:13 +00:00
|
|
|
] ++ lib.optionals cursorSupport [
|
2018-08-31 22:24:28 +01:00
|
|
|
"-L${libXcursor.out}/lib -I${libXcursor.dev}/include"
|
2021-01-21 17:00:13 +00:00
|
|
|
] ++ lib.optionals mysqlSupport [
|
2019-08-17 19:24:29 +01:00
|
|
|
"-qt-sql-mysql" "-L${libmysqlclient}/lib/mysql" "-I${libmysqlclient}/include/mysql"
|
2021-01-21 17:00:13 +00:00
|
|
|
] ++ lib.optionals xftSupport [
|
2018-08-31 22:24:28 +01:00
|
|
|
"-L${libXft.out}/lib" "-I${libXft.dev}/include"
|
|
|
|
"-L${libXft.freetype.out}/lib" "-I${libXft.freetype.dev}/include"
|
|
|
|
"-L${libXft.fontconfig.lib}/lib" "-I${libXft.fontconfig.dev}/include"
|
|
|
|
];
|
2006-09-14 14:24:06 +01:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Don't strip everything so we can get useful backtraces.
|
|
|
|
./strip.patch
|
2013-06-25 08:17:34 +01:00
|
|
|
|
2006-09-14 14:24:06 +01:00
|
|
|
# Build on NixOS.
|
|
|
|
./qt-pwd.patch
|
2013-06-25 08:17:34 +01:00
|
|
|
|
2006-09-14 14:24:06 +01: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 14:24:06 +01:00
|
|
|
];
|
2006-09-14 14:30:47 +01:00
|
|
|
|
|
|
|
passthru = {inherit mysqlSupport;};
|
2016-08-02 17:06:29 +01:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2018-10-27 14:02:30 +01:00
|
|
|
license = with licenses; [ gpl2 qpl ];
|
|
|
|
platforms = platforms.linux;
|
2016-08-02 17:06:29 +01:00
|
|
|
};
|
2005-01-19 22:51:27 +00:00
|
|
|
}
|