aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-12-07 15:59:56 +0100
committerGitHub <noreply@github.com>2020-12-07 15:59:56 +0100
commit97dc44f3d6f804888a68bff0035914447763b5f4 (patch)
treecff4b0df7f7d0498508f5c188681b8f9e834eaeb
parent8a06edbf7e984bae426068189ff9a631bc26af72 (diff)
parent692549c542f673015105a3aa4358c1e3095bb0e0 (diff)
Merge pull request #4305 from matthewbauer/rosetta2-check
Check for rosetta 2 support before installing x86_64-darwin Nix
-rwxr-xr-x[-rw-r--r--]scripts/install.in9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/install.in b/scripts/install.in
index 7c3b795cc..0eaf25bb3 100644..100755
--- a/scripts/install.in
+++ b/scripts/install.in
@@ -45,10 +45,15 @@ case "$(uname -s).$(uname -m)" in
path=@tarballPath_x86_64-darwin@
system=x86_64-darwin
;;
- Darwin.arm64)
+ Darwin.arm64|Darwin.aarch64)
+ # check for Rosetta 2 support
+ if ! [ -f /Library/Apple/System/Library/LaunchDaemons/com.apple.oahd.plist ]; then
+ oops "Rosetta 2 is not installed on this ARM64 macOS machine. Run softwareupdate --install-rosetta then restart installation"
+ fi
+
hash=@binaryTarball_x86_64-darwin@
path=@tarballPath_x86_64-darwin@
- # eventually maybe: arm64-darwin
+ # eventually maybe: aarch64-darwin
system=x86_64-darwin
;;
*) oops "sorry, there is no binary distribution of Nix for your platform";;