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