From: "Ludovic Courtès" <ludo@gnu.org>
To: Andrew Tropin <andrew@trop.in>
Cc: 49288@debbugs.gnu.org
Subject: [bug#49288] [PATCH] gnu: services: Export provenance-entry and sexp->channel
Date: Thu, 01 Jul 2021 15:37:23 +0200 [thread overview]
Message-ID: <877diakve4.fsf@gnu.org> (raw)
In-Reply-To: <871r8j4rer.fsf@trop.in> (Andrew Tropin's message of "Wed, 30 Jun 2021 12:45:32 +0300")
Hi!
Andrew Tropin <andrew@trop.in> skribis:
> These functions are need for Guix Home.
> ---
> For now functions are copy pasted, but it seems better to reuse
> existing functions.
> https://git.sr.ht/~abcdw/rde/tree/057888b2604b05d555fd1b67f3d356644f9a134d/gnu/home-services.scm#L418
>
> 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
‘channel-instance->sexp’?
Actually, could you define it like so:
--8<---------------cut here---------------start------------->8---
(define home-provenance-service-type
(service-type
(inherit provenance-service-type)
(extensions
(list (service-extension
home-service-type
(service-extension-compute
(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?
Ludo’.
next prev parent reply other threads:[~2021-07-01 13:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-30 9:45 [bug#49288] [PATCH] gnu: services: Export provenance-entry and sexp->channel Andrew Tropin
2021-07-01 13:37 ` Ludovic Courtès [this message]
2021-07-01 14:36 ` Andrew Tropin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877diakve4.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=49288@debbugs.gnu.org \
--cc=andrew@trop.in \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).