@@ -13,7 +13,7 @@
1313, bison, gperf
1414, glib, gtk3, dbus-glib
1515, glibc
16−, libXScrnSaver, libXcursor, libXtst, libGLU_combined
16+, libXScrnSaver, libXcursor, libXtst, libGLU_combined, libGL
1717, protobuf, speechd, libXdamage, cups
1818, ffmpeg, libxslt, libxml2, at-spi2-core
1919, jdk
@@ -309,6 +309,13 @@ let
309309 targets = extraAttrs.buildTargets or [];
310310 commands = map buildCommand targets;
311311 in concatStringsSep "\n" commands;
312+
313+ postFixup = ''
314+ # Make sure that libGLESv2 is found by dlopen (if using EGL).
315+ chromiumBinary="$libExecPath/$packageName"
316+ origRpath="$(patchelf --print-rpath "$chromiumBinary")"
317+ patchelf --set-rpath "${libGL}/lib:$origRpath" "$chromiumBinary"
318+ '';
312319 };
313320
314321# Remove some extraAttrs we supplied to the base attributes already.