summary refs log tree commit diff
path: root/gnu/packages/emulators.scm
diff options
context:
space:
mode:
authorKei Kebreau <kkebreau@posteo.net>2020-01-26 19:01:00 -0500
committerKei Kebreau <kkebreau@posteo.net>2020-01-26 19:12:22 -0500
commit1ef71f522577e8b796344e072463d87e5cbae889 (patch)
tree457b5863e80d9af609ecf5710239a74de8d9f4e7 /gnu/packages/emulators.scm
parent4144eb195c28cbfd1ca2a131cf4b64afcad713ae (diff)
downloadguix-1ef71f522577e8b796344e072463d87e5cbae889.tar.gz
gnu: pcsxr: Wrap with GSETTINGS_SCHEMA_DIR path variable.
Without setting this path variable, gtk+ must be installed in the user's
profile for pcsxr's GUI to work.

* gnu/packages/emulators.scm (pcsxr)[arguments]: Add 'wrap-program' phase and
return #t from 'cd-subdir' and 'fix-cdio-lookup' phases.
Diffstat (limited to 'gnu/packages/emulators.scm')
-rw-r--r--gnu/packages/emulators.scm14
1 files changed, 12 insertions, 2 deletions
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 140a8087ec..23b5ad864f 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -1478,12 +1478,22 @@ functions.  The source code to MAME serves as this documentation.")
          #:phases
          (modify-phases %standard-phases
            (add-after 'unpack 'cd-subdir
-             (lambda _ (chdir "pcsxr")))
+             (lambda _ (chdir "pcsxr") #t))
            (add-before 'configure 'fix-cdio-lookup
              (lambda* (#:key inputs #:allow-other-keys)
                (substitute* "cmake/FindCdio.cmake"
                  (("/usr/include/cdio")
-                  (string-append (assoc-ref inputs "libcdio") "/include/cdio"))))))))
+                  (string-append (assoc-ref inputs "libcdio") "/include/cdio")))
+               #t))
+           (add-after 'install 'wrap-program
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (wrap-program (string-append (assoc-ref outputs "out")
+                                            "/bin/pcsxr")
+                 ;; For GtkFileChooserDialog.
+                 `("GSETTINGS_SCHEMA_DIR" =
+                   (,(string-append (assoc-ref inputs "gtk+")
+                                    "/share/glib-2.0/schemas"))))
+               #t)))))
       (native-inputs
        `(("pkg-config" ,pkg-config)
          ("intltool" ,intltool)