-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
49 lines (44 loc) · 1.33 KB
/
shell.nix
File metadata and controls
49 lines (44 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# shell.nix
{ pkgs ? import <nixpkgs> {config.android_sdk.accept_license = true;} }:
let
androidComposition = pkgs.androidenv.composeAndroidPackages {
cmdLineToolsVersion = "12.0-rc15";
toolsVersion = "26.1.1";
platformToolsVersion = "34.0.5";
buildToolsVersions = [ "34.0.0" ];
includeEmulator = true;
emulatorVersion = "34.1.9";
platformVersions = [ "34" ];
includeSources = true;
includeSystemImages = true;
systemImageTypes = [ "google_apis_playstore" ];
abiVersions = [ "x86_64" ];
cmakeVersions = [ "3.10.2" ];
includeNDK = true;
#ndkVersions = ["25"];
useGoogleAPIs = false;
useGoogleTVAddOns = false;
includeExtras = [
"extras;google;gcm"
];
};
in
pkgs.mkShell {
buildInputs = [
pkgs.nodejs
pkgs.yarn
pkgs.ruby
pkgs.jdk17
androidComposition.androidsdk
pkgs.gradle_7
pkgs.aapt
];
shellHook = ''
export PATH="$NODE_PATH/bin:$PATH"
export ANDROID_HOME="${androidComposition.androidsdk}/libexec/android-sdk"
export ANDROID_SDK_ROOT="${androidComposition.androidsdk}/libexec/android-sdk";
export ANDROID_NDK_ROOT="''${ANDROID_SDK_ROOT}/ndk-bundle";
# Use the same buildToolsVersion here
export GRADLE_OPTS="-Dorg.gradle.project.android.aapt2FromMavenOverride=''${ANDROID_SDK_ROOT}/build-tools/34.0.0/aapt2";
'';
}