1{ stdenv, fetchurl, python, mkPythonDerivation, pkgconfig, glib }: 2 3mkPythonDerivation rec { 4 name = "pygobject-2.28.6"; 5 6 src = fetchurl { 7 url = "mirror://gnome/sources/pygobject/2.28/${name}.tar.xz"; 8 sha256 = "1f5dfxjnil2glfwxnqr14d2cjfbkghsbsn8n04js2c2icr7iv2pv"; 9 }; 10 11 outputs = [ "out" "docdev" ]; 12 13 patches = [ 14 # Fix warning spam 15 ./pygobject-2.28.6-set_qdata.patch 16 ./pygobject-2.28.6-gio-types-2.32.patch 17 ]; 18 19 configureFlags = "--disable-introspection"; 20 21 buildInputs = [ pkgconfig glib ]; 22 23 # in a "normal" setup, pygobject and pygtk are installed into the 24 # same site-packages: we need a pth file for both. pygtk.py would be 25 # used to select a specific version, in our setup it should have no 26 # effect, but we leave it in case somebody expects and calls it. 27 postInstall = '' 28 mv $out/lib/${python.libPrefix}/site-packages/{pygtk.pth,${name}.pth} 29 ''; 30 31 meta = { 32 homepage = http://live.gnome.org/PyGObject; 33 description = "Python bindings for Glib"; 34 platforms = stdenv.lib.platforms.unix; 35 }; 36}