python3Packages.pygobject3: fix cross compilation

This commit is contained in:
Tristan Ross
2026-02-01 16:40:37 +01:00
committed by Martin Weinelt
parent e165073e6f
commit 6f4c7157bc
@@ -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