GNU bug report logs - #36563
[PATCH] guix: Add directory to channel.

Previous Next

Package: guix-patches;

Reported by: Jan Nieuwenhuizen <janneke <at> gnu.org>

Date: Tue, 9 Jul 2019 19:27:01 UTC

Severity: normal

Tags: patch

Done: Jan Nieuwenhuizen <janneke <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 36563 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Jan Nieuwenhuizen <janneke <at> gnu.org>
Cc: 36563 <at> debbugs.gnu.org
Subject: Re: [bug#36563] [PATCH] guix: Add directory to channel.
Date: Sat, 13 Jul 2019 22:49:36 +0200
Jan Nieuwenhuizen <janneke <at> gnu.org> skribis:

> Yes, I agree that this should be the first option to support.  Attached
> is a second attempt: I removed the FIXME and moved `directory' to
> channel-metadata.

That was fast!

> A downside could be that this could make a channel user dependent on
> upstream to provide this `.guix-channel' file; probably best to worry
> about that when the need arises :)

If upstream doesn’t provide this file, then the channel is effectively
unusable because of a file name/module name mismatch, no?

> From 5d78a7eab391ea93c044d85736706b333c2dfee8 Mon Sep 17 00:00:00 2001
> From: Jan Nieuwenhuizen <janneke <at> gnu.org>
> Date: Sat, 13 Jul 2019 16:31:50 +0200
> Subject: [PATCH] channels: Add optional directory to channel metadata.
>
> * guix/channels.scm (<channel-metadata>): Add directory slot.  Update users.
> (read-channel-metadata-from-source): New function.
> (standard-module-derivation): Use it.
> * doc/guix.texi (Package Modules in a Subdirectory): New subsection.

[...]

> +@cindex subdirectory, channels
> +@subsection Package Modules in a Subdirectory
> +
> +A developer may include a @file{guix} subdirectory in their upstream source
> +that contains additional or modified Guix package descriptions.  Typically,
> +their toplevel @file{guix.scm} then uses those package definitions:

What about framing it along these lines:

  As a channel author, you may want to keep your channel modules in a
  sub-directory.  In that case, blah…

?

> +By adding a meta-data file @file{.guix-channel} that specifies the
> +subdirectory that contains the Guix package descriptions it can be used
> +directly as a channel:
> +
> +@lisp
> +(channel
> + (directory "guix"))

It should be:

  (channel
    (version 0)
    (directory "something"))

(‘read-channel-metadata’ currently ignores ‘version’, but that’s a bug
that we should fix afterwards, IMO.)

> +            (let* ((subdir (if #$directory
> +                               (string-append "/" #$directory)
> +                               ""))
> +                   (dir (string-append #$source subdir)))

Maybe s/dir/source/?

Otherwise LGTM!

Thanks,
Ludo’.




This bug report was last modified 6 years and 27 days ago.

Previous Next


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