Skip to content

Commit cbcfa53

Browse files
committed
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 <[email protected]>
1 parent f3b0841 commit cbcfa53

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

nix/default.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,3 @@ in stdenv.mkDerivation rec {
8888
platforms = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" "x86_64-windows"];
8989
};
9090
}
91-
92-

nix/shell.nix

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,23 @@
22
pkgs ? import <nixpkgs> { },
33
}:
44
let
5-
optionalDarwinDeps = pkgs.lib.optionals pkgs.stdenv.isDarwin [
6-
pkgs.libiconv
7-
pkgs.darwin.apple_sdk.frameworks.Security
8-
];
9-
in
10-
pkgs.mkShell {
11-
inputsFrom = [
5+
inherit (pkgs) lib stdenv;
6+
/* No Android SDK for Darwin aarch64. */
7+
isMacM1 = stdenv.isDarwin && stdenv.isAarch64;
8+
9+
in pkgs.mkShell {
10+
inputsFrom = lib.optionals isMacM1 [
1211
pkgs.androidShell
13-
] ++ optionalDarwinDeps;
12+
];
1413

1514
buildInputs = with pkgs; [
1615
which
1716
git
1817
cmake
1918
nim-unwrapped-2_2
19+
] ++ lib.optionals stdenv.isDarwin [
20+
pkgs.libiconv
21+
pkgs.darwin.apple_sdk.frameworks.Security
2022
];
2123

2224
# Avoid compiling Nim itself.

0 commit comments

Comments
 (0)