-
Notifications
You must be signed in to change notification settings - Fork 16
/
shell.nix
30 lines (25 loc) · 872 Bytes
/
shell.nix
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
{ pkgs ? import <nixpkgs> {} }:
with import <nixpkgs> {
config.android_sdk.accept_license = true;
config.allowUnfree = true;
};
let
buildToolsVersion = "33.0.2";
androidComposition = androidenv.composeAndroidPackages {
platformVersions = [ "30" "33" ];
buildToolsVersions = [ "${buildToolsVersion}" ];
includeNDK = true;
};
in
pkgs.mkShell {
nativeBuildInputs = with pkgs.buildPackages; [
openjdk17
androidComposition.androidsdk
go_1_20
];
shellHook = ''
export GRADLE_OPTS="-Dorg.gradle.project.android.aapt2FromMavenOverride=${androidComposition.androidsdk}/libexec/android-sdk/build-tools/${buildToolsVersion}/aapt2";
export ANDROID_SDK_ROOT="${androidComposition.androidsdk}/libexec/android-sdk"
export BUILDTOOLS="${androidComposition.androidsdk}/libexec/android-sdk/build-tools/${buildToolsVersion}/"
'';
}