summary refs log tree commit diff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-10-02 17:17:49 +0900
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-10-07 01:20:21 +0900
commitbd3799098481881f341f0694623eef6941669232 (patch)
tree11eb1d915168fc9e3646e70cfd5ef7f165dec1be
parent7fe3a5d216165a291c2c943f09bdc57cbb28f9d5 (diff)
downloadguix-bd3799098481881f341f0694623eef6941669232.tar.gz
gnu: retroarch: Propagate core assets.
The RetroArch menus will not correctly render without its assets, the
plugins won't be usable without the core info files, and controllers won't be
usable without joypad-autoconfig files.  Hence...

* gnu/packages/emulators.scm (retroarch-minimal): New variable, renamed from
previous retroarch.
(retroarch) [propagated-inputs]: New field.

Change-Id: I9dccf89da1f35acfa705de9ae02ae5f72a0b1825
-rw-r--r--gnu/packages/emulators.scm24
1 files changed, 21 insertions, 3 deletions
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 6e3c19b9e1..2b21cc6116 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -118,7 +118,8 @@
   #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
   #:use-module (guix build-system pyproject)
-  #:use-module (guix build-system qt))
+  #:use-module (guix build-system qt)
+  #:use-module (guix build-system trivial))
 
 (define-public vice
   (package
@@ -1577,9 +1578,9 @@ recognize input devices and automatically setup default mappings between the
 physical device and the RetroPad virtual controller.")
     (license license:expat)))
 
-(define-public retroarch
+(define-public retroarch-minimal
   (package
-    (name "retroarch")
+    (name "retroarch-minimal")
     (version "1.19.1")
     (source
      (origin
@@ -1740,6 +1741,23 @@ multi-system game/emulator system.")
                    license:expat         ;yxml
                    license:bsd-3))))     ;feragamemode
 
+(define-public retroarch
+  (package
+    (inherit retroarch-minimal)
+    (name "retroarch")
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments (list #:builder #~(mkdir #$output)))
+    (propagated-inputs
+     (list retroarch-minimal
+           ;; We cannot simply hard-code the resource paths, as they'd written
+           ;; to ~/.config/retroarch.cfg and never updated (going stale),
+           ;; which is problematic.  The environment variables overrides the
+           ;; configuration file values.
+           retroarch-assets
+           retroarch-core-info
+           retroarch-joypad-autoconfig))))
+
 (define-public wasm4
   (package
     (name "wasm4")