anchor.diff:      gtk_2
       libglade
       pango
  -    #python2Packages.numpy
  -    python2Packages.pycairo
  -    python2Packages.pygobject_2
  -    python2Packages.python
  -    python2Packages.wrapPython
  +    pycairo
  +    pygobject_2
  +    python
  +    wrapPython
     ];
  +
  +  postPatch = ''
  +    sed -i configure.ac \
  +      -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/'
  +  '';
  +
  +  autoreconfPhase = ''
  +    # autoreconfHook doesn't use $ACLOCAL_FLAGS so it must be run manually
  +    aclocal --force -I m4/
  +    libtoolize --copy --force
  +    autoheader
  +    automake --force-missing --add-missing
  +    autoconf --force
  +  '';
   
     postInstall = ''
       rm -v $out/bin/pygtk-codegen-2.0
       ln -sv \
  -      ${python2Packages.pygobject_2}/bin/pygobject-codegen-2.0  \
  +      ${pygobject_2}/bin/pygobject-codegen-2.0  \
         $out/bin/pygtk-codegen-2.0
       ln -sv \
  -      ${python2Packages.pygobject_2}/lib/${python2Packages.python.libPrefix}/site-packages/${python2Packages.pygobject_2.name}.pth \
  -      $out/lib/${python2Packages.python.libPrefix}/site-packages/${name}.pth
  +      ${pygobject_2}/lib/${python.libPrefix}/site-packages/${pygobject_2.name}.pth \
  +      $out/lib/${python.libPrefix}/site-packages/${name}.pth
     '';
   
  -  checkPhase = ''
  +  preCheck = ''
       sed -i tests/common.py \
         -e "s/glade = importModule('gtk.glade', buildDir)//" \
         -e "s/sys.path.insert(0, os.path.join(buildDir, 'gtk'))//" \
  
positive.code: { stdenv
  , fetchurl
  , isPy3k
  , lib
  
  , atk
  , glib
  , gtk_2
  , libglade
  , pango
  , python2Packages
  #, pygobject
  #, pycairo
  }:
  
  stdenv.mkDerivation rec {
    name = "pygtk-2.24.0";
  
    src = fetchurl {
      url = "mirror://gnome/sources/pygtk/2.24/${name}.tar.bz2";
      sha256 = "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d";
    };
  
    propagatedBuildInputs = [
      atk
  
negative.code:       -e "s/, glade$//" \
        -e "s/.*testGlade.*//" \
        -e "s/.*(glade.*//"
    '';
  
    # XXX: TypeError: Unsupported type: <class 'gtk._gtk.WindowType'>
    doCheck = false;
  
    meta = with lib; {
      description = "GTK+2 bindings for Python";
  