mirror of
https://github.com/logos-messaging/nim-sds.git
synced 2026-01-02 14:13:07 +00:00
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>
28 lines
489 B
Nix
28 lines
489 B
Nix
{
|
|
pkgs ? import <nixpkgs> { },
|
|
}:
|
|
let
|
|
inherit (pkgs) lib stdenv;
|
|
/* No Android SDK for Darwin aarch64. */
|
|
isMacM1 = stdenv.isDarwin && stdenv.isAarch64;
|
|
|
|
in pkgs.mkShell {
|
|
inputsFrom = lib.optionals (!isMacM1) [
|
|
pkgs.androidShell
|
|
];
|
|
|
|
buildInputs = with pkgs; [
|
|
which
|
|
git
|
|
cmake
|
|
nim-unwrapped-2_2
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
pkgs.libiconv
|
|
];
|
|
|
|
# Avoid compiling Nim itself.
|
|
shellHook = ''
|
|
export MAKEFLAGS='USE_SYSTEM_NIM=1'
|
|
'';
|
|
}
|