nix: switch to manually composing the SDK

This commit is contained in:
Harsh Shandilya 2022-04-14 16:05:23 +05:30
parent 45e6684f9c
commit 9cb5dd26a5
No known key found for this signature in database
GPG Key ID: 366D7BBAD1031E80

View File

@ -1,8 +1,25 @@
{ pkgs ? import <nixpkgs> { config.android_sdk.accept_license = true; } }:
(pkgs.buildFHSUserEnv {
name = "android-sdk-env";
targetPkgs = pkgs:
(with pkgs; [ androidenv.androidPkgs_9_0.androidsdk gradle glibc zlib ]);
runScript = "bash";
}).env
let
androidComposition = pkgs.androidenv.composeAndroidPackages {
toolsVersion = "26.1.1";
platformToolsVersion = "31.0.3";
buildToolsVersions = [ "31.0.0" ];
includeEmulator = false;
emulatorVersion = "30.9.0";
platformVersions = [ "31" ];
includeSources = false;
includeSystemImages = false;
systemImageTypes = [ ];
abiVersions = [ ];
cmakeVersions = [ ];
includeNDK = false;
ndkVersions = [ ];
useGoogleAPIs = false;
useGoogleTVAddOns = false;
includeExtras = [ ];
};
in pkgs.mkShell rec {
ANDROID_SDK_ROOT = "${androidComposition.androidsdk}/libexec/android-sdk";
buildInputs = with pkgs; [ gradle glibc zlib ];
}