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

From: Andrew Tropin <[email-masked]>
Date: Sun, 11 May 2025 09:45:59 +0700

On 2025-05-09 10:49, Ludovic Courtès wrote:

> Hello,
>
> Tomas Volf <[email-masked]> writes:
>
>> Ludovic Courtès <[email-masked]> writes:
>
> [...]
>
>>> Could you include the code you used to generate the options?
>>
>> I definitely *could* do that.  While the code is maybe a bit ugly, it is
>> not intended to be kept secret.  Couple of questions though.
>>
>> 1. Where should I put it?  Somewhere in etc directory?  Or next to the
>>    service, so e.g. gnu/home/services/mpv-refresh.sh?
>>
>> 2. It has external dependencies, some of which are packaged in Guix
>>    (emacs, emacs-paredit) and some of them are not (guile-wolfsden).  Is
>>    that a problem?  Do I need to rewrite it to use just packaged
>>    libraries and programs?
>
> Well, in that case, maybe just include the URL in the script in the
> comment (“Generated by …”).
>
> Had it been pure Scheme (possibly based on (guix read-print) rather than
> Emacs), we could have included it straight in the code, as is done for
> Dovecot IIRC.  Someone updating it could use the relevant procedures at
> the REPL to re-generate the option definitions.

I would also suggest to keep auto-generated schemas and docs in separate
files, so they can be easily re-generated without copy-pasting or other
manual interventions.

-- 
Best regards,
Andrew Tropin