gnu: Add racket-minimal.
* gnu/packages/scheme.scm (racket-minimal): New variable. (racket-minimal)[arguments]: Split 'pre-configure phase so that the non-minimal part can be easily removed in racket-minimal.
This commit is contained in:
parent
fb9832436a
commit
4b8450c07e
1 changed files with 66 additions and 18 deletions
|
@ -412,22 +412,15 @@ implementation techniques and as an expository tool.")
|
||||||
(arguments
|
(arguments
|
||||||
'(#:phases
|
'(#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-before 'configure 'pre-configure
|
(add-before 'configure 'pre-configure-minimal
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
;; Patch dynamically loaded libraries with their absolute paths.
|
;; Patch dynamically loaded libraries with their absolute paths.
|
||||||
(let* ((library-path (search-path-as-string->list
|
(let* ((library-path (search-path-as-string->list
|
||||||
(getenv "LIBRARY_PATH")))
|
(getenv "LIBRARY_PATH")))
|
||||||
(find-so (lambda (soname)
|
(find-so (lambda (soname)
|
||||||
(search-path
|
(search-path
|
||||||
library-path
|
library-path
|
||||||
(format #f "~a.so" soname))))
|
(format #f "~a.so" soname)))))
|
||||||
(patch-ffi-libs (lambda (file libs)
|
|
||||||
(for-each
|
|
||||||
(lambda (lib)
|
|
||||||
(substitute* file
|
|
||||||
(((format #f "\"~a\"" lib))
|
|
||||||
(format #f "\"~a\"" (find-so lib)))))
|
|
||||||
libs))))
|
|
||||||
(substitute* "collects/db/private/sqlite3/ffi.rkt"
|
(substitute* "collects/db/private/sqlite3/ffi.rkt"
|
||||||
(("ffi-lib sqlite-so")
|
(("ffi-lib sqlite-so")
|
||||||
(format #f "ffi-lib \"~a\"" (find-so "libsqlite3"))))
|
(format #f "ffi-lib \"~a\"" (find-so "libsqlite3"))))
|
||||||
|
@ -436,7 +429,25 @@ implementation techniques and as an expository tool.")
|
||||||
(format #f "ffi-lib \"~a\"" (find-so "libssl"))))
|
(format #f "ffi-lib \"~a\"" (find-so "libssl"))))
|
||||||
(substitute* "collects/openssl/libcrypto.rkt"
|
(substitute* "collects/openssl/libcrypto.rkt"
|
||||||
(("ffi-lib libcrypto-so")
|
(("ffi-lib libcrypto-so")
|
||||||
(format #f "ffi-lib \"~a\"" (find-so "libcrypto"))))
|
(format #f "ffi-lib \"~a\"" (find-so "libcrypto")))))
|
||||||
|
(chdir "src")
|
||||||
|
#t))
|
||||||
|
(add-before 'pre-configure-minimal 'pre-configure
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
;; Patch dynamically loaded libraries with their absolute paths.
|
||||||
|
(let* ((library-path (search-path-as-string->list
|
||||||
|
(getenv "LIBRARY_PATH")))
|
||||||
|
(find-so (lambda (soname)
|
||||||
|
(search-path
|
||||||
|
library-path
|
||||||
|
(format #f "~a.so" soname))))
|
||||||
|
(patch-ffi-libs (lambda (file libs)
|
||||||
|
(for-each
|
||||||
|
(lambda (lib)
|
||||||
|
(substitute* file
|
||||||
|
(((format #f "\"~a\"" lib))
|
||||||
|
(format #f "\"~a\"" (find-so lib)))))
|
||||||
|
libs))))
|
||||||
(substitute* "share/pkgs/math-lib/math/private/bigfloat/gmp.rkt"
|
(substitute* "share/pkgs/math-lib/math/private/bigfloat/gmp.rkt"
|
||||||
(("ffi-lib libgmp-so")
|
(("ffi-lib libgmp-so")
|
||||||
(format #f "ffi-lib \"~a\"" (find-so "libgmp"))))
|
(format #f "ffi-lib \"~a\"" (find-so "libgmp"))))
|
||||||
|
@ -474,15 +485,14 @@ implementation techniques and as an expository tool.")
|
||||||
("libGL"))
|
("libGL"))
|
||||||
("share/pkgs/sgl/gl.rkt"
|
("share/pkgs/sgl/gl.rkt"
|
||||||
("libGL" "libGLU")))))
|
("libGL" "libGLU")))))
|
||||||
(chdir "src")
|
|
||||||
#t))
|
#t))
|
||||||
(add-after 'unpack 'patch-/bin/sh
|
(add-after 'unpack 'patch-/bin/sh
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "collects/racket/system.rkt"
|
(substitute* "collects/racket/system.rkt"
|
||||||
(("/bin/sh") (which "sh")))
|
(("/bin/sh") (which "sh")))
|
||||||
#t)))
|
#t)))
|
||||||
#:tests? #f ; XXX: how to run them?
|
;; XXX: how to run them?
|
||||||
))
|
#:tests? #f))
|
||||||
(inputs
|
(inputs
|
||||||
`(("libffi" ,libffi)
|
`(("libffi" ,libffi)
|
||||||
;; Hardcode dynamically loaded libraries for better functionality.
|
;; Hardcode dynamically loaded libraries for better functionality.
|
||||||
|
@ -513,6 +523,44 @@ of libraries.")
|
||||||
;; https://download.racket-lang.org/license.html
|
;; https://download.racket-lang.org/license.html
|
||||||
(license (list lgpl3+ asl2.0 expat))))
|
(license (list lgpl3+ asl2.0 expat))))
|
||||||
|
|
||||||
|
(define-public racket-minimal
|
||||||
|
(package
|
||||||
|
(inherit racket)
|
||||||
|
(name "racket-minimal")
|
||||||
|
(version (package-version racket))
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (list (string-append "http://mirror.racket-lang.org/installers/"
|
||||||
|
version "/racket-minimal-" version "-src.tgz")
|
||||||
|
(string-append
|
||||||
|
"http://mirror.informatik.uni-tuebingen.de/mirror/racket/"
|
||||||
|
version "/racket-minimal-" version "-src.tgz")))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0id094q9024hj2n3907l7dblp3iix1v5289xzskmh5c26xfygp9y"))
|
||||||
|
(patches (search-patches
|
||||||
|
"racket-store-checksum-override.patch"))))
|
||||||
|
(synopsis "Racket without bundled packages such as Dr. Racket")
|
||||||
|
(arguments
|
||||||
|
(substitute-keyword-arguments (package-arguments racket)
|
||||||
|
((#:phases phases)
|
||||||
|
`(modify-phases ,phases
|
||||||
|
;; Delete fix that applies to files not included in the minimal package.
|
||||||
|
(delete 'pre-configure)))))
|
||||||
|
(inputs
|
||||||
|
`(("libffi" ,libffi)
|
||||||
|
("openssl" ,openssl)
|
||||||
|
("sqlite" ,sqlite)))
|
||||||
|
(description
|
||||||
|
"Racket is an implementation of the Scheme programming language (R5RS and
|
||||||
|
R6RS) and related languages, such as Typed Racket. It features a compiler and
|
||||||
|
a virtual machine with just-in-time native compilation, as well as a large set
|
||||||
|
of libraries.
|
||||||
|
|
||||||
|
In this minimal package, the essential package racket-libs is included, as
|
||||||
|
well as libraries that live in collections. In particular, @command{raco} and
|
||||||
|
the @code{pkg} library are still bundled.")))
|
||||||
|
|
||||||
(define-public gambit-c
|
(define-public gambit-c
|
||||||
(package
|
(package
|
||||||
(name "gambit-c")
|
(name "gambit-c")
|
||||||
|
|
Reference in a new issue