lib.systems: throw if sdkVer or ndkVer are used for android.
Those attrs have been renamed and throwing is the best way to show it, if we only warned then the user would only get an error like this `error: Unsupported sdk: 33` from `pkgs/top-level/darwin-packages.nix`. If someone wants to support multiple NixOS versions then they can simply set both attrs. (`!args ? androidSdkVersion` is for that)
This commit is contained in:
@@ -257,6 +257,22 @@ let
|
||||
if final.isMacOS then "MACOSX_DEPLOYMENT_TARGET"
|
||||
else if final.isiOS then "IPHONEOS_DEPLOYMENT_TARGET"
|
||||
else null;
|
||||
|
||||
# Remove before 25.05
|
||||
androidSdkVersion =
|
||||
if (args ? sdkVer && !args ? androidSdkVersion) then
|
||||
throw "For android `sdkVer` has been renamed to `androidSdkVersion`"
|
||||
else if (args ? androidSdkVersion) then
|
||||
args.androidSdkVersion
|
||||
else
|
||||
null;
|
||||
androidNdkVersion =
|
||||
if (args ? ndkVer && !args ? androidNdkVersion) then
|
||||
throw "For android `ndkVer` has been renamed to `androidNdkVersion`"
|
||||
else if (args ? androidSdkVersion) then
|
||||
args.androidNdkVersion
|
||||
else
|
||||
null;
|
||||
} // (
|
||||
let
|
||||
selectEmulator = pkgs:
|
||||
|
||||
@@ -60,6 +60,8 @@ rec {
|
||||
armv7a-android-prebuilt = {
|
||||
config = "armv7a-unknown-linux-androideabi";
|
||||
rust.rustcTarget = "armv7-linux-androideabi";
|
||||
androidSdkVersion = "33";
|
||||
androidNdkVersion = "26";
|
||||
useAndroidPrebuilt = true;
|
||||
} // platforms.armv7a-android;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user