Change:
The component of the derivation fails to compile on MacOS. But in two ways, and I can't tell what causes one or the other to trigger. On command: On command: the channel compilation failure Compiles.
It has been broken for a while now for different reasons. Maintaining it for darwin is a lot of work and nobody has stepped up to do that. Also, this is a duplicate of
By the way, what is your use case for ?
We're building a desktop version of mobile application and we need for our in-app browser with Ethereum support.

Discussion:
url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/qtbug-77037-workaround.patch?h=packages/qt5-webengine&id=fc77d6b3d5ec74e421b58f199efceb2593cbf951"; sha256 = "1gv733qfdn9746nbqqxzyjx4ijjqkkb7zb71nxax49nna5bri3am"; }) <del> ] ++ optional stdenv.isDarwin ./qtwebengine-darwin-no-platform-check.patch; </del> <ins> ] ++ optionals stdenv.isDarwin [ ./qtwebengine-darwin-no-platform-check.patch ./qtwebengine-darwin-fix-failed-static-assertion.patch ]; </ins> qtwebkit = [ ./qtwebkit.patch ] ++ optionals stdenv.isDarwin [ ./qtwebkit-darwin-no-readline.patch

<ins> Fix a following build error: In file included from ../../3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm:7: ../../3rdparty/chromium/base/bind.h:59:3: error: static_assert failed "Bound argument |i| of type |Arg| cannot be forwarded as |Unwrapped| to the bound functor, which declares it as |Param|." static_assert( ^ ../../3rdparty/chromium/base/bind.h:91:7: note: in instantiation of template class 'base::internal::AssertConstructible<1, long, long, const long &, NSError *>' requested here : AssertConstructible<Ns, Args, std::decay_t<Args>, Unwrapped, Params>... { ^ ../../3rdparty/chromium/base/bind.h:213:27: note: in instantiation of template class 'base::internal::AssertBindArgsValidity<std::__1::integer_sequence<unsigned long, 0, 1>, base::internal::TypeList<base::WeakPtr<device::BluetoothRemoteGattCharacteristicMac>, long>, base::internal::TypeList<device::BluetoothRemoteGattCharacteristicMac *, const long &>, base::internal::TypeList<device::BluetoothRemoteGattCharacteristicMac *, NSError *> >' requested here static_assert(internal::AssertBindArgsValidity< ^ ../../3rdparty/chromium/base/bind.h:242:16: note: in instantiation of function template specialization 'base::BindRepeating<void (device::BluetoothRemoteGattCharacteristicMac::*)(NSError *), base::WeakPtr<device::BluetoothRemoteGattCharacteristicMac>, long>' requested here return base::BindRepeating(std::forward<Functor>(functor), ^ ../../3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm:211:15: note: in instantiation of function template specialization 'base::Bind<void (device::BluetoothRemoteGattCharacteristicMac::*)(NSError *), base::WeakPtr<device::BluetoothRemoteGattCharacteristicMac>, long>' requested here base::Bind(&BluetoothRemoteGattCharacteristicMac::DidWriteValue, ^ Resurrected from https://github.com/NixOS/nixpkgs/blob/ddcf01bca6c7a7a7f096bec836a1e6a707ad473d/pkgs/development/libraries/qt-5/5.11/qtwebengine-clang-fix.patch because the same problem is present in 5.12 when compiling on macOS. --- a/src/3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm +++ b/src/3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm @@ -209,7 +209,7 @@ void BluetoothRemoteGattCharacteristicMac::WriteRemoteCharacteristic( base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::Bind(&BluetoothRemoteGattCharacteristicMac::DidWriteValue, -                   weak_ptr_factory_.GetWeakPtr(), nil)); +                   weak_ptr_factory_.GetWeakPtr(), nullptr)); } } </ins>

<ins> diff --git a/configure.pri b/configure.pri index 897bea54..6f834c20 100644 --- a/configure.pri +++ b/configure.pri @@ -269,7 +269,7 @@ defineReplace(webEngineGetMacOSVersion) { } defineReplace(webEngineGetMacOSSDKVersion) { -    value = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -version ProductVersion 2>/dev/null") +    value = $$system("xcrun --show-sdk-version") return($$value) } </ins> diff --git a/mkspecs/features/platform.prf b/mkspecs/features/platform.prf <ins> index 35eb6b89..7eed640a 100644 </ins> --- a/mkspecs/features/platform.prf +++ b/mkspecs/features/platform.prf @@ -40,8 +40,6 @@ defineTest(isPlatformSupported) {

} } else { skipBuild("Unknown platform. Qt WebEngine only supports Linux, Windows, and macOS.") <ins> @@ -111,7 +107,7 @@ defineTest(isMinOSXSDKVersion) { requested_minor = $$2 requested_patch = $$3 isEmpty(requested_patch): requested_patch = 0 -    WEBENGINE_OSX_SDK_PRODUCT_VERSION = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -version ProductVersion 2>/dev/null") +    WEBENGINE_OSX_SDK_PRODUCT_VERSION = $$system("xcrun --show-sdk-version") export(WEBENGINE_OSX_SDK_PRODUCT_VERSION) isEmpty(WEBENGINE_OSX_SDK_PRODUCT_VERSION) { skipBuild("Could not resolve SDK product version for '$$QMAKE_MAC_SDK'.") </ins> diff --git a/src/core/config/mac_osx.pri b/src/core/config/mac_osx.pri <ins> index 4426901c..3aa6057e 100644 </ins> --- a/src/core/config/mac_osx.pri +++ b/src/core/config/mac_osx.pri <del> @@ -5,8 +5,6 @@ load(functions) </del> <ins> @@ -5,16 +5,16 @@ load(functions) </ins> # otherwise query for it. QMAKE_MAC_SDK_VERSION = $$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.SDKVersion) isEmpty(QMAKE_MAC_SDK_VERSION) { -     QMAKE_MAC_SDK_VERSION = $$system("/usr/bin/xcodebuild -sdk $${QMAKE_MAC_SDK} -version SDKVersion 2>/dev/null") <del> -     isEmpty(QMAKE_MAC_SDK_VERSION): error("Could not resolve SDK version for '$${QMAKE_MAC_SDK}'") </del> <ins> +     QMAKE_MAC_SDK_VERSION = $$system("xcrun --show-sdk-version") isEmpty(QMAKE_MAC_SDK_VERSION): error("Could not resolve SDK version for '$${QMAKE_MAC_SDK}'") </ins> } QMAKE_CLANG_DIR = "/usr" <ins> -QMAKE_CLANG_PATH = $$eval(QMAKE_MAC_SDK.macx-clang.$${QMAKE_MAC_SDK}.QMAKE_CXX) -!isEmpty(QMAKE_CLANG_PATH) { -    clang_dir = $$clean_path("$$dirname(QMAKE_CLANG_PATH)/../") -    exists($$clang_dir): QMAKE_CLANG_DIR = $$clang_dir -} +# QMAKE_CLANG_PATH = $$eval(QMAKE_MAC_SDK.macx-clang.$${QMAKE_MAC_SDK}.QMAKE_CXX) +# !isEmpty(QMAKE_CLANG_PATH) { +#     clang_dir = $$clean_path("$$dirname(QMAKE_CLANG_PATH)/../") +#     exists($$clang_dir): QMAKE_CLANG_DIR = $$clang_dir +# } QMAKE_CLANG_PATH = "$${QMAKE_CLANG_DIR}/bin/clang++" message("Using clang++ from $${QMAKE_CLANG_PATH}") </ins>

, systemd , enableProprietaryCodecs ? true , gn <del> , cups, darwin, openbsm, runCommand, xcbuild </del> <ins> , cups, darwin, openbsm, runCommand, xcbuild, writeScriptBin </ins> , ffmpeg_3 ? null , lib, stdenv }:

substituteInPlace ./src/3rdparty/chromium/v8/gypfiles/standalone.gypi  --replace /bin/echo ${coreutils}/bin/echo '' <ins> # Prevent Chromium build script from making the path to `clang` relative to # the build directory.  `clang_base_path` is the value of `QMAKE_CLANG_DIR` # from `src/core/config/mac_osx.pri`. + optionalString stdenv.isDarwin '' substituteInPlace ./src/3rdparty/chromium/build/toolchain/mac/BUILD.gn  --replace 'prefix = rebase_path("$clang_base_path/bin/", root_build_dir)' 'prefix = "$clang_base_path/bin/"' '' </ins> # Patch library paths in Qt sources + '' sed -i 

'' + optionalString stdenv.isDarwin ('' substituteInPlace src/core/config/mac_osx.pri  <del> --replace /usr ${stdenv.cc} </del> <ins> --replace 'QMAKE_CLANG_DIR = "/usr"' 'QMAKE_CLANG_DIR = "${stdenv.cc}"' </ins> '' <ins> # Following is required to prevent a build error: # ninja: error: '/nix/store/z8z04p0ph48w22rqzx7ql67gy8cyvidi-SDKs/MacOSX10.12.sdk/usr/include/mach/exc.defs', needed by 'gen/third_party/crashpad/crashpad/util/mach/excUser.c', missing and no known rule to make it </ins> + (optionalString (lib.versionAtLeast qtCompatVersion "5.11") '' substituteInPlace src/3rdparty/chromium/third_party/crashpad/crashpad/util/BUILD.gn  --replace '$sysroot/usr' "${darwin.xnu}" '') + '' <del> cat <<EOF > src/3rdparty/chromium/build/mac/find_sdk.py #!/usr/bin/env python print("${darwin.apple_sdk.sdk}") print("10.12.0") EOF cat <<EOF > src/3rdparty/chromium/build/config/mac/sdk_info.py #!/usr/bin/env python print('xcode_version="0910"') print('xcode_version_int=910') print('xcode_build="9B55"') print('machine_os_build="17E199"') print('sdk_path=""') print('sdk_version="10.10"') print('sdk_platform_path=""') print('sdk_build="17B41"') EOF </del> # Apple has some secret stuff they don't share with OpenBSM 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]"

# TODO: investigate and fix properly "-march=westmere" ] ++ lib.optionals stdenv.isDarwin [ <del> "-DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_10" "-DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_10" </del> <ins> "-DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_12" "-DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_12" </ins> # # Prevent errors like

CoreWLAN Quartz Cocoa <ins> LocalAuthentication </ins> openbsm libunwind

buildInputs = optionals stdenv.isDarwin (with darwin; [ cups <ins> # `sw_vers` is used by `src/3rdparty/chromium/build/config/mac/sdk_info.py` # to get some information about the host platform. (writeScriptBin "sw_vers" '' #!${stdenv.shell} while [ $# -gt 0 ]; do case "$1" in -buildVersion) echo "17E199";; *) break ;; esac shift done '') </ins> # For sandbox.h include (runCommand "MacOS_SDK_sandbox.h" {} '' install -Dm444 "${lib.getDev darwin.apple_sdk.sdk}"/include/sandbox.h "$out"/include/sandbox.h