Make xcode detection a bit more robust and configurable

This commit is contained in:
Sander van der Burg 2013-12-24 14:34:56 +01:00
parent 94536ea09f
commit 2f624cd1fa
2 changed files with 4 additions and 4 deletions

View File

@ -1,8 +1,8 @@
{stdenv}: {stdenv, version ? "5.0"}:
rec { rec {
xcodewrapper = import ./xcodewrapper.nix { xcodewrapper = import ./xcodewrapper.nix {
inherit stdenv; inherit stdenv version;
}; };
buildApp = import ./build-app.nix { buildApp = import ./build-app.nix {

View File

@ -1,4 +1,4 @@
{stdenv, version ? "5.0"}: {stdenv, version}:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "xcode-wrapper-"+version; name = "xcode-wrapper-"+version;
@ -16,7 +16,7 @@ stdenv.mkDerivation {
ln -s "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs" ln -s "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs"
# Check if we have the xcodebuild version that we want # Check if we have the xcodebuild version that we want
if [ -z "$($out/bin/xcodebuild -version | grep ${version})" ] if [ -z "$($out/bin/xcodebuild -version | grep -x 'Xcode ${version}')" ]
then then
echo "We require xcodebuild version: ${version}" echo "We require xcodebuild version: ${version}"
exit 1 exit 1