Skip to content

Instantly share code, notes, and snippets.

@purefunctor
Created September 22, 2022 11:38
Show Gist options
  • Save purefunctor/e76496964caf0ac91d67e249262898d8 to your computer and use it in GitHub Desktop.
Save purefunctor/e76496964caf0ac91d67e249262898d8 to your computer and use it in GitHub Desktop.
Homebrew formula for building Chez Scheme on Apple Silicon
class RacketChez < Formula
desc "Implementation of the Chez Scheme language"
homepage "https://cisco.github.io/ChezScheme/"
url "https://github.com/racket/ChezScheme", :using => :git, :tag => "racket-v8.6"
sha256 "a344c46c9b40d8f4695bdbe82b7802da05ffe7ad2c8ffc16747dd84f02c38964"
license "Apache-2.0"
depends_on "ncurses"
def install
system "./configure", "--pb"
system "make", "tarm64osx.bootquick"
system "./configure",
"--threads",
"--machine=tarm64osx",
"--installprefix=#{prefix}",
"--installschemename=chez"
system "make",
"-j4"
system "make",
"install"
end
test do
(testpath/"hello.ss").write <<~EOS
(display "Hello, World!") (newline)
EOS
expected = <<~EOS
Hello, World!
EOS
assert_equal expected, shell_output("#{bin}/chez --script hello.ss")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment