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));
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"];
};
}

View File

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