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 1be1af06b3b9..09d1b26ac1df 100644 --- a/pkgs/by-name/ol/olive-editor/package.nix +++ b/pkgs/by-name/ol/olive-editor/package.nix @@ -14,12 +14,13 @@ portaudio, imath, qt6, + fmt_10, }: let # https://github.com/olive-editor/olive/issues/2284 # we patch support for 2.3+, but 2.5 fails - openimageio' = openimageio.overrideAttrs (old: rec { + openimageio' = (openimageio.override { fmt = fmt_10; }).overrideAttrs (old: rec { version = "2.4.15.0"; src = ( old.src.override { @@ -35,7 +36,7 @@ in stdenv.mkDerivation { pname = "olive-editor"; - version = "unstable-2023-06-12"; + version = "0.1.2-unstable-2023-06-12"; src = fetchFromGitHub { fetchSubmodules = true; @@ -56,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