From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YJnHKv21DmIXtgAAgWs5BA (envelope-from ) for ; Thu, 17 Feb 2022 21:54:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8KA8KP21DmIGHgAA9RJhRA (envelope-from ) for ; Thu, 17 Feb 2022 21:54:21 +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 208F638253 for ; Thu, 17 Feb 2022 21:54:21 +0100 (CET) Received: from localhost ([::1]:37246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nKnnA-0007lz-Am for larch@yhetil.org; Thu, 17 Feb 2022 15:54:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nKnlv-0006jc-21 for guix-patches@gnu.org; Thu, 17 Feb 2022 15:53:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:58907) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nKnlu-0001cs-Nv for guix-patches@gnu.org; Thu, 17 Feb 2022 15:53:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nKnlu-0003Zr-Nb for guix-patches@gnu.org; Thu, 17 Feb 2022 15:53:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v2 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: Thu, 17 Feb 2022 20:53:02 +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 Cc: Philip McGrath , zimoun , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164513113413587 (code B ref 53878); Thu, 17 Feb 2022 20:53:02 +0000 Received: (at 53878) by debbugs.gnu.org; 17 Feb 2022 20:52:14 +0000 Received: from localhost ([127.0.0.1]:52782 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKnl7-0003X3-PD for submit@debbugs.gnu.org; Thu, 17 Feb 2022 15:52:14 -0500 Received: from mail-qv1-f50.google.com ([209.85.219.50]:39798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKnky-0003VL-Vz for 53878@debbugs.gnu.org; Thu, 17 Feb 2022 15:52:05 -0500 Received: by mail-qv1-f50.google.com with SMTP id f19so10729469qvb.6 for <53878@debbugs.gnu.org>; Thu, 17 Feb 2022 12:52:04 -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=kPgwpMIsLHiqdrTSyFVnO42y4sgYOcXcjUgUPBu2Cs3V8qXD/IAJCMXN30V6NUOaub fkn0ldRkYXrmpE5c03Ux5KkecCOaQHBOumCcUD6wpHksncZ+bp/pNB5jMCExnUWA8Dp/ PRR+1B3UdwjGhgtd87csERXdpq4ta+ghRA1hIfRB/1XLNov8W9jR9IPDviJfDjEqU+s5 eQN6OcwYATzwSnxfIbBJ8FHymI9K5/OkesCvaxnsRHIq1tj7JPSB+kdjMlZrna38EFgW yNKvjS2r04EJBUKe3lQFqGBSxpcSQDYv4uLcLR7kGs6p2o7/Ip3rNNm7vAx7Wz6D0yA4 IbEA== 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=fvujr1J66j2xevmchGReFENfXdmgvnJkgqwSP5oSqSCCy+ftBGtEcztodBSUaiG2pp Up0E8R+xiRUkZccwHQNAJhIQxqOq4MCJJWBfF+nYsdSB35PltLn5x13kgui1tG3sTWzd yjWtDK2isoejp+SqyG0TDSiOvek9pzJDyozH9rW+jnifOLYcjmgsqAlueKL1SFD8DeNN J9GGpjIutbkk3Q/EpBzTqZCaONzDn94Ekx+9ixNXZhEDX6fu829OaX8CllLfDzIcoJzQ VvVQMP2v8p0johK3CIWCbOXiUIeOKApkiQ1AzLu2JR+yw5igJ7zTFN8gvdMXoEN6JHKa Nqrw== X-Gm-Message-State: AOAM5332Z6RByLPitO4vViOxSu+fSBgwhrklyjviA/Wrv5LW0Rmo/dPX swRfl4zxTKxK+UQsL2sLeIXG6d6SSb9ByxGORoE= X-Google-Smtp-Source: ABdhPJwK2WMDB1tdJGxUGiEoc74nd1b/1AnggH/0aydJi4/FmdsBAgqZ7Y6Xgjrjk8+l8Fq0C9moAg== X-Received: by 2002:a05:6214:f0e:b0:42d:88a:63b3 with SMTP id gw14-20020a0562140f0e00b0042d088a63b3mr3591017qvb.124.1645131119430; Thu, 17 Feb 2022 12:51:59 -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 x4sm3901813qkh.42.2022.02.17.12.51.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Feb 2022 12:51:59 -0800 (PST) From: Philip McGrath Date: Thu, 17 Feb 2022 15:50:41 -0500 Message-Id: <20220217205048.967383-9-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220217205048.967383-1-philip@philipmcgrath.com> References: <97f8916ae5bd8d8459bdfd507864f2f55cc217a1.camel@ist.tugraz.at> <20220217205048.967383-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=1645131261; 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=Mvfn71tfKEJ5U7Nu1smGn6EcIzCFl+/VG3SWwqCfY0Amd/8MYvf1nAZeG17xX1PirCm3wj A1na3fNWrZhz5896+kSVGNaQOaqBSb4RLUs+sw50BWNOVQXT4eqekCr08r+gMZm151qfeI OIGrSCT3M9j/jxKOYJw35Jg8gvrQwmYBxAyJn1XtgVEFGhvyiOL8zZjyOqqDk/jZaF3f2Z rMX3x8DxSXKtizS09dsXtW79963MZ/oQyNDDROHdHqZMgZffTXafyuoGWXbpuRcUes93s4 njQOsSwe1a9TyGfnNDxpbwKMmLBHZRb9O9g8gcLbqv4pp2aem6mqrAnDeNX4RQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645131261; a=rsa-sha256; cv=none; b=cXYpWJgB8gYqFhqymQks20cKFujb3Z7h7GNFxWdbE59BFMlhjM4BFbfYvmA/6HIO+jFQg6 Fe++w94bv3NlHL+1ce2u7/Tf1xaeBt+tCQ8OcKNnbx5ZfE8l8/6Z6HwQsElAYVQpyuyHF5 jZUDmBqe+2uwJRboYyVzAZaUNswTn0itaQwWiA+b0y05CAyKY+OAdVV2kt5Ahdp+8fPhDS Ou14Ryc48EnQYqZSv6rT7G+w1onoA5vtb2m9ui35/orT2CDfKlbH6erkcYc0UkDwI11iqF kxznFFQw9IvMBII4RWVnGGVVNZDosKbFthZRkrsf4bECiML0/BcL9f8xASuu9w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=kPgwpMIs; 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.87 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=kPgwpMIs; 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: 208F638253 X-Spam-Score: 0.87 X-Migadu-Scanner: scn1.migadu.com X-TUID: UCORbam/MCQQ 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