2007-05-31 16:02:16 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, gtk, libXinerama, libSM, libXxf86vm, xf86vidmodeproto
|
|
|
|
, compat22 ? false, compat24 ? true, unicode ? true
|
|
|
|
}:
|
2005-10-19 17:15:37 +02:00
|
|
|
|
|
|
|
assert pkgconfig != null && gtk != null;
|
|
|
|
assert gtk.libtiff != null;
|
|
|
|
assert gtk.libjpeg != null;
|
|
|
|
assert gtk.libpng != null;
|
|
|
|
assert gtk.libpng.zlib != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2007-05-02 17:29:57 +02:00
|
|
|
name = "wxGTK-2.6.4";
|
2005-10-19 17:15:37 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2007-08-27 15:01:33 +02:00
|
|
|
url = mirror://sourceforge/wxwindows/wxGTK-2.6.4.tar.gz;
|
2007-05-02 17:29:57 +02:00
|
|
|
sha256 = "1yilzg9qxvdpqhhd3sby1w9pj00k7jqw0ikmwyhh5jmaqnnnrb2x";
|
2005-10-19 17:15:37 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pkgconfig gtk gtk.libtiff gtk.libjpeg gtk.libpng gtk.libpng.zlib
|
2007-05-31 16:02:16 +02:00
|
|
|
libXinerama libSM libXxf86vm xf86vidmodeproto
|
2005-10-19 17:15:37 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-gtk2"
|
|
|
|
(if compat22 then "--enable-compat22" else "--disable-compat22")
|
2007-05-31 16:02:16 +02:00
|
|
|
(if compat24 then "--enable-compat24" else "--disable-compat24")
|
2005-10-19 17:15:37 +02:00
|
|
|
"--disable-precomp-headers"
|
2006-07-11 09:55:52 +02:00
|
|
|
(if unicode then "--enable-unicode" else "")
|
2005-10-19 17:15:37 +02:00
|
|
|
];
|
|
|
|
|
2007-05-31 16:02:16 +02: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 21:30:09 +01:00
|
|
|
postBuild = "(cd contrib/src && make)";
|
2007-05-02 17:29:57 +02:00
|
|
|
postInstall = "
|
|
|
|
(cd contrib/src && make install)
|
|
|
|
(cd $out/include && ln -s wx-*/* .)
|
|
|
|
";
|
2006-12-13 21:30:09 +01:00
|
|
|
|
2007-05-31 16:02:16 +02:00
|
|
|
passthru = {inherit gtk compat22 compat24 unicode;};
|
2005-10-19 17:15:37 +02:00
|
|
|
}
|