Skip to content

gimp3: init at 3.0.2 - #67576

Merged
jtojnar merged 12 commits into
NixOS:masterfrom
jtojnar:gimp-meson
Apr 16, 2025
Merged

jtojnar merged 12 commits into
NixOS:masterfrom
jtojnar:gimp-meson

Conversation

@jtojnar

@jtojnar jtojnar commented Aug 27, 2019 •

Copy link
Copy Markdown
Member

Trying to see if we need any changes on Darwin.

closes #333800

Comment thread pkgs/applications/graphics/gimp/default.nix Outdated
Comment thread pkgs/development/libraries/gegl/4.0.nix Outdated
@jtojnar jtojnar added the 2.status: wait-for-upstream Waiting for upstream fix (or their other action). label Sep 9, 2019
@jtojnar jtojnar mentioned this pull request Oct 31, 2019
1 task
@jtojnar

jtojnar commented Nov 5, 2019

Copy link
Copy Markdown
Member Author

The gjs failure will require #72805

@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-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Nov 5, 2019
Comment thread pkgs/applications/graphics/gimp/default.nix Outdated

@worldofpeace worldofpeace Nov 5, 2019 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Think this won't work if it ends up in a shebang for darwin (because wrappers).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Bah. Hoping for C wrappers before GIMP 3 is released.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good news! makeBinaryWrapper is a thing now: #124556

@jtojnar
jtojnar force-pushed the gimp-meson branch 2 times, most recently from 715ab15 to f52c409 Compare November 20, 2019 22:02
@ofborg ofborg Bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Nov 20, 2019
@jtojnar jtojnar changed the title gimp: switch to unstable gimp: Testing dev version with Meson Nov 21, 2019
@ofborg ofborg Bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Nov 21, 2019
@jtojnar
jtojnar force-pushed the gimp-meson branch 2 times, most recently from c750da1 to 359513f Compare November 21, 2019 22:58
@jtojnar

jtojnar commented Dec 13, 2019

Copy link
Copy Markdown
Member Author

@GrahamcOfBorg eval

@jtojnar

jtojnar commented Apr 1, 2025

Copy link
Copy Markdown
Member Author

To avoid blocking on Darwin support and performance regressions, I have re-introduced (now unmaintained) GIMP 2.

@Readf0x

Readf0x commented Apr 5, 2025

Copy link
Copy Markdown

Have others been testing this? I've found that it always hangs while loading.
image
I am aware that it is not meant for end users yet, I would just like to ask if this issue is known. I have tested the flatpak and this does not occur. It also works perfect on other distributions' packages, such as Nobara.

@Sigmanificient

Sigmanificient commented Apr 5, 2025 •

Copy link
Copy Markdown
Member

@Readf0x Which system are you running gimp3 on? It seems to work pretty smoothly on my NixOS environment (x64_84-linux) 😅
It takes less than 2 seconds to load on my computer 🤔

@Sigmanificient

Sigmanificient commented Apr 5, 2025 •

Copy link
Copy Markdown
Member

Found some warning from configure (not sure how relevant they are):

Library backtrace found: NO
Library socket found: NO
Run-time dependency libunwind found: NO (tried pkgconfig and cmake)
Library execinfo found: NO
Has header "qoi.h" : NO
Program xdg-email found: NO
Program xmllint found: NO
Program flex found: NO
Program bison found: NO
diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix
index e8a839dc263b..78557179cf33 100644
--- a/pkgs/applications/graphics/gimp/default.nix
+++ b/pkgs/applications/graphics/gimp/default.nix
@@ -68,6 +68,14 @@
   desktopToDarwinBundle,
   AppKit,
   Cocoa,
+  libbacktrace,
+  libexecinfo,
+  libunwind,
+  libxml2,
+  qoi,
+  xdg-utils,
+  flex,
+  bison,
 }:
 
 let
@@ -186,6 +194,14 @@ stdenv.mkDerivation (finalAttrs: {
       libmypaint
       mypaint-brushes1
 
+      libbacktrace
+      libexecinfo
+      libunwind
+      libxml2
+      qoi
+      flex
+      bison
+
       # New file dialogue crashes with “Icon 'image-missing' not present in theme Symbolic” without an icon theme.
       adwaita-icon-theme
 
@@ -199,6 +215,7 @@ stdenv.mkDerivation (finalAttrs: {
 
       # for JavaScript plug-ins
       gjs
+      xdg-utils
     ]
     ++ lib.optionals stdenv.hostPlatform.isDarwin [
       llvmPackages.openmp

I could not find the socket sadly

Here is a screenshot of gimp with one of QOI sample images:

image

Lastly, I get this strange log when closing the application:

Failed writing to '/home/sigmanificient/.config/GIMP/3.0/shortcutsrc': Error opening file “/home/sigmanificient/.config/GIMP/3.0/shortcutsrc”: Permission denied

but the file exists, and contain the following:


(action "file-print-gtk" "<Primary>p")

@MithicSpirit

MithicSpirit commented Apr 5, 2025 •

Copy link
Copy Markdown
Contributor

Lastly, I get this strange log when closing the application:

Failed writing to '/home/sigmanificient/.config/GIMP/3.0/shortcutsrc': Error opening file “/home/sigmanificient/.config/GIMP/3.0/shortcutsrc”: Permission denied

but the file exists, and contain the following:


(action "file-print-gtk" "<Primary>p")

Make sure the file is writeable. I had the same issue, but doing chmod u+w on it fixed it (it also is created with the correct permissions after being deleted; maybe it was a bug in an earlier release?).

EDIT: it appears that it generates that file with permissions 444 when generating the default config. Probably an upstream bug.

@Readf0x

Readf0x commented Apr 5, 2025

Copy link
Copy Markdown

@Readf0x Which system are you running gimp3 on? It seems to work pretty smoothly on my NixOS environment (x64_84-linux) 😅
It takes less than 2 seconds to load on my computer 🤔

Very interesting, I'm also running NixOS x64_86-linux. I'll have to do some testing then, who knows what could be causing the issue. I suspect it's a configuration error on my end. Is your system configuration publicly available?

@Sigmanificient

Sigmanificient commented Apr 5, 2025 •

Copy link
Copy Markdown
Member

Yes, you can build a VM of my configuration using

nix run github:Sigmanificient/dotfiles#nixosConfigurations.Sigmachine.config.system.build.vm

You'll be able to log in with sigmanificient & password hello. Then, use startx to enter the graphical session (or alternatively, qtile start --backend wayland)

@Readf0x

Readf0x commented Apr 6, 2025

Copy link
Copy Markdown

@Sigmanificient In the generated image it still has gimp 2.10 instead of 3.
image

@Sigmanificient

Sigmanificient commented Apr 6, 2025 •

Copy link
Copy Markdown
Member

It's my system image, so it does not have gimp 3 currently (i guess i should include it to make it easier for tou to test 😅)

I made a branch that will provide gimp3 out of the box:

nix run github:Sigmanificient/dotfiles/gimp3#nixosConfigurations.Sigmachine.config.system.build.vm

image

@jtojnar

jtojnar commented Apr 7, 2025 •

Copy link
Copy Markdown
Member Author

Looking at the source, the migration copies the ~/.config/GIMP/2.10/menurc file:

https://gitlab.gnome.org/GNOME/gimp/-/blob/14b1c1127379d775d361a1053db989d40b70044b/app/core/gimp-user-install.c#L1316

And the copying preserves the permissions of the original file:

https://gitlab.gnome.org/GNOME/gimp/-/blob/14b1c1127379d775d361a1053db989d40b70044b/app/config/gimpconfig-file.c#L232

So if the original file is read-only, the new one will be too:

$ ls -la ~/.config/GIMP/2.10/menurc
-r--r--r-- 1 jtojnar users 117 Apr 29  2020 /home/jtojnar/.config/GIMP/2.10/menurc

And looks like the original file was just copied from store:

https://gitlab.gnome.org/GNOME/gimp/-/blob/GIMP_2_10_38/app/core/gimp-user-install.c#L836

Sigmanificient and others added 12 commits April 15, 2025 10:01
The `gimpPlugins` should now support both versions.
https://www.gimp.org/news/2022/08/27/gimp-2-99-12-released/
GNOME/gimp@256b2d9...a791151

Introduces `gimp-script-fu-interpreter-3.0` as interpreter invoked by shebang of some plug-ins. Let’s ensure it is on `PATH`.
https://www.gimp.org/news/2023/07/09/gimp-2-99-16-released/
https://www.gimp.org/news/2024/02/21/gimp-2-99-18-released/
https://www.gimp.org/news/2024/11/06/gimp-3-0-RC1-released/
GNOME/gimp@ad7a2e5...GIMP_3_0_0_RC1

- gtk-mac-integration dependency removed https://gitlab.gnome.org/GNOME/gimp/-/commit/df4ed9c1ec85117747e41e4540cb75b02284bdbe
- Python plug-in mandatory https://gitlab.gnome.org/GNOME/gimp/-/commit/93cc81281cd12c55139f483d65629be9c31e798d
- Only Lua 5.1 is supported https://gitlab.gnome.org/GNOME/gimp/-/commit/70372975261f2fc89aa9bbf92fe975a7663ef59f
- Fixes gi-docgen and libjxl.

Had to add `adwaita-icon-theme` to `XDG_DATA_DIRS` at check time, or tests would fail:

    Gtk:ERROR:../gtk/gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Default (gtk-icon-theme-error-quark, 0)

No longer builds on Darwin.

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Keep around for a while for legacy plug-in support.

Re-introducing it in a separate commit so that `gimp` expression retains continuous git history.
Superseded by GIMP 3 in the `gimp` package.
Temporarily, rename `gimp` to `gimp3` and `gimp2` back to `gimp`.

Revert once GIMP 3 works on Darwin again and performance regressions are debugged.
@jtojnar

jtojnar commented Apr 15, 2025

Copy link
Copy Markdown
Member Author

Rebased to resolve the merge conflict. Given that only some people are experiencing the issues and that we are keeping gimp pointing to GIMP 2 for now, I will merge this tomorrow.

The slowness and Darwin support can be resolved on master.

@goyalyashpal

goyalyashpal commented Apr 17, 2025 •

Copy link
Copy Markdown

yayyyy!! finally merged. i've been tracking this for several weeks now. so glad. thanks a lot for all the efforts.

https://search.nixos.org/packages?show=gimp3&query=gimp&channel=unstable

@kolaente

Copy link
Copy Markdown
Member

Also handy to see when this lands in unstable: https://nixpk.gs/pr-tracker.html?pr=67576

@autumn-mck

Copy link
Copy Markdown

in unstable now 🥳

@eveeifyeve

eveeifyeve commented Apr 20, 2025 •

Copy link
Copy Markdown
Member

yayyyy!! finally merged. i've been tracking this for several weeks now. so glad. thanks a lot for all the efforts.

https://search.nixos.org/packages?show=gimp3&query=gimp&channel=unstable
Also handy to see when this lands in unstable: https://nixpk.gs/pr-tracker.html?pr=67576
in unstable now 🥳

Can you please not continue to comment here please. As many people are following this issue and this could be done somewhere else like in the matrix or disclosure.

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

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages 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.

Update Request: gimp 2.10.38 → 3.0