From 23cae56ca720fadb1040e7739a30bff7dbda38c8 Mon Sep 17 00:00:00 2001 From: Andrew Childs Date: Tue, 9 Feb 2021 15:58:21 +0900 Subject: [PATCH] lib/systems/platforms: add Apple M1 --- lib/systems/platforms.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/systems/platforms.nix b/lib/systems/platforms.nix index f46e9c826a5..445144439ca 100644 --- a/lib/systems/platforms.nix +++ b/lib/systems/platforms.nix @@ -375,6 +375,13 @@ rec { }; }; + apple-m1 = { + gcc = { + arch = "armv8.3-a+crypto+sha2+aes+crc+fp16+lse+simd+ras+rdm+rcpc"; + cpu = "apple-a13"; + }; + }; + ## ## MIPS ## @@ -495,7 +502,10 @@ rec { else if lib.versionOlder version "6" then sheevaplug else if lib.versionOlder version "7" then raspberrypi else armv7l-hf-multiplatform - else if platform.isAarch64 then aarch64-multiplatform + + else if platform.isAarch64 then + if platform.isDarwin then apple-m1 + else aarch64-multiplatform else if platform.isRiscV then riscv-multiplatform