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.
Performed the following automatic androidenv updates:
- platforms: 35 -> 36
- sources: 35 -> 36
- build-tools: 35.0.1 -> 36.0.0
- cmdline-tools: 17.0 -> 19.0
- skiaparser: 6 -> 7
- cmake: 3.31.5 -> 3.31.6
- emulator: 35.4.8 -> 35.5.8
Tests exited with status: 0
Last 100 lines of output:
```
PosixPath('/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh/lib'),
PosixPath('/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh/lib'),
PosixPath('/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh/lib'),
PosixPath('/nix/store/8v6k283dpbc0qkdq81nb6mrxrgcb10i1-gcc-wrapper-14-20241116/lib'),
PosixPath('/nix/store/r8gajll0yb0c08hd734lyj3jmqav3p9a-binutils-wrapper-2.43.1/lib'),
PosixPath('/nix/store/ycli2afmijaqi9vmv6rwz4jbcrbly3x7-unzip-6.0/lib'),
PosixPath('/nix/store/43jxq9r017vpwkmph5x4mphk38r8v3fp-make-shell-wrapper-hook/lib'),
PosixPath('/nix/store/5z8ff1wfq3f5yd74jbv3g5vzd27cq0nh-die-hook/lib'),
PosixPath('/nix/store/yip39c32hz27ix425p14q6pw7w8i598g-auto-patchelf-hook/lib'),
PosixPath('/nix/store/214vrsiv784x6marqh27ips2r4p6pq34-auto-patchelf-0-unstable-2024-08-14/lib'),
PosixPath('/nix/store/b1y4f1xab6svz8in8azp7c8bl5r6sx2s-binutils-wrapper-2.43.1/lib'),
PosixPath('/nix/store/nk427kbyf9l6fpfdxb8hmrq2nlkl8nfl-patchelf-0.15.0/lib'),
PosixPath('/nix/store/qjb61crwqjr60mgd75z8cfx0cmjgd1i9-update-autotools-gnu-config-scripts-hook/lib'),
PosixPath('/nix/store/jjhw2phnaip4kg0qjas3x3fsaifi8y0w-no-broken-symlinks.sh/lib'),
PosixPath('/nix/store/h9lc1dpi14z7is86ffhl3ld569138595-audit-tmpdir.sh/lib'),
PosixPath('/nix/store/m54bmrhj6fqz8nds5zcj97w9s9bckc9v-compress-man-pages.sh/lib'),
PosixPath('/nix/store/wgrbkkaldkrlrni33ccvm3b6vbxzb656-make-symlinks-relative.sh/lib'),
PosixPath('/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh/lib'),
PosixPath('/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh/lib'),
PosixPath('/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh/lib'),
PosixPath('/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh/lib'),
PosixPath('/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh/lib'),
PosixPath('/nix/store/hxv896faph0rqxjq2ycxpcrbnngc95sz-patch-shebangs.sh/lib'),
PosixPath('/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh/lib'),
PosixPath('/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh/lib'),
PosixPath('/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh/lib'),
PosixPath('/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh/lib'),
PosixPath('/nix/store/8v6k283dpbc0qkdq81nb6mrxrgcb10i1-gcc-wrapper-14-20241116/lib'),
PosixPath('/nix/store/r8gajll0yb0c08hd734lyj3jmqav3p9a-binutils-wrapper-2.43.1/lib')],
'paths': [PosixPath('.')],
'recursive': True,
'runtime_dependencies': []}
auto-patchelf: 0 dependencies could not be satisfied
patching script interpreter paths in /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/libexec/android-sdk/cmdline-tools/19.0/bin
/nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/libexec/android-sdk/cmdline-tools/19.0/bin/.screenshot2-wrapped: interpreter directive changed from "#!/usr/bin/env sh" to "/nix/store/58br4vk3q5akf4g8lx0pqzfhn47k3j8d-bash-5.2p37/bin/sh"
/nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/libexec/android-sdk/cmdline-tools/19.0/bin/.lint-wrapped: interpreter directive changed from "#!/usr/bin/env sh" to "/nix/store/58br4vk3q5akf4g8lx0pqzfhn47k3j8d-bash-5.2p37/bin/sh"
/nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/libexec/android-sdk/cmdline-tools/19.0/bin/.avdmanager-wrapped: interpreter directive changed from "#!/usr/bin/env sh" to "/nix/store/58br4vk3q5akf4g8lx0pqzfhn47k3j8d-bash-5.2p37/bin/sh"
/nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/libexec/android-sdk/cmdline-tools/19.0/bin/.d8-wrapped: interpreter directive changed from "#!/usr/bin/env sh" to "/nix/store/58br4vk3q5akf4g8lx0pqzfhn47k3j8d-bash-5.2p37/bin/sh"
/nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/libexec/android-sdk/cmdline-tools/19.0/bin/.sdkmanager-wrapped: interpreter directive changed from "#!/usr/bin/env sh" to "/nix/store/58br4vk3q5akf4g8lx0pqzfhn47k3j8d-bash-5.2p37/bin/sh"
/nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/libexec/android-sdk/cmdline-tools/19.0/bin/.r8-wrapped: interpreter directive changed from "#!/usr/bin/env sh" to "/nix/store/58br4vk3q5akf4g8lx0pqzfhn47k3j8d-bash-5.2p37/bin/sh"
/nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/libexec/android-sdk/cmdline-tools/19.0/bin/.profgen-wrapped: interpreter directive changed from "#!/usr/bin/env sh" to "/nix/store/58br4vk3q5akf4g8lx0pqzfhn47k3j8d-bash-5.2p37/bin/sh"
/nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/libexec/android-sdk/cmdline-tools/19.0/bin/.apkanalyzer-wrapped: interpreter directive changed from "#!/usr/bin/env sh" to "/nix/store/58br4vk3q5akf4g8lx0pqzfhn47k3j8d-bash-5.2p37/bin/sh"
/nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/libexec/android-sdk/cmdline-tools/19.0/bin/.resourceshrinker-wrapped: interpreter directive changed from "#!/usr/bin/env sh" to "/nix/store/58br4vk3q5akf4g8lx0pqzfhn47k3j8d-bash-5.2p37/bin/sh"
/nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/libexec/android-sdk/cmdline-tools/19.0/bin/.retrace-wrapped: interpreter directive changed from "#!/usr/bin/env sh" to "/nix/store/58br4vk3q5akf4g8lx0pqzfhn47k3j8d-bash-5.2p37/bin/sh"
[=======================================] 100% Fetch remote repository...
Auto-selecting single ABI x86_64
Running phase: fixupPhase
checking for references to /build/ in /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk...
patching script interpreter paths in /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/apkanalyzer to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/.retrace-wrapped to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/.r8-wrapped to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/.screenshot2-wrapped to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/retrace to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/.d8-wrapped to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/.resourceshrinker-wrapped to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/.sdkmanager-wrapped_ to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/.profgen-wrapped to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/d8 to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/lint to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/.lint-wrapped to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/profgen to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/.apkanalyzer-wrapped to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/avdmanager to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/.avdmanager-wrapped to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/screenshot2 to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/.sdkmanager-wrapped to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/resourceshrinker to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/sdkmanager to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
rewriting symlink /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/bin/r8 to be relative to /nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk
building '/nix/store/q2gng1mpi5n05nd47rjndkyar7ix11py-shell-sdkmanager-licenses-test.drv'...
building '/nix/store/dgj4jknvdwj240hkilp3bjny3qhfryfm-shell-sdkmanager-packages-test.drv'...
Do you wish to create a custom hardware profile? [no]
AVD 'testAVD' deleted.
Warning: Observed package id 'ndk;28.0.13004108' in inconsistent location '/nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/libexec/android-sdk/ndk-bundle' (Expected '/nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/libexec/android-sdk/ndk/28.0.13004108')
Warning: Observed package id 'ndk;28.0.13004108' in inconsistent location '/nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/libexec/android-sdk/ndk-bundle' (Expected '/nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/libexec/android-sdk/ndk/28.0.13004108')
Warning: Observed package id 'ndk;28.0.13004108' in inconsistent location '/nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/libexec/android-sdk/ndk-bundle' (Expected '/nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/libexec/android-sdk/ndk/28.0.13004108')
Warning: Failed to connect to host: https://dl.google.com/android/repository/addons_list-6.xml
Warning: Failed to connect to host: https://dl.google.com/android/repository/addons_list-5.xml
Warning: Failed to connect to host: https://dl.google.com/android/repository/addons_list-4.xml
Warning: Failed to connect to host: https://dl.google.com/android/repository/addons_list-3.xml
Warning: Failed to connect to host: https://dl.google.com/android/repository/addons_list-2.xml
Warning: Failed to connect to host: https://dl.google.com/android/repository/addons_list-1.xml
Warning: Failed to download any source lists!
Warning: IO exception while downloading manifest
Warning: IO exception while downloading manifest
Warning: Observed package id 'ndk;28.0.13004108' in inconsistent location '/nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/libexec/android-sdk/ndk-bundle' (Expected '/nix/store/pxy9rcwwpp1r54azmh9aqw3i8pin2m9k-androidsdk/libexec/android-sdk/ndk/28.0.13004108')
Warning: Failed to connect to host: https://dl.google.com/android/repository/addons_list-6.xml
Warning: Failed to connect to host: https://dl.google.com/android/repository/addons_list-5.xml
Warning: Failed to connect to host: https://dl.google.com/android/repository/addons_list-4.xml
Warning: Failed to connect to host: https://dl.google.com/android/repository/addons_list-3.xml
Warning: Failed to connect to host: https://dl.google.com/android/repository/addons_list-2.xml
Warning: Failed to connect to host: https://dl.google.com/android/repository/addons_list-1.xml
Warning: Failed to download any source lists!
Warning: IO exception while downloading manifest
Warning: IO exception while downloading manifest
Warning: Still waiting for package manifests to be fetched remotely.
Warning: Still waiting for package manifests to be fetched remotely.
building '/nix/store/0dhv47xy0dv9dhshkd1cakm815zvm5kd-androidenv-test-suite.drv'...
/nix/store/1498sa9cvh8fkp1gm7s6kc5ivrrjy099-androidenv-test-suite
```
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
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev b32a094368
result/bin/apply-formatting $NIXPKGS_PATH
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"
```
* doc: add stdenv passthru chapter
Broad strokes:
- create the chapter
- move existing stdenv passthru coverage into it
- move out-of-place coverage of passthru.tests from the stdenv meta chapter into it
- (try to) apply 1-sentence-per-line to text I've touched
- add legacy anchors for everything moved
- update existing links to the new anchors
- add tentative motivating text
- make nixpkgs-internal links relative/branchless
razor: if it is only ever needed by contributors, which is likely if links
refer to the latest revision of the source code, then it's for
the contributor guide
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Fixes#298285, alternative to #300386.
As suggested in #298285 `lib64` was renamed to `lib`, so just doing the same
as for `lib64` seems to fix the issue.
See also recent discussion in #300386.