Subject: Re: [bug#73522] [PATCH games-team 07/14] gnu: retroarch: Extend search-path support.

From: Maxim Cournoyer <[email-masked]>
Date: Sun, 06 Oct 2024 16:45:07 +0900

Hi Liliana,

Liliana Marie Prikler <[email-masked]> writes:

> Am Sonntag, dem 06.10.2024 um 14:32 +0900 schrieb Maxim Cournoyer:
>> * gnu/packages/patches/retroarch-improved-search-paths.patch: New
>> file.
>> * gnu/local.mk (dist_patch_DATA): Register it.
>> * gnu/packages/emulators.scm (retroarch) [source]: Apply patch.
>> [configure-flags]: Add '--disable-update_assets'.
>> [native-search-paths]: New search paths for
>> LIBRETRO_ASSETS_DIRECTORY,
>> LIBRETRO_AUTOCONFIG_DIRECTORY, LIBRETRO_VIDEO_FILTER_DIRECTORY and
>> LIBRETRO_VIDEO_SHADER_DIRECTORY.

[...]

>> -    (native-inputs
>> -     (list pkg-config wayland-protocols which))
>>      (native-search-paths
>>       (list (search-path-specification
>>              (variable "LIBRETRO_DIRECTORY")
>> -            (separator #f)              ; single entry
>> -            (files '("lib/libretro")))))
>> +            (separator #f)              ;single entry
>> +            (files '("lib/libretro")))
>> +           (search-path-specification
>> +            (variable "LIBRETRO_ASSETS_DIRECTORY")
>> +            (separator #f)              ;single entry
>> +            (files '("share/libretro/assets")))
>> +           (search-path-specification
>> +            (variable "LIBRETRO_AUTOCONFIG_DIRECTORY")
>> +            (separator #f)              ;single entry
>> +            (files '("share/libretro/autoconfig")))
>> +           (search-path-specification
>> +            (variable "LIBRETRO_VIDEO_FILTER_DIRECTORY")
>> +            (separator #f)              ;single entry
>> +            (files '("share/libretro/filters/video")))
>> +           (search-path-specification
>> +            (variable "LIBRETRO_VIDEO_SHADER_DIRECTORY")
>> +            (separator #f)              ;single entry
>> +            (files '("share/libretro/shaders")))))
> Can we make some of those colon-separated paths?

Not in the current implementation.  I've followed what was already there
(LIBRETRO_DIRECTORY).  Having a real multi-items search path would be
nice but in practice it has little benefits (it'd only be useful if you
had libretro cores distributed across multiple Guix profiles -- not a
very common scenario). Also, tokenizing strings in C is not particularly
fun, as I found out when I worked on that in my previous jgrf
submission.

-- 
Thanks,
Maxim