The E (extension) line in pygimp.interp prints the following warnings:
GIMP-Warning: Bad interpreter referenced in interpreter file /nix/store/5c91dah385gn70blsn6i5rzncqj3ks0y-gimp-with-plugins-2.10.18/lib/gimp/2.0/interpreters/pygimp.interp: python2
GIMP-Warning: Bad binary format string in interpreter file /nix/store/5c91dah385gn70blsn6i5rzncqj3ks0y-gimp-with-plugins-2.10.18/lib/gimp/2.0/interpreters/pygimp.interp
This means that the py extension will not be registered when python2 is not in PATH. To prevent this, let’s hardcode the absolute python2 path.
https://github.com/NixOS/nixpkgs/issues/60937#issuecomment-653652093
Closes: https://github.com/NixOS/nixpkgs/issues/60937
GIMP uses python interpreter specified in pygimp.interp file for running Python plug-ins,
so any Python related wrapping is useless. It will pick up and use the python from build PATH.
Let’s use a python environment containing pygtk, which is needed by many plug-ins.
Closes: https://github.com/NixOS/nixpkgs/issues/87883
It produces an error:
GIMP-Error: Calling error for procedure 'gimp-image-get-active-layer':
Procedure 'gimp-image-get-active-layer' has been called with an invalid ID for argument 'image'. Most likely a plug-in is trying to work on an image that doesn't exist any longer.
(script-fu:25123): GLib-WARNING **: 12:41:03.500: (../glib/gerror.c:416):g_error_new_valist: runtime check failed: (domain != 0)
script-fu-Warning: Error while loading /nix/store/31y1qiyg8fzn07yz6lrnkbja33298gmz-gimp-with-plugins-2.10.14/share/gimp/2.0/scripts/exposure-blend/nds9ds1m18d0wg1b01fch8wyzdwpmr8x-exposure-blend.scm:
Error: (/nix/store/31y1qiyg8fzn07yz6lrnkbja33298gmz-gimp-with-plugins-2.10.14/share/gimp/2.0/scripts/exposure-blend/nds9ds1m18d0wg1b01fch8wyzdwpmr8x-exposure-blend.scm : 627) Procedure execution of gimp-image-get-active-layer failed on invalid input arguments: Procedure 'gimp-image-get-active-layer' has been called with an invalid ID for argument 'image'. Most likely a plug-in is trying to work on an image that doesn't exist any longer.