unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip McGrath <philip@philipmcgrath.com>
To: 47153@debbugs.gnu.org, Leo Prikler <leo.prikler@student.tugraz.at>
Subject: [bug#47153] [PATCH] gnu: chez-scheme: simplify packaging
Date: Mon, 15 Mar 2021 14:03:19 -0400	[thread overview]
Message-ID: <80ae553f-ac34-9b63-af43-9adf7d7113a6@philipmcgrath.com> (raw)
In-Reply-To: <cd84e81c9636899b80ef3e31fd0fbb2bd23de7ad.camel@student.tugraz.at>

Hi!

On 3/15/21 6:32 AM, Leo Prikler wrote:
> I'm not an expert on Chez Scheme, so take this with a grain of salt,

I'm not an expert on Guix, so take this with a grain of salt :)

I've been exploring packaging for Racket, and, by extension, Chez 
Scheme, as a way to get more familiar with Guix.

> Am Montag, den 15.03.2021, 04:42 -0400 schrieb Philip McGrath:
>> * gnu/packages/chez.scm (nanopass): Rename it to ...
>> (nanopass-framework-scheme): ... this variable. Change it from an
>> origin
>> to a package. Update to 1.9.2.
> What advantages do we get from making this a package? Can it be
> upgraded to 1.9.2 without this change at the same time?
>> (stex): Rename it to ...
>> (chez-stex): ... this variable. Change it from an origin to a hidden
>> package. Update to commit 5405149, which helps us install it.
> Same here

I don't have a strong opinion about whether these should be packages. My 
main goal was to have the unpack and patch-source-shebangs phases happen 
just once, rather than be handled in an ad-hoc way inside chez-scheme's 
configure phase, because I know I will be reusing these in the Racket 
package, as well.

There are some other considerations specific to each package/origin:

- nanopass-framework-scheme is portable to many R6RS Scheme
implementations. It doesn't have a Makefile or anything:
you just put it in the right place and then happily
`(import (nanopass))` from your Scheme of choice.

- I think the right thing would be to make chez-stex a
public package, instead of the "stex" output of the chez-scheme
package, but there are some bootstrapping issues I'll discuss below.


> , also does this need to be done at the same time as the
> nanopass upgrade?

No

>> (chez-scheme)[source](patches): Use it.
> Use what?

The new patch chez-scheme-build-util-paths-backport.patch added above. 
Is there a better way to write that in the message?

> copy-build-system exists. And again, what is the point of making this
> a package if it contains the exact same files as the corresponding
> origin?

copy-build-system also does validate-documentation-location and 
install-license-files, IIUC. But again, I'm open to alternative approaches.

>> +(define chez-stex
>> + ;; Hidden because of a circular dependency issue:
>> + ;; stex needs chez-scheme to be used, but chez-scheme uses
>> + ;; stex to build its documentation.
>> + ;; The chez-scheme package has an stex output that exposes
>> + ;; the useful version of this---or maybe there's a more elegant
>> solution?

This is related to the comments I added about things probably being 
wrong for cross-compilation, though I don't think they're any more wrong 
with this patch than without it. Fundamentally, you need Chez Scheme to 
compile Chez Scheme. (The Racket fork can be bootstrapped with a C-based 
Racket implementation that simulates enough of Chez Scheme to compile 
the Chez Scheme compiler. Unfortunately, the forks have diverged too 
much right now, at a minimum in the definition of `#!base-rtd`, to be 
able to bootstrap upstream Chez that way.)

Chez distributes "bootfiles" for i686, x86_64, and "arm32" (which I 
hope, but am not sure, could work for "armhf"). Once you've done a 
native build for one of those platforms, you can use it to cross-compile 
for any platform Chez Scheme supports (ppc32, various BSDs, etc—Racket's 
fork adds arm64, and there's been some work on riscv). You need Chez to 
build stex, and thus you need a native Chez to build the Chez Scheme docs.

I'm not sure what the best way to structure that in Guix would be. Maybe 
a hidden variant of Chez that builds the public Chez?

Suggestions are very welcome!

-Philip





  reply	other threads:[~2021-03-15 18:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15  8:42 [bug#47153] [PATCH] gnu: chez-scheme: simplify packaging Philip McGrath
2021-03-15 10:32 ` Leo Prikler
2021-03-15 18:03   ` Philip McGrath [this message]
2021-03-15 18:28     ` Leo Prikler
2021-03-15 21:53       ` Philip McGrath
2021-03-15 22:21         ` Leo Prikler
2021-03-15 22:53           ` [bug#47153] [PATCH v2 1/3] gnu: chez-scheme: Update nanopass to 1.9.2 Philip McGrath
2021-03-15 22:53             ` [bug#47153] [PATCH v2 2/3] gnu: chez-scheme: Update stex Philip McGrath
2021-03-15 22:53             ` [bug#47153] [PATCH v2 3/3] gnu: chez-scheme: simplify packaging Philip McGrath
2021-03-16  7:37             ` [bug#47153] [PATCH v2] gnu: chez-scheme: Update nanopass to 1.9.2 Leo Prikler
2021-03-16 20:19               ` Philip McGrath
2021-03-16 21:09                 ` Leo Prikler
2021-03-19 18:24                   ` [bug#47153] [PATCH v3 1/3] " Philip McGrath
2021-03-19 18:24                     ` [bug#47153] [PATCH v3 2/3] gnu: chez-scheme: Update stex Philip McGrath
2021-03-19 18:24                     ` [bug#47153] [PATCH v3 3/3] gnu: chez-scheme: simplify packaging Philip McGrath
2021-04-05 10:02                     ` [bug#47153] [PATCH] " Ludovic Courtès
2021-04-05 14:20                       ` bug#47153: " Leo Prikler
2021-03-20 16:06                   ` [bug#47153] [PATCH v2] gnu: chez-scheme: Update nanopass to 1.9.2 Philip McGrath

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=80ae553f-ac34-9b63-af43-9adf7d7113a6@philipmcgrath.com \
    --to=philip@philipmcgrath.com \
    --cc=47153@debbugs.gnu.org \
    --cc=leo.prikler@student.tugraz.at \
    /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).