Skip to content

Commit

Permalink
xcbuild: only override version with 1 arg
Browse files Browse the repository at this point in the history
sometimes we want the "SDK" version from xcbuild so we do something
like:

$ xcbuild -version -sdk MacOSX10.10
SDKSettings.plist - MacOSX10.10 (MacOSX10.10)
SDKVersion: 10.10
Path: /nix/store/6k7crm1n4drf09ga0dwvbmb59x4zl2i2-SDKs/MacOSX10.10.sdk
PlatformPath: /nix/store/vhfwb1znfy65s2xs27j8xribk6mp6lbw-Platforms/MacOSX.platform
ProductName: Mac OS X
ProductVersion: 10.10

This was previously overriden by the current xcode version so you
would get:

Xcode 9.4.1
Build version 17E189

This should fix the other usage of -version in nodejs 6.x.
  • Loading branch information
matthewbauer committed Aug 20, 2018
1 parent cfa4e0a commit b300ddd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/development/tools/xcbuild/wrapper.nix
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ runCommand "xcodebuild-${xcbuild.version}" {
--add-flags "DERIVED_DATA_DIR=." \
--set DEVELOPER_DIR "$out" \
--set SDKROOT ${sdkName} \
--run '[ "$1" = "-version" ] && (echo Xcode ${xcodeVer}; echo Build version ${sdkBuildVersion}) && exit 0' \
--run '[ "$1" = "-version" ] && [ "$#" -eq 1 ] && (echo Xcode ${xcodeVer}; echo Build version ${sdkBuildVersion}) && exit 0' \
--run '[ "$1" = "-license" ] && exit 0'
substitute ${xcode-select} $out/bin/xcode-select \
Expand Down

0 comments on commit b300ddd

Please sign in to comment.