androidndkPkgs: separate build and target ndkInfoFun

remove unused hostInfo variable, the uses of it were removed in (androidndk: remove legacy ndks)[2408ef3c6f].

This prevents exiting with `error "attribute 'triple' missing"`
It's better to exit with a throw than a attribute missing which cannot
This commit is contained in:
Artturin 2023-09-21 01:09:37 +03:00
parent 2557230bf6
commit b2bcfe74af

View File

@ -11,15 +11,17 @@ let
# than we do. We don't just use theirs because ours are less ambiguous and # than we do. We don't just use theirs because ours are less ambiguous and
# some builds need that clarity. # some builds need that clarity.
# #
# FIXME: ndkBuildInfoFun = { config, ... }: {
# There's some dragons here. Build host and target concepts are being mixed up.
ndkInfoFun = { config, ... }: {
x86_64-apple-darwin = { x86_64-apple-darwin = {
double = "darwin-x86_64"; double = "darwin-x86_64";
}; };
x86_64-unknown-linux-gnu = { x86_64-unknown-linux-gnu = {
double = "linux-x86_64"; double = "linux-x86_64";
}; };
}.${config} or
(throw "Android NDK doesn't support building on ${config}, as far as we know");
ndkTargetInfoFun = { config, ... }: {
i686-unknown-linux-android = { i686-unknown-linux-android = {
triple = "i686-linux-android"; triple = "i686-linux-android";
arch = "x86"; arch = "x86";
@ -37,11 +39,10 @@ let
triple = "aarch64-linux-android"; triple = "aarch64-linux-android";
}; };
}.${config} or }.${config} or
(throw "Android NDK doesn't support ${config}, as far as we know"); (throw "Android NDK doesn't support targetting ${config}, as far as we know");
buildInfo = ndkInfoFun stdenv.buildPlatform; buildInfo = ndkBuildInfoFun stdenv.buildPlatform;
hostInfo = ndkInfoFun stdenv.hostPlatform; targetInfo = ndkTargetInfoFun stdenv.targetPlatform;
targetInfo = ndkInfoFun stdenv.targetPlatform;
inherit (stdenv.targetPlatform) sdkVer; inherit (stdenv.targetPlatform) sdkVer;
suffixSalt = lib.replaceStrings ["-" "."] ["_" "_"] stdenv.targetPlatform.config; suffixSalt = lib.replaceStrings ["-" "."] ["_" "_"] stdenv.targetPlatform.config;