From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0PemMaMlGmL+IAAAgWs5BA (envelope-from ) for ; Sat, 26 Feb 2022 14:05:39 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aAbqLqMlGmKiJwAA9RJhRA (envelope-from ) for ; Sat, 26 Feb 2022 14:05:39 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6D0D03F870 for ; Sat, 26 Feb 2022 14:05:39 +0100 (CET) Received: from localhost ([::1]:53142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwlW-0000L3-Kk for larch@yhetil.org; Sat, 26 Feb 2022 08:05:38 -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 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645880739; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=QWGrAxMsRalG9YbMvxWhRRakQjhDJePWTZEStznge9s=; b=k0ePRic9IepAjbqwvlxIHqA2p4IryUaIrffTibKBCkBZAQjjdWP0D2F2+KVlmo0yN2O38v WkErh2gtKvGxpKsBMDeJcZM+JtWtst+MrzxgLjg7jEiW3Gjk7Avd97o5mQD49KhLvinUFZ mik2+OU+6yGdYyzkMPAszyDX08uee2d5XRfozHeo9Xnuo6AkNKT1IL8USKR0X+rNjIFlce 6dTNP56u/i6DbB5SVhIQa3S6dXB0Y3z0EF+69uSjdTB2a00FkJUBHjwnG4I9xNdawBHNhv 6h12zJMsm7NLATQwEK/WJtXSq+M6CsvXRjTLM/UrAfLKkRUlvMxhClbOR5kN7Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645880739; a=rsa-sha256; cv=none; b=sbGBuCstYBPpkgvjXawafnngPjfVd3iyY6YPBK2XU2uKHuY0ha2ZGDziBy4QuPq4dU+n0Q QpFVRl+oRm0m8XPQkr8QUsXz6Sp72bdUiDyQIZP4LVQpFfO4RCVRJ5S7BhKns/DOVXgt4d 4GfzvYAQDNwiOFrzpVj8CNco5+PYrBlHBVYnxgKzNlaoNgdznOOJCPfkaxm6P9gywbRags 94Lqoyag/NtCAQHIVuL9jArTKCBLo7uafRXM2fk+yWSpn1VS39YTDvhSQN9TjSh23pBXey e1SzRPKFvTmK/skcWRR49DxIVJz+4ZVHqqqE/bB1P5S0wTfNebiPeb4bbk2LzQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=Mficudk9; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 2.88 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=Mficudk9; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6D0D03F870 X-Spam-Score: 2.88 X-Migadu-Scanner: scn0.migadu.com X-TUID: E7Fh1mgtt8kA * 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 -- 2.32.0