From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Overlays Date: Fri, 30 Aug 2013 21:31:07 +0200 Message-ID: <87bo4f3ric.fsf_-_@gnu.org> References: <87vc2o4qwc.fsf@gnu.org> <87eh9c9sb8.fsf@gnu.org> <20130830160948.GB5927@kubera.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFUUW-00060d-2w for guix-devel@gnu.org; Fri, 30 Aug 2013 15:36:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VFUUQ-0002Sv-3q for guix-devel@gnu.org; Fri, 30 Aug 2013 15:36:20 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:55921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFUUP-0002Sl-Th for guix-devel@gnu.org; Fri, 30 Aug 2013 15:36:14 -0400 In-Reply-To: <20130830160948.GB5927@kubera.inria.fr> (Cyprien Nicolas's message of "Fri, 30 Aug 2013 18:09:48 +0200") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Cyprien Nicolas Cc: guix-devel@gnu.org Cyprien Nicolas skribis: > "Portage" (the tool used to install packages from source, through the > "emerge" command) looks for ebuild in that directory, but it can also > looks from other directories which follow the same structure, those > directories are called "overlays", as they can mask packages from the > official tree, but also extend it. OK, I see. In Guix, packages (equivalent to =E2=80=9Cebuilds=E2=80=9D, AIUI) are just = Scheme objects. Normally, they are exported by Guile modules; the GNU system exports packages from the (gnu packages ...) name space, but users are free to create other modules that define and export packages. The =E2=80=98guix build=E2=80=99 and =E2=80=98guix package=E2=80=99 command= s traverse the list of modules in the (gnu packages ...) name space. Thus, if you type: guix build hop the whole list packages exported by (gnu packages ...) modules is traversed in search of one whose name is =E2=80=9Chop=E2=80=9D. But you can also run: guix build -e '(@ (my own packages) hop)' to refer to a specific package definition in your own module. Now, there is currently no way to instruct the command-line tools to also look under (my own packages), for instance. That may be a useful thing to add. > However, overlay create new concerns. First, priority of overlays, if > two provide the same package-version combination, which one to choose? > If Overlay A provide Package P, which depends on Library L, not in > Overlay A but in the "base" repository, and that Overlay B provide > a newer version of Library L, which L to choose? In Guix the dependency graph is really a graph of Scheme objects, so there=E2=80=99s no ambiguity as to what they refer to. So I think Guix nearly supports overlays, no? :-) The way forward is to identify precise mechanisms needed to better support overlay-style uses, and then to come up with patches (patches that are simple enough could go in for 0.4.) A good starting point is the =E2=80=98fold-packages=E2=80=99 procedure in (= gnu packages). WDYT? Thanks, Ludo=E2=80=99.