unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip McGrath <philip@philipmcgrath.com>
To: 47829@debbugs.gnu.org
Cc: Philip McGrath <philip@philipmcgrath.com>
Subject: [bug#47829] [PATCH 3/4] gnu: racket: Racket inherits racket-minimal, not vice versa.
Date: Fri, 16 Apr 2021 17:11:38 -0400	[thread overview]
Message-ID: <20210416211139.21825-2-philip@philipmcgrath.com> (raw)
In-Reply-To: <20210416211139.21825-1-philip@philipmcgrath.com>

By design, the `racket` package is equivalent to 'racket-minimal'
plus 'raco pkg install -i main-distribution'.
This switch brings the Guix packages a small step closer to that goal.

* gnu/packages/racket.scm (racket-minimal, racket): Change
'racket-minimal' to be the base package and 'racket' to inherit
from it.  Move 'version', 'patches', 'home-page', 'build-system',
'arguments', and 'license' to 'racket-minimal'.
* gnu/packages/racket.scm (racket)[inputs]: Rather than copy and
pasting, use '(package-inputs racket-minimal)'.
---
 gnu/packages/racket.scm | 123 ++++++++++++++++++++--------------------
 1 file changed, 60 insertions(+), 63 deletions(-)

diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index 6cb72e592c..73e00240de 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -47,23 +47,32 @@
   #:use-module (gnu packages tls)
   #:use-module (gnu packages xorg))
 
-(define-public racket
+(define-public racket-minimal
   (package
-    (name "racket")
-    (version "8.0")            ; note: remember to also update racket-minimal!
-    (source (origin
-              (method url-fetch)
-              (uri (list (string-append "https://mirror.racket-lang.org/installers/"
-                                        version "/racket-src.tgz")
-                         ;; this mirror seems to have broken HTTPS:
-                         (string-append
-                          "http://mirror.informatik.uni-tuebingen.de/mirror/racket/"
-                          version "/racket-src.tgz")))
-              (sha256
-               (base32
-                "047wpjblfzmf1msz7snrp2c2h0zxyzlmbsqr9bwsyvz3frcg0888"))
-              (patches (search-patches
-                        "racket-sh-via-rktio.patch"))))
+    (name "racket-minimal")
+    (version "8.0")            ; note: remember to also update racket!
+    (source
+     (origin
+       (method url-fetch)
+       (uri (list (string-append "https://mirror.racket-lang.org/installers/"
+                                 version "/racket-minimal-src.tgz")
+                  ;; this mirror seems to have broken HTTPS:
+                  (string-append
+                   "http://mirror.informatik.uni-tuebingen.de/mirror/racket/"
+                   version "/racket-minimal-src.tgz")))
+       (sha256 "0mwyffw4gcci8wmzxa3j28h03h0gsz55aard8qrk3lri8r2xyg21")
+       (patches (search-patches
+                 "racket-sh-via-rktio.patch"))))
+    (home-page "https://racket-lang.org")
+    (synopsis "Racket without bundled packages such as DrRacket")
+    (inputs
+     `(("openssl" ,openssl)
+       ("sqlite" ,sqlite)
+       ("sh" ,bash-minimal)
+       ("zlib" ,zlib)
+       ("zlib:static" ,zlib "static")
+       ("lz4" ,lz4)
+       ("lz4:static" ,lz4 "static")))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags
@@ -164,15 +173,41 @@
                                   "unixodbc"
                                   "libedit")))
              #t)))
-       ;; XXX: how to run them?
+       ;; Tests are in packages like racket-test-core and
+       ;; main-distribution-test that aren't part of the main distribution.
        #:tests? #f))
+    (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.
+
+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.")
+    ;; https://download.racket-lang.org/license.html
+    (license (list lgpl3+ asl2.0 expat))))
+
+
+(define-public racket
+  (package/inherit
+      racket-minimal
+    (name "racket")
+    (version (package-version racket-minimal)) ; needed for origin uri to work
+    (source
+     (origin
+       (inherit (package-source racket-minimal))
+       (uri (list (string-append "https://mirror.racket-lang.org/installers/"
+                                 version "/racket-src.tgz")
+                  ;; this mirror seems to have broken HTTPS:
+                  (string-append
+                   "http://mirror.informatik.uni-tuebingen.de/mirror/racket/"
+                   version "/racket-src.tgz")))
+       (sha256
+        (base32
+         "047wpjblfzmf1msz7snrp2c2h0zxyzlmbsqr9bwsyvz3frcg0888"))))
     (inputs
      `(;; sqlite and libraries for `racket/draw' are needed to build the doc.
-       ("sh" ,bash-minimal)
-       ("zlib" ,zlib)
-       ("zlib:static" ,zlib "static")
-       ("lz4" ,lz4)
-       ("lz4:static" ,lz4 "static")
        ("cairo" ,cairo)
        ("fontconfig" ,fontconfig)
        ("glib" ,glib)
@@ -184,12 +219,10 @@
        ("libx11" ,libx11)
        ("mesa" ,mesa)
        ("mpfr" ,mpfr)
-       ("openssl" ,openssl)
        ("pango" ,pango)
-       ("sqlite" ,sqlite)
        ("unixodbc" ,unixodbc)
-       ("libedit" ,libedit)))
-    (home-page "https://racket-lang.org")
+       ("libedit" ,libedit)
+       ,@(package-inputs racket-minimal)))
     (synopsis "A programmable programming language in the Scheme family")
     (description
      "Racket is a general-purpose programming language in the Scheme family,
@@ -199,40 +232,4 @@ languages to complete language implementations.
 
 The main Racket distribution comes with many bundled packages, including the
 DrRacket IDE, libraries for GUI and web programming, and implementations of
-languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog.")
-    ;; https://download.racket-lang.org/license.html
-    (license (list lgpl3+ asl2.0 expat))))
-
-(define-public racket-minimal
-  (package
-    (inherit racket)
-    (name "racket-minimal")
-    (version (package-version racket))
-    (source
-     (origin
-       (inherit (package-source racket))
-       (uri (list (string-append "https://mirror.racket-lang.org/installers/"
-                                 version "/racket-minimal-src.tgz")
-                  ;; this mirror seems to have broken HTTPS:
-                  (string-append
-                   "http://mirror.informatik.uni-tuebingen.de/mirror/racket/"
-                   version "/racket-minimal-src.tgz")))
-       (sha256 "0mwyffw4gcci8wmzxa3j28h03h0gsz55aard8qrk3lri8r2xyg21")))
-    (synopsis "Racket without bundled packages such as DrRacket")
-    (inputs
-     `(("openssl" ,openssl)
-       ("sqlite" ,sqlite)
-       ("sh" ,bash-minimal)
-       ("zlib" ,zlib)
-       ("zlib:static" ,zlib "static")
-       ("lz4" ,lz4)
-       ("lz4:static" ,lz4 "static")))
-    (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.
-
-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.")))
+languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog.")))
-- 
2.25.1





  reply	other threads:[~2021-04-16 22:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-16 21:08 [bug#47829] [PATCH 1/4] gnu: racket: Move to (gnu packages racket) Philip McGrath
2021-04-16 21:11 ` [bug#47829] [PATCH 2/4] gnu: racket: Remove obsolete patch Philip McGrath
2021-04-16 21:11   ` Philip McGrath [this message]
2021-04-16 21:11   ` [bug#47829] [PATCH 4/4] gnu: racket: Add aditional mirrors Philip McGrath
2021-05-05 14:12     ` bug#47829: [PATCH 1/4] gnu: racket: Move to (gnu packages racket) Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210416211139.21825-2-philip@philipmcgrath.com \
    --to=philip@philipmcgrath.com \
    --cc=47829@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).