summaryrefslogtreecommitdiff
path: root/pkgs/development/mobile/androidenv/examples/shell.nix
AgeCommit message (Collapse)Author
2026-04-19androidenv: ANDROID_SDK_ROOT -> ANDROID_HOMEMorgan Jones
Change the 'primary' env var to ANDROID_HOME. Always export ANDROID_SDK_ROOT for compatibility.
2026-04-05androidenv: fix new "37.0" packages with API version rangesMorgan Jones
Google has seemed to require this suffix on their newer packages, and also doesn't provide sources anymore. Fix both issues.
2025-12-22androidenv: support nonstandard SDK versionsMorgan Jones
Google have been releasing 'nonstandard' SDK versions for a while. Named things like CANARY, UpsideDownCake, 36x, and so on, androidenv has been generally unable to use them, instead preferring Google's officially supported Android SDKs corresponding to the [API levels](https://apilevels.com/) (e.g. "35" or "36"). Updates to those SDK versions have generally come in the form of updates to Google's repositories that repo.json picks up. These are mostly noneventful for end users, unless a user experienced a bug in an API definition, then it tended to be picked up with an androidenv repo update. API 36.1 changes this. It's not just a number (so it doesn't correspond to a unique API level). The previous attempt in #470569 simply preferred the newer version to attempt to emulate the old behavior. Unfortunately, this now requires a Gradle change (see #472561). So this means we should just support all the strange SDK versions now and have a test for it. Note that only depending on "latest" (the default) will properly pick these up as the latest, but using a min and max SDK version or numLatestPlatformVersions > 1 will create a range of SDK versions as before, which means you may miss (e.g.) 36.1 but will still have 36. Considering that this requires `compileSdk "android-36.1"` instead of a simple `compileSdk 36` in Gradle, it's recommended to explicitly specify platformVersions if you depend on this change, or use the defaults, where it will only install the latest.
2025-10-04pkgs: remove optional builtins prefixes from prelude functionsNAHO
Remove optional builtins prefixes from prelude functions by running: builtins=( abort baseNameOf break derivation derivationStrict dirOf false fetchGit fetchMercurial fetchTarball fetchTree fromTOML import isNull map null placeholder removeAttrs scopedImport throw toString true ) fd \ --type file \ . \ pkgs \ --exec-batch sed --in-place --regexp-extended " s/\<builtins\.($( printf '%s\n' "${builtins[@]}" | paste --delimiter '|' --serial - ))\>/\1/g " nix fmt
2025-07-24treewide: run nixfmt 1.0.0Wolfgang Walther
2025-04-27androidenv: support linking "latest" version of all pluginsMorgan Jones
As noted in #379534, the NDK linking broke during refactoring. Add a test for that, and support linking the latest for all platform plugins that take at least one version.
2025-04-13androidenv: fix missing versions for Google addonsMorgan Jones
This is a regression caused by fixing the linking of Google TV addons. Change the check so we just check for the package being present instead of checking the specific version.
2025-03-29androidenv: support 5 years of Android APIs with images; test 10 withoutMorgan Jones
Cut down on the number of system images that need to be fetched by just supporting packages from the last 5 years. Still test the last 10 years of APIs without images.
2025-03-29androidenv: support minPlatformVersion and maxPlatformVersionMorgan Jones
With the release of Android API 36, it was getting rather annoying to need to keep these updated. Allow just specifying the min and max instead.
2025-03-29androidenv: accept license during testsMorgan Jones
2025-03-29androidenv: nixfmtMorgan Jones
2025-03-29androidenv: support if-supported for include* optionsMorgan Jones
This lets us stop hardcoding platforms and start filtering for which archives have sources, which is the most accurate way to do it. Tested on x86_64-linux, aarch64-linux, and aarch64-darwin.
2025-03-29androidenv: simplify updating and track latestMorgan Jones
We can figure out the latest version for every package in mkrepo.rb, instead of repeating ourselves in compose-android-packages. Track the latest non-preview versions of all packages by default, and remove version hardcoding everywhere. Enable the update script.
2025-02-20androidenv: upgradde to repository2-3Hadi
androidenv: apply numinit patch to have a nice error message androidenv handle unsupported systems, and make tests running by default! androidenv run nixfmt androidenv: support emulator/systemimages/NDK only for certain systems androidenv: apply nixfmt androidenv: give a warning if archive doesn't exist
2025-01-24androidenv fix extras;google;autoHadi
fix SDL_CreateWindowRenderer's problem while initiating the desktop-head-unit androidenv: format extras.nix adding android-automotive-sys-img2-1.xml and ran mkrepo.sh which updated the packages androidenv: apply nixfmt-rfc-style
2024-08-20androidenv: updates for Android API 35Hadi
2024-07-07treewide: fix broken 'nix.dev' URLsNAHO
2024-04-09androidenv: update to latestMorgan Jones
2023-11-05androidenv: updates for Android API 34Morgan Jones
2023-08-10androidenv update packagesHadi
2023-05-12androidenv: update repo.json with a new strategy to expireHadi
2023-02-28androidenv: make `nix-build -A androidenv.test-suite` workHadi
androidenv: set config.allowUnfree = true for integration tests androidenv: fix concerns in the PR
2023-02-28androidenv: add shell-with-emulator.nix to have test and more examplesHadi
androidenv: replace buildInputs with nativeBuildInputs
2023-02-28androidenv: fix problem with avdmanager when trying to create an avdHadi
To do so, we gathered different system images with the same abiVersion in the same derivation.
2023-01-27androidenv: Implement cmdline-tools and patcherHadi
- 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
2022-12-31androidenv: Fix we are using 2 spaces to intend nix code inHadi
see: https://github.com/NixOS/nixpkgs/pull/208137#discussion_r1059518929
2022-12-30androidenv: fix missing packages in repo json (#208137)Hadi
2022-12-15androidenv: use callPackage instead of import & fix infinite recursionArtturin
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
2021-06-20treewide: use quotes for urlPavol Rusnak
2021-05-13mkShell: introduce packages argument (#122180)Jonas Chevalier
The distinction between the inputs doesn't really make sense in the mkShell context. Technically speaking, we should be using the nativeBuildInputs most of the time. So in order to make this function more beginner-friendly, add "packages" as an attribute, that maps to nativeBuildInputs. This commit also updates all the uses in nixpkgs.
2021-04-24androidenv: Allow multiple ndkVersions to be specifiedMorgan Jones
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-01-03Rework androidenv package generationnuminit
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.