From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0DOjMOntG2KEQgAAgWs5BA (envelope-from ) for ; Sun, 27 Feb 2022 22:32:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id SHdoLentG2J2/QAAauVa8A (envelope-from ) for ; Sun, 27 Feb 2022 22:32:25 +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 4E15DC068 for ; Sun, 27 Feb 2022 22:32:25 +0100 (CET) Received: from localhost ([::1]:59310 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOR9U-0000Y3-Er for larch@yhetil.org; Sun, 27 Feb 2022 16:32:24 -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=A8s?= , 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 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=1645997545; 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=4c+LihuPfHfcBGJwbquveRPMTwT9e1jfOQoAXBdkyyc=; b=iAQrbVHCQJVAsZApXFjOE09VwcZUMJ3c++LcWzickI9GuDpDhajuEpVFDy9o8DLGg5LAyK +V+Ahv8gjKeC0ljDD4/UHsjM0wEoDeXgaZ2EoRdVjBJM9QYeyezRT4cHF1Ewq36aIV0erh qT5TUG3ViUP2QGDy+gZjaZq5zr1IRMEWoBJBRqNF9hDcxAts0jtY6+tWPa6Si9OAdMRocX toaCBADNNzrounZ9DKgcOjE+GMI1ymLGM3k/5BydRqfmZTyoo/F8RD+Rh6WgH4EdPUnQfB SydgBxT/SGNxiSdEUw6kt7KQWzFHTITw0trAZJ447HEfl0xBhKlZUz2Hzv34Cw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645997545; a=rsa-sha256; cv=none; b=QHS/Nl47RicV0K/AAtEF2BhrNNDVzTAZtVBot8LyR08bPgSSWgffQbRe/1p/JIEFv2BX2t 4LGlsAHzTt45CDpLA+5GZT4DIhP1uCfv2majR442XdIAtp5x1aoTacR9x55gVktDej31nh 5nAD1YkX6jc/zl2wr+Bcb5anLvgVsJZUexVh+eCFp28vtmBgs+tBHLWUrVXWJDzc6BzPli eLGFQRIU8uc1lZEfTJ/4aYX+yFWT0dcGtHzwV1JvnKXYlCyI8OR4O61mBYNOt0pGqy1jeO 8LtGFs4j4DqC1Z+qdkDd2dIgX11nOKc2uEXjQuKGw+sa7g9OCQ2HBk3d9zQZ0w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=as+jI3gS; 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: 3.40 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=as+jI3gS; 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: 4E15DC068 X-Spam-Score: 3.40 X-Migadu-Scanner: scn0.migadu.com X-TUID: cIc8LytnMuw/ * 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 -- 2.32.0