From 2eb97f2ddd3f557c39437c1007b92d51f619628d Mon Sep 17 00:00:00 2001 From: Ivan Babrou Date: Fri, 5 Feb 2021 21:42:42 -0800 Subject: [PATCH] darwin.developer_cmds: wrap clang -E from clang-wrapped as clang-cpp --- .../apple-source-releases/developer_cmds/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix index 77de079e2f0f..f2c4ec32146f 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix @@ -1,7 +1,7 @@ -{ lib, appleDerivation, xcbuildHook, llvmPackages }: +{ lib, appleDerivation, xcbuildHook, llvmPackages, makeWrapper }: appleDerivation { - nativeBuildInputs = [ xcbuildHook ]; + nativeBuildInputs = [ xcbuildHook makeWrapper ]; patches = [ # The following copied from @@ -11,8 +11,9 @@ appleDerivation { ]; postPatch = '' + makeWrapper ${llvmPackages.clang}/bin/clang $out/bin/clang-cpp --add-flags "--driver-mode=cpp" substituteInPlace rpcgen/rpc_main.c \ - --replace "/usr/bin/cpp" "${llvmPackages.clang-unwrapped}/bin/clang-cpp" + --replace "/usr/bin/cpp" "$out/bin/clang-cpp" ''; # temporary install phase until xcodebuild has "install" support