2021-01-24 00:29:22 +00:00
|
|
|
{ lib, stdenv, fetchurl, python, buildPythonPackage, pkg-config, glib, isPy3k, pythonAtLeast }:
|
2007-05-13 21:12:13 +01:00
|
|
|
|
2017-03-21 12:01:17 +00:00
|
|
|
buildPythonPackage rec {
|
2017-11-09 11:26:09 +00:00
|
|
|
pname = "pygobject";
|
2019-12-13 22:55:40 +00:00
|
|
|
version = "2.28.7";
|
2017-03-21 20:58:57 +00:00
|
|
|
format = "other";
|
2021-01-04 02:59:48 +00:00
|
|
|
disabled = pythonAtLeast "3.9";
|
2016-09-04 08:39:17 +01:00
|
|
|
|
2007-05-13 21:12:13 +01:00
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "mirror://gnome/sources/pygobject/2.28/${pname}-${version}.tar.xz";
|
2019-12-13 22:55:40 +00:00
|
|
|
sha256 = "0nkam61rsn7y3wik3vw46wk5q2cjfh2iph57hl9m39rc8jijb7dv";
|
2007-05-13 21:12:13 +01:00
|
|
|
};
|
|
|
|
|
2016-09-01 10:07:23 +01:00
|
|
|
outputs = [ "out" "devdoc" ];
|
2015-07-26 12:43:49 +01:00
|
|
|
|
2021-01-24 00:29:22 +00:00
|
|
|
patches = lib.optionals stdenv.isDarwin [
|
2019-01-27 13:55:58 +00:00
|
|
|
./pygobject-2.0-fix-darwin.patch
|
2016-04-16 04:23:57 +01:00
|
|
|
];
|
|
|
|
|
2018-07-25 22:44:21 +01:00
|
|
|
configureFlags = [ "--disable-introspection" ];
|
2010-10-18 23:55:20 +01:00
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2017-09-05 22:26:13 +01:00
|
|
|
buildInputs = [ glib ];
|
2016-05-14 02:04:41 +01:00
|
|
|
|
2013-01-11 15:11:07 +00:00
|
|
|
# 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.
|
2021-01-24 00:29:22 +00:00
|
|
|
postInstall = lib.optionalString (!isPy3k) ''
|
2019-08-15 13:41:18 +01:00
|
|
|
mv $out/lib/${python.libPrefix}/site-packages/{pygtk.pth,${pname}-${version}.pth}
|
2016-09-02 20:34:25 +01:00
|
|
|
|
|
|
|
# Prevent wrapping of codegen files as these are meant to be
|
|
|
|
# executed by the python program
|
|
|
|
chmod a-x $out/share/pygobject/*/codegen/*.py
|
2013-01-11 15:11:07 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-24 00:29:22 +00:00
|
|
|
meta = with lib; {
|
2019-12-13 22:55:40 +00:00
|
|
|
homepage = "https://pygobject.readthedocs.io/";
|
|
|
|
description = "Python bindings for GLib";
|
2021-01-24 00:29:22 +00:00
|
|
|
platforms = platforms.unix;
|
2010-10-18 23:55:20 +01:00
|
|
|
};
|
2007-05-13 21:12:13 +01:00
|
|
|
}
|