2018-07-21 01:44:44 +01:00
|
|
|
{stdenv, fetchurl, unzip, makeWrapper}:
|
2017-01-24 12:21:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2018-01-05 11:34:03 +00:00
|
|
|
name = "mobilesdk-6.3.1.GA";
|
2018-08-20 20:11:29 +01:00
|
|
|
src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") then fetchurl {
|
2018-01-05 11:34:03 +00:00
|
|
|
url = http://builds.appcelerator.com/mobile/6_3_X/mobilesdk-6.3.1.v20171101154403-linux.zip;
|
|
|
|
sha256 = "0g8dqqf5ffa7ll3rqm5naywipnv2vvfxcj9fmqg1wnvvxf0rflqj";
|
2017-01-24 12:21:52 +00:00
|
|
|
}
|
2018-08-20 20:11:29 +01:00
|
|
|
else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl {
|
2018-01-05 11:34:03 +00:00
|
|
|
url = http://builds.appcelerator.com/mobile/6_3_X/mobilesdk-6.3.1.v20171101154403-osx.zip;
|
|
|
|
sha256 = "00bm8vv70mg4kd7jvmxd1bfqafv6zdpdx816i0hvf801zwnak4nj";
|
2017-01-24 12:21:52 +00:00
|
|
|
}
|
2018-08-20 20:11:29 +01:00
|
|
|
else throw "Platform: ${stdenv.hostPlatform.system} not supported!";
|
2017-01-24 12:21:52 +00:00
|
|
|
|
|
|
|
buildInputs = [ unzip makeWrapper ];
|
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cd $out
|
|
|
|
(yes y | unzip $src) || true
|
|
|
|
|
|
|
|
# Rename ugly version number
|
|
|
|
cd mobilesdk/*
|
2018-01-05 11:34:03 +00:00
|
|
|
mv * 6.3.1.GA
|
2017-01-24 12:21:52 +00:00
|
|
|
cd *
|
2018-08-20 20:11:29 +01:00
|
|
|
${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-darwin") ''
|
2018-01-31 17:56:47 +00:00
|
|
|
# Fixes a bad archive copying error when generating an IPA file
|
|
|
|
sed -i -e "s|cp -rf|/bin/cp -rf|" iphone/cli/commands/_build.js
|
|
|
|
''}
|
|
|
|
|
2017-01-24 12:21:52 +00:00
|
|
|
# Patch some executables
|
|
|
|
|
2018-08-20 20:11:29 +01:00
|
|
|
${if stdenv.hostPlatform.system == "i686-linux" then
|
2017-01-24 12:21:52 +00:00
|
|
|
''
|
|
|
|
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 android/titanium_prep.linux32
|
|
|
|
''
|
2018-08-20 20:11:29 +01:00
|
|
|
else if stdenv.hostPlatform.system == "x86_64-linux" then
|
2017-01-24 12:21:52 +00:00
|
|
|
''
|
|
|
|
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 android/titanium_prep.linux64
|
|
|
|
''
|
|
|
|
else ""}
|
|
|
|
'';
|
|
|
|
}
|