diff options
author | Shea Levy <shea@shealevy.com> | 2016-11-15 16:31:55 -0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2016-11-15 16:31:55 -0500 |
commit | 7df3d7446f868170848227cd972fa833c827f07c (patch) | |
tree | 5b2ff67e13aa0c5e94c46a6bf2b8564c4282bb78 /pkgs/stdenv | |
parent | 2ca507a2b8408228cacb56f59dfbf0039bcff6c2 (diff) |
Add initial basic support for cross-compiling to iOS
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r-- | pkgs/stdenv/cross/default.nix | 6 | ||||
-rw-r--r-- | pkgs/stdenv/default.nix | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix index 575692ca0126..0cde6a05943e 100644 --- a/pkgs/stdenv/cross/default.nix +++ b/pkgs/stdenv/cross/default.nix @@ -26,4 +26,10 @@ rec { stdenvCross = buildPackages.makeStdenvCross buildPackages.stdenv crossSystem buildPackages.binutilsCross buildPackages.gccCrossStageFinal; + + stdenvCrossiOS = let + inherit (buildPackages.darwin.ios-cross { prefix = crossSystem.config; inherit (crossSystem) arch; simulator = crossSystem.isiPhoneSimulator or false; }) cc binutils; + in buildPackages.makeStdenvCross + buildPackages.stdenv crossSystem + binutils cc; } diff --git a/pkgs/stdenv/default.nix b/pkgs/stdenv/default.nix index 10086ee6a853..4be34a35acb3 100644 --- a/pkgs/stdenv/default.nix +++ b/pkgs/stdenv/default.nix @@ -38,13 +38,15 @@ rec { inherit (import ./darwin { inherit system allPackages platform config; }) stdenvDarwin; - inherit (import ./cross { inherit system allPackages platform crossSystem config lib; }) stdenvCross; + inherit (import ./cross { inherit system allPackages platform crossSystem config lib; }) stdenvCross stdenvCrossiOS; inherit (import ./custom { inherit system allPackages platform crossSystem config lib; }) stdenvCustom; # Select the appropriate stdenv for the platform `system'. stdenv = - if crossSystem != null then stdenvCross else + if crossSystem != null then + if crossSystem.useiOSCross or false then stdenvCrossiOS + else stdenvCross else if config ? replaceStdenv then stdenvCustom else if system == "i686-linux" then stdenvLinux else if system == "x86_64-linux" then stdenvLinux else |