Because a single abi such as x86_64 can have multiple image variants which are not distinguished by checking only the
first tag. Android API 36x were particularly affected as they have both 4kb and 16kb memory page images.
Remove the inconsistent use of `tag` to determine the image path and ID. Instead the path is uniquely determined from
the source XML metadata's location while the `id` uses part of Google's `path` ID.
The `repo.json` is updated incrementally and the last version which was not affected by these issues was `a137f263af92`
so it has been regenerated based on that version.
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.
Map 'latest' to the latest minor version of each SDK level, since Google
now has minor versions of SDK levels. The SDK levels are still integers,
so also map "36" to (e.g.) "36.1" by default, since the user likely
wants the latest revision of "36" we have.
Fix: #468525
Use `overrideAttrs` to specify the FOD name we want,
instead of specifying `pname` and `version`
and expect a broken overrideAttrs that won't update `name`.
This allows evaluating the package's meta attribute without triggering
the throw, thus making it possible to list the package in the search
results. It also avoids CI falling over with this attribute.
This regression happened during refactoring of mkrepo.rb. Do another
round of it with a focus on fixing the autoupdate and use of custom
repository XMLs.
Add an example to check this behavior (but don't run it in the test
suite, since it requires IFD).
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.
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.
Some of the system images and NDK packages looked like:
`androidenv.androidPkgs.all.system_images.v35.google_apis_playstore.x_86___64`.
`androidenv.androidPkgs.all.packages.ndk.v21_0_6011959_rc_2`
Now they look like:
`androidenv.androidPkgs.all.system-images.v35.google_apis_playstore.x86_64`.
`androidenv.androidPkgs.all.packages.ndk.v21_0_6011959-rc2`
They should also have the versions correctly attached now for s.n.o.
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.
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.
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.
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
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
In preparation for the deprecation of `stdenv.isX`.
These shorthands are not conducive to cross-compilation because they
hide the platforms.
Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way
One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059
There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.
```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
- 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