androidenv/emulate-app: fix passing extra args to the sdk composition

This feature was originally intended but left unfinished, as indicated
by the unused variables 'args' and 'androidSdkArgNames'.
This commit is contained in:
Erik Arvstedt 2019-08-17 10:48:06 +02:00
parent e48d97f640
commit 0dab612395
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -1,24 +1,21 @@
{ composeAndroidPackages, stdenv }:
{ name, app ? null
, platformVersion ? "16", abiVersion ? "armeabi-v7a", systemImageType ? "default", useGoogleAPIs ? false
, platformVersion ? "16", abiVersion ? "armeabi-v7a", systemImageType ? "default"
, enableGPU ? false, extraAVDFiles ? []
, package ? null, activity ? null
, avdHomeDir ? null
}@args:
, avdHomeDir ? null, sdkExtraArgs ? {}
}:
let
androidSdkArgNames = builtins.attrNames (builtins.functionArgs composeAndroidPackages);
# Extract the parameters meant for the Android SDK
androidParams = {
sdkArgs = {
platformVersions = [ platformVersion ];
includeEmulator = true;
includeSystemImages = true;
systemImageTypes = [ systemImageType ];
abiVersions = [ abiVersion ];
};
} // sdkExtraArgs;
androidsdkComposition = (composeAndroidPackages androidParams).androidsdk;
androidsdkComposition = (composeAndroidPackages sdkArgs).androidsdk;
in
stdenv.mkDerivation {
inherit name;