From a5f462e79169777a0706312214f473984f7b5648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Mon, 10 May 2021 18:54:55 +0100 Subject: [PATCH] mindforger: remove use of deprecated QtWebFrame Removed references to QtWebKit and migrated to QtWebEngine. Co-authored-by: Dmitry Kalinkin Co-authored-by: Sandro --- .../editors/mindforger/default.nix | 27 +++++++++++++++---- .../mindforger/{build.patch => paths.patch} | 0 2 files changed, 22 insertions(+), 5 deletions(-) rename pkgs/applications/editors/mindforger/{build.patch => paths.patch} (100%) diff --git a/pkgs/applications/editors/mindforger/default.nix b/pkgs/applications/editors/mindforger/default.nix index 512e0f124411..781d8296d01d 100644 --- a/pkgs/applications/editors/mindforger/default.nix +++ b/pkgs/applications/editors/mindforger/default.nix @@ -1,9 +1,10 @@ { mkDerivation , cmark-gfm , fetchurl +, fetchpatch , qmake , qtbase -, qtwebkit +, qtwebengine , lib , wrapGAppsHook }: @@ -17,19 +18,35 @@ mkDerivation rec { sha256 = "1pghsw8kwvjhg3jpmjs0n892h2l0pm0cs6ymi8b23fwk0kfj67rd"; }; - nativeBuildInputs = [ qmake wrapGAppsHook ] ; - buildInputs = [ qtbase qtwebkit cmark-gfm ] ; + nativeBuildInputs = [ qmake wrapGAppsHook ]; + buildInputs = [ qtbase qtwebengine cmark-gfm ]; doCheck = true; - patches = [ ./build.patch ] ; + patches = [ + # this makes the package relocatable - removes hardcoded references to /usr + ./paths.patch + # this fixes compilation with QtWebEngine - referencing a commit trying to upstream the change - see https://github.com/dvorka/mindforger/pull/1357 + (fetchpatch { + url = "https://github.com/dvorka/mindforger/commit/d28e2bade0278af1b5249953202810540969026a.diff"; + sha256 = "sha256-qHKQQNGSc3F9seaOHV0gzBQFFqcTXk91LpKrojjpAUw="; + }) + ]; postPatch = '' substituteInPlace lib/src/install/installer.cpp --replace /usr "$out" substituteInPlace app/resources/gnome-shell/mindforger.desktop --replace /usr "$out" + for f in app/app.pro lib/lib.pro; do + substituteInPlace "$f" --replace "QMAKE_CXX = g++" "" + done ''; - qmakeFlags = [ "-r mindforger.pro" "CONFIG+=mfnoccache" ] ; + qmakeFlags = [ + "-r" + "mindforger.pro" + "CONFIG+=mfnoccache" + "CONFIG+=mfwebengine" + ]; meta = with lib; { description = "Thinking Notebook & Markdown IDE"; diff --git a/pkgs/applications/editors/mindforger/build.patch b/pkgs/applications/editors/mindforger/paths.patch similarity index 100% rename from pkgs/applications/editors/mindforger/build.patch rename to pkgs/applications/editors/mindforger/paths.patch