[PATCH 1/4] gnu: racket: Move to (gnu packages racket).

DoneSubmitted by Philip McGrath.
Details
2 participants
  • Ludovic Courtès
  • Philip McGrath
Owner
unassigned
Severity
normal
P
P
Philip McGrath wrote on 16 Apr 23:08 +0200
(address . guix-patches@gnu.org)(name . Philip McGrath)(address . philip@philipmcgrath.com)
20210416210822.21536-1-philip@philipmcgrath.com
* 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 packagewith `racket` as the variant, rather than vice versa. Following Racket'sactual organization this way provides the right basis for further improvements(e.g. changing `racket` to use `racket-minimal` as an input), though thoseimprovements 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
Toggle diff (467 lines)diff --git a/gnu/local.mk b/gnu/local.mkindex 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.scmnew file mode 100644index 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.scmindex 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
P
P
Philip McGrath wrote on 16 Apr 23:11 +0200
[PATCH 2/4] gnu: racket: Remove obsolete patch.
(address . 47829@debbugs.gnu.org)(name . Philip McGrath)(address . philip@philipmcgrath.com)
20210416211139.21825-1-philip@philipmcgrath.com
* gnu/packages/racket.scm (racket)[source](patches): Remove"racket-store-checksum-override.patch", which is no longer needed sincewe 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
Toggle diff (80 lines)diff --git a/gnu/local.mk b/gnu/local.mkindex 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.patchdeleted file mode 100644index 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 filediff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scmindex 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
P
P
Philip McGrath wrote on 16 Apr 23:11 +0200
[PATCH 3/4] gnu: racket: Racket inherits racket-minimal, not vice versa.
(address . 47829@debbugs.gnu.org)(name . Philip McGrath)(address . philip@philipmcgrath.com)
20210416211139.21825-2-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 inheritfrom it. Move 'version', 'patches', 'home-page', 'build-system','arguments', and 'license' to 'racket-minimal'.* gnu/packages/racket.scm (racket)[inputs]: Rather than copy andpasting, use '(package-inputs racket-minimal)'.--- gnu/packages/racket.scm | 123 ++++++++++++++++++++-------------------- 1 file changed, 60 insertions(+), 63 deletions(-)
Toggle diff (160 lines)diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scmindex 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
P
P
Philip McGrath wrote on 16 Apr 23:11 +0200
[PATCH 4/4] gnu: racket: Add aditional mirrors.
(address . 47829@debbugs.gnu.org)(name . Philip McGrath)(address . philip@philipmcgrath.com)
20210416211139.21825-3-philip@philipmcgrath.com
* gnu/packages/racket.scm (racket-minimal, racket)[source](uri): Liftbase 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(-)
Toggle diff (61 lines)diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scmindex 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
L
L
Ludovic Courtès wrote on 5 May 16:12 +0200
Re: bug#47829: [PATCH 1/4] gnu: racket: Move to (gnu packages racket).
(name . Philip McGrath)(address . philip@philipmcgrath.com)(address . 47829-done@debbugs.gnu.org)
878s4tjmm3.fsf_-_@gnu.org
Hi Philip,
Applied all four patches. Thank you, and sorry for the delay!
Ludo’.
Closed
?