git.iko.soy/typeable/nixpkgs
on master help sign in
xcodeenv: make it work with Xcode 8.2.1
commit0f6eab52e133f2e54723aed7d946efb6f25ca3ea authorSander van der Burg <svanderburg@mgail.com> dateWed 25 Jan 2017, 16:56 (10 years ago) parentca7923f
8 files changed+11−18
pkgs/development/mobile/titaniumenv/build-app.nix+1−1 pkgs/development/mobile/titaniumenv/default.nix+1−1 pkgs/development/mobile/titaniumenv/examples/default.nix+2−2 pkgs/development/mobile/titaniumenv/examples/simulate-kitchensink/default.nix+1−1 pkgs/development/mobile/xcodeenv/build-app.nix+2−8 pkgs/development/mobile/xcodeenv/default.nix+1−1 pkgs/development/mobile/xcodeenv/simulate-app.nix+2−3 pkgs/development/mobile/xcodeenv/xcodewrapper.nix+1−1
pkgs/development/mobile/titaniumenv/build-app.nix+1−1
@@ -1,7 +1,7 @@
11{stdenv, androidsdk, titaniumsdk, titanium, alloy, xcodewrapper, jdk, python, nodejs, which, xcodeBaseDir}:
22{ name, src, target, androidPlatformVersions ? [ "23" ], androidAbiVersions ? [ "armeabi" "armeabi-v7a" ], tiVersion ? null
33, release ? false, androidKeyStore ? null, androidKeyAlias ? null, androidKeyStorePassword ? null
4−, iosMobileProvisioningProfile ? null, iosCertificateName ? null, iosCertificate ? null, iosCertificatePassword ? null, iosVersion ? "9.2"
4+, iosMobileProvisioningProfile ? null, iosCertificateName ? null, iosCertificate ? null, iosCertificatePassword ? null, iosVersion ? "10.2"
55, enableWirelessDistribution ? false, installURL ? null
66}:
77
pkgs/development/mobile/titaniumenv/default.nix+1−1
@@ -1,4 +1,4 @@
1−{pkgs, pkgs_i686, xcodeVersion ? "7.2", xcodeBaseDir ? "/Applications/Xcode.app", tiVersion ? "6.0.2.GA"}:
1+{pkgs, pkgs_i686, xcodeVersion ? "8.2.1", xcodeBaseDir ? "/Applications/Xcode.app", tiVersion ? "6.0.2.GA"}:
22
33rec {
44 androidenv = pkgs.androidenv;
pkgs/development/mobile/titaniumenv/examples/default.nix+2−2
@@ -1,10 +1,10 @@
11{ nixpkgs ? <nixpkgs>
22, systems ? [ "x86_64-linux" "x86_64-darwin" ]
3−, xcodeVersion ? "7.2"
3+, xcodeVersion ? "8.2.1"
44, xcodeBaseDir ? "/Applications/Xcode.app"
55, tiVersion ? "6.0.2.GA"
66, rename ? false
7−, newBundleId ? "com.example.kitchensink", iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? "Example", iosCertificatePassword ? "", iosVersion ? "9.2"
7+, newBundleId ? "com.example.kitchensink", iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? "Example", iosCertificatePassword ? "", iosVersion ? "10.2"
88, enableWirelessDistribution ? false, installURL ? null
99}:
1010
pkgs/development/mobile/titaniumenv/examples/simulate-kitchensink/default.nix+1−1
@@ -3,5 +3,5 @@
33xcodeenv.simulateApp {
44 name = "simulate-${kitchensink.name}";
55 inherit bundleId;
6− app = "${kitchensink}/build/iphone/build/Debug-iphonesimulator";
6+ app = "${kitchensink}/build/iphone/build/Products/Debug-iphonesimulator";
77}
pkgs/development/mobile/xcodeenv/build-app.nix+2−8
@@ -1,12 +1,11 @@
11{stdenv, xcodewrapper}:
22{ name
33, src
4−, sdkVersion ? "6.1"
4+, sdkVersion ? "10.2"
55, target ? null
66, configuration ? null
77, scheme ? null
88, sdk ? null
9−, arch ? null
109, xcodeFlags ? ""
1110, release ? false
1211, codeSignIdentity ? null
@@ -35,11 +34,6 @@ let
3534 if release then "Release" else "Debug"
3635 else configuration;
3736
38− _arch = if arch == null
39− then
40− if release then "armv7" else "x86_64"
41− else arch;
42−
4337 _sdk = if sdk == null
4438 then
4539 if release then "iphoneos" + sdkVersion else "iphonesimulator" + sdkVersion
@@ -83,7 +77,7 @@ stdenv.mkDerivation {
8377 ''}
8478
8579 # Do the building
86− 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 ""}
80+ 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 ""}
8781
8882 ${stdenv.lib.optionalString release ''
8983 ${stdenv.lib.optionalString generateIPA ''
pkgs/development/mobile/xcodeenv/default.nix+1−1
@@ -1,4 +1,4 @@
1−{stdenv, version ? "7.2", xcodeBaseDir ? "/Applications/Xcode.app"}:
1+{stdenv, version ? "8.2.1", xcodeBaseDir ? "/Applications/Xcode.app"}:
22
33rec {
44 xcodewrapper = import ./xcodewrapper.nix {
pkgs/development/mobile/xcodeenv/simulate-app.nix+2−3
@@ -25,7 +25,7 @@ stdenv.mkDerivation {
2525
2626 # Copy the app and restore the write permissions
2727 appTmpDir=$(mktemp -d -t appTmpDir)
28− cp -r "$(echo ${app}/*.app)" $appTmpDir
28+ cp -r "$(echo ${app}/*.app)" "$appTmpDir"
2929 chmod -R 755 "$(echo $appTmpDir/*.app)"
3030
3131 # Wait for the simulator to start
@@ -33,7 +33,7 @@ stdenv.mkDerivation {
3333 read
3434
3535 # Install the app
36− xcrun simctl install $udid "$(echo $appTmpDir/*.app)"
36+ xcrun simctl install "$udid" "$(echo $appTmpDir/*.app)"
3737
3838 # Remove the app tempdir
3939 rm -Rf $appTmpDir
@@ -45,4 +45,3 @@ stdenv.mkDerivation {
4545 chmod +x $out/bin/run-test-simulator
4646 '';
4747}
48−
pkgs/development/mobile/xcodeenv/xcodewrapper.nix+1−1
@@ -8,8 +8,8 @@ stdenv.mkDerivation {
88 ln -s /usr/bin/xcode-select
99 ln -s /usr/bin/security
1010 ln -s /usr/bin/codesign
11+ ln -s /usr/bin/xcrun
1112 ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcodebuild"
12− ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcrun"
1313 ln -s "${xcodeBaseDir}/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator"
1414
1515 cd ..