git.iko.soy/typeable/nixpkgs
on master help sign in
python3.pkgs.pygobject2: fix build

2.28.7 no longer installs codegen for Python 3: https://gitlab.gnome.org/GNOME/pygobject/commit/2940d0c45c592c19196d4ab0d345ab27fca0f0a0 so our postInstall broke. No need to rename the pth file either, as pygtk does not work on Python 3.

commit136c83c977de118f11548d9bf7122b935bd437a3 authorJan Tojnar <jtojnar@gmail.com> dateFri 20 Dec 2019, 22:52 (7 years ago) parent7887a81
1 file changed+2−2
pkgs/development/python-modules/pygobject/default.nix+2−2
pkgs/development/python-modules/pygobject/default.nix+2−2
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, python, buildPythonPackage, pkgconfig, glib }:
1+{ stdenv, fetchurl, python, buildPythonPackage, pkgconfig, glib, isPy3k }:
22
33buildPythonPackage rec {
44 pname = "pygobject";
@@ -25,7 +25,7 @@ buildPythonPackage rec {
2525 # same site-packages: we need a pth file for both. pygtk.py would be
2626 # used to select a specific version, in our setup it should have no
2727 # effect, but we leave it in case somebody expects and calls it.
28− postInstall = ''
28+ postInstall = stdenv.lib.optionalString (!isPy3k) ''
2929 mv $out/lib/${python.libPrefix}/site-packages/{pygtk.pth,${pname}-${version}.pth}
3030
3131 # Prevent wrapping of codegen files as these are meant to be