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