Subject: [PATCH v4] gnu: gimp-3: add wrappings to enable gimp startup in pure profile.

From: Runciter <[email-masked]>
Date: Sun, 06 Jul 2025 19:31:48 +0000

* gnu/packages/gimp.scm (gimp-3)[arguments]<phases>:
  Wrap value of GDK_PIXBUF_MODULE_FILE in wrapper script.
  Add wrapping for gtk+ data files in prefix to XDG_DATA_DIRS.
  Add wrapping for ahared-mime-info data files in prefix to XDG_DATA_DIRS.
  Change wrapping of GI_TYPELIB_PATH and GUIX_PYTHONPATH to prefix.

Change-Id: I2cae7408f373bd46fbc3941ed2a8e2eee40633ec
---
 gnu/packages/gimp.scm | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm
index c602d3083a..66c57c0e36 100644
--- a/gnu/packages/gimp.scm
+++ b/gnu/packages/gimp.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2020 Michael Rohleder <[email-masked]>
 ;;; Copyright © 2021, 2022, 2025 Vinicius Monego <[email-masked]>
 ;;; Copyright © 2022 Maxim Cournoyer <[email-masked]>
+;;; Copyright © 2025 Runciter <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -460,13 +461,19 @@ (define-public gimp-3
                    (for-each
                     (lambda (prog)
                       (wrap-program prog
-                        ;; Ensure GI_TYPELIB_PATH is not extended from the
+                        ;; Ensure GI_TYPELIB_PATH is not suffixed to the
                         ;; environment, as it could cause Gimp to crash (see
                         ;; bug#77921).
-                        `("GI_TYPELIB_PATH" =
+                        `("GI_TYPELIB_PATH" prefix
                           (,(getenv "GI_TYPELIB_PATH")))
-                        `("GUIX_PYTHONPATH" suffix
-                          (,(getenv "GUIX_PYTHONPATH")))))
+                        `("GUIX_PYTHONPATH" prefix
+                          (,(getenv "GUIX_PYTHONPATH")))
+                        `("GDK_PIXBUF_MODULE_FILE" =
+                          (,(getenv "GDK_PIXBUF_MODULE_FILE")))
+                        `("XDG_DATA_DIRS" prefix
+                          (,(string-append #$gtk+ "/share")))
+                        `("XDG_DATA_DIRS" prefix
+                          (,(string-append #$shared-mime-info "/share")))))
                     (find-files (string-append #$output "/bin")
                                 (lambda (_ stat)
                                   (eq? 'regular (stat:type stat))))))))))

base-commit: a5768ec09332a625c709a20f76f0227aab2a9e5f
-- 
2.50.0