1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/mobile/titaniumenv/titaniumsdk-6.3.nix

40 lines
1.2 KiB
Nix
Raw Normal View History

{stdenv, fetchurl, unzip, makeWrapper, python, jdk}:
stdenv.mkDerivation {
name = "mobilesdk-6.3.1.GA";
src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl {
url = http://builds.appcelerator.com/mobile/6_3_X/mobilesdk-6.3.1.v20171101154403-linux.zip;
sha256 = "0g8dqqf5ffa7ll3rqm5naywipnv2vvfxcj9fmqg1wnvvxf0rflqj";
}
else if stdenv.system == "x86_64-darwin" then fetchurl {
url = http://builds.appcelerator.com/mobile/6_3_X/mobilesdk-6.3.1.v20171101154403-osx.zip;
sha256 = "00bm8vv70mg4kd7jvmxd1bfqafv6zdpdx816i0hvf801zwnak4nj";
}
else throw "Platform: ${stdenv.system} not supported!";
buildInputs = [ unzip makeWrapper ];
buildCommand = ''
mkdir -p $out
cd $out
(yes y | unzip $src) || true
# Rename ugly version number
cd mobilesdk/*
mv * 6.3.1.GA
cd *
# Patch some executables
${if stdenv.system == "i686-linux" then
''
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 android/titanium_prep.linux32
''
else if stdenv.system == "x86_64-linux" then
''
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 android/titanium_prep.linux64
''
else ""}
'';
}