Skip to content

Commit

Permalink
apple_sdk_11_0: simplify SDK unpacking
Browse files Browse the repository at this point in the history
The SDK was missing SDKSettings files. This is usually not a problem for
Nix builds, because we generate our own fake SDK structure when
necessary (in xcbuild), but not having these files blocks using the
upstream Apple SDK in tooling such as gen-frameworks.py.
  • Loading branch information
stephank committed Mar 17, 2023
1 parent 0c3aaf3 commit a0537d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 2 additions & 8 deletions pkgs/os-specific/darwin/apple-sdk-11.0/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ let
};

installPhase = ''
cd Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk
mkdir $out
cp -r System usr $out/
mv Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk $out
'';
};

Expand All @@ -49,10 +46,7 @@ let
};

installPhase = ''
cd Library/Developer/CommandLineTools
mkdir $out
cp -r Library usr $out/
mv Library/Developer/CommandLineTools $out
'';
};

Expand Down
6 changes: 6 additions & 0 deletions pkgs/os-specific/darwin/gen-frameworks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@

"""
Generate a frameworks.nix for a macOS SDK.
You may point this tool at an Xcode bundled SDK, but more ideal is using the
SDK from Nixpkgs. For example:
SDK_PATH="$(nix-build --no-link -A darwin.apple_sdk_11_0.MacOSX-SDK)"
./gen-frameworks.py "$SDK_PATH" > ./new-frameworks.nix
"""

import json
Expand Down

0 comments on commit a0537d6

Please sign in to comment.