qtwebengine: switch to pure sandbox on darwin

This commit is contained in:
Andrew Childs 2021-03-16 23:13:09 +09:00 committed by Dmitry Kalinkin
parent 5268bf50d2
commit a5979a4f99

@ -90,11 +90,7 @@ qtModule {
'' else ''
substituteInPlace src/3rdparty/chromium/base/mac/mach_port_broker.mm \
--replace "audit_token_to_pid(msg.trailer.msgh_audit)" "msg.trailer.msgh_audit.val[5]"
'')
+ ''
substituteInPlace src/3rdparty/chromium/sandbox/mac/BUILD.gn \
--replace 'libs = [ "sandbox" ]' 'libs = [ "/usr/lib/libsandbox.1.dylib" ]'
'');
''));
NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [
# with gcc8, -Wclass-memaccess became part of -Wall and this exceeds the logging limit
@ -190,6 +186,7 @@ qtModule {
buildInputs = optionals stdenv.isDarwin (with darwin; [
cups
apple_sdk.libs.sandbox
# `sw_vers` is used by `src/3rdparty/chromium/build/config/mac/sdk_info.py`
# to get some information about the host platform.
@ -205,15 +202,8 @@ qtModule {
shift
done
'')
# For sandbox.h include
(runCommand "MacOS_SDK_sandbox.h" {} ''
install -Dm444 "${lib.getDev darwin.apple_sdk.sdk}"/include/sandbox.h "$out"/include/sandbox.h
'')
]);
__impureHostDeps = optional stdenv.isDarwin "/usr/lib/libsandbox.1.dylib";
dontUseNinjaBuild = true;
dontUseNinjaInstall = true;
dontUseXcbuild = true;