From patchwork Sun Feb 27 21:29:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37538 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7946F27BBEC; Sun, 27 Feb 2022 21:32:29 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 758E327BBEA for ; Sun, 27 Feb 2022 21:32:28 +0000 (GMT) Received: from localhost ([::1]:59310 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOR9X-0000Y3-JY for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:32:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOR99-0000W0-TC for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37243) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOR99-0005f0-KC for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOR99-0008Hf-Gg for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 11/24] gnu: racket: Move Chez bootfiles to (gnu packages chez). Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:32:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599747331721 (code B ref 53878); Sun, 27 Feb 2022 21:32:03 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:31:13 +0000 Received: from localhost ([127.0.0.1]:59359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR8K-0008FR-P9 for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:31:13 -0500 Received: from mail-vs1-f52.google.com ([209.85.217.52]:44631) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR83-0008DF-8z for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:30:55 -0500 Received: by mail-vs1-f52.google.com with SMTP id y4so11045819vsd.11 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:30:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4c+LihuPfHfcBGJwbquveRPMTwT9e1jfOQoAXBdkyyc=; b=as+jI3gSWTEAhjn9xsiozUMP4Rm3EciQNWAd60gp33rH67VBpPemKplb0RtFI2felc W5hIG+xMifpAC0mtCikVs0ch3giyai+dkOBTOUA8BPNo05KipwQgmTf1jzLOpqbBN1vS +Pd9XHZlwREagPFeXZYCX0Tk1ikPB97pRRu/90EIF+ysKVGFZavhBf1cQRQygKN/BMru I7Dz5kqlnYo7AbYkPj+7OD0rXIZkHkGzUXOGa1AYqX5JZFPSIJijujQt7tw8bqJ+0yVH IqzRbvBSu3LRcZaPtdGlZwtkgyCzO0jFe1A2/KzwPCOCzW2cn7L5sfrPl+fvMheWsIeo a4ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4c+LihuPfHfcBGJwbquveRPMTwT9e1jfOQoAXBdkyyc=; b=e0TdPnXYi+vy6eVuIkN3euPQ/zgmoI//lDYoIMgsCvaZcaZLtDNH+/4wb6iTK4BhJy TfVlZI8JW11sfiAtMLT6FNr/TGVPxgJdROcPrDlC/fuX1RNpOmD4aMxCMz1uumXGIYjC g4bNhKxrrknBsY1g0QJpElZq7HJyi93eIW6Zu8DYtnBBzQdy8+JX72BGL1Y5BXl/sBdt VZkfNJWO3EzinEDr96bwZ/kxxaLuTtu+/TKiJJ5ZUMmh0P3om/5ByaEtZDR3crAGnJus QUSgl7lpTb85f1z19UJ+loFxedkLjYGzXQkJecE2Fan3fTnW0PyKK6pLKpvZR01NXW6i ghUg== X-Gm-Message-State: AOAM530h+MU2Kvbwh+FEsk+PVdSjY0NsMKxSe0GlBRWvASyUcn762gGx cbivl5GWEMHb92xO+oyCJ9gqQwAakrggLCupM5c= X-Google-Smtp-Source: ABdhPJxVXBU404QNZtJTVeGmFwxouJLLWJm/KQQjEQKY9qGaPpi5N9pdelw+vAVrBsZ6p2MU5CBBMg== X-Received: by 2002:a05:6102:5494:b0:31b:7af4:1d5a with SMTP id bk20-20020a056102549400b0031b7af41d5amr7097212vsb.40.1645997449572; Sun, 27 Feb 2022 13:30:49 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id e21-20020ab031d5000000b0033ffa5785cfsm1315901uan.16.2022.02.27.13.30.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:30:49 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:07 -0500 Message-Id: <20220227212920.2009000-12-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/racket.scm (chez-scheme-for-racket-bootstrap-bootfiles): Move to ... * gnu/packages/chez.scm (chez-scheme-for-racket-bootstrap-bootfiles): ... this new variable. [source]: Avoid problematic cycle with "racket.scm". [arguments]<#:phases>: Likewise. --- gnu/packages/chez.scm | 62 +++++++++++++++++++++++++++++++++++++++++ gnu/packages/racket.scm | 52 ---------------------------------- 2 files changed, 62 insertions(+), 52 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index 47904e7b4e..046bb3dcdc 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -31,12 +31,14 @@ (define-module (gnu packages chez) #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix gexp) + #:use-module (guix build-system copy) #:use-module (guix build-system gnu) #:use-module (gnu packages compression) #:use-module (gnu packages ncurses) #:use-module (gnu packages ghostscript) #:use-module (gnu packages linux) #:use-module (gnu packages netpbm) + #:use-module (gnu packages racket) #:use-module (gnu packages tex) #:use-module (gnu packages compression) #:use-module (gnu packages image) @@ -260,6 +262,66 @@ (define* (stex-make #:optional (suffix "")) and 32-bit PowerPC architectures.") (license asl2.0))) +(define-public chez-scheme-for-racket-bootstrap-bootfiles + (package + (name "chez-scheme-for-racket-bootstrap-bootfiles") + (version "9.5.7.3") + ;; The version should match `(scheme-fork-version-number)`. + ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360. + ;; It will always be different than the upstream version! + ;; When updating, remember to also update %racket-version in racket.scm. + (source #f) ; avoid problematic cycle with racket.scm + (inputs `()) + (native-inputs (list racket-vm-bc)) + (build-system copy-build-system) + ;; TODO: cross compilation + (arguments + (list + #:install-plan + #~`(("boot/" "lib/chez-scheme-bootfiles")) + #:phases + #~(let ((unpack (assoc-ref %standard-phases 'unpack))) + (modify-phases %standard-phases + (replace 'unpack + (lambda args + (unpack #:source #$(or (package-source this-package) + (package-source racket-vm-bc))))) + (add-after 'unpack 'chdir + (lambda args + (chdir "racket/src/ChezScheme"))) + (add-after 'chdir 'unpack-nanopass+stex + (lambda args + (copy-recursively + #$nanopass + "nanopass" + #:keep-mtime? #t))) + (add-before 'install 'build + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (invoke (search-input-file (or native-inputs inputs) + "/opt/racket-vm/bin/racket") + "rktboot/main.rkt"))))))) + (home-page "https://github.com/racket/ChezScheme") + ;; ^ This is downstream of https://github.com/racket/racket, + ;; but it's designed to be a friendly landing place for people + ;; who want a ChezScheme-shaped repositroy. + (synopsis "Chez Scheme bootfiles bootstrapped by Racket") + (description "Chez Scheme is a self-hosting compiler: building it +requires ``bootfiles'' containing the Scheme-implemented portions compiled for +the current platform. (Chez can then cross-compile bootfiles for all other +supported platforms.) + +The Racket package @code{cs-bootstrap} (part of the main Racket Git +repository) implements enough of a Chez Scheme simulation to load the Chez +Scheme compiler purely from source into Racket and apply the compiler to +itself, thus bootstrapping Chez Scheme. Bootstrapping takes about 10 times as +long as using an existing Chez Scheme, but @code{cs-bootstrap} supports Racket +7.1 and later, including the Racket BC variant. + +Note that the generated bootfiles are specific to Racket's fork of Chez +Scheme, and @code{cs-bootstrap} does not currently support building upstream +Chez Scheme.") + (license (list asl2.0)))) + (define-public chez-srfi (package (name "chez-srfi") diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index d3d3eb2bbd..a853e520f5 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -445,58 +445,6 @@ (define-public racket-vm-cs ;; The LGPL components are only used by Racket BC. (license (list license:asl2.0 license:expat)))) -(define-public chez-scheme-for-racket-bootstrap-bootfiles - (package - (name "chez-scheme-for-racket-bootstrap-bootfiles") - (version "9.5.7.3") - ;; The version should match `(scheme-fork-version-number)`. - ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360. - ;; It will always be different than the upstream version! - ;; When updating, remember to also update %racket-version in racket.scm. - (source %racket-origin) - (inputs `()) - (native-inputs (list racket-vm-bc)) - (build-system copy-build-system) - ;; TODO: cross compilation - (arguments - (list - #:install-plan - #~`(("boot/" "lib/chez-scheme-bootfiles")) - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'chdir - (lambda args - (chdir "racket/src/ChezScheme"))) - (add-after 'chdir 'unpack-nanopass+stex - (lambda args - #$(make-unpack-nanopass+stex))) - (add-before 'install 'build - (lambda* (#:key native-inputs inputs #:allow-other-keys) - (invoke (search-input-file (or native-inputs inputs) - "/opt/racket-vm/bin/racket") - "rktboot/main.rkt")))))) - (home-page "https://github.com/racket/ChezScheme") - ;; ^ This is downstream of https://github.com/racket/racket, - ;; but it's designed to be a friendly landing place for people - ;; who want a ChezScheme-shaped repositroy. - (synopsis "Chez Scheme bootfiles bootstrapped by Racket") - (description "Chez Scheme is a self-hosting compiler: building it -requires ``bootfiles'' containing the Scheme-implemented portions compiled for -the current platform. (Chez can then cross-compile bootfiles for all other -supported platforms.) - -The Racket package @code{cs-bootstrap} (part of the main Racket Git -repository) implements enough of a Chez Scheme simulation to load the Chez -Scheme compiler purely from source into Racket and apply the compiler to -itself, thus bootstrapping Chez Scheme. Bootstrapping takes about 10 times as -long as using an existing Chez Scheme, but @code{cs-bootstrap} supports Racket -7.1 and later, including the Racket BC variant. - -Note that the generated bootfiles are specific to Racket's fork of Chez -Scheme, and @code{cs-bootstrap} does not currently support building upstream -Chez Scheme.") - (license (list license:asl2.0)))) - (define (racket-packages-origin name origin specs) "Extract from ORIGIN the sources for the Racket packages specified by SPECS, a non-empty list of package specifications. In the resulting file-like