gnome-maps: fix cross compilation

upstream determines the gjs path with `find_program('gjs')`, however
this fails to find anything when cross compiling because meson doesn't
know which paths to check.

the interaction between meson's `find_program` and `cross-file` is
documented here:
<https://mesonbuild.com/Reference-manual_functions.html#find_program>
This commit is contained in:
Colin
2024-11-19 12:11:13 +00:00
parent 240d44bc74
commit 7a9a2d8f34
+8
View File
@@ -25,6 +25,7 @@
libadwaita,
geocode-glib_2,
tzdata,
writeText,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -68,6 +69,13 @@ stdenv.mkDerivation (finalAttrs: {
libsoup_3
];
mesonFlags = [
"--cross-file=${writeText "crossfile.ini" ''
[binaries]
gjs = '${lib.getExe gjs}'
''}"
];
preCheck = ''
# time.js included by timeTest and translationsTest depends on org.gnome.desktop.interface schema.
export XDG_DATA_DIRS="${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:$XDG_DATA_DIRS"