summaryrefslogtreecommitdiffstats
path: root/pkgs/development/mobile/xcodeenv
diff options
context:
space:
mode:
authorSander van der Burg <svanderburg@mgail.com>2017-01-25 16:56:55 +0100
committerSander van der Burg <svanderburg@mgail.com>2017-01-25 16:56:55 +0100
commit0f6eab52e133f2e54723aed7d946efb6f25ca3ea (patch)
tree3901af073d3c894e13e81dfd566b23153c156d82 /pkgs/development/mobile/xcodeenv
parentca7923f1117571cb13bd74b349156b963b4b7526 (diff)
xcodeenv: make it work with Xcode 8.2.1
Diffstat (limited to 'pkgs/development/mobile/xcodeenv')
-rw-r--r--pkgs/development/mobile/xcodeenv/build-app.nix10
-rw-r--r--pkgs/development/mobile/xcodeenv/default.nix2
-rw-r--r--pkgs/development/mobile/xcodeenv/simulate-app.nix5
-rw-r--r--pkgs/development/mobile/xcodeenv/xcodewrapper.nix2
4 files changed, 6 insertions, 13 deletions
diff --git a/pkgs/development/mobile/xcodeenv/build-app.nix b/pkgs/development/mobile/xcodeenv/build-app.nix
index b2e6f84bb000..7e46aefb2997 100644
--- a/pkgs/development/mobile/xcodeenv/build-app.nix
+++ b/pkgs/development/mobile/xcodeenv/build-app.nix
@@ -1,12 +1,11 @@
{stdenv, xcodewrapper}:
{ name
, src
-, sdkVersion ? "6.1"
+, sdkVersion ? "10.2"
, target ? null
, configuration ? null
, scheme ? null
, sdk ? null
-, arch ? null
, xcodeFlags ? ""
, release ? false
, codeSignIdentity ? null
@@ -35,11 +34,6 @@ let
if release then "Release" else "Debug"
else configuration;
- _arch = if arch == null
- then
- if release then "armv7" else "x86_64"
- else arch;
-
_sdk = if sdk == null
then
if release then "iphoneos" + sdkVersion else "iphonesimulator" + sdkVersion
@@ -83,7 +77,7 @@ stdenv.mkDerivation {
''}
# Do the building
- xcodebuild -target ${_target} -configuration ${_configuration} ${stdenv.lib.optionalString (scheme != null) "-scheme ${scheme}"} -sdk ${_sdk} -arch ${_arch} ONLY_ACTIVE_ARCH=NO VALID_ARCHS="${_arch}" CONFIGURATION_TEMP_DIR=$TMPDIR CONFIGURATION_BUILD_DIR=$out ${if generateXCArchive then "archive" else ""} ${xcodeFlags} ${if release then ''"CODE_SIGN_IDENTITY=${codeSignIdentity}" PROVISIONING_PROFILE=$PROVISIONING_PROFILE OTHER_CODE_SIGN_FLAGS="--keychain $HOME/Library/Keychains/$keychainName"'' else ""}
+ xcodebuild -target ${_target} -configuration ${_configuration} ${stdenv.lib.optionalString (scheme != null) "-scheme ${scheme}"} -sdk ${_sdk} TARGETED_DEVICE_FAMILY="1, 2" ONLY_ACTIVE_ARCH=NO CONFIGURATION_TEMP_DIR=$TMPDIR CONFIGURATION_BUILD_DIR=$out ${if generateXCArchive then "archive" else ""} ${xcodeFlags} ${if release then ''"CODE_SIGN_IDENTITY=${codeSignIdentity}" PROVISIONING_PROFILE=$PROVISIONING_PROFILE OTHER_CODE_SIGN_FLAGS="--keychain $HOME/Library/Keychains/$keychainName"'' else ""}
${stdenv.lib.optionalString release ''
${stdenv.lib.optionalString generateIPA ''
diff --git a/pkgs/development/mobile/xcodeenv/default.nix b/pkgs/development/mobile/xcodeenv/default.nix
index d7e35142be4c..afe430df383a 100644
--- a/pkgs/development/mobile/xcodeenv/default.nix
+++ b/pkgs/development/mobile/xcodeenv/default.nix
@@ -1,4 +1,4 @@
-{stdenv, version ? "7.2", xcodeBaseDir ? "/Applications/Xcode.app"}:
+{stdenv, version ? "8.2.1", xcodeBaseDir ? "/Applications/Xcode.app"}:
rec {
xcodewrapper = import ./xcodewrapper.nix {
diff --git a/pkgs/development/mobile/xcodeenv/simulate-app.nix b/pkgs/development/mobile/xcodeenv/simulate-app.nix
index ecfdbe2a6e39..5f71b5994080 100644
--- a/pkgs/development/mobile/xcodeenv/simulate-app.nix
+++ b/pkgs/development/mobile/xcodeenv/simulate-app.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation {
# Copy the app and restore the write permissions
appTmpDir=$(mktemp -d -t appTmpDir)
- cp -r "$(echo ${app}/*.app)" $appTmpDir
+ cp -r "$(echo ${app}/*.app)" "$appTmpDir"
chmod -R 755 "$(echo $appTmpDir/*.app)"
# Wait for the simulator to start
@@ -33,7 +33,7 @@ stdenv.mkDerivation {
read
# Install the app
- xcrun simctl install $udid "$(echo $appTmpDir/*.app)"
+ xcrun simctl install "$udid" "$(echo $appTmpDir/*.app)"
# Remove the app tempdir
rm -Rf $appTmpDir
@@ -45,4 +45,3 @@ stdenv.mkDerivation {
chmod +x $out/bin/run-test-simulator
'';
}
-
diff --git a/pkgs/development/mobile/xcodeenv/xcodewrapper.nix b/pkgs/development/mobile/xcodeenv/xcodewrapper.nix
index 26b0197b2e13..38afe86c5aa5 100644
--- a/pkgs/development/mobile/xcodeenv/xcodewrapper.nix
+++ b/pkgs/development/mobile/xcodeenv/xcodewrapper.nix
@@ -8,8 +8,8 @@ stdenv.mkDerivation {
ln -s /usr/bin/xcode-select
ln -s /usr/bin/security
ln -s /usr/bin/codesign
+ ln -s /usr/bin/xcrun
ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcodebuild"
- ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcrun"
ln -s "${xcodeBaseDir}/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator"
cd ..