xcodeenv: make it work with Xcode 8.2.1
This commit is contained in:
parent
ca7923f111
commit
0f6eab52e1
@ -1,7 +1,7 @@
|
|||||||
{stdenv, androidsdk, titaniumsdk, titanium, alloy, xcodewrapper, jdk, python, nodejs, which, xcodeBaseDir}:
|
{stdenv, androidsdk, titaniumsdk, titanium, alloy, xcodewrapper, jdk, python, nodejs, which, xcodeBaseDir}:
|
||||||
{ name, src, target, androidPlatformVersions ? [ "23" ], androidAbiVersions ? [ "armeabi" "armeabi-v7a" ], tiVersion ? null
|
{ name, src, target, androidPlatformVersions ? [ "23" ], androidAbiVersions ? [ "armeabi" "armeabi-v7a" ], tiVersion ? null
|
||||||
, release ? false, androidKeyStore ? null, androidKeyAlias ? null, androidKeyStorePassword ? null
|
, release ? false, androidKeyStore ? null, androidKeyAlias ? null, androidKeyStorePassword ? null
|
||||||
, iosMobileProvisioningProfile ? null, iosCertificateName ? null, iosCertificate ? null, iosCertificatePassword ? null, iosVersion ? "9.2"
|
, iosMobileProvisioningProfile ? null, iosCertificateName ? null, iosCertificate ? null, iosCertificatePassword ? null, iosVersion ? "10.2"
|
||||||
, enableWirelessDistribution ? false, installURL ? null
|
, enableWirelessDistribution ? false, installURL ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{pkgs, pkgs_i686, xcodeVersion ? "7.2", xcodeBaseDir ? "/Applications/Xcode.app", tiVersion ? "6.0.2.GA"}:
|
{pkgs, pkgs_i686, xcodeVersion ? "8.2.1", xcodeBaseDir ? "/Applications/Xcode.app", tiVersion ? "6.0.2.GA"}:
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
androidenv = pkgs.androidenv;
|
androidenv = pkgs.androidenv;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{ nixpkgs ? <nixpkgs>
|
{ nixpkgs ? <nixpkgs>
|
||||||
, systems ? [ "x86_64-linux" "x86_64-darwin" ]
|
, systems ? [ "x86_64-linux" "x86_64-darwin" ]
|
||||||
, xcodeVersion ? "7.2"
|
, xcodeVersion ? "8.2.1"
|
||||||
, xcodeBaseDir ? "/Applications/Xcode.app"
|
, xcodeBaseDir ? "/Applications/Xcode.app"
|
||||||
, tiVersion ? "6.0.2.GA"
|
, tiVersion ? "6.0.2.GA"
|
||||||
, rename ? false
|
, rename ? false
|
||||||
, newBundleId ? "com.example.kitchensink", iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? "Example", iosCertificatePassword ? "", iosVersion ? "9.2"
|
, newBundleId ? "com.example.kitchensink", iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? "Example", iosCertificatePassword ? "", iosVersion ? "10.2"
|
||||||
, enableWirelessDistribution ? false, installURL ? null
|
, enableWirelessDistribution ? false, installURL ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -3,5 +3,5 @@
|
|||||||
xcodeenv.simulateApp {
|
xcodeenv.simulateApp {
|
||||||
name = "simulate-${kitchensink.name}";
|
name = "simulate-${kitchensink.name}";
|
||||||
inherit bundleId;
|
inherit bundleId;
|
||||||
app = "${kitchensink}/build/iphone/build/Debug-iphonesimulator";
|
app = "${kitchensink}/build/iphone/build/Products/Debug-iphonesimulator";
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
{stdenv, xcodewrapper}:
|
{stdenv, xcodewrapper}:
|
||||||
{ name
|
{ name
|
||||||
, src
|
, src
|
||||||
, sdkVersion ? "6.1"
|
, sdkVersion ? "10.2"
|
||||||
, target ? null
|
, target ? null
|
||||||
, configuration ? null
|
, configuration ? null
|
||||||
, scheme ? null
|
, scheme ? null
|
||||||
, sdk ? null
|
, sdk ? null
|
||||||
, arch ? null
|
|
||||||
, xcodeFlags ? ""
|
, xcodeFlags ? ""
|
||||||
, release ? false
|
, release ? false
|
||||||
, codeSignIdentity ? null
|
, codeSignIdentity ? null
|
||||||
@ -35,11 +34,6 @@ let
|
|||||||
if release then "Release" else "Debug"
|
if release then "Release" else "Debug"
|
||||||
else configuration;
|
else configuration;
|
||||||
|
|
||||||
_arch = if arch == null
|
|
||||||
then
|
|
||||||
if release then "armv7" else "x86_64"
|
|
||||||
else arch;
|
|
||||||
|
|
||||||
_sdk = if sdk == null
|
_sdk = if sdk == null
|
||||||
then
|
then
|
||||||
if release then "iphoneos" + sdkVersion else "iphonesimulator" + sdkVersion
|
if release then "iphoneos" + sdkVersion else "iphonesimulator" + sdkVersion
|
||||||
@ -83,7 +77,7 @@ stdenv.mkDerivation {
|
|||||||
''}
|
''}
|
||||||
|
|
||||||
# Do the building
|
# 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 release ''
|
||||||
${stdenv.lib.optionalString generateIPA ''
|
${stdenv.lib.optionalString generateIPA ''
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{stdenv, version ? "7.2", xcodeBaseDir ? "/Applications/Xcode.app"}:
|
{stdenv, version ? "8.2.1", xcodeBaseDir ? "/Applications/Xcode.app"}:
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
xcodewrapper = import ./xcodewrapper.nix {
|
xcodewrapper = import ./xcodewrapper.nix {
|
||||||
|
@ -25,7 +25,7 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
# Copy the app and restore the write permissions
|
# Copy the app and restore the write permissions
|
||||||
appTmpDir=$(mktemp -d -t appTmpDir)
|
appTmpDir=$(mktemp -d -t appTmpDir)
|
||||||
cp -r "$(echo ${app}/*.app)" $appTmpDir
|
cp -r "$(echo ${app}/*.app)" "$appTmpDir"
|
||||||
chmod -R 755 "$(echo $appTmpDir/*.app)"
|
chmod -R 755 "$(echo $appTmpDir/*.app)"
|
||||||
|
|
||||||
# Wait for the simulator to start
|
# Wait for the simulator to start
|
||||||
@ -33,7 +33,7 @@ stdenv.mkDerivation {
|
|||||||
read
|
read
|
||||||
|
|
||||||
# Install the app
|
# Install the app
|
||||||
xcrun simctl install $udid "$(echo $appTmpDir/*.app)"
|
xcrun simctl install "$udid" "$(echo $appTmpDir/*.app)"
|
||||||
|
|
||||||
# Remove the app tempdir
|
# Remove the app tempdir
|
||||||
rm -Rf $appTmpDir
|
rm -Rf $appTmpDir
|
||||||
@ -45,4 +45,3 @@ stdenv.mkDerivation {
|
|||||||
chmod +x $out/bin/run-test-simulator
|
chmod +x $out/bin/run-test-simulator
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@ stdenv.mkDerivation {
|
|||||||
ln -s /usr/bin/xcode-select
|
ln -s /usr/bin/xcode-select
|
||||||
ln -s /usr/bin/security
|
ln -s /usr/bin/security
|
||||||
ln -s /usr/bin/codesign
|
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/xcodebuild"
|
||||||
ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcrun"
|
|
||||||
ln -s "${xcodeBaseDir}/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator"
|
ln -s "${xcodeBaseDir}/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator"
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
Loading…
x
Reference in New Issue
Block a user