Skip to content

Commit

Permalink
ios-cross: Bump sdk version, verify sdk install at build time
Browse files Browse the repository at this point in the history
  • Loading branch information
shlevy committed Jan 20, 2017
1 parent 00ab8e8 commit e70dcf6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkgs/os-specific/darwin/ios-cross/default.nix
Expand Up @@ -18,7 +18,9 @@
{ prefix, arch, simulator ? false }: let
sdkType = if simulator then "Simulator" else "OS";

sdk = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhone${sdkType}.platform/Developer/SDKs/iPhone${sdkType}10.0.sdk";
sdkVer = "10.2";

sdk = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhone${sdkType}.platform/Developer/SDKs/iPhone${sdkType}${sdkVer}.sdk";

/* TODO: Properly integrate with gcc-cross-wrapper */
wrapper = import ../../../build-support/cc-wrapper {
Expand All @@ -29,6 +31,10 @@
libc = runCommand "empty-libc" {} "mkdir -p $out/{lib,include}";
cc = clang;
extraBuildCommands = ''
if ! [ -d ${sdk} ]; then
echo "You must have ${sdkVer} of the iPhone${sdkType} sdk installed at ${sdk}" >&2
exit 1
fi
# ugh
tr '\n' ' ' < $out/nix-support/cc-cflags > cc-cflags.tmp
mv cc-cflags.tmp $out/nix-support/cc-cflags
Expand Down

0 comments on commit e70dcf6

Please sign in to comment.