nix: do not add android SDK on aarch64 Darwin

Otherwise it fails with:

error: aarch64-darwin not supported for Android SDK. Use: NIXPKGS_SYSTEM_OVERRIDE=x86_64-darwin

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2025-10-24 11:58:15 +02:00
parent 2a216f3eb5
commit a8060c5600
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
3 changed files with 16 additions and 10 deletions

View File

@ -65,5 +65,12 @@
targets = [ name ]; targets = [ name ];
}; };
}) targets)); }) targets));
devShells = forAllSystems (system: let
pkgs = pkgsFor.${system};
in {
default = pkgs.callPackage ./nix/shell.nix { } ;
});
}; };
} }

View File

@ -88,5 +88,3 @@ in stdenv.mkDerivation rec {
platforms = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" "x86_64-windows"]; platforms = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" "x86_64-windows"];
}; };
} }

View File

@ -2,21 +2,22 @@
pkgs ? import <nixpkgs> { }, pkgs ? import <nixpkgs> { },
}: }:
let let
optionalDarwinDeps = pkgs.lib.optionals pkgs.stdenv.isDarwin [ inherit (pkgs) lib stdenv;
pkgs.libiconv /* No Android SDK for Darwin aarch64. */
pkgs.darwin.apple_sdk.frameworks.Security isMacM1 = stdenv.isDarwin && stdenv.isAarch64;
];
in in pkgs.mkShell {
pkgs.mkShell { inputsFrom = lib.optionals (!isMacM1) [
inputsFrom = [
pkgs.androidShell pkgs.androidShell
] ++ optionalDarwinDeps; ];
buildInputs = with pkgs; [ buildInputs = with pkgs; [
which which
git git
cmake cmake
nim-unwrapped-2_2 nim-unwrapped-2_2
] ++ lib.optionals stdenv.isDarwin [
pkgs.libiconv
]; ];
# Avoid compiling Nim itself. # Avoid compiling Nim itself.