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: Fri, 07 Oct 2016 14:44:38 +0200 Message-ID: <87d1jcxr9l.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> 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]:57717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsUWD-0007yt-Nn for guix-devel@gnu.org; Fri, 07 Oct 2016 08:45:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsUW4-00072E-G6 for guix-devel@gnu.org; Fri, 07 Oct 2016 08:44:52 -0400 In-Reply-To: <20161007040731.4005f917@uwaterloo.ca> (Andy Patterson's message of "Fri, 7 Oct 2016 04:07:31 -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 Hello, Adding my 2=C2=A2 as =E5=AE=8B=E6=96=87=E6=AD=A6 suggested. :-) Andy Patterson skribis: > From 31dea60d8f4d876c24352b3279c8bef7d5a1ffc4 Mon Sep 17 00:00:00 2001 > From: Andy Patterson > Date: Mon, 26 Sep 2016 20:11:54 -0400 > Subject: [PATCH v3 01/12] build-system: Add asdf-build-system. > > * guix/build-system/asdf.scm: New file. > * guix/build/asdf-build-system.scm: New file. > * guix/build/lisp-utils.scm: New file. > * Makefile.am (MODULES): Add them. > * doc/guix.texi (Build Systems): Document 'asdf-build-system'. Woohoo, nice stuff! > +@defvr {Scheme Variable} asdf-build-system/source > +@defvrx {Scheme Variable} asdf-build-system/sbcl > +@defvrx {Scheme Variable} asdf-build-system/ecl And great doc. > +(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-SY= STEM, > +and returns one using TO-BUILD-SYSTEM. If PKG was prefixed by FROM-PREFI= X, the > +resulting package will be prefixed by TO-PREFIX. Inputs of PKG are recur= sively > +transformed using the same rule. The result's #:phases argument will be > +modified by PHASES-TRANSFORMER, an S-expression which evaluates on the b= uild > +side to a procedure of one argument. 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 used h= ere, but at any rate, we should keep an eye towards factorizing this and keep it as simple as possible to facilitate that. Is #:variant-property necessary here? It was necessary in =E2=80=98package-with-python2=E2=80=99 due to python-2 and python-3 package= s sometimes having a different set of dependencies. If it can be avoided here, it=E2= =80=99s better. Otherwise that=E2=80=99s fine. (I haven=E2=80=99t followed closely, so apologies if this has already been discussed.) Note: Two spaces after end-of-sentence period please. :-) > + (define target-is-source? (eq? 'asdf/source > + (build-system-name to-build-system))) Rather: (eq? ast-build-system/source to-build-system) The name is purely for debugging purposes. > +(define asdf-build-system/sbcl > + (build-system > + (name 'asdf/sbcl) > + (description "The build system for asdf binary packages using sbcl") > + (lower (lower "sbcl")))) > + > +(define asdf-build-system/ecl > + (build-system > + (name 'asdf/ecl) > + (description "The build system for asdf binary packages using ecl") > + (lower (lower "ecl")))) > + > +(define asdf-build-system/source > + (build-system > + (name 'asdf/source) > + (description "The build system for asdf source packages") > + (lower lower/source))) Probably uppercase: SBCL, ECL, ASDF. > +(define* (strip #:key lisp #:allow-other-keys #:rest args) > + ;; stripping sbcl binaries removes their entry program and extra syste= ms > + (unless (string=3D? lisp "sbcl") > + (apply (assoc-ref gnu:%standard-phases 'strip) args)) > + #t) Shouldn=E2=80=99t it be: (or (string=3D? lisp "sbcl") (apply =E2=80=A6)) ? Otherwise the real return value is discarded. > +(define %lisp > + (make-parameter "lisp")) Add a comment like =E2=80=9CFile name of the Lisp compiler.=E2=80=9D (?). > +(define %install-prefix "/share/common-lisp") What about =E2=80=9Clib/common-lisp=E2=80=9D for architecture-dependent fil= es (binaries)? What do other distros do? That=E2=80=99s it. Thank you! Ludo=E2=80=99.