Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

qt5.qtwebengine: pin clang version to clang 15

The version of Chromium used by Qt WebEngine 5.15.x does not build with
clang 16 due to the following errors:

* -Wenum-constexpr-conversion: This is a downgradable error in clang 16,
but it is planned to be made into a hard error in a future version of
clang. Patches are not available for the version of v8 used by
Chromium in Qt WebEngine, and fixing the code is non-trivial.
* -Wincompatible-function-pointer-types: This is also a downgradable
error generated starting with clang 16. Patches are available upstream
that can be backported.

Because the first error is non-trivial to fix and suppressing it risks
future breakage, clang is pinned to clang 15, which also makes fixing
the incompatible function pointer conversion errors unnecessary.

The derivation is also updated to use the `overrideLibcxx` adapter.
Using it links qt5.qtwebengine against the same versions of libc++ and
libc++abi as qt5.qtbase even though they are built with different
versions of clang, avoiding the compatibility problems that can cause.

Also, reenable x86_64-darwin because it builds successfully too.

+14 -1
+13
pkgs/development/libraries/qt-5/5.15/default.nix
··· 11 11 , lib, stdenv, fetchurl, fetchgit, fetchpatch, fetchFromGitHub, makeSetupHook, makeWrapper 12 12 , bison, cups ? null, harfbuzz, libGL, perl, python3 13 13 , gstreamer, gst-plugins-base, gtk3, dconf 14 + , llvmPackages_15, overrideSDK, overrideLibcxx 14 15 , darwin 15 16 16 17 # options ··· 288 289 qtwayland = callPackage ../modules/qtwayland.nix {}; 289 290 qtwebchannel = callPackage ../modules/qtwebchannel.nix {}; 290 291 qtwebengine = callPackage ../modules/qtwebengine.nix { 292 + # The version of Chromium used by Qt WebEngine 5.15.x does not build with clang 16 due 293 + # to the following errors: 294 + # * -Wenum-constexpr-conversion: This is a downgradable error in clang 16, but it is planned 295 + # to be made into a hard error in a future version of clang. Patches are not available for 296 + # the version of v8 used by Chromium in Qt WebEngine, and fixing the code is non-trivial. 297 + # * -Wincompatible-function-pointer-types: This is also a downgradable error generated 298 + # starting with clang 16. Patches are available upstream that can be backported. 299 + # Because the first error is non-trivial to fix and suppressing it risks future breakage, 300 + # clang is pinned to clang 15. That also makes fixing the second set of errors unnecessary. 301 + stdenv = 302 + let stdenv' = if stdenv.cc.isClang then overrideLibcxx llvmPackages_15.stdenv else stdenv; 303 + in if stdenv'.isDarwin then overrideSDK stdenv' "11.0" else stdenv'; 291 304 inherit (srcs.qtwebengine) version; 292 305 python = python3; 293 306 postPatch = ''
-1
pkgs/development/libraries/qt-5/modules/qtwebengine.nix
··· 306 306 isAarch64 307 307 (patternLogicalAnd isMips isLittleEndian) 308 308 ]); 309 - broken = stdenv.isDarwin && stdenv.isx86_64; 310 309 311 310 # This build takes a long time; particularly on slow architectures 312 311 timeout = 24 * 3600;
+1
pkgs/top-level/all-packages.nix
··· 24694 24694 inherit (__splicedPackages) 24695 24695 makeScopeWithSplicing' generateSplicesForMkScope lib fetchurl fetchpatch fetchgit fetchFromGitHub makeSetupHook makeWrapper 24696 24696 bison cups dconf harfbuzz libGL perl gtk3 python3 24697 + llvmPackages_15 overrideSDK overrideLibcxx 24697 24698 darwin; 24698 24699 inherit (__splicedPackages.gst_all_1) gstreamer gst-plugins-base; 24699 24700 inherit config;