titaniumenv: fix stripping the unneeded architectures

This commit is contained in:
Sander van der Burg 2019-03-10 23:18:08 +01:00
parent 37fe6bf786
commit 907c478ceb
3 changed files with 13 additions and 2 deletions

View File

@ -40,8 +40,7 @@ in
stdenv.mkDerivation ({
name = stdenv.lib.replaceChars [" "] [""] name;
buildInputs = [ nodejs titanium alloy python which file jdk ]
++ stdenv.lib.optional (target == "iphone") xcodewrapper;
buildInputs = [ nodejs titanium alloy python which file jdk ];
buildPhase = ''
${preBuild}
@ -91,6 +90,10 @@ stdenv.mkDerivation ({
''}
''
else if target == "iphone" then ''
# Be sure that the Xcode wrapper has priority over everything else.
# When using buildInputs this does not seem to be the case.
export PATH=${xcodewrapper}/bin:$PATH
# Configure the path to Xcode
titanium --config-file $TMPDIR/config.json --no-colors config paths.xcode ${xcodeBaseDir}

View File

@ -87,6 +87,11 @@ stdenv.mkDerivation {
# Patch maven central repository with our own local directory. This prevents the builder from downloading Maven artifacts
sed -i -e 's|mavenCentral()|maven { url "${fakeMavenRepo}" }|' android/templates/build/proguard.gradle
# Patch the strip frameworks script in the iPhone build template to not let
# it skip the strip phase. This is caused by an assumption on the file
# permissions in which Nix deviates from the standard.
sed -i -e "s|-perm +111|-perm /111|" iphone/templates/build/strip-frameworks.sh
# Patch some executables
${if stdenv.system == "i686-linux" then

View File

@ -14,6 +14,9 @@ stdenv.mkDerivation {
ln -s /usr/bin/xcrun
ln -s /usr/bin/plutil
ln -s /usr/bin/clang
ln -s /usr/bin/lipo
ln -s /usr/bin/file
ln -s /usr/bin/rev
ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcodebuild"
ln -s "${xcodeBaseDir}/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator"