diff options
author | John Ericson <Ericson2314@Yahoo.com> | 2017-02-17 00:36:10 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2018-02-27 14:15:39 -0500 |
commit | 2482e2858e7e2d5e91f506932f3774288ca6120d (patch) | |
tree | 3619ff9d81826a55baa3d4b10ab8a4f1c96d3abe /lib | |
parent | dfc5d7835d6e248d3cc83430da941277ae5cabaa (diff) | |
download | nixlib-2482e2858e7e2d5e91f506932f3774288ca6120d.tar nixlib-2482e2858e7e2d5e91f506932f3774288ca6120d.tar.gz nixlib-2482e2858e7e2d5e91f506932f3774288ca6120d.tar.bz2 nixlib-2482e2858e7e2d5e91f506932f3774288ca6120d.tar.lz nixlib-2482e2858e7e2d5e91f506932f3774288ca6120d.tar.xz nixlib-2482e2858e7e2d5e91f506932f3774288ca6120d.tar.zst nixlib-2482e2858e7e2d5e91f506932f3774288ca6120d.zip |
prebuilt android tools: Init using SDK
Expose as an option for the cross stdenv.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/systems/default.nix | 17 | ||||
-rw-r--r-- | lib/systems/examples.nix | 7 | ||||
-rw-r--r-- | lib/systems/inspect.nix | 1 | ||||
-rw-r--r-- | lib/systems/parse.nix | 1 |
4 files changed, 20 insertions, 6 deletions
diff --git a/lib/systems/default.nix b/lib/systems/default.nix index 0729cc7ef293..d5a206e620c8 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -23,13 +23,15 @@ rec { config = parse.tripleFromSystem final.parsed; # Just a guess, based on `system` platform = platforms.selectBySystem final.system; + # Derived meta-data libc = - /**/ if final.isDarwin then "libSystem" - else if final.isMinGW then "msvcrt" - else if final.isMusl then "musl" - else if final.isLinux /* default */ then "glibc" + /**/ if final.isDarwin then "libSystem" + else if final.isMinGW then "msvcrt" + else if final.isMusl then "musl" + else if final.isAndroid then "bionic" + else if final.isLinux /* default */ then "glibc" # TODO(@Ericson2314) think more about other operating systems - else "native/impure"; + else "native/impure"; extensions = { sharedLibrary = /**/ if final.isDarwin then ".dylib" @@ -39,7 +41,10 @@ rec { /**/ if final.isWindows then ".exe" else ""; }; + # Misc boolean options + useAndroidPrebuilt = false; } // mapAttrs (n: v: v final.parsed) inspect.predicates // args; - in final; + in assert final.useAndroidPrebuilt -> final.isAndroid; + final; } diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index e0d08ed5daed..848737700b0b 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -38,6 +38,13 @@ rec { platform = platforms.aarch64-multiplatform; }; + aarch64-android-prebuilt = rec { + config = "aarch64-unknown-linux-android"; + arch = "aarch64"; + platform = platforms.aarch64-multiplatform; + useAndroidPrebuilt = true; + }; + scaleway-c1 = armv7l-hf-multiplatform // rec { platform = platforms.scaleway-c1; inherit (platform.gcc) fpu; diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix index ff8f60001175..ab220af46e30 100644 --- a/lib/systems/inspect.nix +++ b/lib/systems/inspect.nix @@ -34,6 +34,7 @@ rec { Cygwin = { kernel = kernels.windows; abi = abis.cygnus; }; MinGW = { kernel = kernels.windows; abi = abis.gnu; }; + Android = [ { abi = abis.android; } { abi = abis.androideabi; } ]; Musl = with abis; map (a: { abi = a; }) [ musl musleabi musleabihf ]; Kexecable = map (family: { kernel = kernels.linux; cpu.family = family; }) diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix index eea471f5773d..03d052f5f192 100644 --- a/lib/systems/parse.nix +++ b/lib/systems/parse.nix @@ -176,6 +176,7 @@ rec { types.abi = enum (attrValues abis); abis = setTypes types.openAbi { + android = {}; cygnus = {}; gnu = {}; msvc = {}; |