From patchwork Fri Mar 29 05:18:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 62352 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 60D4627BBEC; Fri, 29 Mar 2024 05:20:50 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id BB7C327BBE2 for ; Fri, 29 Mar 2024 05:20:47 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rq4f8-0003NK-NK; Fri, 29 Mar 2024 01:20:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rq4eo-0003J1-DP for guix-patches@gnu.org; Fri, 29 Mar 2024 01:20:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rq4eo-00067A-2e for guix-patches@gnu.org; Fri, 29 Mar 2024 01:20:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rq4ep-0004zZ-4k; Fri, 29 Mar 2024 01:20:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70065] [PATCH 3/6] gnu: chez-scheme: Reorganize package definitions. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Fri, 29 Mar 2024 05:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70065 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70065@debbugs.gnu.org Cc: Philip McGrath X-Debbugs-Original-Xcc: Philip McGrath Received: via spool by 70065-submit@debbugs.gnu.org id=B70065.171168956019087 (code B ref 70065); Fri, 29 Mar 2024 05:20:03 +0000 Received: (at 70065) by debbugs.gnu.org; 29 Mar 2024 05:19:20 +0000 Received: from localhost ([127.0.0.1]:41488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rq4e7-0004xa-IT for submit@debbugs.gnu.org; Fri, 29 Mar 2024 01:19:20 -0400 Received: from wfout2-smtp.messagingengine.com ([64.147.123.145]:59851) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rq4dy-0004wd-QD for 70065@debbugs.gnu.org; Fri, 29 Mar 2024 01:19:12 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfout.west.internal (Postfix) with ESMTP id 85ADD1C00089 for <70065@debbugs.gnu.org>; Fri, 29 Mar 2024 01:19:03 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 29 Mar 2024 01:19:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= philipmcgrath.com; h=cc:content-transfer-encoding:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm2; t=1711689543; x=1711775943; bh=vQqPRe3LRDGDDpUSHjZ4K7+PW2DVaq30 0T3tV3JtIDk=; b=X/epFJ4Yo2HEzRhP9l61V34Hrt1ZvJaBA2SBeXOtyijHM+RJ nHoEMz8JpIcz0U1julXuPtSiP2rNT+bcjLdqF2VoYrFqBOo7BJc+sAEvV1qrCDTP hd5QFW05RPMwdmqQxqMG0ROYo2r6/qS3EDNH3/RJKj2CZh2JffqyiPHw2J/gXSPj WK+XHmAA+3hL6Xo4Im3pGeDT9ucVSy3UVQpwBPNB03+P6SwiFZaEjo8M0ORxka7w jAs3NW4lCUAfUCGVeHtWbho/RHj7KibPGPe/k9gdaC8XNpGPc7kpLLs4jHmRPkcd wv/bcWp9KbnpPZjtWBg7CnN7v/UTCCLFW4CedQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1711689543; x=1711775943; bh=vQqPRe3LRDGDD pUSHjZ4K7+PW2DVaq300T3tV3JtIDk=; b=c3ABSD0m0+ksX+zsTfXfxHsykljr9 I3Ulpz8Ge+Aj1cLXVYpS/jV4VuK4veFa6aQ4SMxH3L0wx0A6v6ksN5rBwfVRUe8u kV5xBYUU5FPkevoKauRzBh2lB/xSnqlfA/MAfAHXESVt5+wbCGlKDQDr6QbNWEF/ Tpw3DMkXtk7zUPBgEy3+wL/IEKSwIcuPFsLUVTKdTKa3rJYC3TojAp8jcE+ddFl5 8W20wC0m0IkYt7CjGLGSE+e+TvQk7ecRSWIubkXDFOsBYtHu7eylXkxFq5KBTvtC 9Wg0pJbpNgN2xFJNitmU7huWA0Yzztkj4Wk+ToYTBB6l5oGaQFZSkSBkw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledruddvtddgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgoufhushhpvggtthffohhmrghinhculdegledmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefrhhhilhhi phcuofgtifhrrghthhcuoehphhhilhhiphesphhhihhlihhpmhgtghhrrghthhdrtghomh eqnecuggftrfgrthhtvghrnhepteevudeuteeuteehteeuteeiffefieefjeejtdeltdej feehteeuvdejvdehvedunecuffhomhgrihhnpehgihhthhhusgdrtghomhdpghhithhhuh gsrdhiohenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehphhhilhhiphesphhhihhlihhpmhgtghhrrghthhdrtghomh X-ME-Proxy: Feedback-ID: i2b1146f3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for <70065@debbugs.gnu.org>; Fri, 29 Mar 2024 01:19:02 -0400 (EDT) From: Philip McGrath Date: Fri, 29 Mar 2024 01:18:52 -0400 Message-ID: <5c84a4bda522531288944d78c505c4328735ac5d.1711688274.git.philip@philipmcgrath.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches A future commit will change 'chez-scheme' to inherit from 'chez-scheme-for-racket', so 'chez-scheme-for-racket' will need to be defined before 'chez-scheme'. In an attempt to produce better diffs, this commit re-orders the definitions while keeping their contents exactly the same. * gnu/packages/chez.scm (chez-scheme): Move below 'chez-scheme-for-racket'. (chez-scheme-bootstrap-bootfiles): Move below 'chez-scheme-for-racket-bootstrap-bootfiles'. Change-Id: Ie088abea2b44329f9d8399fbfb95c51d8912b05e --- gnu/packages/chez.scm | 426 +++++++++++++++++++++--------------------- 1 file changed, 213 insertions(+), 213 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index c71d6fafd5..3b7e6a67b3 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -282,191 +282,6 @@ (define unpack-nanopass "lib/chez-scheme/nanopass.ss")) "nanopass")))) -(define-public chez-scheme - (package - (name "chez-scheme") - ;; The version should match `(scheme-version-number)`. - ;; See s/cmacros.ss c. line 360. - (version "9.5.8") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/cisco/ChezScheme") - (commit (string-append "v" version)))) - (sha256 - (base32 - "0xchqq8cm0ka5wgpn18sjs0hh15rc3nb7xrjqbbc9al3asq0d7gc")) - (file-name (git-file-name name version)) - (patches (search-patches "chez-scheme-bin-sh.patch")) - (snippet #~(begin - (use-modules (guix build utils)) - ;; TODO: consider putting this in a (guix ...) or - ;; (guix build ...) module so it can be shared - ;; with the Racket origin without cyclic issues. - (for-each (lambda (dir) - (when (directory-exists? dir) - (delete-file-recursively dir))) - '("stex" - "nanopass" - "lz4" - "zlib")))))) - (build-system gnu-build-system) - (inputs - (list - chez-scheme-bootstrap-bootfiles - `(,util-linux "lib") ;<-- libuuid - zlib - lz4 - ncurses ;<-- for expeditor - ;; 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-search-paths - (list (search-path-specification - (variable "CHEZSCHEMELIBDIRS") - (files '("lib/chez-scheme"))))) - (outputs '("out" "doc")) - (arguments - (list - #:modules - '((guix build gnu-build-system) - (guix build utils) - (ice-9 ftw) - (ice-9 match)) - #:test-target "test" - #:configure-flags - #~`(,(string-append "--installprefix=" #$output) - #$@(if (and=> (chez-upstream-features-for-system) - (cut memq 'threads <>)) - #~("--threads") - #~()) - "ZLIB=-lz" - "LZ4=-llz4" - "--libkernel" - ;; Guix will do 'compress-man-pages', - ;; and letting Chez try causes an error - "--nogzip-man-pages") - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'unpack-nanopass+stex - (lambda args - (begin - (copy-recursively - (dirname (search-input-file %build-inputs - "lib/chez-scheme/nanopass.ss")) - "nanopass" - #:keep-mtime? #t) - (mkdir-p "stex") - (with-output-to-file "stex/Mf-stex" - (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 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`. This replacement phase uses only - ;; the explicitly provided `#:configure-flags`. - (replace 'configure - (lambda* (#:key inputs (configure-flags '()) out-of-source? - #:allow-other-keys) - (let* ((abs-srcdir (getcwd)) - (srcdir (if out-of-source? - (string-append "../" (basename abs-srcdir)) - "."))) - (format #t "source directory: ~s (relative from build: ~s)~%" - abs-srcdir srcdir) - (if out-of-source? - (begin - (mkdir "../build") - (chdir "../build"))) - (format #t "build directory: ~s~%" (getcwd)) - (format #t "configure flags: ~s~%" configure-flags) - (apply invoke - (string-append srcdir "/configure") - configure-flags)))) - (add-after 'configure 'configure-environment-variables - (lambda args - ;; Some makefiles (for tests) don't seem to propagate CC - ;; properly, so we take it out of their hands: - (setenv "CC" #$(cc-for-target)) - ;; Likewise, some tests have needed HOME to be set: - (setenv "HOME" "/tmp"))) - ;; The binary file name is called "scheme" as is the one from - ;; MIT/GNU Scheme. We add a symlink to use in case both are - ;; installed. - (add-after 'install 'install-symlink - (lambda* (#:key outputs #:allow-other-keys) - (let* ((scheme (search-input-file outputs "/bin/scheme")) - (bin-dir (dirname scheme))) - (symlink scheme - (string-append bin-dir "/chez-scheme")) - (match (find-files (string-append bin-dir "/../lib") - "scheme.boot") - ((scheme.boot) - (symlink scheme.boot - (string-append (dirname scheme.boot) - "/chez-scheme.boot"))))))) - ;; Building the documentation requires stex and a running scheme. - (add-after 'install-symlink 'install-docs - (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) - (let* ((doc-prefix (or (assoc-ref outputs "doc") - (assoc-ref outputs "out"))) - (chez+version (strip-store-file-name #$output)) - (scheme (search-input-file outputs "/bin/scheme")) - (stexlib (search-input-directory (or native-inputs - inputs) - "/lib/stex")) - (doc-dir (string-append doc-prefix - "/share/doc/" - chez+version))) - (define* (stex-make #:optional (suffix "")) - (invoke "make" "install" - (string-append "Scheme=" scheme) - (string-append "STEXLIB=" stexlib) - (string-append "installdir=" doc-dir suffix))) - (with-directory-excursion "csug" - (stex-make "/csug")) - (with-directory-excursion "release_notes" - (stex-make "/release_notes"))))) - (add-after 'install-docs 'link-doc-pdfs - ;; otherwise, it's hard to notice them in a forest of HTML files - (lambda* (#:key outputs #:allow-other-keys) - (with-directory-excursion - (string-append (or (assoc-ref outputs "doc") - (assoc-ref outputs "out")) - "/share/doc/" - (strip-store-file-name #$output)) - (symlink "release_notes/release_notes.pdf" - "release_notes.pdf") - (match (find-files "csug" - "csug.*\\.pdf$" ;; embeded version number - #:fail-on-error? #t) - ((pth) - (symlink pth - "csug.pdf"))))))))) - (supported-systems - (delete - "armhf-linux" ;; XXX reportedly broken, needs checking - (filter chez-upstream-features-for-system - %supported-systems))) - (home-page "https://cisco.github.io/ChezScheme/") - (synopsis "R6RS Scheme compiler and run-time") - (description - "Chez Scheme is a compiler and run-time system for the language of the -Revised^6 Report on Scheme (R6RS), with numerous extensions. The compiler -generates native code for each target processor, with support for x86, x86_64, -and 32-bit PowerPC architectures.") - (license asl2.0))) - (define chez-configure ;; The custom Chez 'configure' script doesn't allow unrecognized flags, such ;; as those automatically added by `gnu-build-system`. This replacement @@ -686,39 +501,194 @@ (define-public chez-scheme-for-racket version of Chez Scheme.") (license asl2.0))) -;; -;; Bootfiles: -;; - -(define-public chez-scheme-bootstrap-bootfiles +(define-public chez-scheme (package - (inherit chez-scheme) - (name "chez-scheme-bootstrap-bootfiles") - (inputs '()) - (native-inputs '()) - (outputs '("out")) - (build-system copy-build-system) - ;; TODO: cross compilation + (name "chez-scheme") + ;; The version should match `(scheme-version-number)`. + ;; See s/cmacros.ss c. line 360. + (version "9.5.8") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/cisco/ChezScheme") + (commit (string-append "v" version)))) + (sha256 + (base32 + "0xchqq8cm0ka5wgpn18sjs0hh15rc3nb7xrjqbbc9al3asq0d7gc")) + (file-name (git-file-name name version)) + (patches (search-patches "chez-scheme-bin-sh.patch")) + (snippet #~(begin + (use-modules (guix build utils)) + ;; TODO: consider putting this in a (guix ...) or + ;; (guix build ...) module so it can be shared + ;; with the Racket origin without cyclic issues. + (for-each (lambda (dir) + (when (directory-exists? dir) + (delete-file-recursively dir))) + '("stex" + "nanopass" + "lz4" + "zlib")))))) + (build-system gnu-build-system) + (inputs + (list + chez-scheme-bootstrap-bootfiles + `(,util-linux "lib") ;<-- libuuid + zlib + lz4 + ncurses ;<-- for expeditor + ;; 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-search-paths + (list (search-path-specification + (variable "CHEZSCHEMELIBDIRS") + (files '("lib/chez-scheme"))))) + (outputs '("out" "doc")) (arguments - (list #:install-plan - #~`(("boot/" "lib/chez-scheme-bootfiles")))) + (list + #:modules + '((guix build gnu-build-system) + (guix build utils) + (ice-9 ftw) + (ice-9 match)) + #:test-target "test" + #:configure-flags + #~`(,(string-append "--installprefix=" #$output) + #$@(if (and=> (chez-upstream-features-for-system) + (cut memq 'threads <>)) + #~("--threads") + #~()) + "ZLIB=-lz" + "LZ4=-llz4" + "--libkernel" + ;; Guix will do 'compress-man-pages', + ;; and letting Chez try causes an error + "--nogzip-man-pages") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'unpack-nanopass+stex + (lambda args + (begin + (copy-recursively + (dirname (search-input-file %build-inputs + "lib/chez-scheme/nanopass.ss")) + "nanopass" + #:keep-mtime? #t) + (mkdir-p "stex") + (with-output-to-file "stex/Mf-stex" + (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 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`. This replacement phase uses only + ;; the explicitly provided `#:configure-flags`. + (replace 'configure + (lambda* (#:key inputs (configure-flags '()) out-of-source? + #:allow-other-keys) + (let* ((abs-srcdir (getcwd)) + (srcdir (if out-of-source? + (string-append "../" (basename abs-srcdir)) + "."))) + (format #t "source directory: ~s (relative from build: ~s)~%" + abs-srcdir srcdir) + (if out-of-source? + (begin + (mkdir "../build") + (chdir "../build"))) + (format #t "build directory: ~s~%" (getcwd)) + (format #t "configure flags: ~s~%" configure-flags) + (apply invoke + (string-append srcdir "/configure") + configure-flags)))) + (add-after 'configure 'configure-environment-variables + (lambda args + ;; Some makefiles (for tests) don't seem to propagate CC + ;; properly, so we take it out of their hands: + (setenv "CC" #$(cc-for-target)) + ;; Likewise, some tests have needed HOME to be set: + (setenv "HOME" "/tmp"))) + ;; The binary file name is called "scheme" as is the one from + ;; MIT/GNU Scheme. We add a symlink to use in case both are + ;; installed. + (add-after 'install 'install-symlink + (lambda* (#:key outputs #:allow-other-keys) + (let* ((scheme (search-input-file outputs "/bin/scheme")) + (bin-dir (dirname scheme))) + (symlink scheme + (string-append bin-dir "/chez-scheme")) + (match (find-files (string-append bin-dir "/../lib") + "scheme.boot") + ((scheme.boot) + (symlink scheme.boot + (string-append (dirname scheme.boot) + "/chez-scheme.boot"))))))) + ;; Building the documentation requires stex and a running scheme. + (add-after 'install-symlink 'install-docs + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + (let* ((doc-prefix (or (assoc-ref outputs "doc") + (assoc-ref outputs "out"))) + (chez+version (strip-store-file-name #$output)) + (scheme (search-input-file outputs "/bin/scheme")) + (stexlib (search-input-directory (or native-inputs + inputs) + "/lib/stex")) + (doc-dir (string-append doc-prefix + "/share/doc/" + chez+version))) + (define* (stex-make #:optional (suffix "")) + (invoke "make" "install" + (string-append "Scheme=" scheme) + (string-append "STEXLIB=" stexlib) + (string-append "installdir=" doc-dir suffix))) + (with-directory-excursion "csug" + (stex-make "/csug")) + (with-directory-excursion "release_notes" + (stex-make "/release_notes"))))) + (add-after 'install-docs 'link-doc-pdfs + ;; otherwise, it's hard to notice them in a forest of HTML files + (lambda* (#:key outputs #:allow-other-keys) + (with-directory-excursion + (string-append (or (assoc-ref outputs "doc") + (assoc-ref outputs "out")) + "/share/doc/" + (strip-store-file-name #$output)) + (symlink "release_notes/release_notes.pdf" + "release_notes.pdf") + (match (find-files "csug" + "csug.*\\.pdf$" ;; embeded version number + #:fail-on-error? #t) + ((pth) + (symlink pth + "csug.pdf"))))))))) (supported-systems - (filter (lambda (system) - (and=> (chez-upstream-features-for-system system) - (cut memq 'bootstrap-bootfiles <>))) - %supported-systems)) - (synopsis "Chez Scheme bootfiles (binary seed)") + (delete + "armhf-linux" ;; XXX reportedly broken, needs checking + (filter chez-upstream-features-for-system + %supported-systems))) + (home-page "https://cisco.github.io/ChezScheme/") + (synopsis "R6RS Scheme compiler and run-time") (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.) + "Chez Scheme is a compiler and run-time system for the language of the +Revised^6 Report on Scheme (R6RS), with numerous extensions. The compiler +generates native code for each target processor, with support for x86, x86_64, +and 32-bit PowerPC architectures.") + (license asl2.0))) -This package provides bootstrap bootfiles for upstream Chez Scheme. -Currently, it simply packages the binaries checked in to the upstream -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."))) +;; +;; Bootfiles: +;; (define-public chez-scheme-for-racket-bootstrap-bootfiles (package @@ -800,6 +770,36 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles 7.1 and later, including the Racket BC variant.") (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 + (filter (lambda (system) + (and=> (chez-upstream-features-for-system system) + (cut memq 'bootstrap-bootfiles <>))) + %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 upstream +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: ;;