unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#47829] [PATCH 1/4] gnu: racket: Move to (gnu packages racket).
@ 2021-04-16 21:08 Philip McGrath
  2021-04-16 21:11 ` [bug#47829] [PATCH 2/4] gnu: racket: Remove obsolete patch Philip McGrath
  0 siblings, 1 reply; 5+ messages in thread
From: Philip McGrath @ 2021-04-16 21:08 UTC (permalink / raw)
  To: 47829; +Cc: Philip McGrath

* gnu/packages/scheme.scm (racket,racket-minimal): Move to ...
* gnu/packages/racket.scm: ... this new file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/racket.scm (racket)[synopsis]: Tweak.
---
This package series does some internal reorganization of the `racket` and
`racket-minimal` packages in anticipation of the upcoming Racket 8.1 release.
The most important change is making `racket-minimal` the base package
with `racket` as the variant, rather than vice versa. Following Racket's
actual organization this way provides the right basis for further improvements
(e.g. changing `racket` to use `racket-minimal` as an input), though those
improvements should be easier after the 8.1 release.

 gnu/local.mk            |   1 +
 gnu/packages/racket.scm | 242 ++++++++++++++++++++++++++++++++++++++++
 gnu/packages/scheme.scm | 194 --------------------------------
 3 files changed, 243 insertions(+), 194 deletions(-)
 create mode 100644 gnu/packages/racket.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 50b11a8ca2..92ec4b4589 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -471,6 +471,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/toys.scm				\
   %D%/packages/tryton.scm			\
   %D%/packages/qt.scm				\
+  %D%/packages/racket.scm			\
   %D%/packages/radio.scm			\
   %D%/packages/ragel.scm			\
   %D%/packages/rails.scm			\
diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
new file mode 100644
index 0000000000..925a6391f5
--- /dev/null
+++ b/gnu/packages/racket.scm
@@ -0,0 +1,242 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2020 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>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages racket)
+  #:use-module ((guix licenses)
+                #:select (asl2.0 expat lgpl3+))
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix git-download)
+  #:use-module (guix utils)
+  #:use-module (guix gexp)
+  #:use-module (guix build-system gnu)
+  #:use-module (srfi srfi-1)
+  #:use-module (ice-9 match)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages bash)
+  #:use-module ((gnu packages chez)
+                #:select (chez-scheme))
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages databases)
+  #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages gl)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages image)
+  #:use-module (gnu packages libedit)
+  #:use-module (gnu packages multiprecision)
+  #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages xorg))
+
+(define-public racket
+  (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"
+                        ;; TODO: If we're no longer patching Racket source
+                        ;; files with store paths, we may also fix the
+                        ;; issue that necessitated the following patch:
+                        "racket-store-checksum-override.patch"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       `(,(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH="
+                         (assoc-ref %build-inputs "sh")
+                         "/bin/sh")
+         "--enable-libz"
+         "--enable-liblz4")
+       #:modules
+       ((guix build gnu-build-system)
+        (guix build utils)
+        (srfi srfi-1))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-chez-configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (substitute* "src/cs/c/Makefile.in"
+               (("/bin/sh") (which "sh")))
+             ;; TODO: Racket CS uses a fork of Chez Scheme.
+             ;; Most of this is copy-pasted from the "chez.scm",
+             ;; but maybe there's a way to reuse more directly.
+             (with-directory-excursion "src/ChezScheme"
+               (substitute* (find-files "mats" "Mf-.*")
+                 (("^[[:space:]]+(cc ) *") "\tgcc "))
+               (substitute*
+                   (find-files "." (string-append
+                                    "("
+                                    "Mf-[a-zA-Z0-9.]+"
+                                    "|Makefile[a-zA-Z0-9.]*"
+                                    "|checkin"
+                                    "|stex\\.stex"
+                                    "|newrelease"
+                                    "|workarea"
+                                    "|unix\\.ms"
+                                    "|^6\\.ms"
+                                    ;;"|[a-zA-Z0-9.]+\\.ms" ; guile can't read
+                                    ")"))
+                 (("/bin/rm") (which "rm"))
+                 (("/bin/ln") (which "ln"))
+                 (("/bin/cp") (which "cp"))
+                 (("/bin/echo") (which "echo")))
+               (substitute* "makefiles/installsh"
+                 (("/bin/true") (which "true"))))
+             #t))
+         (add-before 'configure 'pre-configure-minimal
+           (lambda* (#:key inputs #:allow-other-keys)
+             (chdir "src")
+             #t))
+         (add-after 'build 'patch-config.rktd-lib-search-dirs
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             ;; We do this between the `build` and `install` phases
+             ;; so that we have racket to read and write the hash table,
+             ;; but it comes before `raco setup`, when foreign libraries
+             ;; are needed to build the documentation.
+             (define out (assoc-ref outputs "out"))
+             (apply invoke
+                    "./cs/c/racketcs"
+                    "-e"
+                    ,(format #f
+                             "~s"
+                             '(let* ((args
+                                      (vector->list
+                                       (current-command-line-arguments)))
+                                     (file (car args))
+                                     (extra-lib-search-dirs (cdr args)))
+                                (write-to-file
+                                 (hash-update
+                                  (file->value file)
+                                  'lib-search-dirs
+                                  (lambda (dirs)
+                                    (append dirs extra-lib-search-dirs))
+                                  null)
+                                 #:exists 'truncate/replace
+                                 file)))
+                    "--"
+                    "../etc/config.rktd"
+                    (filter-map (lambda (lib)
+                                  (cond
+                                   ((assoc-ref inputs lib)
+                                    => (lambda (pth)
+                                         (string-append pth "/lib")))
+                                   (else
+                                    #f)))
+                                '("cairo"
+                                  "fontconfig"
+                                  "glib"
+                                  "glu"
+                                  "gmp"
+                                  "gtk+"
+                                  "libjpeg"
+                                  "libpng"
+                                  "libx11"
+                                  "mesa"
+                                  "mpfr"
+                                  "openssl"
+                                  "pango"
+                                  "sqlite"
+                                  "unixodbc"
+                                  "libedit")))
+             #t)))
+       ;; XXX: how to run them?
+       #:tests? #f))
+    (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)
+       ("glu" ,glu)
+       ("gmp" ,gmp)
+       ("gtk+" ,gtk+)                   ; propagates gdk-pixbuf+svg
+       ("libjpeg" ,libjpeg-turbo)
+       ("libpng" ,libpng)
+       ("libx11" ,libx11)
+       ("mesa" ,mesa)
+       ("mpfr" ,mpfr)
+       ("openssl" ,openssl)
+       ("pango" ,pango)
+       ("sqlite" ,sqlite)
+       ("unixodbc" ,unixodbc)
+       ("libedit" ,libedit)))
+    (home-page "https://racket-lang.org")
+    (synopsis "A programmable programming language in the Scheme family")
+    (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 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.")))
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index b5d526bfc3..23de98fb2e 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -397,200 +397,6 @@ implementation techniques and as an expository tool.")
     ;; Most files are BSD-3; see COPYING for the few exceptions.
     (license bsd-3)))
 
-(define-public racket
-  (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"
-                        ;; TODO: If we're no longer patching Racket source
-                        ;; files with store paths, we may also fix the
-                        ;; issue that necessitated the following patch:
-                        "racket-store-checksum-override.patch"))))
-    (build-system gnu-build-system)
-    (arguments
-     `(#:configure-flags
-       `(,(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH="
-                         (assoc-ref %build-inputs "sh")
-                         "/bin/sh")
-         "--enable-libz"
-         "--enable-liblz4")
-       #:modules
-       ((guix build gnu-build-system)
-        (guix build utils)
-        (srfi srfi-1))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-chez-configure
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (substitute* "src/cs/c/Makefile.in"
-               (("/bin/sh") (which "sh")))
-             ;; TODO: Racket CS uses a fork of Chez Scheme.
-             ;; Most of this is copy-pasted from the "chez.scm",
-             ;; but maybe there's a way to reuse more directly.
-             (with-directory-excursion "src/ChezScheme"
-               (substitute* (find-files "mats" "Mf-.*")
-                 (("^[[:space:]]+(cc ) *") "\tgcc "))
-               (substitute*
-                   (find-files "." (string-append
-                                    "("
-                                    "Mf-[a-zA-Z0-9.]+"
-                                    "|Makefile[a-zA-Z0-9.]*"
-                                    "|checkin"
-                                    "|stex\\.stex"
-                                    "|newrelease"
-                                    "|workarea"
-                                    "|unix\\.ms"
-                                    "|^6\\.ms"
-                                    ;;"|[a-zA-Z0-9.]+\\.ms" ; guile can't read
-                                    ")"))
-                 (("/bin/rm") (which "rm"))
-                 (("/bin/ln") (which "ln"))
-                 (("/bin/cp") (which "cp"))
-                 (("/bin/echo") (which "echo")))
-               (substitute* "makefiles/installsh"
-                 (("/bin/true") (which "true"))))
-             #t))
-         (add-before 'configure 'pre-configure-minimal
-           (lambda* (#:key inputs #:allow-other-keys)
-             (chdir "src")
-             #t))
-         (add-after 'build 'patch-config.rktd-lib-search-dirs
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             ;; We do this between the `build` and `install` phases
-             ;; so that we have racket to read and write the hash table,
-             ;; but it comes before `raco setup`, when foreign libraries
-             ;; are needed to build the documentation.
-             (define out (assoc-ref outputs "out"))
-             (apply invoke
-                    "./cs/c/racketcs"
-                    "-e"
-                    ,(format #f
-                             "~s"
-                             '(let* ((args
-                                      (vector->list
-                                       (current-command-line-arguments)))
-                                     (file (car args))
-                                     (extra-lib-search-dirs (cdr args)))
-                                (write-to-file
-                                 (hash-update
-                                  (file->value file)
-                                  'lib-search-dirs
-                                  (lambda (dirs)
-                                    (append dirs extra-lib-search-dirs))
-                                  null)
-                                 #:exists 'truncate/replace
-                                 file)))
-                    "--"
-                    "../etc/config.rktd"
-                    (filter-map (lambda (lib)
-                                  (cond
-                                   ((assoc-ref inputs lib)
-                                    => (lambda (pth)
-                                         (string-append pth "/lib")))
-                                   (else
-                                    #f)))
-                                '("cairo"
-                                  "fontconfig"
-                                  "glib"
-                                  "glu"
-                                  "gmp"
-                                  "gtk+"
-                                  "libjpeg"
-                                  "libpng"
-                                  "libx11"
-                                  "mesa"
-                                  "mpfr"
-                                  "openssl"
-                                  "pango"
-                                  "sqlite"
-                                  "unixodbc"
-                                  "libedit")))
-             #t)))
-       ;; XXX: how to run them?
-       #:tests? #f))
-    (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)
-       ("glu" ,glu)
-       ("gmp" ,gmp)
-       ("gtk+" ,gtk+)                   ; propagates gdk-pixbuf+svg
-       ("libjpeg" ,libjpeg-turbo)
-       ("libpng" ,libpng)
-       ("libx11" ,libx11)
-       ("mesa" ,mesa)
-       ("mpfr" ,mpfr)
-       ("openssl" ,openssl)
-       ("pango" ,pango)
-       ("sqlite" ,sqlite)
-       ("unixodbc" ,unixodbc)
-       ("libedit" ,libedit)))
-    (home-page "https://racket-lang.org")
-    (synopsis "Implementation of Scheme and related languages")
-    (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 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, 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 Dr. Racket")
-    (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
-Dr. Racket IDE, are not included.")))
-
 (define-public gambit-c
   (package
     (name "gambit-c")
-- 
2.25.1





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#47829] [PATCH 2/4] gnu: racket: Remove obsolete patch.
  2021-04-16 21:08 [bug#47829] [PATCH 1/4] gnu: racket: Move to (gnu packages racket) Philip McGrath
@ 2021-04-16 21:11 ` Philip McGrath
  2021-04-16 21:11   ` [bug#47829] [PATCH 3/4] gnu: racket: Racket inherits racket-minimal, not vice versa Philip McGrath
  2021-04-16 21:11   ` [bug#47829] [PATCH 4/4] gnu: racket: Add aditional mirrors Philip McGrath
  0 siblings, 2 replies; 5+ messages in thread
From: Philip McGrath @ 2021-04-16 21:11 UTC (permalink / raw)
  To: 47829; +Cc: Philip McGrath

* gnu/packages/racket.scm (racket)[source](patches): Remove
"racket-store-checksum-override.patch", which is no longer needed since
we stopped injecting store paths into Racket files in commit 834aa48:
see <https://issues.guix.gnu.org/47180>.
* gnu/packages/patches/racket-store-checksum-override.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Remove it.
---
 gnu/local.mk                                  |  1 -
 .../racket-store-checksum-override.patch      | 42 -------------------
 gnu/packages/racket.scm                       |  6 +--
 3 files changed, 1 insertion(+), 48 deletions(-)
 delete mode 100644 gnu/packages/patches/racket-store-checksum-override.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 92ec4b4589..26c93885ef 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1642,7 +1642,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/rpcbind-CVE-2017-8779.patch		\
   %D%/packages/patches/rtags-separate-rct.patch			\
   %D%/packages/patches/racket-sh-via-rktio.patch		\
-  %D%/packages/patches/racket-store-checksum-override.patch	\
   %D%/packages/patches/remake-impure-dirs.patch			\
   %D%/packages/patches/retroarch-LIBRETRO_DIRECTORY.patch	\
   %D%/packages/patches/rnp-add-version.cmake.patch		\
diff --git a/gnu/packages/patches/racket-store-checksum-override.patch b/gnu/packages/patches/racket-store-checksum-override.patch
deleted file mode 100644
index 6c4ebcf022..0000000000
--- a/gnu/packages/patches/racket-store-checksum-override.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Racket uses checksums to test if it needs to recompile its source
-files to bytecode.  If Racket is updated by grafting, the source and
-bytecode files get updated, but the checksum stays the same.  Since
-the checksum no longer matches the source file, Racket tries to
-regenerate the bytecode and write it to the store, causing errors
-because the store is immutable.  This patch makes Racket ignore
-checksums for files in the store.
-
-See <https://debbugs.gnu.org/30680> for details.
-
----
---- a/collects/compiler/private/cm-minimal.rkt
-+++ b/collects/compiler/private/cm-minimal.rkt
-@@ -6,6 +6,7 @@
-          racket/list
-          racket/path
-          racket/promise
-+         racket/string
-          file/sha1
-          setup/cross-system
-          compiler/compilation-path
-@@ -268,7 +269,8 @@
-                (trace-printf "newer src... ~a > ~a" path-time path-zo-time)
-                (maybe-compile-zo deps path->mode roots path orig-path read-src-syntax up-to-date collection-cache new-seen
-                                  #:trying-sha1? sha1-only?)]
--              [(different-source-sha1-and-dep-recorded path deps)
-+              [(and (not (store-reference? path))
-+                    (different-source-sha1-and-dep-recorded path deps))
-                => (lambda (difference)
-                     (trace-printf "different src hash ~a for ~a..." difference path)
-                     (maybe-compile-zo deps path->mode roots path orig-path read-src-syntax up-to-date collection-cache new-seen
-@@ -1012,5 +1014,9 @@
-       #f
-       (list src-hash recorded-hash)))
-
-+(define (store-reference? path)
-+  (let ([store-prefix (or (getenv "NIX_STORE") "/gnu/store")])
-+    (string-prefix? (path->string path) store-prefix)))
-+
- ;; Make sure `recompile-from` is machine-independent so that
- ;; recompilation makes sense.
- ;; The compilation lock must is held for the source of `recompile-from`.
\ No newline at end of file
diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index 925a6391f5..6cb72e592c 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -63,11 +63,7 @@
                (base32
                 "047wpjblfzmf1msz7snrp2c2h0zxyzlmbsqr9bwsyvz3frcg0888"))
               (patches (search-patches
-                        "racket-sh-via-rktio.patch"
-                        ;; TODO: If we're no longer patching Racket source
-                        ;; files with store paths, we may also fix the
-                        ;; issue that necessitated the following patch:
-                        "racket-store-checksum-override.patch"))))
+                        "racket-sh-via-rktio.patch"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags
-- 
2.25.1





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#47829] [PATCH 3/4] gnu: racket: Racket inherits racket-minimal, not vice versa.
  2021-04-16 21:11 ` [bug#47829] [PATCH 2/4] gnu: racket: Remove obsolete patch Philip McGrath
@ 2021-04-16 21:11   ` Philip McGrath
  2021-04-16 21:11   ` [bug#47829] [PATCH 4/4] gnu: racket: Add aditional mirrors Philip McGrath
  1 sibling, 0 replies; 5+ messages in thread
From: Philip McGrath @ 2021-04-16 21:11 UTC (permalink / raw)
  To: 47829; +Cc: Philip McGrath

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





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#47829] [PATCH 4/4] gnu: racket: Add aditional mirrors.
  2021-04-16 21:11 ` [bug#47829] [PATCH 2/4] gnu: racket: Remove obsolete patch Philip McGrath
  2021-04-16 21:11   ` [bug#47829] [PATCH 3/4] gnu: racket: Racket inherits racket-minimal, not vice versa Philip McGrath
@ 2021-04-16 21:11   ` Philip McGrath
  2021-05-05 14:12     ` bug#47829: [PATCH 1/4] gnu: racket: Move to (gnu packages racket) Ludovic Courtès
  1 sibling, 1 reply; 5+ messages in thread
From: Philip McGrath @ 2021-04-16 21:11 UTC (permalink / raw)
  To: 47829; +Cc: Philip McGrath

* gnu/packages/racket.scm (racket-minimal, racket)[source](uri): Lift
base urls into a new internal variable, '%installer-mirrors'.
Add mirrors at the University of Utah, Northwestern University,
the University of Waterloo, and Vrije Universiteit Brussel (Infogroep).
---
 gnu/packages/racket.scm | 34 ++++++++++++++++++++++------------
 1 file changed, 22 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index 73e00240de..f2bbf28564 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -47,6 +47,22 @@
   #:use-module (gnu packages tls)
   #:use-module (gnu packages xorg))
 
+
+(define %installer-mirrors
+  ;; Source:
+  ;; https://github.com/racket/racket-lang-org/blob/master/download/data.rkt#L58
+  ;; Matthew Flatt says: "note that many are commented out"
+  ;; INVARIANT: End with a trailing "/"!
+  '("https://mirror.racket-lang.org/installers/"
+    "https://www.cs.utah.edu/plt/installers/"
+    "https://plt.cs.northwestern.edu/racket-mirror/"
+    "https://mirror.csclub.uwaterloo.ca/racket/racket-installers/"
+    ;; Universität Tübingen is using a self-signed HTTPS certificate:
+    "http://mirror.informatik.uni-tuebingen.de/mirror/racket/"
+    "https://racket.infogroep.be/"
+    ))
+
+
 (define-public racket-minimal
   (package
     (name "racket-minimal")
@@ -54,12 +70,9 @@
     (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")))
+       (uri (map (lambda (base)
+                   (string-append base version "/racket-minimal-src.tgz"))
+                 %installer-mirrors))
        (sha256 "0mwyffw4gcci8wmzxa3j28h03h0gsz55aard8qrk3lri8r2xyg21")
        (patches (search-patches
                  "racket-sh-via-rktio.patch"))))
@@ -197,12 +210,9 @@ DrRacket IDE, are not included.")
     (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")))
+       (uri (map (lambda (base)
+                   (string-append base version "/racket-src.tgz"))
+                 %installer-mirrors))
        (sha256
         (base32
          "047wpjblfzmf1msz7snrp2c2h0zxyzlmbsqr9bwsyvz3frcg0888"))))
-- 
2.25.1





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#47829: [PATCH 1/4] gnu: racket: Move to (gnu packages racket).
  2021-04-16 21:11   ` [bug#47829] [PATCH 4/4] gnu: racket: Add aditional mirrors Philip McGrath
@ 2021-05-05 14:12     ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2021-05-05 14:12 UTC (permalink / raw)
  To: Philip McGrath; +Cc: 47829-done

Hi Philip,

Applied all four patches.  Thank you, and sorry for the delay!

Ludo’.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-05-05 14:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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   ` [bug#47829] [PATCH 3/4] gnu: racket: Racket inherits racket-minimal, not vice versa Philip McGrath
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

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).