Subject: [bug#54986] [PATCH] gnu: mpd: Add support for socket activation.

From: Liliana Marie Prikler <[email-masked]>
Date: Wed, 26 Apr 2023 06:28:16 +0200

Am Dienstag, dem 25.04.2023 um 20:33 -0400 schrieb Maxim Cournoyer:
> Hi!
> 
> Liliana Marie Prikler <[email-masked]> writes:
> 
> > * gnu/services/shepherd.scm (<shepherd-endpoint>): New record type.
> > (shepherd-endpoint->sexp): New variable.
> > * doc/guix.texi (Shepherd Services): Document it.
> 
> Like Ludovic, I'm wondering what duplicating the Shepherd endpoints
> API in Guix buys us?  It sometimes feel a bit contrived to have to
> work inside the service's gexp expression, but other than that, I
> think it's good to:
> 
> 1. Avoid duplication.
> 2. Keep it as internal/hidden as possible from users.
I agree with the point about avoiding duplication, but I want users to
be able to specify endpoints for socket activation.  This has several
benefits: It firstly allows users to specify that they want a specific
service to be started on demand rather than on boot, and it also allows
them to bind to multiple endpoints, e.g. any IPv4 address, any IPv6
address or both.  Duplicating the API here is merely a means of
allowing users to express the above in a Guixy fashion.  It also gives
us type-checking which a simple quote or quasiquote doesn't.  If the
same can be achieved by inspecting Shepherd's records and we can allow
Guix to depend on Shepherd, that'd be fine by me. 

Cheers