androidenv: fix default ndk linking for ndk > 22

This commit is contained in:
Van Tuan Vo 2022-07-24 14:33:02 +02:00
parent e8dfc2d72a
commit 8b8ac80759
No known key found for this signature in database
GPG key ID: 7C96B1B77958A566

View file

@ -222,6 +222,12 @@ rec {
'') plugins}
'';
# Function that automatically links the default NDK plugin.
linkNdkPlugin = {name, plugin, check}:
lib.optionalString check ''
ln -s ${plugin}/libexec/android-sdk/${name} ${name}
'';
# Function that automatically links a plugin for which only one version exists
linkPlugin = {name, plugin, check ? true}:
lib.optionalString check ''
@ -259,7 +265,7 @@ rec {
${linkPlatformPlugins { name = "sources"; plugins = sources; check = includeSources; }}
${linkPlugins { name = "cmake"; plugins = cmake; }}
${linkNdkPlugins { name = "ndk-bundle"; rootName = "ndk"; plugins = ndk-bundles; }}
${linkPlugin { name = "ndk-bundle"; plugin = ndk-bundle; check = includeNDK; }}
${linkNdkPlugin { name = "ndk-bundle"; plugin = ndk-bundle; check = includeNDK; }}
${lib.optionalString includeSystemImages ''
mkdir -p system-images