Unverified Commit f115f69d authored by Wolfgang Walther's avatar Wolfgang Walther
Browse files

androidndkPkgs: avoid throwing for incompatibility in CI

Same reasoning as in the commit before.
parent e26ecf5c
Loading
Loading
Loading
Loading
+124 −115
Original line number Diff line number Diff line
{
  config,
  lib,
  stdenv,
  makeWrapper,
@@ -21,7 +22,7 @@ let
  # some builds need that clarity.
  #
  ndkBuildInfoFun =
    { config, ... }:
    fallback:
    {
      x86_64-apple-darwin = {
        double = "darwin-x86_64";
@@ -30,10 +31,10 @@ let
        double = "linux-x86_64";
      };
    }
    .${config} or (throw "Android NDK doesn't support building on ${config}, as far as we know");
    .${stdenv.buildPlatform.config} or fallback;

  ndkTargetInfoFun =
    { config, ... }:
    fallback:
    {
      i686-unknown-linux-android = {
        triple = "i686-linux-android";
@@ -52,10 +53,14 @@ let
        triple = "aarch64-linux-android";
      };
    }
    .${config} or (throw "Android NDK doesn't support targetting ${config}, as far as we know");
    .${stdenv.targetPlatform.config} or fallback;

  buildInfo = ndkBuildInfoFun stdenv.buildPlatform;
  targetInfo = ndkTargetInfoFun stdenv.targetPlatform;
  buildInfo = ndkBuildInfoFun (
    throw "Android NDK doesn't support building on ${stdenv.buildPlatform.config}, as far as we know"
  );
  targetInfo = ndkTargetInfoFun (
    throw "Android NDK doesn't support targetting ${stdenv.targetPlatform.config}, as far as we know"
  );

  androidSdkVersion =
    if
@@ -74,6 +79,10 @@ let
  );
in

if !config.allowAliases && (ndkBuildInfoFun null == null || ndkTargetInfoFun null == null) then
  # Don't throw without aliases to not break CI.
  null
else
  lib.recurseIntoAttrs rec {
    # Misc tools
    binaries = stdenv.mkDerivation {
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ let
      majorVersion = lib.versions.major ndkVersion;
    in
    import ./androidndk-pkgs.nix {
      inherit lib;
      inherit config lib;
      inherit (buildPackages)
        makeWrapper
        autoPatchelfHook