Merge pull request #182697 from vtuan10/fix-android-ndk
This commit is contained in:
commit
cd56fc47c6
2 changed files with 8 additions and 2 deletions
|
@ -222,6 +222,12 @@ rec {
|
||||||
'') plugins}
|
'') 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
|
# Function that automatically links a plugin for which only one version exists
|
||||||
linkPlugin = {name, plugin, check ? true}:
|
linkPlugin = {name, plugin, check ? true}:
|
||||||
lib.optionalString check ''
|
lib.optionalString check ''
|
||||||
|
@ -259,7 +265,7 @@ rec {
|
||||||
${linkPlatformPlugins { name = "sources"; plugins = sources; check = includeSources; }}
|
${linkPlatformPlugins { name = "sources"; plugins = sources; check = includeSources; }}
|
||||||
${linkPlugins { name = "cmake"; plugins = cmake; }}
|
${linkPlugins { name = "cmake"; plugins = cmake; }}
|
||||||
${linkNdkPlugins { name = "ndk-bundle"; rootName = "ndk"; plugins = ndk-bundles; }}
|
${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 ''
|
${lib.optionalString includeSystemImages ''
|
||||||
mkdir -p system-images
|
mkdir -p system-images
|
||||||
|
|
|
@ -23,7 +23,7 @@ deployAndroidPackage {
|
||||||
# to still support the old standalone toolchains builds.
|
# to still support the old standalone toolchains builds.
|
||||||
if [ -d $out/libexec/android-sdk/ndk ] && [ ! -d $out/libexec/android-sdk/ndk-bundle ]; then
|
if [ -d $out/libexec/android-sdk/ndk ] && [ ! -d $out/libexec/android-sdk/ndk-bundle ]; then
|
||||||
ln -sf $out/libexec/android-sdk/ndk/${package.revision} $out/libexec/android-sdk/ndk-bundle
|
ln -sf $out/libexec/android-sdk/ndk/${package.revision} $out/libexec/android-sdk/ndk-bundle
|
||||||
else
|
elif [ ! -d $out/libexec/android-sdk/ndk-bundle ]; then
|
||||||
echo "The ndk-bundle layout has changed. The nix expressions have to be updated!"
|
echo "The ndk-bundle layout has changed. The nix expressions have to be updated!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue