Subject: [bug#74801] [PATCH v4] gnu: home: services: Add home-mpv-service-type.

From: Sergey Trofimov <[email-masked]>
Date: Fri, 23 May 2025 13:27:21 +0200

Hi Tomas,

Tomas Volf <[email-masked]> writes:

> This commit adds a new service type to generate configuration file for the mpv
> media player.
>

I've just noticed this got merged and tried to use it in my config. I've
mostly translated the config, but stumbled on the scripts settings:

--8<---------------cut here---------------start------------->8---
(service home-mpv-service-type
        (make-home-mpv-configuration
         #:global (make-mpv-profile-configuration
                    #:scripts
                    (list
                     (file-append #$mpv-mpris "/lib/mpris.so")
                     (file-append #$mpv-thumbfast "/share/mpv/scripts/thumbfast.lua")
                     (file-append #$mpv-uosc "/share/mpv/scripts/uosc")))))
--8<---------------cut here---------------end--------------->8---

Such config doesn't work as `scripts` option is of `list-of-string`
type. I've also tried to workaround with `#:extra-config #~(...)`, but
this didn't work either, raising an error in `string-suffix?`.

To make it work, I think a new "file" type is necessary, which would
allow gexps. Options that are marked as "[file]" (`mpv --list-options |
grep -F "[file]"`) should assume this new type.