mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: racket-minimal: Change inheritance to follow bootstrapping.
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'. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
parent
9f8f785014
commit
daa91a49b2
1 changed files with 67 additions and 63 deletions
|
@ -2,7 +2,7 @@
|
||||||
;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
|
;;; 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 © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
|
;;; 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>
|
;;; Copyright © 2021 jgart <jgart@dismail.de>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
|
@ -172,9 +172,9 @@
|
||||||
(display "# to placate ../configure")))))
|
(display "# to placate ../configure")))))
|
||||||
|
|
||||||
|
|
||||||
(define-public racket-minimal
|
(define-public racket-minimal-bc-cgc
|
||||||
(package
|
(package
|
||||||
(name "racket-minimal")
|
(name "racket-minimal-bc-cgc")
|
||||||
(version %racket-version)
|
(version %racket-version)
|
||||||
(source %racket-origin)
|
(source %racket-origin)
|
||||||
(inputs
|
(inputs
|
||||||
|
@ -184,19 +184,14 @@
|
||||||
sqlite
|
sqlite
|
||||||
bash-minimal ;; <- for `system`
|
bash-minimal ;; <- for `system`
|
||||||
ncurses ;; <- for #%terminal
|
ncurses ;; <- for #%terminal
|
||||||
;; only for CS
|
;; only for BC variants:
|
||||||
zlib
|
libffi))
|
||||||
lz4))
|
(native-inputs (list libtool)) ;; <- only for BC variants
|
||||||
(native-inputs
|
|
||||||
(list chez-scheme-for-racket-bootstrap-bootfiles
|
|
||||||
racket-minimal-bc-3m))
|
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
#:configure-flags
|
#:configure-flags
|
||||||
#~(cons* "--enable-csonly"
|
#~(cons* "--enable-cgcdefault"
|
||||||
"--enable-libz"
|
|
||||||
"--enable-lz4"
|
|
||||||
#$(racket-vm-common-configure-flags))
|
#$(racket-vm-common-configure-flags))
|
||||||
;; Tests are in packages like racket-test-core and
|
;; Tests are in packages like racket-test-core and
|
||||||
;; main-distribution-test that aren't part of the main
|
;; main-distribution-test that aren't part of the main
|
||||||
|
@ -210,17 +205,6 @@
|
||||||
(guix build utils))
|
(guix build utils))
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-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
|
(add-before 'configure 'initialize-config.rktd
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(define (write-racket-hash alist)
|
(define (write-racket-hash alist)
|
||||||
|
@ -265,43 +249,37 @@
|
||||||
;; rmdir because we want an error if it isn't empty
|
;; rmdir because we want an error if it isn't empty
|
||||||
(rmdir (string-append #$output "/share/racket/pkgs")))))))
|
(rmdir (string-append #$output "/share/racket/pkgs")))))))
|
||||||
(home-page "https://racket-lang.org")
|
(home-page "https://racket-lang.org")
|
||||||
(synopsis "Racket without bundled packages such as DrRacket")
|
(synopsis "Old Racket implementation used for bootstrapping")
|
||||||
(description
|
(description "This variant of the Racket BC (``before Chez'' or
|
||||||
"Racket is a general-purpose programming language in the Scheme family,
|
``bytecode'') implementation is not recommended for general use. It uses
|
||||||
with a large set of libraries and a compiler based on Chez Scheme. Racket is
|
CGC (a ``Conservative Garbage Collector''), which was succeeded as default in
|
||||||
also a platform for language-oriented programming, from small domain-specific
|
PLT Scheme version 370 (which translates to 3.7 in the current versioning
|
||||||
languages to complete language implementations.
|
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
|
Racket BC [CGC] is primarily used for bootstrapping Racket BC [3M]. It may
|
||||||
use @command{raco pkg} to install more. Bundled packages, such as the
|
also be used for embedding applications without the annotations needed in C
|
||||||
DrRacket IDE, are not included.")
|
code to use the 3M garbage collector.")
|
||||||
;; https://download.racket-lang.org/license.html
|
;; https://download.racket-lang.org/license.html
|
||||||
;; The LGPL components are only used by Racket BC.
|
;; 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
|
(define-public racket-minimal-bc-3m
|
||||||
(hidden-package
|
(hidden-package
|
||||||
(package
|
(package
|
||||||
(inherit racket-minimal)
|
(inherit racket-minimal-bc-cgc)
|
||||||
(name "racket-minimal-bc-3m")
|
(name "racket-minimal-bc-3m")
|
||||||
(inputs
|
|
||||||
(modify-inputs (package-inputs racket-minimal)
|
|
||||||
(prepend libffi) ;; <- only for BC variants
|
|
||||||
(delete "zlib" "lz4")))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list libtool
|
(modify-inputs (package-native-inputs racket-minimal-bc-cgc)
|
||||||
(if (%current-target-system)
|
(prepend racket-minimal-bc-cgc)))
|
||||||
racket-minimal
|
|
||||||
racket-minimal-bc-cgc)))
|
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments racket-minimal)
|
(substitute-keyword-arguments (package-arguments racket-minimal-bc-cgc)
|
||||||
((#:configure-flags _ '())
|
((#:configure-flags _ '())
|
||||||
#~(cons "--enable-bconly"
|
#~(cons "--enable-bconly"
|
||||||
#$(racket-vm-common-configure-flags)))
|
#$(racket-vm-common-configure-flags)))))
|
||||||
((#:phases cs-phases)
|
|
||||||
#~(modify-phases #$cs-phases
|
|
||||||
(delete 'unpack-nanopass+stex)
|
|
||||||
(delete 'unpack-bootfiles)))))
|
|
||||||
(synopsis "Minimal Racket with the BC [3M] runtime system")
|
(synopsis "Minimal Racket with the BC [3M] runtime system")
|
||||||
(description "The Racket BC (``before Chez'' or ``bytecode'')
|
(description "The Racket BC (``before Chez'' or ``bytecode'')
|
||||||
implementation was the default before Racket 8.0. It uses a compiler written
|
implementation was the default before Racket 8.0. It uses a compiler written
|
||||||
|
@ -316,27 +294,53 @@ collector, 3M (``Moving Memory Manager'').")
|
||||||
;; The LGPL components are only used by Racket BC.
|
;; The LGPL components are only used by Racket BC.
|
||||||
(license (list license:lgpl3+ license:asl2.0 license:expat)))))
|
(license (list license:lgpl3+ license:asl2.0 license:expat)))))
|
||||||
|
|
||||||
(define-public racket-minimal-bc-cgc
|
(define-public racket-minimal
|
||||||
(package
|
(package
|
||||||
(inherit racket-minimal-bc-3m)
|
(inherit racket-minimal-bc-3m)
|
||||||
(name "racket-minimal-bc-cgc")
|
(name "racket-minimal")
|
||||||
(native-inputs (list libtool))
|
(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
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments racket-minimal-bc-3m)
|
(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 _ '())
|
((#:configure-flags _ '())
|
||||||
#~(cons "--enable-cgcdefault"
|
#~(cons* "--enable-csonly"
|
||||||
|
"--enable-libz"
|
||||||
|
"--enable-lz4"
|
||||||
#$(racket-vm-common-configure-flags)))))
|
#$(racket-vm-common-configure-flags)))))
|
||||||
(synopsis "Old Racket implementation used for bootstrapping")
|
(synopsis "Racket without bundled packages such as DrRacket")
|
||||||
(description "This variant of the Racket BC (``before Chez'' or
|
(description
|
||||||
``bytecode'') implementation is not recommended for general use. It uses
|
"Racket is a general-purpose programming language in the Scheme family,
|
||||||
CGC (a ``Conservative Garbage Collector''), which was succeeded as default in
|
with a large set of libraries and a compiler based on Chez Scheme. Racket is
|
||||||
PLT Scheme version 370 (which translates to 3.7 in the current versioning
|
also a platform for language-oriented programming, from small domain-specific
|
||||||
scheme) by the 3M variant, which in turn was succeeded in version 8.0 by the
|
languages to complete language implementations.
|
||||||
Racket CS implementation.
|
|
||||||
|
|
||||||
Racket BC [CGC] is primarily used for bootstrapping Racket BC [3M]. It may
|
The ``minimal Racket'' distribution includes just enough of Racket for you to
|
||||||
also be used for embedding applications without the annotations needed in C
|
use @command{raco pkg} to install more. Bundled packages, such as the
|
||||||
code to use the 3M garbage collector.")))
|
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
|
(define-public chez-scheme-for-racket-bootstrap-bootfiles
|
||||||
(package
|
(package
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue