diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 3e63389be02d..45c125985120 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -13,7 +13,7 @@ , bison, gperf , glib, gtk3, dbus-glib , glibc -, libXScrnSaver, libXcursor, libXtst, libGLU_combined +, libXScrnSaver, libXcursor, libXtst, libGLU_combined, libGL , protobuf, speechd, libXdamage, cups , ffmpeg, libxslt, libxml2, at-spi2-core , jdk @@ -309,6 +309,13 @@ let targets = extraAttrs.buildTargets or []; commands = map buildCommand targets; in concatStringsSep "\n" commands; + + postFixup = '' + # Make sure that libGLESv2 is found by dlopen (if using EGL). + chromiumBinary="$libExecPath/$packageName" + origRpath="$(patchelf --print-rpath "$chromiumBinary")" + patchelf --set-rpath "${libGL}/lib:$origRpath" "$chromiumBinary" + ''; }; # Remove some extraAttrs we supplied to the base attributes already.