From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH v2 01/13] build-system: Add asdf-build-system. Date: Sat, 08 Oct 2016 14:39:19 +0200 Message-ID: <87oa2vhv60.fsf@gnu.org> References: <20160927041532.27097-1-ajpatter@uwaterloo.ca> <20161003024139.19975-1-ajpatter@uwaterloo.ca> <20161003024139.19975-2-ajpatter@uwaterloo.ca> <20161007040731.4005f917@uwaterloo.ca> <87d1jcxr9l.fsf@gnu.org> <20161007175708.01e92083@uwaterloo.ca> 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]:56070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsquZ-0002ud-7e for guix-devel@gnu.org; Sat, 08 Oct 2016 08:39:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsquX-0004AF-3c for guix-devel@gnu.org; Sat, 08 Oct 2016 08:39:30 -0400 In-Reply-To: <20161007175708.01e92083@uwaterloo.ca> (Andy Patterson's message of "Fri, 7 Oct 2016 17:57:08 -0400") List-Id: "Development of GNU Guix and the GNU System distribution." 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" To: Andy Patterson Cc: guix-devel@gnu.org Hi Andy, Andy Patterson skribis: > On Fri, 07 Oct 2016 14:44:38 +0200 > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: [...] >> Andy Patterson skribis: >>=20 >> > +(define* (package-with-build-system from-build-system >> > to-build-system >> > + from-prefix to-prefix >> > + #:key variant-property >> > + phases-transformer) >> > + "Return a precedure which takes a package PKG which uses >> > FROM-BUILD-SYSTEM, +and returns one using TO-BUILD-SYSTEM. If PKG >> > was prefixed by FROM-PREFIX, the +resulting package will be >> > prefixed by TO-PREFIX. Inputs of PKG are recursively +transformed >> > using the same rule. The result's #:phases argument will be >> > +modified by PHASES-TRANSFORMER, an S-expression which evaluates on >> > the build +side to a procedure of one argument.=20=20 >>=20 >> This code seems to be adapted from =E2=80=98package-with-python2=E2=80= =99. It seems >> that =E2=80=98package-input-rewriting=E2=80=99 is too specific to be use= d here, but at >> any rate, we should keep an eye towards factorizing this and keep it >> as simple as possible to facilitate that. >>=20 > > I'm not sure what the right abstraction is to encompass both. I=E2=80=99m thinking of (package-input-map proc), which would take care of = the DAG traversal so we don=E2=80=99t have to rewrite that every time. >> Is #:variant-property necessary here? It was necessary in >> =E2=80=98package-with-python2=E2=80=99 due to python-2 and python-3 pack= ages sometimes >> having a different set of dependencies. If it can be avoided here, >> it=E2=80=99s better. Otherwise that=E2=80=99s fine. >>=20 > > It's necessary any time the variant package must differ from what the > transformer would ordinarily produce, so that a package which needs to > include the variant knows how to find it in the recursive step. In our > case, ecl packages may need different phases or outputs for binary > generation. > > Also, the dependencies could differ, for example stumpwm used to use > the built-in clx on ecl. OK, that makes a lot of sense; it=E2=80=99s similar to the Python situation. >> > +(define %install-prefix "/share/common-lisp")=20=20 >>=20 >> What about =E2=80=9Clib/common-lisp=E2=80=9D for architecture-dependent = files >> (binaries)? What do other distros do? >>=20 > > Binaries are placed in /lib//. /share/common-lisp is just used > for source or symlinked .asd files (as is the convention). The other > distributions I've seen which package Common Lisp libraries (Debian and > Gentoo) do not distribute binaries for systems, and what they do is > basically equivalent to the asdf-build-system/source. I > think /lib// is a good place for binaries, since the > implementations place their extra included system binaries there, > roughly (/lib/sbcl/contrib; /lib/ecl-). Alright. Maybe just add a comment next to =E2=80=98%install-prefix=E2=80= =99 stating that this is the installation prefix for source, not for binaries (I had overlooked that), and maybe rename it to =E2=80=98%source-install-prefix=E2= =80=99. > Cool. Fixes attached inline. No further comments from me. > Are the packages also OK? I'd like to start fixing any problems with > those as well. I=E2=80=99ll take a quick look and will leave the final word to =E5=AE=8B= =E6=96=87=E6=AD=A6. Thanks for your patience! Ludo=E2=80=99.