From 1c186f09a123140ad60e7095e8e683dabed1117a Mon Sep 17 00:00:00 2001 From: Mathew Polzin Date: Thu, 21 Mar 2024 13:30:09 -0500 Subject: [PATCH] prefer chez scheme 10+ over racket fork (#3233) --- INSTALL.md | 23 +++++++++++++---------- flake.lock | 12 ++++++------ flake.nix | 6 ++++-- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index d4e91bf5e..34dc98993 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -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 @@ -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 diff --git a/flake.lock b/flake.lock index 9e0629bc0..cdea8f673 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -36,11 +36,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1705877117, - "narHash": "sha256-7LRSFcFDlb3MSt5KKBZlPNjvYVcGzQ8Si2IVqvmK4is=", + "lastModified": 1710854652, + "narHash": "sha256-fKaaZQgVIK3+3G6SWOAMms3XKIPMYs/ErOXLT7iWCW0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "35d61a923bbb0cd44d49115a6efc82032c39cfac", + "rev": "dbdb1f1b8b37ea37793eb596f4081dc0920821f8", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index e267e99f6..d18f4c34d 100644 --- a/flake.nix +++ b/flake.nix @@ -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;