Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7679b8edae18
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 317702e28d58
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Apr 29, 2020

  1. xcbuild: add compatibility support for exporting sdk info

    "Real" xcodebuild allows using `xcodebuild -version -sdk` without
    an sdk version argument, which will dump sdk info for all the
    installed sdks.
    
    Bazel"s "xcode cc toolchain setup on mac" process uses this
    to determine which SDK version is actually installed.  This
    change allows using a nix-supplied pinned compiler and build
    system under bazel.
    Dave Nicponski authored and virusdave committed Apr 29, 2020
    Copy the full SHA
    c3c3f68 View commit details
  2. Merge pull request #85844 from virusdave/dnicponski/scratch/better_sd…

    …k_version_support
    
    xcbuild: add support for exporting sdk info
    worldofpeace authored Apr 29, 2020
    Copy the full SHA
    317702e View commit details
Showing with 4 additions and 0 deletions.
  1. +4 −0 pkgs/development/tools/xcbuild/wrapper.nix
4 changes: 4 additions & 0 deletions pkgs/development/tools/xcbuild/wrapper.nix
Original file line number Diff line number Diff line change
@@ -110,11 +110,15 @@ runCommand "xcodebuild-${xcbuild.version}" {
mkdir -p $out/Applications/Xcode.app/Contents
ln -s $out $out/Applications/Xcode.app/Contents/Developer
# The native xcodebuild command supports an invocation like "xcodebuild -version -sdk" without specifying the specific SDK, so we simulate this by
# detecting this case and simulating the output; printing the header and appending the normal output via appending the sdk version to the positional
# arguments we pass through to the wrapped xcodebuild.
makeWrapper ${xcbuild}/bin/xcodebuild $out/bin/xcodebuild \
--add-flags "-xcconfig ${xcconfig}" \
--add-flags "DERIVED_DATA_DIR=." \
--set DEVELOPER_DIR "$out" \
--set SDKROOT ${sdkName} \
--run '[ "$#" -eq 2 ] && [ "$1" = "-version" ] && [ "$2" = "-sdk" ] && echo ${sdkName}.sdk - macOS ${sdkVer} \(macosx${sdkVer}\) && set -- "$@" "${sdkName}"' \
--run '[ "$1" = "-version" ] && [ "$#" -eq 1 ] && (echo Xcode ${xcodeVer}; echo Build version ${sdkBuildVersion}) && exit 0' \
--run '[ "$1" = "-license" ] && exit 0'