From 150b0712cdbd7669b20233895b32d2f7bbbefdf0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 31 May 2007 14:02:16 +0000 Subject: [PATCH] * Very subtle purity error: on NixOS, wxGTK wasn't being built with Xinerama support. It gets libXinerama as an explicit build input, but it checks for its existence in /usr/X11/include etc. This caused Bittorrent to fail (NIXPKGS-61). Backported the builder fixes from wxGTK 2.8. svn path=/nixpkgs/trunk/; revision=8813 --- .../libraries/wxGTK-2.6/default.nix | 21 ++++++++++++++++--- .../python-modules/wxPython/2.6.nix | 2 +- pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/wxGTK-2.6/default.nix b/pkgs/development/libraries/wxGTK-2.6/default.nix index af43e1918683..98725292ecb3 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 e31b2a2ea75f..6dbf28207508 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 0eb631861e1d..f24cd42cb031 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 {