[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#49288] [PATCH] gnu: services: Export provenance-entry and sexp->cha

From: Ludovic Courtès
Subject: [bug#49288] [PATCH] gnu: services: Export provenance-entry and sexp->channel
Date: Thu, 01 Jul 2021 15:37:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)


Andrew Tropin <> skribis:

> These functions are need for Guix Home.
> ---
>  For now functions are copy pasted, but it seems better to reuse
>  existing functions.
>  gnu/services.scm | 3 +++
>  1 file changed, 3 insertions(+)
> diff --git a/gnu/services.scm b/gnu/services.scm
> index 8d413e198e..53b358c63b 100644
> --- a/gnu/services.scm
> +++ b/gnu/services.scm
> @@ -91,6 +91,9 @@
>              ambiguous-target-service-error-service
>              ambiguous-target-service-error-target-type
> +            provenance-entry
> +            sexp->channel

This ‘sexp->channel’ exists “for historical reasons”.  Could you use
(@ (guix channels) sexp->channel) instead, together with

Actually, could you define it like so:

--8<---------------cut here---------------start------------->8---
(define home-provenance-service-type
   (inherit provenance-service-type)
    (list (service-extension
            (first (service-extensions provenance-service-type))))))
   (default-value #f)))
--8<---------------cut here---------------end--------------->8---

More generally, perhaps you could have a procedure that takes a service
type and “rewires” it so that it extends ‘home-service-type’ instead of
‘etc-service-type’, say.  Does that make sense?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]