@@ -0,0 +1,40 @@
1+{ stdenv, fetchurl, buildPythonPackage, pkgconfig, glib, gobject-introspection,
2+pycairo, cairo, which, ncurses, meson, ninja, isPy3k, gnome3 }:
3+
4+buildPythonPackage rec {
5+ pname = "pygobject";
6+ version = "3.36.1";
7+
8+ format = "other";
9+
10+ src = fetchurl {
11+ url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
12+ sha256 = "0b9CgC0c7BE7Wtqg579/N0W0RSHcIWNYjSdtXNYdcY8=";
13+ };
14+
15+ outputs = [ "out" "dev" ];
16+
17+ mesonFlags = [
18+ "-Dpython=python${if isPy3k then "3" else "2" }"
19+ ];
20+
21+ nativeBuildInputs = [ pkgconfig meson ninja gobject-introspection ];
22+ buildInputs = [ glib gobject-introspection ]
23+ ++ stdenv.lib.optionals stdenv.isDarwin [ which ncurses ];
24+ propagatedBuildInputs = [ pycairo cairo ];
25+
26+ passthru = {
27+ updateScript = gnome3.updateScript {
28+ packageName = pname;
29+ attrPath = "python3.pkgs.${pname}3";
30+ };
31+ };
32+
33+ meta = with stdenv.lib; {
34+ homepage = "https://pygobject.readthedocs.io/";
35+ description = "Python bindings for Glib";
36+ license = licenses.gpl2;
37+ maintainers = with maintainers; [ orivej ];
38+ platforms = platforms.unix;
39+ };
40+}