guix_mirror_bot pushed a commit to branch go-team
in repository guix.

commit 6f9e15b913853762707f31974156069708b06e3b
Author: Runciter <runci...@whispers-vpn.org>
AuthorDate: Sun Jul 6 19:31:48 2025 +0000

    gnu: gimp-3: Fix execution outside of a profile.
    
    * gnu/packages/gimp.scm (gimp-3) [arguments]
    <phases> {wrap}: Adjust to wrap in prefix mode. Also wrap
    GDK_PIXBUF_MODULE_FILE, and XDG_DATA_DIRS.
    [native-inputs]: Add shared-mime-info.
    
    Change-Id: I2cae7408f373bd46fbc3941ed2a8e2eee40633ec
    Signed-off-by: Maxim Cournoyer <ma...@guixotic.coop>
    Modified-by: Maxim Cournoyer <ma...@guixotic.coop>
---
 gnu/packages/gimp.scm | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm
index c602d3083a..a54572cb49 100644
--- a/gnu/packages/gimp.scm
+++ b/gnu/packages/gimp.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2020 Michael Rohleder <m...@rohleder.de>
 ;;; Copyright © 2021, 2022, 2025 Vinicius Monego <mon...@posteo.net>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.courno...@gmail.com>
+;;; Copyright © 2025 Runciter <runci...@whispers-vpn.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -460,13 +461,21 @@ that is extensible via a plugin system.")
                    (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 #$(this-package-input "gtk+")
+                                           "/share")
+                           ,(string-append #$(this-package-native-input
+                                              "shared-mime-info")
+                                           "/share")))))
                     (find-files (string-append #$output "/bin")
                                 (lambda (_ stat)
                                   (eq? 'regular (stat:type stat))))))))))
@@ -478,7 +487,8 @@ that is extensible via a plugin system.")
     (native-inputs (modify-inputs (package-native-inputs gimp-2)
                      (prepend appstream-glib
                               gi-docgen
-                              libarchive)))))
+                              libarchive
+                              shared-mime-info)))))
 
 (define-public gimp gimp-3)
 (define-public gimp-next

Reply via email to