From 3df04eb09f4a473cf6a214331cccba50694677f1 Mon Sep 17 00:00:00 2001 From: Philip McGrath Date: Fri, 16 Apr 2021 17:08:22 -0400 Subject: gnu: racket: Move to (gnu packages racket). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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. Signed-off-by: Ludovic Courtès --- gnu/packages/scheme.scm | 194 ------------------------------------------------ 1 file changed, 194 deletions(-) (limited to 'gnu/packages/scheme.scm') diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm index 5c2d2747b9..fa17b9d566 100644 --- a/gnu/packages/scheme.scm +++ b/gnu/packages/scheme.scm @@ -405,200 +405,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") -- cgit v1.2.3