3
0
Fork 0
forked from mirrors/nixpkgs

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

This commit is contained in:
Ivan Babrou 2021-02-05 21:42:42 -08:00 committed by Andrew Childs
parent bac1418031
commit 2eb97f2ddd

View file

@ -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