From eb4fbff60a82011599d9db5729fbb8538dbf9bde Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 17 Sep 2024 22:26:52 +0000 Subject: [PATCH] xdg-desktop-portal: support cross compilation --- .../libraries/xdg-desktop-portal/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/libraries/xdg-desktop-portal/default.nix b/pkgs/development/libraries/xdg-desktop-portal/default.nix index b5c653d5eac7..f1dea3ab641c 100644 --- a/pkgs/development/libraries/xdg-desktop-portal/default.nix +++ b/pkgs/development/libraries/xdg-desktop-portal/default.nix @@ -65,6 +65,12 @@ stdenv.mkDerivation (finalAttrs: { ./trash-test.patch ]; + # until/unless bubblewrap ships a pkg-config file, meson has no way to find it when cross-compiling. + postPatch = '' + substituteInPlace meson.build \ + --replace-fail "find_program('bwrap'" "find_program('${lib.getExe bubblewrap}'" + ''; + nativeBuildInputs = [ docbook_xml_dtd_412 docbook_xml_dtd_43 @@ -117,8 +123,12 @@ stdenv.mkDerivation (finalAttrs: { (lib.mesonEnable "systemd" enableSystemd) ] ++ lib.optionals (!enableGeoLocation) [ "-Dgeoclue=disabled" + ] ++ lib.optionals (!finalAttrs.finalPackage.doCheck) [ + "-Dpytest=disabled" ]; + strictDeps = true; + doCheck = true; preCheck = ''