From d09aec1b2769b6d64e590c0fa921cef2415529db Mon Sep 17 00:00:00 2001 From: ghpzin Date: Sun, 2 Nov 2025 22:38:58 +0300 Subject: [PATCH] olive-editor: fix build with qt6-6.10 - add patch from merged upstream PR of `kddockwidgets` submodule: https://www.github.com/KDAB/KDDockWidgets/pull/615 https://github.com/KDAB/KDDockWidgets/commit/f2b50fff29bd4b49acdfed3ed8fc42eb0a502032 (does not apply with `fetchpatch`) Fixes build failure with qt6-6.10: ``` CMake Error at ext/KDDockWidgets/src/CMakeLists.txt:306 (target_link_libraries): Target "kddockwidgets" links to: Qt6::WidgetsPrivate but the target was not found. Possible reasons include: * There is a typo in the target name. * A find_package call is missing for an IMPORTED target. * An ALIAS target is missing. ``` --- ...kddockwidgets-fix-build-with-qt-6_10.patch | 21 +++++++++++++++++++ pkgs/by-name/ol/olive-editor/package.nix | 5 +++++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/by-name/ol/olive-editor/olive-editor-kddockwidgets-fix-build-with-qt-6_10.patch diff --git a/pkgs/by-name/ol/olive-editor/olive-editor-kddockwidgets-fix-build-with-qt-6_10.patch b/pkgs/by-name/ol/olive-editor/olive-editor-kddockwidgets-fix-build-with-qt-6_10.patch new file mode 100644 index 000000000000..3ab25e679764 --- /dev/null +++ b/pkgs/by-name/ol/olive-editor/olive-editor-kddockwidgets-fix-build-with-qt-6_10.patch @@ -0,0 +1,21 @@ +diff --git a/ext/KDDockWidgets/CMakeLists.txt b/ext/KDDockWidgets/CMakeLists.txt +index 608a2491..d0edc399 100644 +--- a/ext/KDDockWidgets/CMakeLists.txt ++++ b/ext/KDDockWidgets/CMakeLists.txt +@@ -160,8 +160,16 @@ + include(KDQtInstallPaths) #to set QT_INSTALL_FOO variables + + set(${PROJECT_NAME}_DEPS "widgets") ++if(Qt6Core_VERSION VERSION_GREATER_EQUAL "6.10.0") ++ set(QT_NO_PRIVATE_MODULE_WARNING ON) ++ find_package(Qt6 ${QT_MIN_VERSION} NO_MODULE REQUIRED COMPONENTS WidgetsPrivate) ++endif() + if(${PROJECT_NAME}_QTQUICK) + find_package(Qt${Qt_VERSION_MAJOR} NO_MODULE REQUIRED COMPONENTS Quick QuickControls2) ++ if(Qt6Core_VERSION VERSION_GREATER_EQUAL "6.10.0") ++ set(QT_NO_PRIVATE_MODULE_WARNING ON) ++ find_package(Qt6 ${QT_MIN_VERSION} NO_MODULE REQUIRED COMPONENTS QuickPrivate) ++ endif() + add_definitions(-DKDDOCKWIDGETS_QTQUICK) + set(${PROJECT_NAME}_DEPS "${${PROJECT_NAME}_DEPS} quick quickcontrols2") + else() diff --git a/pkgs/by-name/ol/olive-editor/package.nix b/pkgs/by-name/ol/olive-editor/package.nix index 110701b74a91..6d98955eea6c 100644 --- a/pkgs/by-name/ol/olive-editor/package.nix +++ b/pkgs/by-name/ol/olive-editor/package.nix @@ -57,6 +57,11 @@ stdenv.mkDerivation { url = "https://github.com/olive-editor/olive/commit/311eeb72944f93f873d1cd1784ee2bf423e1e7c2.patch"; hash = "sha256-lswWn4DbXGH1qPvPla0jSgUJQXuqU7LQGHIPoXAE8ag="; }) + + # Fix build of `kddockwidgets` with qt6-6.10, adapted from: + # https://github.com/KDAB/KDDockWidgets/pull/615 + # https://github.com/KDAB/KDDockWidgets/commit/f2b50fff29bd4b49acdfed3ed8fc42eb0a502032 + ./olive-editor-kddockwidgets-fix-build-with-qt-6_10.patch ]; # https://github.com/olive-editor/olive/issues/2200