GNU bug report logs - #56439
[PATCH] gnu: home: Add Guix channels service.

Previous Next

Package: guix-patches;

Reported by: Reily Siegel <mail <at> reilysiegel.com>

Date: Thu, 7 Jul 2022 15:34:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 56439-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Reily Siegel <mail <at> reilysiegel.com>
Cc: 56439-done <at> debbugs.gnu.org
Subject: Re: bug#56439: [PATCH] gnu: home: Add Guix channels service.
Date: Tue, 12 Jul 2022 00:07:38 +0200
[Message part 1 (text/plain, inline)]
Hi,

Reily Siegel <mail <at> reilysiegel.com> skribis:

> * gnu/home/services/guix.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add guix.scm.
> * doc/guix.texi: Add documentation for home-channels-service.

Neat!  Applied with the cosmetic changes below.

> +(define (channels-xdg-files channels)
> +  `(("guix/channels.scm"
> +     ,(plain-file
> +       "channels.scm"
> +       (call-with-output-string
> +         (lambda (port)
> +           (pretty-print (cons 'list (map channel->code channels)) port)))))))

The downside with this approach is that it doesn’t let you have a
sophisticated ‘channels.scm’ file, for instance one that calls
‘channel-with-substitutes-available’ (info "(guix) Channels with
Substitutes").

All in all, I think that’s an acceptable limitation.  Someone willing to
write arbitrary code to ‘channels.scm’ can “roll their own” and extend
‘home-xdg-configuration-files-service-type’ similarly.

Thanks,
Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/doc/guix.texi b/doc/guix.texi
index 1f49d9bd6a..637a2cf744 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -40083,14 +40083,14 @@ user-specific Guix configuration.
 
 @defvr {Scheme Variable} home-channels-service-type
 This is the service type for managing
-@file{$XGG_CONFIG_HOME/guix/channels.scm}, the file which controls the
-channels recieved on @command{guix pull}. Its associated value is a list
+@file{$XDG_CONFIG_HOME/guix/channels.scm}, the file that controls the
+channels recieved on @command{guix pull}.  Its associated value is a list
 of @code{channel} records, defined in the @code{(guix channels)} module.
 
 Generally, it is better to extend this service than to directly
 configure it, as its default value is the default guix channel(s)
 defined by @code{%default-channels}. If you configure this service
-directly, be sure to include a guix channel. See @ref{Specifying
+directly, be sure to include a guix channel.  @xref{Specifying
 Additional Channels} and @ref{Using a Custom Guix Channel} for more
 details.
 

This bug report was last modified 2 years and 311 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.