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