unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Andy Patterson <ajpatter@uwaterloo.ca>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH v2 01/13] build-system: Add asdf-build-system.
Date: Fri, 07 Oct 2016 14:44:38 +0200	[thread overview]
Message-ID: <87d1jcxr9l.fsf@gnu.org> (raw)
In-Reply-To: <20161007040731.4005f917@uwaterloo.ca> (Andy Patterson's message of "Fri, 7 Oct 2016 04:07:31 -0400")

Hello,

Adding my 2¢ as 宋文武 suggested.  :-)

Andy Patterson <ajpatter@uwaterloo.ca> skribis:

> From 31dea60d8f4d876c24352b3279c8bef7d5a1ffc4 Mon Sep 17 00:00:00 2001
> From: Andy Patterson <ajpatter@uwaterloo.ca>
> 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-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.

This code seems to be adapted from ‘package-with-python2’.  It seems
that ‘package-input-rewriting’ is too specific to be used here, 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
‘package-with-python2’ due to python-2 and python-3 packages sometimes
having a different set of dependencies.  If it can be avoided here, it’s
better.  Otherwise that’s fine.

(I haven’t 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 systems
> +  (unless (string=? lisp "sbcl")
> +    (apply (assoc-ref gnu:%standard-phases 'strip) args))
> +  #t)

Shouldn’t it be:

  (or (string=? lisp "sbcl")
      (apply …))

?  Otherwise the real return value is discarded.

> +(define %lisp
> +  (make-parameter "lisp"))

Add a comment like “File name of the Lisp compiler.” (?).

> +(define %install-prefix "/share/common-lisp")

What about “lib/common-lisp” for architecture-dependent files
(binaries)?  What do other distros do?

That’s it.

Thank you!

Ludo’.

  reply	other threads:[~2016-10-07 12:45 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-27  4:15 [PATCH 0/12]: Add asdf-build-system Andy Patterson
2016-09-27  4:15 ` [PATCH 01/12] build-system: " Andy Patterson
2016-09-27  4:15 ` [PATCH 02/12] gnu: Add alexandria Andy Patterson
2016-10-08 12:43   ` Ludovic Courtès
2016-09-27  4:15 ` [PATCH 03/12] gnu: Add fiveam Andy Patterson
2016-10-08 12:48   ` Ludovic Courtès
2016-09-27  4:15 ` [PATCH 04/12] gnu: Add bordeaux-threads Andy Patterson
2016-09-27  4:15 ` [PATCH 05/12] gnu: Add trivial-gray-streams Andy Patterson
2016-09-27  4:15 ` [PATCH 06/12] gnu: Add flexi-streams Andy Patterson
2016-09-27  4:15 ` [PATCH 07/12] gnu: Add cl-ppcre Andy Patterson
2016-09-27  4:15 ` [PATCH 08/12] gnu: Add clx Andy Patterson
2016-09-27  4:15 ` [PATCH 09/12] gnu: Add stumpwm Andy Patterson
2016-09-27  4:15 ` [PATCH 10/12] gnu: Add slynk Andy Patterson
2016-10-08 12:59   ` Ludovic Courtès
2016-09-27  4:15 ` [PATCH 11/12] gnu: Add stumpwm-with-slynk-sbcl Andy Patterson
2016-09-27  4:15 ` [PATCH 12/12] gnu: Add stumpwm-with-slynk-image-sbcl Andy Patterson
2016-09-27 12:51 ` [PATCH 0/12]: Add asdf-build-system James Richardson
2016-09-29  2:30 ` Andy Patterson
2016-09-30 11:45   ` 宋文武
2016-10-03  2:41     ` Andy Patterson
2016-10-03  2:41 ` [PATCH v2 00/13]: " Andy Patterson
2016-10-03  2:41   ` [PATCH v2 01/13] build-system: " Andy Patterson
2016-10-05  4:55     ` 宋文武
2016-10-05 20:59       ` Andy Patterson
2016-10-07  8:07         ` Andy Patterson
2016-10-07  8:07     ` Andy Patterson
2016-10-07 12:44       ` Ludovic Courtès [this message]
2016-10-07 21:57         ` Andy Patterson
2016-10-08 12:39           ` Ludovic Courtès
2016-10-03  2:41   ` [PATCH v2 02/13] gnu: sbcl: Honour XDG_DATA_DIRS Andy Patterson
2016-10-03  2:41   ` [PATCH v2 03/13] gnu: ecl: " Andy Patterson
2016-10-03  2:41   ` [PATCH v2 04/13] gnu: Add cl-alexandria Andy Patterson
2016-10-03  2:41   ` [PATCH v2 05/13] gnu: Add cl-fiveam Andy Patterson
2016-10-03  2:41   ` [PATCH v2 06/13] gnu: Add cl-bordeaux-threads Andy Patterson
2016-10-03  2:41   ` [PATCH v2 07/13] gnu: Add cl-trivial-gray-streams Andy Patterson
2016-10-03  2:41   ` [PATCH v2 08/13] gnu: Add cl-flexi-streams Andy Patterson
2016-10-03  2:41   ` [PATCH v2 09/13] gnu: Add cl-ppcre Andy Patterson
2016-10-03  2:41   ` [PATCH v2 10/13] gnu: Add cl-clx Andy Patterson
2016-10-03  2:41   ` [PATCH v2 11/13] gnu: Add cl-stumpwm Andy Patterson
2016-10-07  8:07     ` Andy Patterson
2016-10-03  2:41   ` [PATCH v2 12/13] gnu: Add cl-slynk Andy Patterson
2016-10-07  8:07     ` Andy Patterson
2016-10-03  2:41   ` [PATCH v2 13/13] gnu: Add sbcl-stumpwm-with-slynk Andy Patterson
2016-10-07  8:07     ` Andy Patterson
2016-10-06 21:04   ` [PATCH v2 00/13]: Add asdf-build-system Ludovic Courtès
2016-10-07  0:59     ` 宋文武
2016-10-08 13:30   ` 宋文武
2016-10-08 13:00 ` [PATCH 0/12]: " Ludovic Courtès
2016-10-08 13:28   ` 宋文武
2016-10-10 17:54     ` Andy Patterson
2016-10-10 17:47   ` Andy Patterson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d1jcxr9l.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=ajpatter@uwaterloo.ca \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).