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.
This reverts commit 65a333600d.
This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.
It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).
A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.
[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
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
We are migrating packages that meet below requirements:
1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration
The tool is here: https://github.com/Aleksanaa/by-name-migrate.
The indentation stripping semantics of strings are fairly bad and have a
few gotchas where the resulting string has not the intended indentation.
This commit fixes most if not all such instances in Nixpkgs.
I tried to strive a balance between keeping the diff small and
reformatting/refactoring the code to look better. In general,
reformatting should be left to Nixfmt.
Note that this causes a lot of rebuilds by design. All changes need to
be thoroughly vetted and reviewed for correctness. There is no automatic
way to prove correctness.
List of files to fix generated by running
https://gerrit.lix.systems/c/lix/+/2092 on Nixpkgs and looking at the
warnings.
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"
```
- xcodewrapper nix derivation has been updated to now accept a list of acceptable versions.
- allowHigher is now removed
- this matches closely to what we use for building react-native with nix at status-mobile repo
ref -> https://github.com/status-im/status-mobile/blob/develop/nix/pkgs/xcodeenv/compose-xcodewrapper.nix
- The key change done here is that now xcodewrapper checks Xcode versions at runtime instead of build time. This helps us to show warning messages when underlying environment does not have the Xcode version we want to support.