From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 aABYCMyYEGJYlAAAgWs5BA (envelope-from ) for ; Sat, 19 Feb 2022 08:14:20 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id OGszAcyYEGJVWQAAG6o9tA (envelope-from ) for ; Sat, 19 Feb 2022 08:14:20 +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 7C1DE129D0 for ; Sat, 19 Feb 2022 08:14:19 +0100 (CET) Received: from localhost ([::1]:54908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nLJwb-0002D4-Jc for larch@yhetil.org; Sat, 19 Feb 2022 02:14:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLJTT-00071U-4Q for guix-patches@gnu.org; Sat, 19 Feb 2022 01:44:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34626) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nLJTS-00082f-9k for guix-patches@gnu.org; Sat, 19 Feb 2022 01:44:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nLJTS-0004nk-8u for guix-patches@gnu.org; Sat, 19 Feb 2022 01:44:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v3 08/15] gnu: chez-scheme: Explicitly package bootstrap bootfiles. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 19 Feb 2022 06:44:06 +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 Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Attila Lendvai , Philip McGrath , Malte Gerdes , zimoun Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164525302818315 (code B ref 53878); Sat, 19 Feb 2022 06:44:06 +0000 Received: (at 53878) by debbugs.gnu.org; 19 Feb 2022 06:43:48 +0000 Received: from localhost ([127.0.0.1]:56737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLJTA-0004lI-5Q for submit@debbugs.gnu.org; Sat, 19 Feb 2022 01:43:48 -0500 Received: from mail-qk1-f178.google.com ([209.85.222.178]:44610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLJSy-0004kB-Ro for 53878@debbugs.gnu.org; Sat, 19 Feb 2022 01:43:37 -0500 Received: by mail-qk1-f178.google.com with SMTP id q4so8837660qki.11 for <53878@debbugs.gnu.org>; Fri, 18 Feb 2022 22:43:36 -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=KNOUjMT3+W/jjCU6TuR4VoZo9rnrj3vaZE3pLMma7YQ=; b=NslN0ZL1F4uPg67/ViQ6yzxwzopN4gOkmNUYVZET1JYftxjocv+rtr+Cv4+h2wBM0x eeMazf7me2TUCekVYBo4s0IcOr9HmG4G3PU6ZPZEzClVClv0rdIHqaz34doYniBbtgJG wxePAWMa07WYb3aLaxb71B/AGh4tjzbE73vtHrqbLlQP/qp7ZrtsqhGbynG3peFIl0uZ c8ljzrhVlBxl1ELUqPyW2pzl0ZHWinoSla2/cjKwgQ0yir9yUt8qUlOGCraJEgHxvKkk /DjaaGOKxRCmYS3LOCQDNKXpJ1O1l815FGKMKpYsvV5xcyK9fp6Fh5FS8AOOvstaYalk T8ag== 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=KNOUjMT3+W/jjCU6TuR4VoZo9rnrj3vaZE3pLMma7YQ=; b=2JFm7SvNLhEmie7c6s6V1DWm95G89qsnxBwXDDV7PvOttcCS3HsZhCXGqgUqpglbJr W/wimFldRBfWwpQ1zWzpoyrLln9nCTbSEXuM7nH0luF59eoFfxI89C/g6OBZOYQdpYP0 bnneZuw7yi0utHYxCH3l3uYKvMcvHMUZs64l0yDvsq1XeSneGpNt7T8JS628mLDdqFPc nMONHcSL3RDYxgXcZSjSrWZvW1FO9Ekk9kbElMfsgZiT25vjNJtKCs+B0xtExh122/g2 FiDQQcsXOVbsyzVleDLYHJDNiW/sbyFaH8bQzv0Gj5pEotMiJlzCuU+KhciPR0Oa/PPt 3mqw== X-Gm-Message-State: AOAM530x1fSEGf42jDeSfVqjuggdEDedfVWM+pY/koEFZ0G+6CJnslqT jkzHR1+L+firQlf4aJu0WucZvFiZQOHGRuw8X7w= X-Google-Smtp-Source: ABdhPJzxB8XHdqo8PQeH4syXSFk01a7cTLVOUeft8JupuqOB8y3vt3/AXnQq7c0ehhjZXRfIjW1noQ== X-Received: by 2002:ae9:ef58:0:b0:46c:e3c1:71ff with SMTP id d85-20020ae9ef58000000b0046ce3c171ffmr6662639qkg.698.1645253011361; Fri, 18 Feb 2022 22:43:31 -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 z17sm26705721qta.11.2022.02.18.22.43.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Feb 2022 22:43:31 -0800 (PST) From: Philip McGrath Date: Sat, 19 Feb 2022 01:42:21 -0500 Message-Id: <20220219064228.246917-9-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220219064228.246917-1-philip@philipmcgrath.com> References: <20220208151316.1897345-1-philip@philipmcgrath.com> <20220219064228.246917-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=1645254859; 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=KNOUjMT3+W/jjCU6TuR4VoZo9rnrj3vaZE3pLMma7YQ=; b=Dv8UHPlPicGOJp4yuwiIL9XRsJ5E2ROe4b5YYccxnUyzYTaTaXGHa1MIPZUDyOo02RurUA Aonz0y8qxawBNfYbM5lwrpP2xYj/8Un4X1UXKCfdtaDqrr2lXjBLbIpnijs/sNAOKaqyB0 lgzhE+YYpsCf/8cbaL583L7WTjReKLMJMeTDe5X9ZCME55/B45JYFR1PuwiuZDCjg9i6yu tH4xAdrba9YR2MpoWhe3lMdTDqv8yLyjF2P3+464m17ZeHWDJvmoKHtpoS2FOS/esZsOX0 CZi6bTftlJZCAEfS07Wq3T4b38pbJWBIOUc0AGJ8JAPmTOVTIiEFjD60fE64Jw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645254859; a=rsa-sha256; cv=none; b=ezZo6yBrg78DQ/gPmjzT+rU2urd/AVY+msYcGezrpocL5fwAj1mLCIgQqFcghtL4b4pYDl H5H8KCFCAxyAoEnDxHDkS1X3NNg0zx10ayiIMl+AMHZEMD0ra0wiuL0tNr0QIP+j2YPlFi JomRH3LQYPoFryQi7zd9YeUpQ0eEMv4HDMZq/2IdmnQe5v0NOCrPhq4xHG5T4+qitrQsQZ zIlU/OD5AH2y3+z/9zge1lD7hEhZLt6jp6JdCeVjIDy7k6IEDpbmopaTgcpEF99rprNKu0 jfwheqU7ymeXHzUdUgCnmPkSwDfowWfH5w/uXY0zpcLEJwxAb7u9z+t/5m6aow== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=NslN0ZL1; 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: 0.37 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=NslN0ZL1; 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: 7C1DE129D0 X-Spam-Score: 0.37 X-Migadu-Scanner: scn0.migadu.com X-TUID: MDqpdPC9XYU/ This might seem a bit silly in isolation, but it makes the structure of the upstream Chez Scheme package the same as for the Racket variant, it sets things up for (one day, hopefully) actually being able to bootstrap the upstream Chez Scheme bootfiles, and it may be useful for cross-compilation and adding support for architectures without pre-built bootfiles from upstream. * gnu/packages/chez-and-racket-bootstrap.scm (chez-scheme-bootstrap-bootfiles): New variable. (chez-scheme)[native-inputs]: Add it. [arguments]<#:phases>: Add 'unpack-bootfiles'. --- gnu/packages/chez-and-racket-bootstrap.scm | 51 +++++++++++++++++++++- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/gnu/packages/chez-and-racket-bootstrap.scm b/gnu/packages/chez-and-racket-bootstrap.scm index d66955d50d..366815634d 100644 --- a/gnu/packages/chez-and-racket-bootstrap.scm +++ b/gnu/packages/chez-and-racket-bootstrap.scm @@ -187,7 +187,7 @@ (define-public chez-scheme (sha256 (base32 "07s433hn1z2slfc026sidrpzxv3a8narcd40qqr1xrpb9012xdky")) - (file-name (git-file-name name version)) + (file-name (git-file-name "chez-scheme" version)) (snippet #~(begin (use-modules (guix build utils)) (for-each (lambda (dir) @@ -207,7 +207,9 @@ (define-public chez-scheme ;; for X11 clipboard support in expeditor: ;; https://github.com/cisco/ChezScheme/issues/9#issuecomment-222057232 libx11)) - (native-inputs (list chez-nanopass-bootstrap stex-bootstrap)) + (native-inputs (list chez-scheme-bootstrap-bootfiles + chez-nanopass-bootstrap + stex-bootstrap)) (native-search-paths (list (search-path-specification (variable "CHEZSCHEMELIBDIRS") @@ -237,6 +239,14 @@ (define-public chez-scheme (lambda () ;; otherwise, it will try to download submodules (display "# to placate ../configure"))))) + (add-after 'unpack-nanopass+stex 'unpack-bootfiles + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (when (directory-exists? "boot") + (delete-file-recursively "boot")) + (copy-recursively + (search-input-directory (or native-inputs inputs) + "lib/chez-scheme-bootfiles") + "boot"))) ;; NOTE: the custom Chez 'configure' script doesn't allow ;; unrecognized flags, such as those automatically added ;; by `gnu-build-system`. @@ -321,6 +331,43 @@ (define* (stex-make #:optional (suffix "")) and 32-bit PowerPC architectures.") (license license:asl2.0))) +(define-public chez-scheme-bootstrap-bootfiles + (package + (inherit chez-scheme) + (name "chez-scheme-bootstrap-bootfiles") + (inputs '()) + (native-inputs '()) + (outputs '("out")) + (build-system copy-build-system) + ;; TODO: cross compilation + (arguments + (list #:install-plan + #~`(("boot/" "lib/chez-scheme-bootfiles")))) + (supported-systems + ;; Upstream only distributes pre-built bootfiles for + ;; arm32le and t?(i3|a6)(le|nt|osx) + (filter (lambda (system) + (let ((machine (and=> (nix-system->chez-machine system) + chez-machine->nonthreaded))) + (or (equal? "arm32le" machine) + (and machine + (member (substring machine 0 2) '("i3" "a6")) + (or-map (cut string-suffix? <> machine) + '("le" "nt" "osx")))))) + %supported-systems)) + (synopsis "Chez Scheme bootfiles (binary seed)") + (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.) + +This package provides bootstrap bootfiles for upstream Chez Scheme. +Currently, it simply packages the binaries checked in to the upsream +repository. Hopefully we can eventually adapt Racket's @code{cs-bootstrap} to +work with upstream Chez Scheme so that we can bootstrap these files from +source."))) + ;; ;; Chez's bootstrap dependencies: ;; -- 2.32.0