diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2019-01-29 21:13:41 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2019-01-29 21:13:41 -0500 |
commit | 9c770c4efa7847d70612e8a564b0a49cdddfc555 (patch) | |
tree | 8f668798d4b6b376a60429e8ef96cee79099bb21 /pkgs/development | |
parent | 3115e3dbceff2a4fa5d5a95d89edc7d0a275d68f (diff) | |
download | nixlib-9c770c4efa7847d70612e8a564b0a49cdddfc555.tar nixlib-9c770c4efa7847d70612e8a564b0a49cdddfc555.tar.gz nixlib-9c770c4efa7847d70612e8a564b0a49cdddfc555.tar.bz2 nixlib-9c770c4efa7847d70612e8a564b0a49cdddfc555.tar.lz nixlib-9c770c4efa7847d70612e8a564b0a49cdddfc555.tar.xz nixlib-9c770c4efa7847d70612e8a564b0a49cdddfc555.tar.zst nixlib-9c770c4efa7847d70612e8a564b0a49cdddfc555.zip |
androidenv: move licenseAccepted condition to androidsdk
The NDK can be built without accepting the license.
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/mobile/androidenv/compose-android-packages.nix | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/pkgs/development/mobile/androidenv/compose-android-packages.nix b/pkgs/development/mobile/androidenv/compose-android-packages.nix index 690f9712a10c..935a4a4f2fbb 100644 --- a/pkgs/development/mobile/androidenv/compose-android-packages.nix +++ b/pkgs/development/mobile/androidenv/compose-android-packages.nix @@ -20,20 +20,13 @@ , includeExtras ? [] }: -if !licenseAccepted then throw '' - You must accept the Android Software Development Kit License Agreement at - https://developer.android.com/studio/terms - by setting nixpkgs config option 'android_sdk.accept_license = true;' - '' -else assert licenseAccepted; - let inherit (pkgs) stdenv fetchurl makeWrapper unzip; # Determine the Android os identifier from Nix's system identifier os = if stdenv.system == "x86_64-linux" then "linux" else if stdenv.system == "x86_64-darwin" then "macosx" - else "No tarballs found for system architecture: ${stdenv.system}"; + else throw "No tarballs found for system architecture: ${stdenv.system}"; # Generated Nix packages packages = import ./generated/packages.nix { @@ -196,7 +189,11 @@ rec { # This derivation deploys the tools package and symlinks all the desired # plugins that we want to use. - androidsdk = import ./tools.nix { + androidsdk = if !licenseAccepted then throw '' + You must accept the Android Software Development Kit License Agreement at + https://developer.android.com/studio/terms + by setting nixpkgs config option 'android_sdk.accept_license = true;' + '' else import ./tools.nix { inherit deployAndroidPackage requireFile packages toolsVersion autoPatchelfHook makeWrapper os pkgs pkgs_i686; inherit (stdenv) lib; |