From bd63daae03d6a3c014d0b5a526f2698c60f69e6f Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 25 Jun 2017 22:37:50 +0200 Subject: [PATCH] chromium: Add installation of libGLESv2.so The following errors occur when you start Chromium prior to this commit: [2534:2534:0625/202928.673160:ERROR:gl_implementation.cc(246)] Failed to load .../libexec/chromium/swiftshader/libGLESv2.so: ../libexec/chromium/swiftshader/libGLESv2.so: cannot open shared object file: No such file or directory [2534:2534:0625/202928.674434:ERROR:gpu_child_thread.cc(174)] Exiting GPU process due to errors during initialization While in theory we do not strictly need libGLESv2.so, in practice this means that the GPU process isn't starting up at all which in turn leads to crawling rendering performance on some sites. So let's install all shared libraries in swiftshader. I've tested this with the chromium.stable NixOS VM test and also locally on my machine and the errors as well as the performance issues are gone. Signed-off-by: aszlig --- pkgs/applications/networking/browsers/chromium/browser.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/chromium/browser.nix b/pkgs/applications/networking/browsers/chromium/browser.nix index 75f2dcda6a6..993d81ff96e 100644 --- a/pkgs/applications/networking/browsers/chromium/browser.nix +++ b/pkgs/applications/networking/browsers/chromium/browser.nix @@ -12,10 +12,11 @@ mkChromiumDerivation (base: rec { sandboxExecutableName = "__chromium-suid-sandbox"; installPhase = '' - mkdir -p "$libExecPath" + mkdir -p "$libExecPath/swiftshader" cp -v "$buildPath/"*.pak "$buildPath/"*.bin "$libExecPath/" cp -v "$buildPath/icudtl.dat" "$libExecPath/" cp -vLR "$buildPath/locales" "$buildPath/resources" "$libExecPath/" + cp -v "$buildPath/swiftshader/"*.so "$libExecPath/swiftshader/" cp -v "$buildPath/chrome" "$libExecPath/$packageName" if [ -e "$buildPath/libwidevinecdmadapter.so" ]; then