2019-04-11 12:48:53 +00:00
|
|
|
{ config, stdenv, pkgs, target-os ? "all", status-go }:
|
2019-03-25 16:35:01 +00:00
|
|
|
|
|
|
|
with pkgs;
|
|
|
|
with stdenv;
|
|
|
|
|
|
|
|
let
|
2019-03-29 10:56:08 +00:00
|
|
|
gradle = gradle_4_10;
|
2019-03-25 16:35:01 +00:00
|
|
|
targetAndroid = {
|
|
|
|
"android" = true;
|
2019-04-03 11:06:42 +00:00
|
|
|
"all" = true;
|
2019-03-25 16:35:01 +00:00
|
|
|
}.${target-os} or false;
|
|
|
|
targetIOS = {
|
|
|
|
"ios" = true;
|
2019-04-03 11:06:42 +00:00
|
|
|
"all" = true;
|
2019-03-25 16:35:01 +00:00
|
|
|
}.${target-os} or false;
|
2019-04-11 12:48:53 +00:00
|
|
|
xcodewrapperArgs = {
|
|
|
|
version = "10.1";
|
|
|
|
};
|
2019-04-03 20:12:31 +00:00
|
|
|
xcodeWrapper = xcodeenv.composeXcodeWrapper xcodewrapperArgs;
|
2019-04-11 12:48:53 +00:00
|
|
|
android = callPackage ./android.nix { inherit config; };
|
2019-03-25 16:35:01 +00:00
|
|
|
|
|
|
|
in
|
|
|
|
{
|
2019-04-11 12:48:53 +00:00
|
|
|
inherit (android) androidComposition;
|
|
|
|
inherit xcodewrapperArgs;
|
|
|
|
|
2019-03-25 16:35:01 +00:00
|
|
|
buildInputs =
|
2019-04-03 20:12:31 +00:00
|
|
|
lib.optional targetAndroid android.buildInputs ++
|
|
|
|
lib.optional (targetIOS && isDarwin) xcodeWrapper;
|
2019-03-25 16:35:01 +00:00
|
|
|
shellHook =
|
|
|
|
lib.optionalString targetIOS ''
|
|
|
|
export RCTSTATUS_FILEPATH=${status-go}/lib/ios/Statusgo.framework
|
|
|
|
'' +
|
2019-04-11 12:48:53 +00:00
|
|
|
lib.optionalString targetAndroid android.shellHook;
|
2019-03-25 16:35:01 +00:00
|
|
|
}
|