From 97904f8424ccbba6de4ae63e7e97c2c4edf65567 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Tue, 30 Mar 2021 18:24:52 +0200 Subject: [PATCH] qt5.qtwebengine: fix Qt version number in cmake This fixes the build failures in packages depending on qtwebengine and using cmake to find the Qt dependencies (like libsForQt5.messagelib). --- pkgs/development/libraries/qt-5/5.15/default.nix | 4 +++- pkgs/development/libraries/qt-5/modules/qtwebengine.nix | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix index c32f4b001e9d..f969254b5952 100644 --- a/pkgs/development/libraries/qt-5/5.15/default.nix +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -203,7 +203,9 @@ let qtvirtualkeyboard = callPackage ../modules/qtvirtualkeyboard.nix {}; qtwayland = callPackage ../modules/qtwayland.nix {}; qtwebchannel = callPackage ../modules/qtwebchannel.nix {}; - qtwebengine = callPackage ../modules/qtwebengine.nix {}; + qtwebengine = callPackage ../modules/qtwebengine.nix { + inherit (srcs.qtwebengine) version; + }; qtwebglplugin = callPackage ../modules/qtwebglplugin.nix {}; qtwebkit = callPackage ../modules/qtwebkit.nix {}; qtwebsockets = callPackage ../modules/qtwebsockets.nix {}; diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix index f994c7ef6c9a..cd3fa583303d 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix @@ -17,6 +17,7 @@ , cups, darwin, openbsm, runCommand, xcbuild, writeScriptBin , ffmpeg_3 ? null , lib, stdenv, fetchpatch +, version ? null , qtCompatVersion }: @@ -230,6 +231,9 @@ qtModule { [Paths] Prefix = .. EOF + '' + lib.optionalString (lib.versions.majorMinor qtCompatVersion == "5.15") '' + # Fix for out-of-sync QtWebEngine and Qt releases (since 5.15.3) + sed 's/${lib.head (lib.splitString "-" version)} /${qtCompatVersion} /' -i "$out"/lib/cmake/*/*Config.cmake ''; meta = with lib; {