Message ID | 20230107162431.6739-1-jgart@dismail.de |
---|---|
State | New |
Headers | show |
Series | [bug#60630] guix: channels: Add description field. | expand |
Am Samstag, dem 07.01.2023 um 10:24 -0600 schrieb jgart: > * guix/channels.scm (<channel>): Add channel description field and > comment disambiguating the type expected in an introduction field. > * doc/guix.scm (Invoking guix describe): Add channel description > field to channels record instance example. > > This commit adds an optional description field to a channel intended > to describe the channel. Its purpose is similar to the description > field in a <package> record. Since channel descriptions would be maintained by the user and neither Guix' nor the channel's authors, I think it's safe to say that this description field would in effect be nothing more but a comment. Paired with the fact that introducing it would break ABI, I'm not too sure whether this is a good idea. Cheers PS: Apologize the copy, I typo'd on the bug thread.
Hi, Liliana Marie Prikler <liliana.prikler@gmail.com> skribis: > Am Samstag, dem 07.01.2023 um 10:24 -0600 schrieb jgart: >> * guix/channels.scm (<channel>): Add channel description field and >> comment disambiguating the type expected in an introduction field. >> * doc/guix.scm (Invoking guix describe): Add channel description >> field to channels record instance example. >> >> This commit adds an optional description field to a channel intended >> to describe the channel. Its purpose is similar to the description >> field in a <package> record. > Since channel descriptions would be maintained by the user and neither > Guix' nor the channel's authors, I think it's safe to say that this > description field would in effect be nothing more but a comment. Right, I agree. What use case did you have in mind, jgart? Most likely, a description could go to the ‘.guix-channel’ file, if it’s of any use. Thanks, Ludo’.
Hi Ludo and Liliana, Now after thinking more about and discussing my previous proposal with people I also agree with you that it is not the best approach. > Right, I agree. What use case did you have in mind, jgart? See the search that we are building here: https://toys.whereis.みんな/ toys is a channel webring in the form of a web API. It currently allows searching for public symbols (parses docstring info if available), services, and packages across the Guix channels that are part of the webring channels.scm file: https://git.sr.ht/~whereiseveryone/toys/tree/master/item/channels.scm We'd like to be able to have a standardized way to get a channel description in the same way that we have a standardized way to get a description or synopsis of a package. In other words, we want to make it easy to describe each channel for the users that subscribe to that channel or are browsing channels for stuff that they might want to use. > Most likely, a description could go to the ‘.guix-channel’ file, if it’s unmatched-paren had suggested this very idea to me yesterday. unmatched-paren also mentioned the following: > you'd also want to change guix/scripts/pull.scm to display the description when a new channel addition is announced Feel free to close this ticket and when I get some free time I'll try to send a patch implementing the description field to `.guix-channel`. If you have any other suggestions before I send that patch proposal for review feel free to comment now or then. all best, jgart * https://git.sr.ht/~whereiseveryone/toys/ * https://en.wikipedia.org/wiki/Webring
Hi, "jgart" <jgart@dismail.de> skribis: >> Right, I agree. What use case did you have in mind, jgart? > > See the search that we are building here: > > https://toys.whereis.みんな/ Woow, very nice! We definitely need that kind of tool. There might be interesting stuff to borrow/share with hpcguix-web, in particular the bit the periodically updates channels from which packages are displayed. > toys is a channel webring in the form of a web API. It currently allows searching for public symbols (parses docstring info if available), services, and packages across the Guix channels that are part of the webring channels.scm file: https://git.sr.ht/~whereiseveryone/toys/tree/master/item/channels.scm > > We'd like to be able to have a standardized way to get a channel description in the same way that we have a standardized way to get a description or synopsis of a package. > > In other words, we want to make it easy to describe each channel for the users that subscribe to that channel or are browsing channels for stuff that they might want to use. Right, so I think this could go in <channel-metadata> and ‘read-channel-metadata’, which is what reads ‘.guix-channel’. To support i18n, we might want to have a format similar to that of channel news files. As additional metadata, we might want to add a link to a logo, to a substitute server, substitute key, and things like that, as in: https://gitlab.inria.fr/guix-hpc/website/-/blob/master/channels.scm So I’m closing this one and looking forward to addressing this! Thanks, Ludo’.
diff --git a/doc/guix.texi b/doc/guix.texi index 24d99cbf24..483d2fbaa4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -5063,6 +5063,8 @@ $ guix describe -f channels (list (channel (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git") + (description "The main GNU Guix channel providing the core +package collection along with Guix and its documentation.") (commit "e0fa68c7718fffd33d81af415279d6ddb518f727") (introduction diff --git a/guix/channels.scm b/guix/channels.scm index d84228c47e..8acf3d8742 100644 --- a/guix/channels.scm +++ b/guix/channels.scm @@ -122,13 +122,14 @@ (define-module (guix channels) (define-record-type* <channel> channel make-channel channel? - (name channel-name) - (url channel-url) - (branch channel-branch (default "master")) - (commit channel-commit (default #f)) - (introduction channel-introduction (default #f)) - (location channel-location - (default (current-source-location)) (innate))) + (name channel-name) + (url channel-url) + (description channel-description (default #f)) ; string + (branch channel-branch (default "master")) + (commit channel-commit (default #f)) + (introduction channel-introduction (default #f)) ; <channel-introduction> + (location channel-location + (default (current-source-location)) (innate))) ;; Channel introductions. A "channel introduction" provides a commit/signer ;; pair that specifies the first commit of the authentication process as well