[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#53878] [PATCH v7 06/24] gnu: racket-minimal: Change inheritance to
From: |
Philip McGrath |
Subject: |
[bug#53878] [PATCH v7 06/24] gnu: racket-minimal: Change inheritance to follow bootstrapping. |
Date: |
Sun, 27 Feb 2022 16:29:02 -0500 |
Having the package inheritance chain go in the same direction as the
bootstrapping chain, rather than the opposite, is less confusing. In
some cases, it can also help to avoid unnecessary rebuilds.
* gnu/packages/racket.scm (racket-minimal-bc-cgc): Change to be the root
of the package inheritance chain.
[version, source, inputs, native-inputs, build-system, arguments,
home-page, license]: Inline formerly inherited values.
(racket-minimal-bc-3m): Inherit from 'racket-minimal-bc-cgc' rather than
'racket-minimal'.
[inputs, native-inputs, arguments, license]: Adjust accordingly.
(racket-minimal): Inherit from 'racket-minimal-bc-3m'.
[inputs, native-inputs, arguments, license]: Adjust accordingly.
[properties]: Override effect of 'hidden-package'.
---
gnu/packages/racket.scm | 130 +++++++++++++++++++++-------------------
1 file changed, 67 insertions(+), 63 deletions(-)
diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index dc392fb27d..8d12a96f22 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2020, 2021 Ludovic Courtès
<ludo@gnu.org>
;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
-;;; Copyright © 2021 Philip McGrath <philip@philipmcgrath.com>
+;;; Copyright © 2021, 2022 Philip McGrath <philip@philipmcgrath.com>
;;; Copyright © 2021 jgart <jgart@dismail.de>
;;;
;;; This file is part of GNU Guix.
@@ -172,9 +172,9 @@ (define (make-unpack-nanopass+stex)
(display "# to placate ../configure")))))
-(define-public racket-minimal
+(define-public racket-minimal-bc-cgc
(package
- (name "racket-minimal")
+ (name "racket-minimal-bc-cgc")
(version %racket-version)
(source %racket-origin)
(inputs
@@ -184,19 +184,14 @@ (define-public racket-minimal
sqlite
bash-minimal ;; <- for `system`
ncurses ;; <- for #%terminal
- ;; only for CS
- zlib
- lz4))
- (native-inputs
- (list chez-scheme-for-racket-bootstrap-bootfiles
- racket-minimal-bc-3m))
+ ;; only for BC variants:
+ libffi))
+ (native-inputs (list libtool)) ;; <- only for BC variants
(build-system gnu-build-system)
(arguments
(list
#:configure-flags
- #~(cons* "--enable-csonly"
- "--enable-libz"
- "--enable-lz4"
+ #~(cons* "--enable-cgcdefault"
#$(racket-vm-common-configure-flags))
;; Tests are in packages like racket-test-core and
;; main-distribution-test that aren't part of the main
@@ -210,17 +205,6 @@ (define-public racket-minimal
(guix build utils))
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'unpack-nanopass+stex
- (lambda args
- (with-directory-excursion "racket/src/ChezScheme"
- #$(make-unpack-nanopass+stex))))
- (add-after 'unpack-nanopass+stex 'unpack-bootfiles
- (lambda* (#:key native-inputs inputs #:allow-other-keys)
- (with-directory-excursion "racket/src/ChezScheme"
- (copy-recursively
- (search-input-directory (or native-inputs inputs)
- "lib/chez-scheme-bootfiles")
- "boot"))))
(add-before 'configure 'initialize-config.rktd
(lambda* (#:key inputs #:allow-other-keys)
(define (write-racket-hash alist)
@@ -265,43 +249,37 @@ (define maybe-release-catalog
;; rmdir because we want an error if it isn't empty
(rmdir (string-append #$output "/share/racket/pkgs")))))))
(home-page "https://racket-lang.org")
- (synopsis "Racket without bundled packages such as DrRacket")
- (description
- "Racket is a general-purpose programming language in the Scheme family,
-with a large set of libraries and a compiler based on Chez Scheme. Racket is
-also a platform for language-oriented programming, from small domain-specific
-languages to complete language implementations.
+ (synopsis "Old Racket implementation used for bootstrapping")
+ (description "This variant of the Racket BC (``before Chez'' or
+``bytecode'') implementation is not recommended for general use. It uses
+CGC (a ``Conservative Garbage Collector''), which was succeeded as default in
+PLT Scheme version 370 (which translates to 3.7 in the current versioning
+scheme) by the 3M variant, which in turn was succeeded in version 8.0 by the
+Racket CS implementation.
-The ``minimal Racket'' distribution includes just enough of Racket for you to
-use @command{raco pkg} to install more. Bundled packages, such as the
-DrRacket IDE, are not included.")
+Racket BC [CGC] is primarily used for bootstrapping Racket BC [3M]. It may
+also be used for embedding applications without the annotations needed in C
+code to use the 3M garbage collector.")
;; https://download.racket-lang.org/license.html
;; The LGPL components are only used by Racket BC.
- (license (list license:asl2.0 license:expat))))
+ (license (list license:lgpl3+ license:asl2.0 license:expat))
+ ;; Eventually, it may make sense for some vm packages to not be hidden,
+ ;; but this one is especially likely to remain hidden.
+ (properties `((hidden? . #t)))))
(define-public racket-minimal-bc-3m
(hidden-package
(package
- (inherit racket-minimal)
+ (inherit racket-minimal-bc-cgc)
(name "racket-minimal-bc-3m")
- (inputs
- (modify-inputs (package-inputs racket-minimal)
- (prepend libffi) ;; <- only for BC variants
- (delete "zlib" "lz4")))
(native-inputs
- (list libtool
- (if (%current-target-system)
- racket-minimal
- racket-minimal-bc-cgc)))
+ (modify-inputs (package-native-inputs racket-minimal-bc-cgc)
+ (prepend racket-minimal-bc-cgc)))
(arguments
- (substitute-keyword-arguments (package-arguments racket-minimal)
+ (substitute-keyword-arguments (package-arguments racket-minimal-bc-cgc)
((#:configure-flags _ '())
#~(cons "--enable-bconly"
- #$(racket-vm-common-configure-flags)))
- ((#:phases cs-phases)
- #~(modify-phases #$cs-phases
- (delete 'unpack-nanopass+stex)
- (delete 'unpack-bootfiles)))))
+ #$(racket-vm-common-configure-flags)))))
(synopsis "Minimal Racket with the BC [3M] runtime system")
(description "The Racket BC (``before Chez'' or ``bytecode'')
implementation was the default before Racket 8.0. It uses a compiler written
@@ -316,27 +294,53 @@ (define-public racket-minimal-bc-3m
;; The LGPL components are only used by Racket BC.
(license (list license:lgpl3+ license:asl2.0 license:expat)))))
-(define-public racket-minimal-bc-cgc
+(define-public racket-minimal
(package
(inherit racket-minimal-bc-3m)
- (name "racket-minimal-bc-cgc")
- (native-inputs (list libtool))
+ (name "racket-minimal")
+ (inputs
+ (modify-inputs (package-inputs racket-minimal-bc-cgc)
+ (prepend zlib lz4)
+ (delete "libffi")))
+ (native-inputs
+ (modify-inputs (package-native-inputs racket-minimal-bc-cgc)
+ (delete "libtool")
+ (prepend chez-scheme-for-racket-bootstrap-bootfiles
+ racket-minimal-bc-3m)))
(arguments
(substitute-keyword-arguments (package-arguments racket-minimal-bc-3m)
+ ((#:phases bc-phases)
+ #~(modify-phases #$bc-phases
+ (add-after 'unpack 'unpack-nanopass+stex
+ (lambda args
+ (with-directory-excursion "racket/src/ChezScheme"
+ #$(make-unpack-nanopass+stex))))
+ (add-after 'unpack-nanopass+stex 'unpack-bootfiles
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (with-directory-excursion "racket/src/ChezScheme"
+ (copy-recursively
+ (search-input-directory (or native-inputs inputs)
+ "lib/chez-scheme-bootfiles")
+ "boot"))))))
((#:configure-flags _ '())
- #~(cons "--enable-cgcdefault"
- #$(racket-vm-common-configure-flags)))))
- (synopsis "Old Racket implementation used for bootstrapping")
- (description "This variant of the Racket BC (``before Chez'' or
-``bytecode'') implementation is not recommended for general use. It uses
-CGC (a ``Conservative Garbage Collector''), which was succeeded as default in
-PLT Scheme version 370 (which translates to 3.7 in the current versioning
-scheme) by the 3M variant, which in turn was succeeded in version 8.0 by the
-Racket CS implementation.
+ #~(cons* "--enable-csonly"
+ "--enable-libz"
+ "--enable-lz4"
+ #$(racket-vm-common-configure-flags)))))
+ (synopsis "Racket without bundled packages such as DrRacket")
+ (description
+ "Racket is a general-purpose programming language in the Scheme family,
+with a large set of libraries and a compiler based on Chez Scheme. Racket is
+also a platform for language-oriented programming, from small domain-specific
+languages to complete language implementations.
-Racket BC [CGC] is primarily used for bootstrapping Racket BC [3M]. It may
-also be used for embedding applications without the annotations needed in C
-code to use the 3M garbage collector.")))
+The ``minimal Racket'' distribution includes just enough of Racket for you to
+use @command{raco pkg} to install more. Bundled packages, such as the
+DrRacket IDE, are not included.")
+ (properties `())
+ ;; https://download.racket-lang.org/license.html
+ ;; 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
--
2.32.0
- [bug#53878] [PATCH v6 18/24] gnu: Add stex., (continued)
- [bug#53878] [PATCH v6 18/24] gnu: Add stex., Philip McGrath, 2022/02/26
- [bug#53878] [PATCH v6 19/24] gnu: Add chez-nanopass., Philip McGrath, 2022/02/26
- [bug#53878] [PATCH v6 24/24] gnu: racket-vm-cs: Build with "--enable-scheme"., Philip McGrath, 2022/02/26
- [bug#53878] [PATCH v6 22/24] gnu: Add chez-scheme-for-racket., Philip McGrath, 2022/02/26
- [bug#53878] [PATCH v6 23/24] gnu: chez: Add 'chez-scheme-for-system'., Philip McGrath, 2022/02/26
- [bug#53878] [PATCH v7 00/24] Update Racket to 8.4. Adjust Chez Scheme packages., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 01/24] gnu: Use license prefix in (gnu packages racket)., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 03/24] gnu: racket: Use Git origins for Racket packages., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 05/24] gnu: racket-minimal: Don't configure non-existant catalogs., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 02/24] gnu: racket: Update to 8.4., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 06/24] gnu: racket-minimal: Change inheritance to follow bootstrapping.,
Philip McGrath <=
- [bug#53878] [PATCH v7 04/24] gnu: racket-minimal: Use new package style., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 07/24] gnu: racket-minimal: Adjust indentation., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 09/24] gnu: configure-layer.rkt: Adjust indentation., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 11/24] gnu: racket: Move Chez bootfiles to (gnu packages chez)., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 12/24] gnu: chez: Add utilities for Chez machine types., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 08/24] gnu: racket-minimal: Add "debug" output., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 10/24] gnu: racket-minimal: Separate from the Racket VM., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 13/24] gnu: racket: Add 'racket-vm-for-system'., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 14/24] gnu: chez-scheme: Use new style for Chez packages., Philip McGrath, 2022/02/27
- [bug#53878] [PATCH v7 15/24] gnu: chez-scheme: Use "lib/chez-scheme" for search path., Philip McGrath, 2022/02/27