From ee2501f124b817f29cb2ef65b8fc8bbe59cc143f Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 9 Nov 2020 21:11:59 -0500 Subject: [PATCH] qt5.qtwebengine: don't override `patches` in qtModule This fixes darwin build. Fixes: 90db9641 ('qt5.qtwebengine: fix build with bison-3.7') --- pkgs/development/libraries/qt-5/5.12/default.nix | 9 +++++++++ pkgs/development/libraries/qt-5/5.14/default.nix | 11 ++++++++++- pkgs/development/libraries/qt-5/5.15/default.nix | 11 ++++++++++- .../libraries/qt-5/modules/qtwebengine.nix | 11 ----------- 4 files changed, 29 insertions(+), 13 deletions(-) diff --git a/pkgs/development/libraries/qt-5/5.12/default.nix b/pkgs/development/libraries/qt-5/5.12/default.nix index fcceb6d6cf2b..329ddd171626 100644 --- a/pkgs/development/libraries/qt-5/5.12/default.nix +++ b/pkgs/development/libraries/qt-5/5.12/default.nix @@ -97,6 +97,15 @@ let url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/qtbug-77037-workaround.patch?h=packages/qt5-webengine&id=fc77d6b3d5ec74e421b58f199efceb2593cbf951"; sha256 = "1gv733qfdn9746nbqqxzyjx4ijjqkkb7zb71nxax49nna5bri3am"; }) + + # Fix build with bison-3.7: https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?id=1a53f599 + (fetchpatch { + name = "qtwebengine-bison-3.7-build.patch"; + url = "https://code.qt.io/cgit/qt/qtwebengine-chromium.git/patch/?id=1a53f599"; + sha256 = "1nqpyn5fq37q7i9nasag6i14lnz0d7sld5ikqhlm8qwq9d7gbmjy"; + stripLen = 1; + extraPrefix = "src/3rdparty/"; + }) ] ++ optionals stdenv.isDarwin [ ./qtwebengine-darwin-no-platform-check.patch ./qtwebengine-darwin-fix-failed-static-assertion.patch diff --git a/pkgs/development/libraries/qt-5/5.14/default.nix b/pkgs/development/libraries/qt-5/5.14/default.nix index 469157a5f727..b17d9b97b183 100644 --- a/pkgs/development/libraries/qt-5/5.14/default.nix +++ b/pkgs/development/libraries/qt-5/5.14/default.nix @@ -70,7 +70,16 @@ let qtdeclarative = [ ./qtdeclarative.patch ]; qtscript = [ ./qtscript.patch ]; qtserialport = [ ./qtserialport.patch ]; - qtwebengine = [ ] + qtwebengine = [ + # Fix build with bison-3.7: https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?id=1a53f599 + (fetchpatch { + name = "qtwebengine-bison-3.7-build.patch"; + url = "https://code.qt.io/cgit/qt/qtwebengine-chromium.git/patch/?id=1a53f599"; + sha256 = "1nqpyn5fq37q7i9nasag6i14lnz0d7sld5ikqhlm8qwq9d7gbmjy"; + stripLen = 1; + extraPrefix = "src/3rdparty/"; + }) + ] ++ optional stdenv.isDarwin ./qtwebengine-darwin-no-platform-check.patch; qtwebkit = [ (fetchpatch { diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix index 1a90c610a5b5..3a31ca3a9480 100644 --- a/pkgs/development/libraries/qt-5/5.15/default.nix +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -70,7 +70,16 @@ let qtdeclarative = [ ./qtdeclarative.patch ]; qtscript = [ ./qtscript.patch ]; qtserialport = [ ./qtserialport.patch ]; - qtwebengine = [ ] + qtwebengine = [ + # Fix build with bison-3.7: https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?id=1a53f599 + (fetchpatch { + name = "qtwebengine-bison-3.7-build.patch"; + url = "https://code.qt.io/cgit/qt/qtwebengine-chromium.git/patch/?id=1a53f599"; + sha256 = "1nqpyn5fq37q7i9nasag6i14lnz0d7sld5ikqhlm8qwq9d7gbmjy"; + stripLen = 1; + extraPrefix = "src/3rdparty/"; + }) + ] ++ optional stdenv.isDarwin ./qtwebengine-darwin-no-platform-check.patch; qtwebkit = [ ./qtwebkit.patch ] ++ optionals stdenv.isDarwin [ diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix index ff2b444ac275..b98b711c0f5d 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix @@ -38,17 +38,6 @@ qtModule { # which cannot be set at the same time as -Wformat-security hardeningDisable = [ "format" ]; - patches = [ - # Fix build with bison-3.7: https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?id=1a53f599 - (fetchpatch { - name = "qtwebengine-bison-3.7-build.patch"; - url = "https://code.qt.io/cgit/qt/qtwebengine-chromium.git/patch/?id=1a53f599"; - sha256 = "1nqpyn5fq37q7i9nasag6i14lnz0d7sld5ikqhlm8qwq9d7gbmjy"; - stripLen = 1; - extraPrefix = "src/3rdparty/"; - }) - ]; - postPatch = # Patch Chromium build tools ''