webkitgtk: ignore gettext when cross compiling

Unfortunately, CMake looks in CMAKE_PREFIX_PATH for binaries when
cross-compiling. This means that it will use gettext from
CMAKE_PREFIX_PATH even when we provide a gettext binary in PATH! This
is bad because the on in CMAKE_PREFIX_PATH is for the cross system,
not the native one. The only documented way I can find to change this
behavior is by manually setting the CMAKE_IGNORE_PATH variable.
This commit is contained in:
Matthew Bauer 2020-02-25 16:15:40 -05:00
parent f773ef51c5
commit d2775e4ce0

View file

@ -51,6 +51,7 @@
, xdg-dbus-proxy
, substituteAll
, gnome3
, glib
}:
assert enableGeoLocation -> geoclue2 != null;
@ -78,6 +79,14 @@ stdenv.mkDerivation rec {
./libglvnd-headers.patch
];
preConfigure = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
# Ignore gettext in cmake_prefix_path so that find_program doesn't
# pick up the wrong gettext. TODO: Find a better solution for
# this, maybe make cmake not look up executables in
# CMAKE_PREFIX_PATH.
cmakeFlags+=" -DCMAKE_IGNORE_PATH=${getBin gettext}/bin"
'';
nativeBuildInputs = [
bison
cmake
@ -89,6 +98,8 @@ stdenv.mkDerivation rec {
pkgconfig
python3
ruby
glib
wayland
];
buildInputs = [