Commit Graph

50 Commits

Author SHA1 Message Date
Morgan Jones
88ef7a8598
{android-studio,androidenv}: add withSdk passthru and androidPkgs
Rename androidPkgs_9_0 to androidPkgs, and treat it more like a "full"
androidenv package.
2024-06-03 23:01:44 -07:00
Sandro
01ec8ad898
Merge pull request #304716 from asyncmeow/fix-compose-android-packages
androidenv: fix compose-android-packages on non-x86_64 environments
2024-04-18 13:02:15 +02:00
pearl
0e2402e288 androidenv: fix compose-android-packages on non-x86_64 environments
This has always been possible, however the nix package previously checked against stdenv.system with only x86_64 architectures used.
2024-04-16 23:55:15 -04:00
Morgan Jones
a10fada751
androidenv: update to latest 2024-04-09 20:10:14 -07:00
Hadi
3f00b40fff
androidenv: don't include emulator when includeEmulator is false 2024-01-22 19:04:40 -05:00
Morgan Jones
1809b32877 androidenv: updates for Android API 34 2023-11-05 14:31:44 +01:00
Nick Cao
dbf5978a61
Merge pull request #248435 from hadilq/androidenv-fix-cmdline-beta-version
androidenv fix cmdline beta versions' problem
2023-08-13 00:25:14 -06:00
Hadi
430200fe06
androidenv update packages 2023-08-10 20:27:06 -04:00
Hadi
7c005a7b69
androidenv fix cmdline beta versions' problem 2023-08-10 20:09:15 -04:00
Hadi
3310972785
androidenv: update repo.json with a new strategy to expire 2023-05-12 18:33:46 -04:00
Hadi
077588ad1a
androidenv: put a much nicer error message that includes the available options 2023-04-22 14:47:45 -04:00
Hadi
a05928d7fe androidenv: make nix-build -A androidenv.test-suite work
androidenv: set config.allowUnfree = true for integration tests

androidenv: fix concerns in the PR
2023-02-28 08:53:43 -05:00
Hadi
d511bfd0e2 androidenv: add shell-with-emulator.nix to have test and more examples
androidenv: replace buildInputs with nativeBuildInputs
2023-02-28 08:53:43 -05:00
Hadi
e5fbfd894f androidenv: fix problem with avdmanager when trying to create an avd
To do so, we gathered different system images with the same
abiVersion in the same derivation.
2023-02-28 08:53:43 -05:00
Felix Buehler
bc3d5934d7 treewide: use lib.optionals 2023-02-14 19:11:59 +01:00
Hadi
9c4e43ab70 androidenv: Implement cmdline-tools and patcher
- Replace cmdline-tools with tools because tools is obsolete now.
- Depend emulator package to systemImages

androidenv: fix issues on the PR

androidenv: reformat

androidenv: support excluding of `tools` package

androidenv: provide `tools`, and `build-tools`, dependencies

androidenv: replace includeTools with toolsVersion

androidenv: fix a typo

androidenv: add tests to check licenses and installed packages

androidenv: check if tests are running! this commit should fail!

androidenv: fix problems in the review https://github.com/NixOS/nixpkgs/pull/208793

androidenv: add test-suite to handle more tests around

androidenv: fix the test after couldn't running them with ofborg

Update pkgs/development/mobile/androidenv/build-tools.nix

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

androidenv: Resolving https://github.com/NixOS/nixpkgs/pull/208793#discussion_r1065851539

Update pkgs/development/mobile/androidenv/cmdline-tools.nix

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

Update pkgs/development/mobile/androidenv/tools.nix

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

androidenv: fix a typo
2023-01-27 18:15:47 -05:00
Hadi
bceccb7f70 androidenv: Replace deploy-androidpackage.nix with deploy-androidpackages.nix 2022-12-31 11:21:40 -05:00
Hadi
2f688374e0
androidenv: fix missing packages in repo json (#208137) 2022-12-30 15:28:12 +02:00
jakobkukla
14c7a30161 androidenv: fix missing inherit os 2022-12-20 04:28:20 +01:00
jakobkukla
8851f074f8 androidenv: fix non-existent emulatorVersion 2022-12-20 04:28:20 +01:00
Vanilla
32c1e7d7db
androidenv: fix missing inherit os in build-tools 2022-12-17 13:21:54 +08:00
Artturin
a2f85e0fa8 androidenv: use callPackage instead of import & fix infinite recursion
infinite recursion was due to autoPatchelfHook being in buildInputs of
platform-tools, i will add a lint for it in nix-community/nixpkgs-lint.

```
$ nix build ".#pkgsCross.aarch64-android-prebuilt.hello" --show-trace 2>&1 | rg 'while evaluating the attr.+deriv'
    … while evaluating the attribute 'stdenv' of the derivation 'zlib-aarch64-unknown-linux-android-1.2.13'
    … while evaluating the attribute 'CPPFLAGS' of the derivation 'python3-aarch64-unknown-linux-android-3.10.8'
    … while evaluating the attribute 'setuptools' of the derivation 'python-catch-conflicts-hook'
    … while evaluating the attribute 'nativeBuildInputs' of the derivation 'python3.10-pyelftools-0.28'
    … while evaluating the attribute 'passAsFile' of the derivation 'python3-3.10.8-env'
    … while evaluating the attribute 'pythonInterpreter' of the derivation 'auto-patchelf-hook'
    … while evaluating the attribute 'buildInputs' of the derivation 'platform-tools-33.0.2'
    … while evaluating the attribute 'installPhase' of the derivation 'ndk-24.0.8215888'
    … while evaluating the attribute 'installPhase' of the derivation 'aarch64-unknown-linux-android-ndk-toolchain-24.0.8215888'
    … while evaluating the attribute 'bintools_bin' of the derivation 'aarch64-unknown-linux-android-ndk-toolchain-wrapper-24.0.8215888'
    … while evaluating the attribute 'bintools' of the derivation 'aarch64-unknown-linux-android-ndk-toolchain-wrapper-24.0.8215888'
    … while evaluating the attribute 'defaultNativeBuildInputs' of the derivation 'stdenv-linux'
    … while evaluating the attribute 'stdenv' of the derivation 'hello-aarch64-unknown-linux-android-2.12.1'
```

stdenv -> stdenv.cc -> bintools -> android-ndk-toolchain -> ndk -> platform-tools -> auto-patchelf-hook -> python3 -> zlib -> stdenv -> stdenv.cc -> ...

autoPatchelfHook was in buildInputs of platform-tools so we needed the host tools to build
it but platform-tools was a required tool
2022-12-15 21:55:22 +02:00
Léo Gaspard
ad25aa1098
androidenv: use emulator from the path that makes it find qemu (#202088) 2022-12-06 21:16:49 +01:00
Van Tuan Vo
8b8ac80759
androidenv: fix default ndk linking for ndk > 22 2022-07-24 20:35:49 +02:00
Jari Vetoniemi
0aded46f08 androidenv: update packages 2022-06-29 18:27:16 +09:00
Sandro
1fdeb86121
Merge pull request #169468 from Atemu/update/android-env
androidenv: regenerate repo.json
2022-05-31 15:38:21 +02:00
Jakub Sokołowski
b0663a3dc3
androidenv: include autoPatchelfHook only on Linux
This is supposed to fix an issue caused by this PR:
https://github.com/NixOS/nixpkgs/pull/163924

Which made `autoPatchelfHook` available only on Linux, resulting in
builds of Android packages failing with:
```
error: Package ‘auto-patchelf-hook’ in /nix/store/...-nixpkgs-source/pkgs/build-support/trivial-builders.nix:73
    is not supported on ‘x86_64-darwin’, refusing to evaluate.
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-29 23:17:37 +02:00
Atemu
1df306132b platform-tools: allow aarch64-darwin 2022-04-20 20:43:45 +02:00
Atemu
928d976aa5 androidenv: regenerate repo.json 2022-04-20 20:33:12 +02:00
Michael Lohmann
962d74ce84
androidenv: default emulatorVersion to one available
The last repo.json update in a0f6a8af81 removed the default emulator version, so it had to be changed (or the repo.json had to be overwritten) for it to work.
Instead use the most recent available emulator version
2021-12-10 20:43:45 +01:00
Sandro Jäckel
8547db919a
treewide: switch `builtins.fromJSON(builtins.readFile ./file.json)` to lib.importJSON ./file.json 2021-11-03 14:43:52 +01:00
Charlotte Van Petegem
a0f6a8af81
androidenv: regenerate repo.json 2021-08-21 12:20:50 +02:00
Morgan Jones
a7e5b070be androidenv: Allow multiple ndkVersions to be specified
Android is deprecating ndk.dir in favor of specifying exact NDK
version in Gradle configuration. Ensure that we can support multiple
NDKs, and link them into the location the Android Gradle Plugin expects.
2021-04-24 15:56:08 -06:00
s1341
aee60bef7a android_prebuilt: Fix eval 2021-03-04 18:17:39 +00:00
numinit
5b91d4ab65 Rework androidenv package generation
androidenv did not previously write license files, which caused certain
gradle-based Android tools to fail. Restructure androidenv's list of
Android packages into a single repo.json file to prevent duplication
and enable us to extract the EULA texts, which we then hash with
builtins.hashString to produce the license files that Android gradle
tools look for.

Remove includeDocs and lldbVersions, as these have been removed
from the Android package repositories.

Improve documentation and examples.
2021-01-03 21:27:23 -07:00
John Ericson
452854a13c androidndk: Avoid depending on target-sensative openjdk
We just need jdk for this script that helps set up toolchains. The
script might need to know about the target platform, but the interpreter
that runs it (or part of it) doesn't.
2020-09-08 09:49:39 -04:00
Matthew Bauer
074bc78cc8 android: update sdk, ndk to 29, 21 2020-08-17 23:51:53 -05:00
Luca Favatella
3286057969 androidenv: fix default platform-tools to a known one 2020-03-09 04:47:40 +00:00
Luca Favatella
6da0e0b7d7 androidenv: bump emulator version to latest stable - as per Linux
Move to a known version of the emulator.  Each OS has a distinct
version... pick the one on Linux.  A better solution would be to let
the user of `emulateApp` overload what the emulator version shall be
(and maybe it is already possible and I do not see it) - without need
to reproduce large portions of `default.nix`.

Using the previous emulator showed the following warning:
```
Your emulator is out of date, please update by launching Android Studio:
```

I am not aware of any reasons for not wanting the latest emulator (as
I expect it shall be compatible usually with more system images - not
less), so bump its default version.

Emulator release notes:
https://developer.android.com/studio/releases/emulator
2020-03-09 04:47:40 +00:00
volth
7b8fb5c06c treewide: remove redundant quotes 2019-09-08 23:38:31 +00:00
Frederik Rietdijk
5061fe0c2c Merge staging-next into staging 2019-08-28 08:26:42 +02:00
volth
35d68ef143 treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
Erik Arvstedt
1b81302d49
androidenv: rename stdenv.lib -> lib
Removes some visual clutter.
2019-08-17 11:19:06 +02:00
Erik Arvstedt
e48d97f640
androidenv: fix deployment of google_apis* system images
Fixes #56866
2019-08-17 11:18:59 +02:00
volth
f3282c8d1e treewide: remove unused variables (#63177)
* treewide: remove unused variables

* making ofborg happy
2019-06-16 19:59:05 +00:00
Matthew Bauer
4acc434847 androidenv: add more context to os not found error
We don’t have android sdk available for aarch64, so this error happens
a lot. Adding some context on what is going on makes this clearer.
2019-05-08 21:45:33 -04:00
Matthew Bauer
9c770c4efa androidenv: move licenseAccepted condition to androidsdk
The NDK can be built without accepting the license.
2019-01-29 21:13:41 -05:00
Sander van der Burg
3bfd3e73bf Reintroduce licenseAccepted option 2018-12-18 21:16:07 +01:00
Sander van der Burg
cb42643b95 Fix inclusion of sources 2018-12-18 21:16:07 +01:00
Sander van der Burg
74750dc67d Replace androidenv by new implementation 2018-12-18 21:16:06 +01:00