aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/scheme.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/scheme.scm')
-rw-r--r--gnu/packages/scheme.scm214
1 files changed, 126 insertions, 88 deletions
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index 7a1f9416b2..9707c646e9 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -23,6 +23,8 @@
;;; Copyright © 2023 Andrew Whatson <whatson@tailcall.au>
;;; Copyright © 2023 Juliana Sims <juli@incana.org>
;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2024 Skylar Hill <stellarskylark@posteo.net>
+;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -43,7 +45,8 @@
#:use-module (gnu packages)
#:use-module ((guix licenses)
#:select (gpl2 gpl2+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ asl2.0
- bsd-3 cc-by-sa4.0 non-copyleft expat public-domain))
+ bsd-0 bsd-3 cc-by-sa4.0 non-copyleft expat
+ public-domain))
#:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix download)
@@ -854,6 +857,64 @@ can be added and values can be defined in the Scheme environment. Being quite a
small program, it is easy to comprehend, get to grips with, and use.")
(license bsd-3))) ; there are no licence headers
+(define-public tr7
+ (package
+ (name "tr7")
+ (version "1.0.10")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/jobol/tr7")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32 "0n77fkm5kcv2pmwbw5fl8r00aarw8da8gkd9d1ki5fn9kbl4fyk2"))
+ (file-name (git-file-name name version))))
+ (build-system gnu-build-system)
+ (outputs '("out" "doc"))
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (substitute* "Makefile"
+ (("PREFIX = /usr/local")
+ (string-append "PREFIX=" #$output))
+ (("ALL = \\$\\(LIBSTA\\) \\$\\(TR7I\\) tags")
+ "ALL = $(LIBSTA) $(TR7I)"))))
+ (replace 'build
+ (lambda _
+ (setenv "CC" #$(cc-for-target))
+ (invoke "make")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "make" "test"))))
+ (replace 'install
+ (lambda _
+ (let* ((share (string-append #$output "/share"))
+ (doc (string-append #$output:doc "/share/doc/"))
+ (bin (string-append #$output "/bin"))
+ (lib (string-append #$output "/lib/"))
+ (tr7 (string-append share "/tr7"))
+ (libs (string-append tr7 "/libs")))
+ (for-each mkdir-p (list tr7 libs bin lib doc))
+ (copy-file "tr7i" (string-append bin "/tr7i"))
+ (copy-file "libtr7.a" (string-append lib "/libtr7.a"))
+ (copy-file "r7rs.pdf" (string-append doc "/r7rs.pdf"))
+ (copy-recursively "tr7libs" libs)))))))
+ (home-page "https://gitlab.com/jobol/tr7")
+ (synopsis "Embedded R7RS small Scheme interpreter")
+ (description
+ "TR7 is a lightweight Scheme interpreter that implements the revision
+R7RS small of scheme programming language.
+
+It is meant to be used as an embedded scripting interpreter for other
+programs. A lot of functionality in TR7 is included conditionally, to allow
+developers freedom in balancing features and footprint.")
+ (license bsd-0)))
+
(define-public stalin
(let ((commit "ed1c9e339c352b7a6fee40bb2a47607c3466f0be"))
;; FIXME: The Stalin "source" contains C code generated by itself:
@@ -1117,95 +1178,72 @@ a Common Lisp environment.")
(define-public gerbil
(package
(name "gerbil")
- (version "0.17.0")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/vyzo/gerbil")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0c0nspm659ybgmqlppdv7sxzll4hwkvcp9qmcsip6d0kz0p8r9c3"))))
+ (version "0.18.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/mighty-gerbils/gerbil/releases/download/v"
+ version "/gerbil-v" version ".tar.gz"))
+ (sha256
+ (base32 "1dff14bzqkq6scyyhnwhc3ky96j6lr84mnghk4da0x6vifw7p0p1"))))
(arguments
- (list #:phases
- #~(modify-phases %standard-phases
- (delete 'bootstrap)
- (add-before 'configure 'chdir
- (lambda _
- (chdir "src")))
- (replace 'configure
- (lambda _
- (invoke "chmod" "755" "-R" ".")
- ;; Otherwise fails when editing an r--r--r-- file.
- (invoke "gsi-script"
- "configure"
- "--prefix"
- #$output
- "--with-gambit"
- #$gambit-c)))
- (add-before 'patch-generated-file-shebangs 'fix-gxi-shebangs
- (lambda _
- ;; Some .ss files refer to gxi using /usr/bin/env gxi
- ;; and 'patch-generated-file-shebangs can't fix that
- ;; because gxi has not been compiled yet.
- ;; We know where gxi is going to end up so we
- ;; Doctor Who our fix here before the problem
- ;; happens towards the end of the build.sh script.
- (let ((abs-srcdir (getcwd)))
- (for-each (lambda (f)
- (substitute* f
- (("#!/usr/bin/env gxi")
- (string-append "#!" abs-srcdir
- "/../bin/gxi"))))
- '("./gerbil/gxc" "./lang/build.ss"
- "./misc/http-perf/build.ss"
- "./misc/rpc-perf/build.ss"
- "./misc/scripts/docsnarf.ss"
- "./misc/scripts/docstub.ss"
- "./misc/scripts/docsyms.ss"
- "./r7rs-large/build.ss"
- "./release.ss"
- "./std/build.ss"
- "./std/run-tests.ss"
- "./std/web/fastcgi-test.ss"
- "./std/web/rack-test.ss"
- "./tools/build.ss"
- "./tutorial/httpd/build.ss"
- "./tutorial/kvstore/build.ss"
- "./tutorial/lang/build.ss"
- "./tutorial/proxy/build-static.ss"
- "./tutorial/proxy/build.ss")))))
- (add-after 'configure 'create-gx-version.scm
- (lambda _
- (with-output-to-file (string-append (getcwd)
- "/gerbil/runtime/gx-version.scm")
+ (list
+ #:phases #~(modify-phases %standard-phases
+ (delete 'bootstrap)
+ (add-after 'set-paths 'set-cc
+ (lambda _
+ (setenv "CC" #$(cc-for-target))))
+ (add-before 'patch-generated-file-shebangs 'fix-gxi-shebangs
+ (lambda _
+ ;; Some .ss files refer to gxi using /usr/bin/env gxi
+ ;; and 'patch-generated-file-shebangs can't fix that
+ ;; because gxi has not been compiled yet.
+ ;; We know where gxi is going to end up so we
+ ;; Doctor Who our fix here before the problem
+ ;; happens towards the end of the build.sh script.
+ (let ((abs-srcdir (getcwd)))
+ (for-each (lambda (f)
+ (substitute* f
+ (("#!/usr/bin/env gxi")
+ (string-append "#!" abs-srcdir
+ "/../bin/gxi"))))
+ '("./src/std/web/rack-test.ss"
+ "./src/std/web/fastcgi-test.ss"
+ "./src/std/build.ss"
+ "./src/build/build-libgerbil.ss"
+ "./src/gerbil/test/test-build-static-exe.ss"
+ "./src/gerbil/test/test-build-optimized-static-exe.ss"
+ "./src/gerbil/test/test-build-optimized-exe.ss"
+ "./src/gerbil/test/test-build-exe.ss"
+ "./src/srfi/build.ss"
+ "./src/r7rs-large/build.ss"
+ "./src/misc/rpc-perf/build.ss"
+ "./src/misc/http-perf/build.ss"
+ "./src/misc/scripts/docsnarf.ss"
+ "./src/misc/scripts/docstub.ss"
+ "./src/misc/scripts/docsyms.ss"
+ "./src/tools/gxpkg.ss"
+ "./src/tools/build.ss"
+ "./src/lang/build.ss"
+ "./src/tutorial/kvstore/build.ss"
+ "./src/tutorial/httpd/build.ss"
+ "./src/tutorial/proxy/build.ss"
+ "./src/tutorial/ensemble/build.ss"
+ "./src/tutorial/lang/build.ss")))))
+ (replace 'build
(lambda _
- (write `(define (gerbil-version-string)
- ,(string-append "v"
- #$(version-major+minor
- version))))))))
- (replace 'build
- (lambda _
- (setenv "HOME"
- (getcwd))
- (invoke
- ;; The build script needs a tty or it'll crash on an ioctl
- ;; trying to find the width of the terminal it's running on.
- ;; Calling in script prevents that.
- "script"
- "-qefc"
- "./build.sh")))
- (replace 'install
- (lambda _
- (let* ((bin (string-append #$output "/bin"))
- (lib (string-append #$output "/lib")))
- (mkdir-p bin)
- (mkdir-p lib)
- (copy-recursively "../bin" bin)
- (copy-recursively "../lib" lib)))))
- #:tests? #f))
- (native-inputs (list coreutils gambit-c util-linux))
+ (setenv "HOME"
+ (getcwd))
+ (invoke
+ ;; The build script needs a tty or it'll crash on an ioctl
+ ;; trying to find the width of the terminal it's running on.
+ ;; Calling in script prevents that.
+ "script"
+ "-qefc"
+ "./build.sh"))))
+ #:tests? #f))
+ (native-inputs (list gambit-c util-linux))
(propagated-inputs (list gambit-c openssl sqlite zlib))
(build-system gnu-build-system)
(synopsis "Meta-dialect of Scheme with post-modern features")