summary refs log tree commit diff
path: root/pkgs/development/libraries/webkitgtk
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2020-02-25 16:15:40 -0500
committerMatthew Bauer <mjbauer95@gmail.com>2020-03-06 00:45:45 -0500
commitd2775e4ce0761c1a003c2131c4d47d9412cb8e77 (patch)
tree67cd341444082b65d9d3c6200fc58a902dcfe011 /pkgs/development/libraries/webkitgtk
parentf773ef51c5260b3c8e0433ff346462541c194839 (diff)
downloadnixpkgs-d2775e4ce0761c1a003c2131c4d47d9412cb8e77.tar
nixpkgs-d2775e4ce0761c1a003c2131c4d47d9412cb8e77.tar.gz
nixpkgs-d2775e4ce0761c1a003c2131c4d47d9412cb8e77.tar.bz2
nixpkgs-d2775e4ce0761c1a003c2131c4d47d9412cb8e77.tar.lz
nixpkgs-d2775e4ce0761c1a003c2131c4d47d9412cb8e77.tar.xz
nixpkgs-d2775e4ce0761c1a003c2131c4d47d9412cb8e77.tar.zst
nixpkgs-d2775e4ce0761c1a003c2131c4d47d9412cb8e77.zip
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.
Diffstat (limited to 'pkgs/development/libraries/webkitgtk')
-rw-r--r--pkgs/development/libraries/webkitgtk/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/development/libraries/webkitgtk/default.nix b/pkgs/development/libraries/webkitgtk/default.nix
index aa3d874979f..98259e1b034 100644
--- a/pkgs/development/libraries/webkitgtk/default.nix
+++ b/pkgs/development/libraries/webkitgtk/default.nix
@@ -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 = [