anchor.diff:        -e "s/, glade$//" \
         -e "s/.*testGlade.*//" \
         -e "s/.*(glade.*//"
  -
  -    make check
     '';
   
     # XXX: TypeError: Unsupported type: <class 'gtk._gtk.WindowType'>
  -  # The check phase was not executed in the previous
  -  # non-buildPythonPackage setup - not sure why not.
     doCheck = false;
  -
  -  disabled = isPy3k;
   
     meta = with lib; {
       description = "GTK+2 bindings for Python";
  
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:     gtk_2
      libglade
      pango
      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 \
        ${pygobject_2}/bin/pygobject-codegen-2.0  \
        $out/bin/pygtk-codegen-2.0
      ln -sv \
        ${pygobject_2}/lib/${python.libPrefix}/site-packages/${pygobject_2.name}.pth \
        $out/lib/${python.libPrefix}/site-packages/${name}.pth
    '';
  
    preCheck = ''
      sed -i tests/common.py \
        -e "s/glade = importModule('gtk.glade', buildDir)//" \
        -e "s/sys.path.insert(0, os.path.join(buildDir, 'gtk'))//" \
  