guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

06/25: gnu: racket-minimal: Change inheritance to follow bootstrapping.


From: guix-commits
Subject: 06/25: gnu: racket-minimal: Change inheritance to follow bootstrapping.
Date: Fri, 4 Mar 2022 17:54:13 -0500 (EST)

lilyp pushed a commit to branch master
in repository guix.

commit daa91a49b2914343afdfcdbea9a22c9d062ba185
Author: Philip McGrath <philip@philipmcgrath.com>
AuthorDate: Sun Feb 27 16:29:02 2022 -0500

    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>
---
 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 a4b7cda473..c28a25802c 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 @@
           (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 @@
       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 @@
                   (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 @@
               ;; 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 @@ collector, 3M (``Moving Memory Manager'').")
      ;; 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]