From f92e097cd4cfdba43f38a25f858ac15c5d9da44d Mon Sep 17 00:00:00 2001 From: Dan Peebles Date: Tue, 10 Oct 2017 16:41:44 -0400 Subject: [PATCH] xcbuild: add SDKROOT by default to the wrappers This fixes #30269 and lets us do things like `xcrun -find cc`, for example. --- pkgs/development/tools/xcbuild/wrapper.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/xcbuild/wrapper.nix b/pkgs/development/tools/xcbuild/wrapper.nix index ab6605e91b10..2f6b42e7a00e 100644 --- a/pkgs/development/tools/xcbuild/wrapper.nix +++ b/pkgs/development/tools/xcbuild/wrapper.nix @@ -58,11 +58,14 @@ stdenv.mkDerivation { wrapProgram $out/bin/xcodebuild \ --add-flags "-xcconfig ${xcconfig}" \ --add-flags "DERIVED_DATA_DIR=." \ - --set DEVELOPER_DIR "$out" + --set DEVELOPER_DIR "$out" \ + --set SDKROOT ${sdkName} wrapProgram $out/bin/xcrun \ - --set DEVELOPER_DIR "$out" + --set DEVELOPER_DIR "$out" \ + --set SDKROOT ${sdkName} wrapProgram $out/bin/xcode-select \ - --set DEVELOPER_DIR "$out" + --set DEVELOPER_DIR "$out" \ + --set SDKROOT ${sdkName} ''; inherit (xcbuild) meta;