summaryrefslogtreecommitdiffstats
path: root/pkgs/development/mobile/androidenv/emulate-app.nix
diff options
context:
space:
mode:
authorErik Arvstedt <erik.arvstedt@gmail.com>2019-08-17 10:48:09 +0200
committerErik Arvstedt <erik.arvstedt@gmail.com>2019-08-17 11:19:06 +0200
commit1b81302d49ae9a394ea06f0b7aa0bfe0cd4603f0 (patch)
treec4f6101cebe61686f4191d21dfbbe76846a2d26a /pkgs/development/mobile/androidenv/emulate-app.nix
parent2ec43d3509253200a015d854ee0976ffea4aa9e7 (diff)
androidenv: rename stdenv.lib -> lib
Removes some visual clutter.
Diffstat (limited to 'pkgs/development/mobile/androidenv/emulate-app.nix')
-rw-r--r--pkgs/development/mobile/androidenv/emulate-app.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/development/mobile/androidenv/emulate-app.nix b/pkgs/development/mobile/androidenv/emulate-app.nix
index b44b4e57c95f..fa9a56fadbad 100644
--- a/pkgs/development/mobile/androidenv/emulate-app.nix
+++ b/pkgs/development/mobile/androidenv/emulate-app.nix
@@ -1,4 +1,4 @@
-{ composeAndroidPackages, stdenv }:
+{ composeAndroidPackages, stdenv, lib }:
{ name, app ? null
, platformVersion ? "16", abiVersion ? "armeabi-v7a", systemImageType ? "default"
, enableGPU ? false, extraAVDFiles ? []
@@ -74,12 +74,12 @@ stdenv.mkDerivation {
# Create a virtual android device
yes "" | ${sdk}/libexec/android-sdk/tools/android create avd -n device -t 1 --abi ${systemImageType}/${abiVersion} $NIX_ANDROID_AVD_FLAGS
- ${stdenv.lib.optionalString enableGPU ''
+ ${lib.optionalString enableGPU ''
# Enable GPU acceleration
echo "hw.gpu.enabled=yes" >> $ANDROID_SDK_HOME/.android/avd/device.avd/config.ini
''}
- ${stdenv.lib.concatMapStrings (extraAVDFile: ''
+ ${lib.concatMapStrings (extraAVDFile: ''
ln -sf ${extraAVDFile} $ANDROID_SDK_HOME/.android/avd/device.avd
'') extraAVDFiles}
fi
@@ -110,7 +110,7 @@ stdenv.mkDerivation {
echo "ready" >&2
- ${stdenv.lib.optionalString (app != null) ''
+ ${lib.optionalString (app != null) ''
# Install the App through the debugger, if it has not been installed yet
if [ -z "${package}" ] || [ "$(${sdk}/libexec/android-sdk/platform-tools/adb -s emulator-$port shell pm list packages | grep package:${package})" = "" ]
@@ -126,7 +126,7 @@ stdenv.mkDerivation {
fi
# Start the application
- ${stdenv.lib.optionalString (package != null && activity != null) ''
+ ${lib.optionalString (package != null && activity != null) ''
${sdk}/libexec/android-sdk/platform-tools/adb -s emulator-$port shell am start -a android.intent.action.MAIN -n ${package}/${activity}
''}
''}