mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-16 18:53:17 +00:00
Merge pull request #182697 from vtuan10/fix-android-ndk
This commit is contained in:
commit
cd56fc47c6
@ -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
|
||||
|
@ -23,7 +23,7 @@ deployAndroidPackage {
|
||||
# to still support the old standalone toolchains builds.
|
||||
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
|
||||
else
|
||||
elif [ ! -d $out/libexec/android-sdk/ndk-bundle ]; then
|
||||
echo "The ndk-bundle layout has changed. The nix expressions have to be updated!"
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user