diff --git a/pkgs/development/libraries/wxGTK-2.6/default.nix b/pkgs/development/libraries/wxGTK-2.6/default.nix index af43e191868..98725292ecb 100644 --- a/pkgs/development/libraries/wxGTK-2.6/default.nix +++ b/pkgs/development/libraries/wxGTK-2.6/default.nix @@ -1,4 +1,6 @@ -{stdenv, fetchurl, pkgconfig, gtk, libXinerama, compat22 ? true, unicode ? true}: +{ stdenv, fetchurl, pkgconfig, gtk, libXinerama, libSM, libXxf86vm, xf86vidmodeproto +, compat22 ? false, compat24 ? true, unicode ? true +}: assert pkgconfig != null && gtk != null; assert gtk.libtiff != null; @@ -16,21 +18,34 @@ stdenv.mkDerivation { buildInputs = [ pkgconfig gtk gtk.libtiff gtk.libjpeg gtk.libpng gtk.libpng.zlib - libXinerama + libXinerama libSM libXxf86vm xf86vidmodeproto ]; configureFlags = [ "--enable-gtk2" (if compat22 then "--enable-compat22" else "--disable-compat22") + (if compat24 then "--enable-compat24" else "--disable-compat24") "--disable-precomp-headers" (if unicode then "--enable-unicode" else "") ]; + # 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 + "; + postBuild = "(cd contrib/src && make)"; postInstall = " (cd contrib/src && make install) (cd $out/include && ln -s wx-*/* .) "; - inherit gtk compat22; + passthru = {inherit gtk compat22 compat24 unicode;}; } diff --git a/pkgs/development/python-modules/wxPython/2.6.nix b/pkgs/development/python-modules/wxPython/2.6.nix index e31b2a2ea75..6dbf2820750 100644 --- a/pkgs/development/python-modules/wxPython/2.6.nix +++ b/pkgs/development/python-modules/wxPython/2.6.nix @@ -1,6 +1,6 @@ {stdenv, fetchurl, pkgconfig, wxGTK, python}: -assert wxGTK.compat22; +assert wxGTK.unicode; stdenv.mkDerivation { name = "wxPython-2.6.3.3"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0eb631861e1..f24cd42cb03 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1705,7 +1705,7 @@ rec { wxGTK26 = import ../development/libraries/wxGTK-2.6 { inherit fetchurl stdenv pkgconfig; inherit (gtkLibs) gtk; - inherit (xlibs) libXinerama; + inherit (xlibs) libXinerama libSM libXxf86vm xf86vidmodeproto; }; wxGTK28 = import ../development/libraries/wxGTK-2.8 {