aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/mobile
diff options
context:
space:
mode:
authorSander van der Burg <svanderburg@gmail.com>2019-03-10 23:18:08 +0100
committerSander van der Burg <svanderburg@gmail.com>2019-03-10 23:18:08 +0100
commit907c478cebd77dda0b6cf913170b18734b91ad61 (patch)
treeb831017b2145f6da87b37e08d00941755ce60471 /pkgs/development/mobile
parent37fe6bf7868d7c84ae567de446a46f3fd42a8f63 (diff)
titaniumenv: fix stripping the unneeded architectures
Diffstat (limited to 'pkgs/development/mobile')
-rw-r--r--pkgs/development/mobile/titaniumenv/build-app.nix7
-rw-r--r--pkgs/development/mobile/titaniumenv/titaniumsdk-7.5.nix5
-rw-r--r--pkgs/development/mobile/xcodeenv/compose-xcodewrapper.nix3
3 files changed, 13 insertions, 2 deletions
diff --git a/pkgs/development/mobile/titaniumenv/build-app.nix b/pkgs/development/mobile/titaniumenv/build-app.nix
index b3c8d380819..9e19afb2442 100644
--- a/pkgs/development/mobile/titaniumenv/build-app.nix
+++ b/pkgs/development/mobile/titaniumenv/build-app.nix
@@ -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}
diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk-7.5.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-7.5.nix
index cff1d73d302..5c1cd0a265a 100644
--- a/pkgs/development/mobile/titaniumenv/titaniumsdk-7.5.nix
+++ b/pkgs/development/mobile/titaniumenv/titaniumsdk-7.5.nix
@@ -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
diff --git a/pkgs/development/mobile/xcodeenv/compose-xcodewrapper.nix b/pkgs/development/mobile/xcodeenv/compose-xcodewrapper.nix
index dea1b77211b..f1941e051bc 100644
--- a/pkgs/development/mobile/xcodeenv/compose-xcodewrapper.nix
+++ b/pkgs/development/mobile/xcodeenv/compose-xcodewrapper.nix
@@ -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"