From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 GF2BDvTaEWKfAQEAgWs5BA (envelope-from ) for ; Sun, 20 Feb 2022 07:08:52 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id MJUMC/TaEWIgRwAAauVa8A (envelope-from ) for ; Sun, 20 Feb 2022 07:08:52 +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 BB1E812A3E for ; Sun, 20 Feb 2022 07:08:51 +0100 (CET) Received: from localhost ([::1]:60728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nLfOs-000782-Uf for larch@yhetil.org; Sun, 20 Feb 2022 01:08:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLfND-0005J0-9L for guix-patches@gnu.org; Sun, 20 Feb 2022 01:07:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37064) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nLfNB-00040C-KS for guix-patches@gnu.org; Sun, 20 Feb 2022 01:07:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nLfNB-0005OL-DT; Sun, 20 Feb 2022 01:07:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v4 08/15] gnu: chez-scheme: Explicitly package bootstrap bootfiles. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sun, 20 Feb 2022 06:07:05 +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 , Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Attila Lendvai , Malte Gerdes , raingloom , zimoun , Philip McGrath X-Debbugs-Original-Xcc: Philip McGrath Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164533721520612 (code B ref 53878); Sun, 20 Feb 2022 06:07:05 +0000 Received: (at 53878) by debbugs.gnu.org; 20 Feb 2022 06:06:55 +0000 Received: from localhost ([127.0.0.1]:59174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLfN0-0005MH-Rh for submit@debbugs.gnu.org; Sun, 20 Feb 2022 01:06:55 -0500 Received: from mail-qv1-f43.google.com ([209.85.219.43]:45838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLfMy-0005Lk-JA for 53878@debbugs.gnu.org; Sun, 20 Feb 2022 01:06:53 -0500 Received: by mail-qv1-f43.google.com with SMTP id c14so23824691qvl.12 for <53878@debbugs.gnu.org>; Sat, 19 Feb 2022 22:06:52 -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=etqNf27d1sqDj7+jQgEQZIR3yTsYg+lI6VmCAxGz7wxwIUuR/Oz84MIWQ1zGkGnNNe U+yHkH0QkjDV+IWHqA64VHls1TDNIoKxOTW+caQ7tgLegTFoAug1ZN3f79l+bw7SfuzA i61UKCrpqPFBW5mZgb0zGK+qEmr2FGwLdJGA9Wc69/uhUVexxDexOWGy3IVrj/rZ4E+P YWgukGoxQa6WoZZsxRIRrqgHqxkG7HeR+KKq4vYr5wGay3Hk4rOYGZDVw+io719N5hnL 5Ij6Sv5OIrrh5kaUSKMZQsldhUwYpb7VSOCWcJeeDBJZVgrexsjPnmqAIPi82BFVBRKt iw8A== 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=nt/VvhFnQUJWoFHnFMiVh885xha4oZP/7zefHzoEixs9vS4cLsT5XhR1irxqSh9zVT JT5wmNiAHCq0MeY+QgvdfWrnyKe+1J7qhhK8rjrB9eJ2Oh2ivi2TOT9rx+DGdwoUtOSM 3bz7Kv9TiI+1IdXwfAUc2VmJkcizFV+uCkHlJnp1f04DeAN0pqNzYhznMOj4iqfcCSWo Xnwj+wQfgDyygSmqjGxnhJAt0jXkpug6IROxFN28B+Dg55D4w8JWi5DeL+eoPeC9MHEL 7iWENm76+8JoQQpR8GyfOtw8v0xfRiYxfXuXFpvs606s6clB31+4cWJKgHaoEQ/ZR2C1 NcyA== X-Gm-Message-State: AOAM530VUUg05dEq6A+H1+8LM4IvRCn7xAyxLnmE7SaFUAXjIpd54dhP LynPRAsw1fNz9EEZiEOSceWnCcBII+Kq/q1G1kY= X-Google-Smtp-Source: ABdhPJyQa0Y5hpoR+FKCebANgXRfOf/bVPYEOzoUfR/NTRkmDNY6+qSpXqgLAS/DuVqRaubpbI24Cw== X-Received: by 2002:ac8:4e94:0:b0:2dd:dbdc:1366 with SMTP id 20-20020ac84e94000000b002dddbdc1366mr4277663qtp.111.1645337207003; Sat, 19 Feb 2022 22:06:47 -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 s65sm8325312qkh.126.2022.02.19.22.06.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 19 Feb 2022 22:06:46 -0800 (PST) From: Philip McGrath Date: Sun, 20 Feb 2022 01:06:03 -0500 Message-Id: <20220220060610.178131-9-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220220060610.178131-1-philip@philipmcgrath.com> References: <20220208151316.1897345-1-philip@philipmcgrath.com> <20220220060610.178131-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=1645337331; 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=q9i1ElafnLVPwUD8z+UH7xrlFPq6j4PNqmSXs3ASkKbh/BjPk/iusDPYLqL4b28uycbHBo dSzYRrnTF5h1tOJcSWVvlBbrcEeUi9KAp/KiJf6fPCs+CXtgZL8Cqpu+q6YlelPI5NGx2q AZk1qwCbhdf4hUOsWoarzzAKkwhrlSSYl/zqhxIgwp/fH6exKnyp7pDv/5gQeGM6BR8VJD fuCgOaX09m6iwKK3TNd0L0WxTuQ2lqc2FShddBFRi0t8tG+05e/MY85oRGajk0weYc8xzo Tb91GUVk5wtZr41hrfkAlTvPnbRQGiBO7aUfkJoR8uDzCwdNKqyfK4QP00FvXA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645337331; a=rsa-sha256; cv=none; b=Rs7vCZVGdP8cwHVmLvchCc3FJ+hycefGEdlwOqCNrxEBW4zqmFKXmhDroQwwOLMncgof1M 2nrBMT4isoXIKQurPnDXiXwvOU9u0TezGA0bOZ2ctGT8YyRm2E4RXninVRlqj+2xUSpb8N VtLibO9B2W0uoYlrYShoB3DMRhYqE3h6ulbD9U4zjcq74EM0B6edEYJLT1LwEAqtA2QJb1 0GjzIsbxbnrQcBf7MTcdnqUJxn6GSzU2jfY4ToIMsuPKgxSic8fcQZCUqhh0QzZD8pJl/n kZkZtPGDjlU4n8sOBFuf2Kdem4zf3EG7XUnxr8i0srx0DWDgHVb6CO0UV3a/jg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=etqNf27d; 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=etqNf27d; 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: BB1E812A3E X-Spam-Score: 0.87 X-Migadu-Scanner: scn1.migadu.com X-TUID: /KEzrOhNk5Xx 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