git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #64809 from ambrop72/chromium-egl-fix

chromium: Fix running with --use-gl=egl.

commit8281a67be00313b76a82e043ec2fdbabc7931e56 authorMatthew Bauer <mjbauer95@gmail.com> dateWed 14 Aug 2019, 15:42 (7 years ago) parentf5a7cf76a0a073
1 file changed+8−1
pkgs/applications/networking/browsers/chromium/common.nix+8−1
pkgs/applications/networking/browsers/chromium/common.nix+8−1
@@ -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.