chromium: make the new audio sandbox NixOS-compatible

Deal with f2fc90bb74
which landed https://github.com/chromium/chromium/blob/master/services/audio/audio_sandbox_hook_linux.cc
containing /usr/share and /usr/lib/x86_64-linux-gnu paths.

closes https://github.com/NixOS/nixpkgs/pull/54960
This commit is contained in:
Ivan Kozik 2019-01-30 22:55:20 +00:00 committed by Herwig Hochleitner
parent 52eb2c45f6
commit 03960a323d

View file

@ -12,6 +12,7 @@
, utillinux, alsaLib
, bison, gperf
, glib, gtk2, gtk3, dbus-glib
, glibc
, libXScrnSaver, libXcursor, libXtst, libGLU_combined
, protobuf, speechd, libXdamage, cups
, ffmpeg, libxslt, libxml2, at-spi2-core
@ -163,6 +164,17 @@ let
'return sandbox_binary;' \
'return base::FilePath(GetDevelSandboxPath());'
substituteInPlace services/audio/audio_sandbox_hook_linux.cc \
--replace \
'/usr/share/alsa/' \
'${alsaLib}/share/alsa/' \
--replace \
'/usr/lib/x86_64-linux-gnu/gconv/' \
'${glibc}/lib/gconv/' \
--replace \
'/usr/share/locale/' \
'${glibc}/share/locale/'
sed -i -e 's@"\(#!\)\?.*xdg-@"\1${xdg_utils}/bin/xdg-@' \
chrome/browser/shell_integration_linux.cc