darwin.developer_cmds: wrap clang -E from clang-wrapped as clang-cpp

authored by Ivan Babrou and committed by Andrew Childs 2eb97f2d bac14180

+4 -3
+4 -3
pkgs/os-specific/darwin/apple-source-releases/developer_cmds/default.nix
··· 1 - { lib, appleDerivation, xcbuildHook, llvmPackages }: 1 + { lib, appleDerivation, xcbuildHook, llvmPackages, makeWrapper }: 2 2 3 3 appleDerivation { 4 - nativeBuildInputs = [ xcbuildHook ]; 4 + nativeBuildInputs = [ xcbuildHook makeWrapper ]; 5 5 6 6 patches = [ 7 7 # The following copied from ··· 11 11 ]; 12 12 13 13 postPatch = '' 14 + makeWrapper ${llvmPackages.clang}/bin/clang $out/bin/clang-cpp --add-flags "--driver-mode=cpp" 14 15 substituteInPlace rpcgen/rpc_main.c \ 15 - --replace "/usr/bin/cpp" "${llvmPackages.clang-unwrapped}/bin/clang-cpp" 16 + --replace "/usr/bin/cpp" "$out/bin/clang-cpp" 16 17 ''; 17 18 18 19 # temporary install phase until xcodebuild has "install" support