-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
gimp: Testing dev version with Meson #67576
base: master
Are you sure you want to change the base?
Conversation
The gjs failure will require #72805 |
]; | ||
|
||
buildInputs = [ | ||
python3 |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
715ab15
to
f52c409
Compare
c750da1
to
359513f
Compare
@GrahamcOfBorg eval |
d83954d
to
65d90f9
Compare
I rebased to resolve the conflicts, skimmed the upstream changes and merged the update but for some reason that does not build. The previous GIMP revision still builds fine if I apply https://gitlab.gnome.org/GNOME/gimp/-/commit/a4f02398188bc36d1808ef802082b3856cc73741 as a patch but the latest one does not. I reverted for that for now. It appears to fail at running GIMP at build time (https://gitlab.gnome.org/GNOME/gimp/-/commit/354970c0ebb5b2af706b6b5aea16d4a19b2dd0ea makes that failure visible) and at test time. I tried to bisect it but did not succeed. It resulted in a translation commit that obviously cannot be causing the issue: Bisection log
Patch to facilitate bisectiondiff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix
index ffb40331d952..ff8229def450 100644
--- a/pkgs/applications/graphics/gimp/default.nix
+++ b/pkgs/applications/graphics/gimp/default.nix
@@ -89,15 +89,16 @@ in stdenv.mkDerivation (finalAttrs: {
# We should not use fetchFromGitLab because the build system
# will complain and mark the build as unsupported when it cannot find
# .git directory but downloading the whole repo is jus too much.
- src = fetchFromGitHub rec {
- name = "gimp-dev-${rev}"; # to make sure the hash is updated
- owner = "GNOME";
- repo = "gimp";
- rev = "254d4270e6084f6794e737c561d9a5460df9df4c";
- hash = "sha256-dCddCFCRDTT4iY+kepKKu413ezWOMEQ1m4hxBptBCfU=";
- # For gimp-data containing assets.
- fetchSubmodules = true;
- };
+ # src = fetchFromGitHub rec {
+ # name = "gimp-dev-${rev}"; # to make sure the hash is updated
+ # owner = "GNOME";
+ # repo = "gimp";
+ # rev = "254d4270e6084f6794e737c561d9a5460df9df4c";
+ # hash = "sha256-dCddCFCRDTT4iY+kepKKu413ezWOMEQ1m4hxBptBCfU=";
+ # # For gimp-data containing assets.
+ # fetchSubmodules = true;
+ # };
+ src = /home/jtojnar/Projects/gimp;
patches = [
# to remove compiler from the runtime closure, reference was retained via
@@ -226,7 +227,7 @@ in stdenv.mkDerivation (finalAttrs: {
# Requires neweer appstreamcli and not necessary
"-Dappdata-test=disabled"
# Not yet packaged.
- "-Dilbm=disabled"
+ # "-Dilbm=disabled"
] ++ lib.optionals stdenv.isDarwin [
"-Dalsa=disabled"
"-Djavascript=false"
@@ -250,11 +251,22 @@ in stdenv.mkDerivation (finalAttrs: {
app/tests/create_test_env.sh \
tools/gimp-mkenums
+ export NIX_CFLAGS_COMPILE=$(echo "$NIX_CFLAGS_COMPILE" | sed "s/ -Wno-incompatible-function-pointer-types//g")
+ echo "====$NIX_CFLAGS_COMPILE"
+
# Bypass the need for downloading git archive.
- substitute app/git-version.h.in git-version.h \
- --subst-var-by GIMP_GIT_VERSION "GIMP_2.99.?-g${builtins.substring 0 10 finalAttrs.src.rev}" \
- --subst-var-by GIMP_GIT_VERSION_ABBREV "${builtins.substring 0 10 finalAttrs.src.rev}" \
- --subst-var-by GIMP_GIT_LAST_COMMIT_YEAR "${builtins.head (builtins.match ".+\-unstable-([0-9]{4})-[0-9]{2}-[0-9]{2}" finalAttrs.version)}"
+ '';
+ # substitute app/git-version.h.in git-version.h \
+ # --subst-var-by GIMP_GIT_VERSION "GIMP_2.99.?-g${builtins.substring 0 10 finalAttrs.src.rev}" \
+ # --subst-var-by GIMP_GIT_VERSION_ABBREV "${builtins.substring 0 10 finalAttrs.src.rev}" \
+ # --subst-var-by GIMP_GIT_LAST_COMMIT_YEAR "${builtins.head (builtins.match ".+\-unstable-([0-9]{4})-[0-9]{2}-[0-9]{2}" finalAttrs.version)}"
+
+ preBuild = ''
+ # Generating gimp-data/images/gimp-splash.png using tools/in-build-gimp.sh appears to run gimp, which complains:
+ # Failed to create the data directory '/homeless-shelter/.local/share': Permission denied
+ export HOME="$(mktemp -d)"
+
+ templaterc="$out/etc/gimp/3.0/templaterc"
'';
preCheck = ''
diff --git a/pkgs/applications/graphics/gimp/hardcode-plugin-interpreters.patch b/pkgs/applications/graphics/gimp/hardcode-plugin-interpreters.patch
index 13e37da3bd24..6cb261d84ff0 100644
--- a/pkgs/applications/graphics/gimp/hardcode-plugin-interpreters.patch
+++ b/pkgs/applications/graphics/gimp/hardcode-plugin-interpreters.patch
@@ -1,8 +1,8 @@
--- a/plug-ins/python/pygimp.interp.in
+++ b/plug-ins/python/pygimp.interp.in
@@ -2,4 +2,4 @@ python=@PYTHON_PATH@
- python3=@PYTHON_PATH@python.exe
- /usr/bin/python=@PYTHON_PATH@python.exe
- /usr/bin/python3=@PYTHON_PATH@python.exe
+ python3=@PYTHON_PATH@
+ /usr/bin/python=@PYTHON_PATH@
+ /usr/bin/python3=@PYTHON_PATH@
-:Python:E::py::python3:
+:Python:E::py::@python_interpreter@:
|
Hi @jtojnar, I’m interested in working on this as part of getting rid of the remnants of GTK 2 and Python 2. Do you want to discuss the current state of things or should I just have a go at getting it working? |
My GIMP 2.99.18 compiles fine: https://git.sr.ht/~fd/nix-configs/tree/main/item/pkgs/gimp-devel (applied patches from AUR) |
Thank you @9p4! I will certainly take a look at that. |
git.sr.ht/~fd/nix-configs#gimp-devel works great for me, thank you! I run it on Sway with Xwayland disabled, so the "normal" released version of Gimp from nixpkgs-24.05 gives me the pesky One issue with this
|
Something must have changed recently, but one of the tests fails to pass when building. nix-build https://github.com/jtojnar/nixpkgs/archive/gimp-meson.tar.gz -A gimp
# or
nix run "github:jtojnar/nixpkgs/gimp-meson#gimp"
Shall I upload a more complete log? |
Co-Authored-By: Linus Heckemann <git@sphalerite.org>
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`.
GNOME GitLab instance fails with “fatal: the remote end hung up unexpectedly”
GNOME/gimp@ad7a2e5...254d427 - gimp config for tests separated 2f9881c03fdfc09d3d51ecf93bc8f0abd1c162c9 - gimp images moved to gimp-data 42171503d4793612ca35919c517f057c68e35bcd - new testing framework 7b43a7492f9dfe8761beb25fe4e24b48d60ff314 - libiblm support ab93a1484a0784943e7cd7421c05f63a1e91c968 - allow running uninstalled 9e9fe1435af3758f856b6bb15f9efd404a4e11d7
This reverts commit f39b88c756cdd5e36f353222101aec0c57895bbe. Currently it does not build.
This is already part of gimp master but that does not build yet.
…-01" This reverts commit ef9dec5a14ea5dc7dcf49abc12d62ed93309b8e8.
GNOME/gimp@ad7a2e5...c57bf3c - isocodes patch merged upstream GNOME/gimp@aba7316 todo: - lua interp file GNOME/gimp@063324c - mandatory python GNOME/gimp@93cc812
Rebased onto nixos-unstable and updated to latest GIMP commit. Also fixed the issue that prevented GIMP from running at build time (it requires typelibs to be installed due to our gobject-introspection patches). It appears to work, though lua goat exercises crash at the moment:
Maybe something to do with the interp file change. Though the Lua demo plug-in works 🤷♀️ |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/solved-overriding-gimp-attributes-and-a-dependent-package/51003/4 |
Trying to see if we need any changes on Darwin.
Depends on #73833
closes #333800