2007-05-31 15:02:16 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, gtk, libXinerama, libSM, libXxf86vm, xf86vidmodeproto
|
|
|
|
, compat22 ? false, compat24 ? true, unicode ? true
|
|
|
|
}:
|
2005-10-19 16:15:37 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2007-05-02 16:29:57 +01:00
|
|
|
name = "wxGTK-2.6.4";
|
2005-10-19 16:15:37 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2007-08-27 14:01:33 +01:00
|
|
|
url = mirror://sourceforge/wxwindows/wxGTK-2.6.4.tar.gz;
|
2007-05-02 16:29:57 +01:00
|
|
|
sha256 = "1yilzg9qxvdpqhhd3sby1w9pj00k7jqw0ikmwyhh5jmaqnnnrb2x";
|
2005-10-19 16:15:37 +01:00
|
|
|
};
|
|
|
|
|
2011-09-20 07:22:39 +01:00
|
|
|
buildInputs = [ gtk libXinerama libSM libXxf86vm xf86vidmodeproto ];
|
|
|
|
|
|
|
|
buildNativeInputs = [ pkgconfig ];
|
2005-10-19 16:15:37 +01:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-gtk2"
|
|
|
|
(if compat22 then "--enable-compat22" else "--disable-compat22")
|
2007-05-31 15:02:16 +01:00
|
|
|
(if compat24 then "--enable-compat24" else "--disable-compat24")
|
2005-10-19 16:15:37 +01:00
|
|
|
"--disable-precomp-headers"
|
2006-07-11 08:55:52 +01:00
|
|
|
(if unicode then "--enable-unicode" else "")
|
2005-10-19 16:15:37 +01:00
|
|
|
];
|
|
|
|
|
2007-05-31 15:02:16 +01:00
|
|
|
# This variable is used by configure to find some dependencies.
|
|
|
|
SEARCH_INCLUDE =
|
|
|
|
"${libXinerama}/include ${libSM}/include ${libXxf86vm}/include";
|
|
|
|
|
|
|
|
# Work around a bug in configure.
|
|
|
|
NIX_CFLAGS_COMPILE = "-DHAVE_X11_XLIB_H=1";
|
|
|
|
|
|
|
|
preConfigure = "
|
|
|
|
substituteInPlace configure --replace 'SEARCH_INCLUDE=' 'DUMMY_SEARCH_INCLUDE='
|
|
|
|
substituteInPlace configure --replace /usr /no-such-path
|
|
|
|
";
|
|
|
|
|
2006-12-13 20:30:09 +00:00
|
|
|
postBuild = "(cd contrib/src && make)";
|
2007-05-02 16:29:57 +01:00
|
|
|
postInstall = "
|
|
|
|
(cd contrib/src && make install)
|
|
|
|
(cd $out/include && ln -s wx-*/* .)
|
|
|
|
";
|
2006-12-13 20:30:09 +00:00
|
|
|
|
2007-05-31 15:02:16 +01:00
|
|
|
passthru = {inherit gtk compat22 compat24 unicode;};
|
2005-10-19 16:15:37 +01:00
|
|
|
}
|