From 6f4c7157bcce0c6de4bf4eb34f297732c9edca8f Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Mon, 6 Oct 2025 20:59:18 -0700 Subject: [PATCH] python3Packages.pygobject3: fix cross compilation --- pkgs/development/python-modules/pygobject/3.nix | 6 ++++++ 1 file changed, 6 insertions(+) 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