Compare commits

...

2 commits

Author SHA1 Message Date
TakeV b12c376374
gnu: Add cyclone.
* gnu/packages/scheme.scm (cyclone): New variable.

Change-Id: Icf3890ded917b728177c2831231e87b52d996532
2024-04-03 18:54:03 -04:00
TakeV e7f92411f9
gnu: Add cyclone-bootstrap.
* gnu/packages/scheme.scm (cyclone-bootstrap): New variable.

Change-Id: I85d37ebc48882d4b830ef34851ae6d37ecf2e6e5
2024-04-03 18:54:01 -04:00

View file

@ -24,6 +24,7 @@
;;; Copyright © 2023 Juliana Sims <juli@incana.org>
;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2024 Skylar Hill <stellarskylark@posteo.net>
;;; Copyright © 2024 TakeV <takev@disroot.org>
;;;
;;; This file is part of GNU Guix.
;;;
@ -60,6 +61,7 @@ (define-module (gnu packages scheme)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages bdw-gc)
#:use-module (gnu packages c)
#:use-module (gnu packages compression)
#:use-module (gnu packages databases)
#:use-module (gnu packages emacs)
@ -1254,3 +1256,69 @@ (define-public stklos
Machine. STklos can also be compiled as a library and embedded in an
application.")
(license gpl2+)))
;; Cyclone is self-hosted. To build it, we require the bootstrap compiler.
(define cyclone-bootstrap
(package
(name "cyclone-bootstrap")
(version "0.36.0")
;; TODO Use system's libtommath after
;; https://github.com/justinethier/cyclone/issues/458 is resolved
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/justinethier/cyclone-bootstrap.git")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "0fv0mnrn5shbx77383f4mbkvc4i9yyj1bjm3dfyhipnaqapbhqpi"))))
(inputs (list ck))
(build-system gnu-build-system)
(arguments
(list
#:phases #~(modify-phases %standard-phases
(delete 'configure))
#:test-target "test"
#:make-flags #~(list "CC=gcc"
(string-append "PREFIX="
#$output))))
(home-page "https://github.com/justinethier/cyclone-bootstrap")
(synopsis "Cyclone Scheme bootstrap compiler")
(description
"Cyclone Scheme is a brand-new, R7RS Scheme-to-C compiler that uses a
variant of Cheney on the MTA to implement full tail recursion,
continuations, and generational garbage collection. This package uses
intermediate code generated by compiling the Scheme source files to
build and install Cyclone Scheme. The compiler is self-hosting and
cannot be built directly on a system without Cyclone binaries
installed.")
(license expat)))
(define-public cyclone
(package
;; the bootstrap compiler and final compiler share most build reqs
(inherit cyclone-bootstrap)
(name "cyclone")
(version "0.36.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/justinethier/cyclone.git")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "0qz5sdcnqkvw78gx86k3g1f0di5aqagdxqvzc35j50h1q5kj67z6"))))
(native-inputs (list cyclone-bootstrap))
(home-page "http://justinethier.github.io/cyclone/")
(synopsis "Fast R7RS Scheme-to-C compiler")
(description
"Cyclone Scheme is a brand-new compiler that allows real-world application
development using the R7RS Scheme Language standard.
Cyclone's runtime uses Cheney on the MTA to implement full tail recursion,
continuations, multiple native threads, and generational garbage collection.
The on-the-fly garbage collector manages the second-generation heap and
performs major collections without 'stopping the world'.")
(license expat)))