summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorPierre Neidhardt <mail@ambrevar.xyz>2020-02-18 16:58:37 +0100
committerPierre Neidhardt <mail@ambrevar.xyz>2020-02-18 17:04:16 +0100
commit4b8450c07e485985ed4b35173f51c1705980bd1a (patch)
tree2896c7008924f1433dfeb0cddaf67de4cb9cc379 /gnu
parentfb9832436ab929c0f75708edbafb811a76627901 (diff)
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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/scheme.scm84
1 files changed, 66 insertions, 18 deletions
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index 026c9f2e53..52c060744b 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -412,22 +412,15 @@ implementation techniques and as an expository tool.")
(arguments
'(#:phases
(modify-phases %standard-phases
- (add-before 'configure 'pre-configure
+ (add-before 'configure 'pre-configure-minimal
(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))))
+ (let* ((library-path (search-path-as-string->list
+ (getenv "LIBRARY_PATH")))
+ (find-so (lambda (soname)
+ (search-path
+ library-path
+ (format #f "~a.so" soname)))))
(substitute* "collects/db/private/sqlite3/ffi.rkt"
(("ffi-lib sqlite-so")
(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"))))
(substitute* "collects/openssl/libcrypto.rkt"
(("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"
(("ffi-lib libgmp-so")
(format #f "ffi-lib \"~a\"" (find-so "libgmp"))))
@@ -474,15 +485,14 @@ implementation techniques and as an expository tool.")
("libGL"))
("share/pkgs/sgl/gl.rkt"
("libGL" "libGLU")))))
- (chdir "src")
#t))
(add-after 'unpack 'patch-/bin/sh
(lambda _
(substitute* "collects/racket/system.rkt"
(("/bin/sh") (which "sh")))
#t)))
- #:tests? #f ; XXX: how to run them?
- ))
+ ;; XXX: how to run them?
+ #:tests? #f))
(inputs
`(("libffi" ,libffi)
;; Hardcode dynamically loaded libraries for better functionality.
@@ -513,6 +523,44 @@ of libraries.")
;; 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
+ (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
(package
(name "gambit-c")