Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 45 lines 1.4 kB view raw
1{ stdenv, fetchurl, python, buildPythonPackage, pkgconfig, glib }: 2 3buildPythonPackage rec { 4 pname = "pygobject"; 5 version = "2.28.6"; 6 format = "other"; 7 8 src = fetchurl { 9 url = "mirror://gnome/sources/pygobject/2.28/${pname}-${version}.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 ] ++ stdenv.lib.optionals stdenv.isDarwin [ 20 ./pygobject-2.0-fix-darwin.patch 21 ]; 22 23 configureFlags = [ "--disable-introspection" ]; 24 25 nativeBuildInputs = [ pkgconfig ]; 26 buildInputs = [ glib ]; 27 28 # in a "normal" setup, pygobject and pygtk are installed into the 29 # same site-packages: we need a pth file for both. pygtk.py would be 30 # used to select a specific version, in our setup it should have no 31 # effect, but we leave it in case somebody expects and calls it. 32 postInstall = '' 33 mv $out/lib/${python.libPrefix}/site-packages/{pygtk.pth,${pname}-${version}.pth} 34 35 # Prevent wrapping of codegen files as these are meant to be 36 # executed by the python program 37 chmod a-x $out/share/pygobject/*/codegen/*.py 38 ''; 39 40 meta = { 41 homepage = http://live.gnome.org/PyGObject; 42 description = "Python bindings for Glib"; 43 platforms = stdenv.lib.platforms.unix; 44 }; 45}