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