Merge pull request #256180 from Artturin/androidndkimpro

authored by Artturi and committed by GitHub 4d419fa9 6fbb58f8

+11 -10
+8 -7
pkgs/development/androidndk-pkgs/androidndk-pkgs.nix
··· 11 # than we do. We don't just use theirs because ours are less ambiguous and 12 # some builds need that clarity. 13 # 14 - # FIXME: 15 - # There's some dragons here. Build host and target concepts are being mixed up. 16 - ndkInfoFun = { config, ... }: { 17 x86_64-apple-darwin = { 18 double = "darwin-x86_64"; 19 }; 20 x86_64-unknown-linux-gnu = { 21 double = "linux-x86_64"; 22 }; 23 i686-unknown-linux-android = { 24 triple = "i686-linux-android"; 25 arch = "x86"; ··· 37 triple = "aarch64-linux-android"; 38 }; 39 }.${config} or 40 - (throw "Android NDK doesn't support ${config}, as far as we know"); 41 42 - buildInfo = ndkInfoFun stdenv.buildPlatform; 43 - hostInfo = ndkInfoFun stdenv.hostPlatform; 44 - targetInfo = ndkInfoFun stdenv.targetPlatform; 45 46 inherit (stdenv.targetPlatform) sdkVer; 47 suffixSalt = lib.replaceStrings ["-" "."] ["_" "_"] stdenv.targetPlatform.config;
··· 11 # than we do. We don't just use theirs because ours are less ambiguous and 12 # some builds need that clarity. 13 # 14 + ndkBuildInfoFun = { config, ... }: { 15 x86_64-apple-darwin = { 16 double = "darwin-x86_64"; 17 }; 18 x86_64-unknown-linux-gnu = { 19 double = "linux-x86_64"; 20 }; 21 + }.${config} or 22 + (throw "Android NDK doesn't support building on ${config}, as far as we know"); 23 + 24 + ndkTargetInfoFun = { config, ... }: { 25 i686-unknown-linux-android = { 26 triple = "i686-linux-android"; 27 arch = "x86"; ··· 39 triple = "aarch64-linux-android"; 40 }; 41 }.${config} or 42 + (throw "Android NDK doesn't support targetting ${config}, as far as we know"); 43 44 + buildInfo = ndkBuildInfoFun stdenv.buildPlatform; 45 + targetInfo = ndkTargetInfoFun stdenv.targetPlatform; 46 47 inherit (stdenv.targetPlatform) sdkVer; 48 suffixSalt = lib.replaceStrings ["-" "."] ["_" "_"] stdenv.targetPlatform.config;
+3 -3
pkgs/development/androidndk-pkgs/default.nix
··· 29 # these two really are the same. 30 buildAndroidndk = buildAndroidComposition.ndk-bundle; 31 androidndk = androidComposition.ndk-bundle; 32 - targetAndroidndkPkgs = targetPackages.androidndkPkgs_21; 33 }; 34 35 "23b" = ··· 59 # these two really are the same. 60 buildAndroidndk = buildAndroidComposition.ndk-bundle; 61 androidndk = androidComposition.ndk-bundle; 62 - targetAndroidndkPkgs = targetPackages.androidndkPkgs_23b; 63 }; 64 65 "24" = ··· 89 # these two really are the same. 90 buildAndroidndk = buildAndroidComposition.ndk-bundle; 91 androidndk = androidComposition.ndk-bundle; 92 - targetAndroidndkPkgs = targetPackages.androidndkPkgs_24; 93 }; 94 95 }
··· 29 # these two really are the same. 30 buildAndroidndk = buildAndroidComposition.ndk-bundle; 31 androidndk = androidComposition.ndk-bundle; 32 + targetAndroidndkPkgs = if targetPackages ? androidndkPkgs_21 then targetPackages.androidndkPkgs_21 else throw "androidndkPkgs_21: no targetPackages, use `buildPackages.androidndkPkgs_21"; 33 }; 34 35 "23b" = ··· 59 # these two really are the same. 60 buildAndroidndk = buildAndroidComposition.ndk-bundle; 61 androidndk = androidComposition.ndk-bundle; 62 + targetAndroidndkPkgs = if targetPackages ? androidndkPkgs_23b then targetPackages.androidndkPkgs_23b else throw "androidndkPkgs_23b: no targetPackages, use `buildPackages.androidndkPkgs_23b"; 63 }; 64 65 "24" = ··· 89 # these two really are the same. 90 buildAndroidndk = buildAndroidComposition.ndk-bundle; 91 androidndk = androidComposition.ndk-bundle; 92 + targetAndroidndkPkgs = if targetPackages ? androidndkPkgs_24 then targetPackages.androidndkPkgs_24 else throw "androidndkPkgs_24: no targetPackages, use `buildPackages.androidndkPkgs_24"; 93 }; 94 95 }