diff options
Diffstat (limited to 'pkgs/development/mobile/titaniumenv/default.nix')
-rw-r--r-- | pkgs/development/mobile/titaniumenv/default.nix | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/pkgs/development/mobile/titaniumenv/default.nix b/pkgs/development/mobile/titaniumenv/default.nix index 07dc2f4440d7..b77468a09536 100644 --- a/pkgs/development/mobile/titaniumenv/default.nix +++ b/pkgs/development/mobile/titaniumenv/default.nix @@ -1,5 +1,25 @@ {pkgs, pkgs_i686, xcodeVersion ? "5.0"}: +let + # We have to use Oracle's JDK. On Darwin, just simply expose the host system's + # JDK. According to their docs, OpenJDK is not supported. + + jdkWrapper = pkgs.stdenv.mkDerivation { + name = "jdk-wrapper"; + buildCommand = '' + mkdir -p $out/bin + cd $out/bin + ln -s /usr/bin/javac + ln -s /usr/bin/java + ln -s /usr/bin/jarsigner + ln -s /usr/bin/jar + ln -s /usr/bin/keytool + ''; + setupHook = '' + export JAVA_HOME=/usr + ''; + }; +in rec { androidenv = pkgs.androidenv; @@ -12,7 +32,11 @@ rec { }; buildApp = import ./build-app.nix { - inherit (pkgs) stdenv jdk; + inherit (pkgs) stdenv python; + jdk = if pkgs.stdenv.isLinux then pkgs.oraclejdk7 + else if pkgs.stdenv.isDarwin then jdkWrapper + else throw "Platform not supported: ${pkgs.stdenv.system}"; + inherit (pkgs.nodePackages) titanium; inherit (androidenv) androidsdk; inherit (xcodeenv) xcodewrapper; inherit titaniumsdk; |