From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: Real-world example for channels? Date: Sun, 27 Jan 2019 16:46:13 -0800 Message-ID: <87r2cxa9t6.fsf@gmail.com> References: <29d3b7b9-6d96-e132-e59e-ec7a5ccdd2f1@crazy-compilers.com> <87munnt45x.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:34379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gnv48-0001uD-T3 for help-guix@gnu.org; Sun, 27 Jan 2019 19:46:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gnv47-0003nA-Uf for help-guix@gnu.org; Sun, 27 Jan 2019 19:46:20 -0500 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:46574) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gnv47-0003mu-H5 for help-guix@gnu.org; Sun, 27 Jan 2019 19:46:19 -0500 Received: by mail-pl1-x641.google.com with SMTP id t13so6946324ply.13 for ; Sun, 27 Jan 2019 16:46:19 -0800 (PST) In-Reply-To: <87munnt45x.fsf@elephly.net> (Ricardo Wurmus's message of "Sun, 27 Jan 2019 00:00:58 +0100") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Ricardo Wurmus Cc: help-guix --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ricardo Wurmus writes: > No files are expected to be included. You only include files that you > want to offer. There is no prescribed file layout, nor is there any > naming convention. > > You #:use-module these modules like any other module. > > If the repository contains a file =E2=80=9Cfoo.scm=E2=80=9D which starts = with > =E2=80=9C(define-module (foo) =E2=80=A6)=E2=80=9D, then you can =E2=80=9C= #:use-module (foo)=E2=80=9D after the > repository has been added as a channel. > > I suggest putting modules in separate namespaces. All modules provided > by =E2=80=9Cguix-bimsb=E2=80=9D, for example, are in the =E2=80=9Cbimsb= =E2=80=9D namespace. I agree with Hartmut. I also found this confusing. I've attached a patch to try clarifying it. What do you think? If the Guix manual had told me that the repository's root directory will basically be added to the Guile load path, I would have understood the expected file structure immediately. The Guile manual clearly describes the requirements for making modules available via the load path. Maybe the existing text was clear enough for some. I read it but still wasn't sure exactly how Guix expected me to lay out my channel's files. =2D-=20 Chris --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-doc-Clarify-channel-file-structure.patch Content-Transfer-Encoding: quoted-printable From=20d382cbddd11e86bd9b69f271782d2dccba180a05 Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Sun, 27 Jan 2019 16:29:30 -0800 Subject: [PATCH] doc: Clarify channel file structure. Suggested by Hartmut Goebel . * doc/guix.texi (Channels): Clarify how a channel author should structure t= he files in their channel's Git repository. =2D-- doc/guix.texi | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 22fc03b8f..5499ebf5b 100644 =2D-- a/doc/guix.texi +++ b/doc/guix.texi @@ -3691,10 +3691,20 @@ share your improvements, which are basic tenets of email us at @email{guix-devel@@gnu.org} if you'd like to discuss this. @end quotation =20 =2DOnce you have a Git repository containing your own package modules, you = can =2Dwrite @code{~/.config/guix/channels.scm} to instruct @command{guix pull}= to =2Dpull from your personal channel @emph{in addition} to the default Guix =2Dchannel(s): +To create a channel, create a Git repository containing your own package +modules and make it available. The repository can contain anything, but a +useful channel will contain Guile modules that export packages. Once you +start using a channel, Guix will behave as if the root directory of that +channel's Git repository has been added to the Guile load path (@pxref{Load +Paths,,, guile, GNU Guile Reference Manual}). For example, if your channel +contains a file at @file{my-packages/my-tools.scm} that defines a Guile +module, then the module will be available under the name @code{(my-packages +my-tools)}, and you will be able to use it like any other module +(@pxref{Modules,,, guile, GNU Guile Reference Manual}). + +To use a channel, you can write @code{~/.config/guix/channels.scm} to inst= ruct +@command{guix pull} to pull from your personal channel @emph{in addition} = to +the default Guix channel(s): =20 @vindex %default-channels @lisp =2D-=20 2.20.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlxOUNUACgkQ3UCaFdgi Rp2HFQ/9E3X4kXkCjtNcVr7Uj1HfC/23DBm17I3Zqs635xsFcBJVsiaCbg1zbiZk bkyG926KBGhXwjm1KfD+PqR7k+LilL6PtQKlRGe23sujKBsFO7/iogVvtbonFTuf 4ET67vKzie0tNHnNzDfOuD48THPUDP01wpGRElgrxf+3/LpMxllJwdKOyXU6QIWr KqKCa+TntwYhGOxgx60KxOV+FgpSNXQoEFugH/BfbTv+xQ6Nthf7Ejkk0KxnOH1K a6fP1pNJKfpKl3GpDdjPIfiqPTkobtHLsLWqt8ywd2eBlpBqsvIzGMf1vjudCncH O5vhSKnU9YaHgFMk6bbMSL1JZj4X02e/WV+qCVFHrPRM72BxAFPTgAMzKqOge+LO ZfYCoqScbqecLJGv0eMk6xCOwj3gvazh2j1Tqa+GcJNWNy9Eu3lU7fSdLiKrr6vD VubdY6Y6hGX3jeRv0nRfgSgpSC/RP6Qo6YG2plSkjf0a1EtOter4ecLSoS7DxUFp DhRLsEqJ0HZy7WigViJbtS/WGcm7XO082hokRjEVtutMC3pwoREzeevxbpJnoWkw ETf0QtsxOL1PqLUreuldeRbGCB0jyCN9CZeYnOCnMWaXDZHnhkk6kq1ZE1WEdyxV VxYNggfaZsLw1VeAQ9ey5hl8aJ6It9e7FdKXWjllYP8dxvamNpk= =OCZD -----END PGP SIGNATURE----- --==-=-=--