Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

G'Mic missing from Krita #163645

Closed
aidalgol opened this issue Mar 11, 2022 · 8 comments · Fixed by #285177
Closed

G'Mic missing from Krita #163645

aidalgol opened this issue Mar 11, 2022 · 8 comments · Fixed by #285177

Comments

@aidalgol
Copy link
Contributor

Describe the bug

Krita 5 complains that it cannot find the G'Mic plugin.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install Krita and the G'Mic plugin by adding krita and gmic-qt-krita to environment.systemPackages in /etc/nixos/configuration.nix
  2. Launch Krita
  3. Create a new image
  4. Select the menu item Filter→Start G'MIC-Qt
  5. Krita will complain, via a modal dialog, that it cannot load the plugin.
  6. Select the menu item Settings→Configure Krita…
  7. There should be a "G’Mic plugin" section in the left-hand sidebar, but there is not.

Expected behavior

For there to be a Krita setting to specify the path to the G'Mic plugin.

Additional context

The Krita manual explains the correct behaviour.

Notify maintainers

@abbradar

Metadata

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.25, NixOS, 22.05 (Quokka)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.4`
 - channels(aidan): `"nixpkgs-22.05pre355202.b66b39216b1"`
 - channels(root): `"nixos-21.11.336340.2ebb6c1e5ae, home-manager-21.11.tar.gz"`
 - nixpkgs: `/home/aidan/.nix-defexpr/channels/nixpkgs
@sifmelcara
Copy link
Member

Starting from krita 5.0.0 the gmic-qt-krita package won't work with Krita. Krita team forked gmic-qt and Krita will only work with that fork: https://invent.kde.org/graphics/krita/-/blob/2e15682e6e0827b4cdf90b1be18db7e97370a7af/README.packagers.md

It would take some effort to implement the build process mentioned in the README since cmake and make need to be invoked multiple times. (Probably need to manually write the whole configurePhase and buildPhase)

@Anseryde
Copy link

Is it possible to maintain a separate krita-gmic package like arch linux does?

@sifmelcara
Copy link
Member

It is possible but making it a separate package probably wouldn't make it easier to implement.

We just need someone to implement the build process I linked above in nix (sorry I don't have time to do it)

@lelgenio
Copy link
Contributor

Making some minor changes to gmic-qt you can build the krita plugin: lelgenio@60827a7

I've not yet been able to have krita load the plugin though. I've tried creating a symlinkJoin'ed version with the plugin, that does not work 😕

{ callPackage, symlinkJoin, krita-plugin-gmic, krita, ... }:
symlinkJoin {
  name = "krita-gmic";
  paths = [
    krita-plugin-gmic
    krita
  ];
  meta.mainProgram = "krita";
}

Krita is not logging enough information about where it tried to load the plugin for me to be able to deduce what is going wrong.

@lelgenio
Copy link
Contributor

@AndersonTorres, @lilyinstarlight, Do you think the Krita fork of gmic-qt should be integrated in the definition at pkgs/tools/graphics/gmic-qt/default.nix? I was originally afraid modifying it now would not be worth it because the two versions might deviate too much from one another.

@AndersonTorres
Copy link
Member

@lelgenio

  • If you want to remove the original gmic-qt and change it to krita's fork, I believe it will conflict with the previous one, and I would therefore vote against it
  • If you want to keep the fork along with the original, it's fine! You can use overrideAttrs magic in order to reuse the previous expression. Look at advcpmv as an example for inspiration.

@lelgenio
Copy link
Contributor

@AndersonTorres, Option 1 is terrible, I'd never ask for that 😃.

I was asking if krita's gmic-qt should be included as a "variant" in pkgs/tools/graphics/gmic-qt/default.nix, effectively does the same as option 2

Like this
diff --git a/pkgs/tools/graphics/gmic-qt/default.nix b/pkgs/tools/graphics/gmic-qt/default.nix
index a67479e4ffd5..5b2c57b7d3dc 100644
--- a/pkgs/tools/graphics/gmic-qt/default.nix
+++ b/pkgs/tools/graphics/gmic-qt/default.nix
@@ -29,20 +29,23 @@
 
 let
   variants = {
     gimp = {
       extraDeps = [
         gimp
         gimp.gtk
       ];
       description = "GIMP plugin for the G'MIC image processing framework";
     };
+    krita = {
+      ...
+    };
 
     standalone = {
       description = "Versatile front-end to the image processing framework G'MIC";
     };
   };
 
 in
 
 assert lib.assertMsg
   (builtins.hasAttr variant variants)

I think it's best to keep it as a completely separate package, because both packages will never have matching versions.

@lelgenio
Copy link
Contributor

So close! I got the "Q'MIC-qt for Krita" window to open by manipulating KRITA_PLUGIN_PATH:

image

Unfortunately it segfaults the moment I try to use any of the filters:

*** stack smashing detected ***: terminated
Magick: abort due to signal 6 (SIGABRT) "Abort"...

Progress at lelgenio@4872397

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

Successfully merging a pull request may close this issue.

5 participants