Skip to content

mindforger: remove use of deprecated QtWebKit#122476

Merged
veprbl merged 3 commits intoNixOS:masterfrom
cyplo:migrate-mindforger-to-webengine
Jun 12, 2021
Merged

mindforger: remove use of deprecated QtWebKit#122476
veprbl merged 3 commits intoNixOS:masterfrom
cyplo:migrate-mindforger-to-webengine

Conversation

@cyplo
Copy link
Copy Markdown
Contributor

@cyplo cyplo commented May 10, 2021

Removed references to QtWebKit and migrated to QtWebEngine. See #53079 for context

Hit some minor snags where the compilation with QtWebEngine did not work out of the box, just a few missed references to QtWebFrame - fixed that with a patch. As a side note - I will talk to the developer to try to get the patches upstreamed.

Motivation for this change

I've noticed that mindforger no longer installs from master because of build failures coming from QtWebKit, took this opportunity to remove references to it as it's deprecated.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@cyplo cyplo changed the title mindforger: remove use of deprecated QtWebFrame mindforger: remove use of deprecated QtWebKit May 10, 2021
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels May 10, 2021
@r-rmcgibbo
Copy link
Copy Markdown

Result of nixpkgs-review pr 122476 at 80286e3d run on x86_64-linux 1

1 package built successfully:
  • mindforger
3 suggestions:
  • error: no-flags-spaces

    qmakeFlags cannot contain spaces, please use qmakeFlagsArray in Bash.

    Near pkgs/applications/editors/mindforger/default.nix:32:3:

       |
    32 |   qmakeFlags = [ "-r mindforger.pro" "CONFIG+=mfnoccache" "CONFIG+=mfwebengine"] ;
       |   ^
    
  • warning: missing-patch-comment

    Consider adding a comment explaining the purpose of this patch on the line preceeding.
    Near pkgs/applications/editors/mindforger/default.nix:25:29:

       |
    25 |   patches = [ ./paths.patch ./webengine.patch ] ;
       |                             ^
    
  • warning: missing-patch-comment

    Consider adding a comment explaining the purpose of this patch on the line preceeding.
    Near pkgs/applications/editors/mindforger/default.nix:25:15:

       |
    25 |   patches = [ ./paths.patch ./webengine.patch ] ;
       |               ^
    

@veprbl veprbl mentioned this pull request May 10, 2021
69 tasks
@veprbl
Copy link
Copy Markdown
Member

veprbl commented May 13, 2021

@cyplo Would you mind submitting your nice patch upstream?

@cyplo
Copy link
Copy Markdown
Contributor Author

cyplo commented May 13, 2021

@SuperSandro2000 - not sure if splitting the arrays into multiple lines makes it more readable, is this more idiomatic ? Also - not sure if having -r on a separate line is equivalent to having it in one string ?

@veprbl - yeah defo, once this lands in nixos I will submit upstream - ideally with someone giving this a go on a MacOS box before, as I don't have access to any.

@veprbl
Copy link
Copy Markdown
Member

veprbl commented May 13, 2021

@cyplo The preferred way is to first have the patch upstream and then pull it down using fetchpatch in the expression. I agree with your response to the formatting comments.

@SuperSandro2000
Copy link
Copy Markdown
Member

@SuperSandro2000 - not sure if splitting the arrays into multiple lines makes it more readable, is this more idiomatic ? Also - not sure if having -r on a separate line is equivalent to having it in one string ?

@veprbl - yeah defo, once this lands in nixos I will submit upstream - ideally with someone giving this a go on a MacOS box before, as I don't have access to any.

It is less likely to cause merge conflicts and beginning with a line length of ~120 it should always be done to keep the lines readable on the GitHub web interface.

Also please upstream patches beforehand because the developer can give important feedback which we can't know about.

@veprbl
Copy link
Copy Markdown
Member

veprbl commented May 13, 2021

Fixing darwin build would additionally require

diff --git a/pkgs/applications/editors/mindforger/default.nix b/pkgs/applications/editors/mindforger/default.nix
index 512e0f12441..bbbdd34a9fc 100644
--- a/pkgs/applications/editors/mindforger/default.nix
+++ b/pkgs/applications/editors/mindforger/default.nix
@@ -27,6 +27,9 @@ mkDerivation rec {
   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" ] ;

@cyplo
Copy link
Copy Markdown
Contributor Author

cyplo commented May 14, 2021

nice one, thank you both ! will try to contact upstream and let's see how it goes :)

@cyplo
Copy link
Copy Markdown
Contributor Author

cyplo commented Jun 12, 2021

the upstream did not respond - will apply suggestions here and reference the patch commit and let you know :)

@cyplo cyplo force-pushed the migrate-mindforger-to-webengine branch 4 times, most recently from 6178df9 to 9e8b07b Compare June 12, 2021 07:12
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>
@cyplo cyplo force-pushed the migrate-mindforger-to-webengine branch from 9e8b07b to a5f462e Compare June 12, 2021 07:12
@cyplo
Copy link
Copy Markdown
Contributor Author

cyplo commented Jun 12, 2021

@veprbl @SuperSandro2000 if you could review that would be grand
OfBorg seems stuck on the darwin build btw, not sure if related to the PR

@veprbl veprbl force-pushed the migrate-mindforger-to-webengine branch from 4dd4286 to 48f22f4 Compare June 12, 2021 15:04
Copy link
Copy Markdown
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works on darwin

@veprbl veprbl merged commit 0c6186f into NixOS:master Jun 12, 2021
@cyplo cyplo deleted the migrate-mindforger-to-webengine branch June 12, 2021 16:05
@cyplo
Copy link
Copy Markdown
Contributor Author

cyplo commented Jun 12, 2021

awesome work, thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants