unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Jan Nieuwenhuizen <janneke@gnu.org>
Cc: 36563@debbugs.gnu.org
Subject: [bug#36563] [PATCH] guix: Add directory to channel.
Date: Sat, 13 Jul 2019 22:49:36 +0200	[thread overview]
Message-ID: <875zo58xsv.fsf@gnu.org> (raw)
In-Reply-To: <87ef2ukkt8.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Sat, 13 Jul 2019 17:37:07 +0200")

Jan Nieuwenhuizen <janneke@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@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’.

  reply	other threads:[~2019-07-13 20:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-09 19:26 [bug#36563] [PATCH] guix: Add directory to channel Jan Nieuwenhuizen
2019-07-13 10:28 ` Ludovic Courtès
2019-07-13 15:37   ` Jan Nieuwenhuizen
2019-07-13 20:49     ` Ludovic Courtès [this message]
2019-07-13 23:09       ` bug#36563: " Jan Nieuwenhuizen
2019-07-14 13:24         ` [bug#36563] " Ludovic Courtès

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=875zo58xsv.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=36563@debbugs.gnu.org \
    --cc=janneke@gnu.org \
    /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).