chromium: Enable swiftshader by default.

This makes it possible to use chromium headless with WebGL
(e.g. for webdriver tests) without having to rebuild from source.

The upstram default is to enable, thus simply removing our disabling switch.

Also fixes #41918.
This commit is contained in:
Niklas Hambüchen 2020-03-24 17:37:37 +01:00
parent d96bd3394b
commit 015bb28ae1
2 changed files with 10 additions and 1 deletions

View file

@ -18,6 +18,16 @@ mkChromiumDerivation (base: rec {
cp -vLR "$buildPath/locales" "$buildPath/resources" "$libExecPath/"
cp -v "$buildPath/chrome" "$libExecPath/$packageName"
# Swiftshader
# See https://stackoverflow.com/a/4264351/263061 for the find invocation.
if [ -n "$(find "$buildPath/swiftshader/" -maxdepth 1 -name '*.so' -print -quit)" ]; then
echo "Swiftshader files found; installing"
mkdir -p "$libExecPath/swiftshader"
cp -v "$buildPath/swiftshader/"*.so "$libExecPath/swiftshader/"
else
echo "Swiftshader files not found"
fi
mkdir -p "$sandbox/bin"
cp -v "$buildPath/chrome_sandbox" "$sandbox/bin/${sandboxExecutableName}"

View file

@ -244,7 +244,6 @@ let
is_clang = stdenv.cc.isClang;
clang_use_chrome_plugins = false;
blink_symbol_level = 0;
enable_swiftshader = false;
fieldtrial_testing_like_official_build = true;
# Google API keys, see: