![Karn Kallio](/assets/img/avatar_default.png)
In the pygobject package of pythonPackages the codegen python files are executable and get wrapped, which causes pygtk to not build because it uses the python program to execute them. The attached patch makes them not executable so they do not get wrapped and cause pygtk to fail its build. From 931b7998658fa72323c9a76e7b336fe726a9cc61 Mon Sep 17 00:00:00 2001 From: Karn Kallio <kkallio@skami.org> Date: Fri, 2 Sep 2016 15:30:42 -0400 Subject: [PATCH] pygobject: prevent wrapping of codegen/*.py files.
41 lines
1.2 KiB
Nix
41 lines
1.2 KiB
Nix
{ stdenv, fetchurl, python, mkPythonDerivation, pkgconfig, glib }:
|
|
|
|
mkPythonDerivation rec {
|
|
name = "pygobject-2.28.6";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnome/sources/pygobject/2.28/${name}.tar.xz";
|
|
sha256 = "1f5dfxjnil2glfwxnqr14d2cjfbkghsbsn8n04js2c2icr7iv2pv";
|
|
};
|
|
|
|
outputs = [ "out" "docdev" ];
|
|
|
|
patches = [
|
|
# Fix warning spam
|
|
./pygobject-2.28.6-set_qdata.patch
|
|
./pygobject-2.28.6-gio-types-2.32.patch
|
|
];
|
|
|
|
configureFlags = "--disable-introspection";
|
|
|
|
buildInputs = [ pkgconfig glib ];
|
|
|
|
# in a "normal" setup, pygobject and pygtk are installed into the
|
|
# same site-packages: we need a pth file for both. pygtk.py would be
|
|
# used to select a specific version, in our setup it should have no
|
|
# effect, but we leave it in case somebody expects and calls it.
|
|
postInstall = ''
|
|
mv $out/lib/${python.libPrefix}/site-packages/{pygtk.pth,${name}.pth}
|
|
|
|
# Prevent wrapping of codegen files as these are meant to be
|
|
# executed by the python program
|
|
chmod a-x $out/share/pygobject/*/codegen/*.py
|
|
'';
|
|
|
|
meta = {
|
|
homepage = http://live.gnome.org/PyGObject;
|
|
description = "Python bindings for Glib";
|
|
platforms = stdenv.lib.platforms.unix;
|
|
};
|
|
}
|