From 136c83c977de118f11548d9bf7122b935bd437a3 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Fri, 20 Dec 2019 22:52:19 +0100 Subject: [PATCH] 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. --- pkgs/development/python-modules/pygobject/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pygobject/default.nix b/pkgs/development/python-modules/pygobject/default.nix index 268202de865..a7b25e57a33 100644 --- a/pkgs/development/python-modules/pygobject/default.nix +++ b/pkgs/development/python-modules/pygobject/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, python, buildPythonPackage, pkgconfig, glib }: +{ stdenv, fetchurl, python, buildPythonPackage, pkgconfig, glib, isPy3k }: buildPythonPackage rec { pname = "pygobject"; @@ -25,7 +25,7 @@ buildPythonPackage rec { # 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 = '' + postInstall = stdenv.lib.optionalString (!isPy3k) '' mv $out/lib/${python.libPrefix}/site-packages/{pygtk.pth,${pname}-${version}.pth} # Prevent wrapping of codegen files as these are meant to be