diff --git a/pkgs/development/python-modules/pygobject/3.nix b/pkgs/development/python-modules/pygobject/3.nix index ac5d4ac44758..ecdaa3e02e9a 100644 --- a/pkgs/development/python-modules/pygobject/3.nix +++ b/pkgs/development/python-modules/pygobject/3.nix @@ -51,6 +51,12 @@ buildPythonPackage rec { gobject-introspection # e.g. try building: python3Packages.urwid python3Packages.pydbus ]; + # Fixes https://github.com/NixOS/nixpkgs/issues/378447 + preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) '' + export PKG_CONFIG_PATH=${lib.getDev python}/lib/pkgconfig:$PKG_CONFIG_PATH + export PKG_CONFIG_PATH_FOR_BUILD=${lib.getDev python}/lib/pkgconfig:$PKG_CONFIG_PATH_FOR_BUILD + ''; + mesonFlags = [ # This is only used for figuring out what version of Python is in # use, and related stuff like figuring out what the install prefix