Skip to content

Commit

Permalink
prefer chez scheme 10+ over racket fork (#3233)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpolzin committed Mar 21, 2024
1 parent ddc634b commit 1c186f0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
23 changes: 13 additions & 10 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ make sure you run `./configure --threads` to build multithreading support in.
**NOTE**: On FreeBSD, OpenBSD and NetBSD you need to use `gmake` command instead
of `make` in the following steps.

**NOTE**: If you're running macOS on Apple Silicon (arm64) you will need to
install the Racket fork of chez scheme as described below. If you install gmp
via homebrew, you will also need to `export CPATH=/opt/homebrew/include`.
**NOTE**: If you're running macOS on Apple Silicon (arm64) you will need to use
Chez scheme version `10.0.0` or greater. Homebrew has been updated to ship Chez
Scheme 10+ as of this writing. If you cannot install Chez Scheme 10+, install
the Racket fork of chez scheme as described
[below](#installing-chez-scheme-on-apple-silicon). If you install gmp via
homebrew, you will also need to `export CPATH=/opt/homebrew/include`.

### 1: Set installation target directory

Expand Down Expand Up @@ -194,17 +197,17 @@ nix run github:idris-lang/Idris2#emacs-with-idris idrisCode.idr

## Installing Chez Scheme on Apple Silicon

The official version of chez scheme does not yet support Apple Silicon. So, on
macOS with Apple Silicon (e.g. M1 and M2 macs), you will need to build and install
the Racket fork of chez scheme.
Chez scheme only supports Apple Silicon for versions `10.0.0` or newer.

Homebrew bundles Chez Scheme 10+ so if that's your manager of choice, you don't
need to read on.

If you cannot install that new of a version of Chez Scheme, you will need to
build and install the Racket fork of chez scheme.

```sh
git clone git@github.com:racket/ChezScheme.git
cd ChezScheme
git submodule init
git submodule update
./configure --pb
make tarm64osx.bootquick
./configure --threads
make
sudo make install
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
system:
let
pkgs = import nixpkgs { inherit config system overlays; };
chez = if system == "x86_64-linux" then
chezSupportsSystem = (system == "x86_64-linux")
|| (pkgs.lib.versionAtLeast pkgs.chez.version "10.0.0");
chez = if chezSupportsSystem then
pkgs.chez
else
pkgs.chez-racket; # TODO: Should this always be the default?
pkgs.chez-racket;
idris2Support = pkgs.callPackage ./nix/support.nix { inherit idris2Version; };
idris2Bootstrap = pkgs.callPackage ./nix/package.nix {
inherit idris2Version chez;
Expand Down

0 comments on commit 1c186f0

Please sign in to comment.