Newer
Older
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs?rev=3d58e3a31ee55554fe26650bb59db7d6d0e97625";
outputs = { self, nixpkgs }:
let
native-pkgs = import nixpkgs {
system = "x86_64-linux";
allowUnfree = true;
android_sdk.accept_license = true;
};
cross-pkgs = native-pkgs.pkgsCross.aarch64-android;
platformVersion = "31";
cmakeVersion = "3.10.2";
buildToolsVersion = "31.0.0";
# Check out pkgs/development/mobile/androidenv/repo.json for
# nixpkgs-supported versions.
ndkVersion = "23.0.7123448-rc1";
androidComposition = native-pkgs.callPackage ../android.nix {
inherit cmakeVersion buildToolsVersion platformVersion ndkVersion;
};
in {
devShells.x86_64-linux.default = native-pkgs.mkShell rec {
BUILD_PYTHON = "${native-pkgs.python3Minimal}/bin/python";
HOST_PYTHON = "${cross-pkgs.python3Minimal}/bin/python";
ANDROIDSDK = "${androidComposition.androidsdk}/libexec/android-sdk";
ANDROIDNDK = "${ANDROIDSDK}/ndk-bundle";
shellHook = ''
export PATH="$(echo "$ANDROIDSDK/cmake/${cmakeVersion}".*/bin):$PATH"
'';
};
};
}