mindforger: remove use of deprecated QtWebFrame

Removed references to QtWebKit and migrated to QtWebEngine.

Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
Cyryl Płotnicki 2021-05-10 18:54:55 +01:00
parent 9affc60b0c
commit a5f462e791
2 changed files with 22 additions and 5 deletions

View file

@ -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";