Trouble getting a nix/haskell environment setup on M1 Mac

I’m trying to get up and running with the Plutus Starter and encountering the following issue when running nix-shell:

error: Package ‘ghc-8.10.4.20210212’ in /nix/store/.../ghc/default.nix:339 is not supported on ‘aarch64-darwin’, refusing to evaluate.

The version of GHC being used here looks to be one release prior to M1 support. I’m not well-versed in the Haskell ecosystem or nix, and I’m having a hard time understanding what dictates which ghc version is used here and how I might get it to use a supported version.

For what it’s worth, nix purports to have implemented support for M1 Macs.

A quick & “dirty” fix is to make nix run with Rosetta by specifying this in your /etc/nix/nix.conf file:
system = x86_64-darwin

1 Like