From patchwork Sat Feb 26 13:02:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37470 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 6FE5E27BBEA; Sat, 26 Feb 2022 13:05:39 +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,URIBL_BLOCKED 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 C012E27BBE9 for ; Sat, 26 Feb 2022 13:05:38 +0000 (GMT) Received: from localhost ([::1]:53142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwlV-0000L3-Ub for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:05:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwk4-00072w-SX for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60580) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwk4-0003C9-JU for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:08 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwk4-0005YN-Dl; Sat, 26 Feb 2022 08:04:08 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 10/22] gnu: racket: Move Chez bootfiles to (gnu packages chez). Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:04:08 +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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588064321245 (code B ref 53878); Sat, 26 Feb 2022 13:04:08 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:04:03 +0000 Received: from localhost ([127.0.0.1]:54448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjy-0005WI-8m for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:02 -0500 Received: from mail-qt1-f173.google.com ([209.85.160.173]:33623) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjf-0005Ua-BE for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:43 -0500 Received: by mail-qt1-f173.google.com with SMTP id bt3so4981997qtb.0 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:03:43 -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=QWGrAxMsRalG9YbMvxWhRRakQjhDJePWTZEStznge9s=; b=Mficudk9PCCa4zZEls4pALTJ7J0NRSKQMwj0OViq6JxJBMRsospK+mCfKaksNmFMUj apMxdmn4sgvGH2XlgEdUneUQBXR/RS2V3D6iQHnVH2+mCulbgCMBN7/owwO1V/tJyACE MqYN6lwtkkEgia0WUCSkPSJz4EkcCI2r6R3Vf1xHUmjtv+LfWhcjUhpy5V2rZbrHGhdJ /E7iZsRrEtYMHevekbutDEBNzxyVFtr7BbVp2cGgS5Bdu4CLuQI6IctkRzrKgK9rdxyh 65sIZBkjHO1R97MnPsu55dzcWKUQ0CPyh0TaZOa3GXiXDdWI1tXUf+wrpkMlbbLA0Zlf XFNw== 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=QWGrAxMsRalG9YbMvxWhRRakQjhDJePWTZEStznge9s=; b=4GTvIJMoA7az3YQscK7CHzITEmVFULMF44GPt1dT/aBpnbE4lzvlO4Hgzh/aqGZ92X AqmkDiiZfyus28p4pgqSDG2oZ2ymxrYq783gAqW5dOUq+xB4SjXQDwXnONctiLe+sH/0 jenHkel2bTXdG7bueWAknzy3DeDFjFv7TDPCQ9EHAJpyd8q2jHSxL6TneYFt1fF3eGsX gyUdLcRcvLsQkBoZSi6gdrik0pFXCKGVrFrbCqqgwm6Z2VNu4OeYR0QC8l45eHxCG0BQ Uv71m1vHOUBsEBbmLWmzkMkuvDJeSwFWlHQn4C9Owtk1vq9EpSfZsg7NI+YDbIc1uwG4 /4NA== X-Gm-Message-State: AOAM532Y+AZiy50HHQJtyfXWIl2243hCig358OkItV5LULLmQtNbEIcg cTwpkjF38fITG9wMKuiFJTaU+5PWoldFryTMaPU= X-Google-Smtp-Source: ABdhPJzDmaxN6aUrm27+j7EZL+eG7npAK8v7x9V6buhZU0N4n5iX6vaUZ7+YgqaRrhNiVSrm/Rl5vg== X-Received: by 2002:a05:622a:90:b0:2de:57e3:c77a with SMTP id o16-20020a05622a009000b002de57e3c77amr10490334qtw.488.1645880617753; Sat, 26 Feb 2022 05:03:37 -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 b137-20020ae9eb8f000000b00648f9736ab0sm2503052qkg.124.2022.02.26.05.03.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:03:37 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:42 -0500 Message-Id: <20220226130254.1301333-11-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 a7704f1afe..ba958b6101 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -442,58 +442,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 (extract-package-source origin spec) "Extract the source for a Racket package specified by SPEC from ORIGIN into a new file-like object. In the resulting file-like object, the package source